Errors

Every status code the Yotpo APIs return, the real error bodies on each host, and what to do about each one.

Check the HTTP status code first. The error body depends on which host you called, and a few errors are plain text even when the Content-Type header says JSON, so parse defensively.

You callWhoError bodies
api.yotpo.comMerchants, with a store access token (V3, Reviews V1, Core V1)api.yotpo.com
developers.yotpo.comApp partners, with a per-store OAuth tokendevelopers.yotpo.com
api-cdn.yotpo.com, storefront.yotpo.com/loyaltyAnyone; no tokenStorefront endpoints
loyalty.yotpo.comLoyalty API (V2)Loyalty API errors

Status codes

CodeMeaningCommon causes
200 / 201SuccessUpdates (PATCH) and some writes return 200 with an empty body. Storefront endpoints also return 200 with no data for a product ID Yotpo doesn't know.
400The request is invalidA missing required field (customer must be supplied), a wrong format (order_date_min without a time), a page size over 100, or a body the server can't parse. Wrong client credentials when you request a token.
401Not authenticatedAn invalid or expired access token. On developers.yotpo.com, also a token sent as Authorization: Bearer, or a store whose merchant uninstalled your app.
403Forbiddenapi.yotpo.com: no X-Yotpo-Token header. developers.yotpo.com: an app-level webhook path called with the numeric app ID instead of your app's client ID.
404Not foundAn unknown Yotpo ID or store ID, an external_product_id that isn't in your catalog, or a path the API doesn't serve.
405Method not allowedapi.yotpo.com only: an HTTP method the path doesn't support. developers.yotpo.com returns 404 instead.
409Already existsCreating a product, variant, collection, order or fulfillment whose external_id is already in use.
422Related object not foundA webhook subscription that refers to a target or filter that doesn't exist.
429Too many requestsYou went over the rate limit. See 429 Too Many Requests.
5xxServer errorA problem on Yotpo's side. See 5xx Server errors.

Each endpoint's reference page lists the other errors it returns, with example bodies.

api.yotpo.com (V3 and V1)

Standard V3 error

Most 400, 404, 405, 409 and 422 responses:

{
  "errors": [
    {
      "message": "product already exists"
    }
  ]
}

The message says what's wrong in plain English. Log it, but don't parse it: the wording isn't a stable contract.

Other V3 error shapes

WhereStatusBody
Missing X-Yotpo-Token header403{"message": "Forbidden"}
Invalid or expired token401Plain text: unauthorized (no JSON)
Rate limit exceeded429{"message": "API rate limit exceeded", "request_id": "3558bb15ae77d746ad12257fbe748529"}
Malformed or incomplete body on products, variants and some customer filters400application/problem+json: {"type": "about:blank", "title": "Bad Request", "status": 400, "detail": "Invalid request content.", "instance": "/v3/stores/YOUR_STORE_ID/products"}
A path that doesn't exist, or a non-numeric Yotpo ID404{"status": 404, "error": "Not Found"} when you send Accept: application/json; otherwise an HTML page. Here status is a number, not an object.

Access token errors

CauseStatusBody
Wrong or missing secret (V3 POST /access_tokens)401{"errors": [{"message": "The Store ID or Secret you have provided is invalid."}]}
Unknown store ID (V3)404{"status": 404, "error": "Not Found"}
Wrong client_secret (V1 POST /oauth/token)400{"error": "invalid_client"}
grant_type missing or not client_credentials (V1)400{"error": "unsupported_grant_type"}
Unknown client_id (V1)404The V1 error shape below, with "message": "Couldn't find Account"

V1 error shape

V1 endpoints (/apps/... and /v1/apps/...) return:

{
  "status": {
    "message": "You are not authorized to access this page.",
    "code": 401,
    "error_type": "Exceptions::AccessDenied",
    "uuid": "6bb905f3-96f2-48ac-a87c-c7264aab4e38"
  }
}

Log the uuid: Yotpo support can use it to find the request. V1 validation errors on order calls list each problem, with the uuid at the top level: {"code": 400, "uuid": "17552b78-3a8d-4932-bf31-81597fdebb6f", "errors": [{"order_num": 1, "order_id": "order_1", "field": "email", "error": "missing mandatory field"}]}.

developers.yotpo.com (app partners)

Authentication errors (401)

CauseBody
No token, or the token sent only as Authorization: Bearer{"error": "invalid_request", "error_description": "The access token is missing"}
A token that's wrong, revoked or expired, or a store token from api.yotpo.com{"error": "invalid_token", "error_description": "The access token is invalid or has expired"}

invalid_request means the API didn't find a token at all: send it in the X-Yotpo-Token header. invalid_token means it found one but can't use it. App tokens don't expire on their own, so this usually means the merchant uninstalled your app.

Forbidden (403)

The app-level webhook endpoints (/core/v3/applications/{application_id}/...) take your app's client ID as application_id: the 32-character Application ID you got when you registered your app. With the numeric app ID they return {"message": "Forbidden"}.

Paths the API doesn't serve (404)

{
  "message": "no Route matched with those values",
  "request_id": "5b943f4c94d45a495bc5fe7094092e60"
}

This includes a real path called with the wrong method: you get 404, not 405. Check the method and path against the reference page. Log request_id and include it when you contact Yotpo.

Token endpoint errors (POST /v2/oauth2/token)

CauseStatusBody
Wrong client_id or client_secret400400 BAD_REQUEST "{"error":"invalid_client","error_description":"Invalid client authentication"}"
A required field is missing, for example redirect_uri or client_id400Plain text, for example No value for field: "No value for field: "redirect_uri" provided." provided.

These bodies aren't valid JSON, even though Content-Type is application/json. Read the status code, then search the body for the error name (invalid_client) or the missing field. Send client_id and client_secret in the request body: an Authorization: Basic header isn't read.

Storefront endpoints

Storefront endpoints (api-cdn.yotpo.com and storefront.yotpo.com/loyalty) need no token, so they don't return 401.

CauseStatusBody
Unknown store ID (api-cdn.yotpo.com)404Plain text: Account not found
A required query parameter is missing, for example page or perPage on Retrieve bottomline scores400{"type": "about:blank", "title": "Bad Request", "status": 400, "detail": "Required parameter 'perPage' is not present.", "instance": "..."} (application/problem+json)
reviewType missing on Retrieve top reviews400Plain text: Invalid Request
A required body field is missing on Product Potential Points, for example product_id400{"error": "Missing body parameter 'product_potential_points.product_id'."}

Storefront endpoints don't return 404 for a product ID Yotpo doesn't know. They return 200 with no reviews:

{
  "pagination": { "page": 0, "perPage": 5, "total": 0 },
  "bottomline": { "totalReview": 0, "averageScore": 0.0 },
  "products": [],
  "reviews": []
}

To tell "no reviews yet" apart from "wrong product ID", check that you're sending the product ID the store's e-commerce platform sends to Yotpo.

How to handle each error

400 Bad Request

Fix the request before sending it again. The message names the field. Check the endpoint's reference page for required fields and formats; a retry without changes fails the same way.

401 Unauthorized

  • Store token (api.yotpo.com): request a new access token with Generate access token and retry the call once. If it fails again, the secret or store ID is wrong: stop and check your configuration instead of looping.
  • App token (developers.yotpo.com), invalid_request: send the token in the X-Yotpo-Token header. Authorization: Bearer isn't read.
  • App token, invalid_token: check that you're using the token for this store, since each store that installed your app has its own token. If the token was working before, the merchant has probably uninstalled your app. After 3 401 responses in a row for a store that used to work, mark the integration as disconnected and let the merchant reinstall it (see Authenticating with OAuth 2.0).

Don't retry a 401 in a loop: it won't succeed until the token changes.

403 Forbidden

On api.yotpo.com, the request has no X-Yotpo-Token header: add it. On developers.yotpo.com, check that application_id in the path is your app's client ID, not the numeric app ID. There's nothing to retry.

404 Not Found

Check the ID and the path. For orders, a 404 with products not found: ... means a line item refers to a product that isn't in your catalog yet: create the product first, then resend. On developers.yotpo.com, no Route matched with those values means the method or path is wrong.

409 Conflict

An object with that external_id already exists. If you're retrying a create after a timeout or a 5xx, a 409 usually means your first attempt succeeded: look the object up (for example Retrieve products with external_ids) instead of creating it again. See Idempotency.

429 Too Many Requests

On api.yotpo.com, the limit is 5 requests per second per store, shared by every integration using that store ID. On developers.yotpo.com, limits are per endpoint and store; see App partners guidelines and conventions. Every response carries these headers:

HeaderDescription
RateLimit-LimitRequests allowed in the window
RateLimit-RemainingRequests left in the current window
RateLimit-ResetSeconds until the window resets (for example 1)
Retry-AfterOn 429 only: seconds to wait before retrying

Wait for Retry-After (or RateLimit-Reset) seconds, then retry. If you keep getting 429, double the wait each time. To avoid it, pace your requests: when RateLimit-Remaining reaches 0, pause until the window resets. See Rate limiting for bulk-sync patterns.

5xx Server errors

Retry with exponential backoff (1 s, 2 s, 4 s, then give up and alert). Reads and PATCH updates are safe to retry. Before retrying a POST create, remember the first attempt may have gone through: retry it, and treat a 409 as success.

What to log

For every failed call, log:

  • The time (UTC), HTTP method, host and path, with your store ID
  • The status code and the full response body
  • The external_id of the object you were sending
  • The request_id from a 429 or 404 body, or the uuid from a V1 error, when present

Never log the API secret, an app secret or an access token. When you contact Yotpo support, include the method, path, time and status code, plus any request_id or uuid.


Did this page help you?