Guidelines and Conventions

Before you start using the API, we recommend you review these guidelines.

Protocol support

Use HTTPS. An http:// request gets a 301 redirect to https://, and many HTTP clients turn a redirected POST into a GET, so a POST sent over HTTP can fail.

UTF-8 Support

The Yotpo API calls support special characters according to the UTF-8 coding.

Data Format

Data must be in JSON format. As such, the HTTP header content-type must be set to: application/json

Pagination

Two pagination styles are in use, depending on the endpoint:

EndpointsParametersHow to get the next page
/core/v3/... (orders, fulfillments, products, variants, customers)limit (1 to 100, default 100) and page_infoSend the pagination.next_page_info value from the response as page_info. When it's null, you've reached the last page.
/v2/{account_id}/... (reviews, products, questions, orders)page (page number) and count (results per page)Increase page by 1 until a page returns fewer than count results.

Rate limiting

Rate limits apply to your app per store: each store your app is installed on has its own allowance. They depend on the endpoint:

EndpointsLimit
/core/v3/...: orders, fulfillments, products, variants, customers, segments, webhooks5 requests per second
/v2/{store_id}/moderation/reviews5 requests per second
/loyalty/v3/..., and the token and Remove Application endpoints100 requests per minute and 6,000 per hour
Other /v2/... endpoints: reviews, products, questions, comments20,000 requests per minute and 1,000,000 per hour

A few stores have lower limits for some endpoints. Always go by the headers below rather than the table.

Every response tells you where you stand:

HeaderMeaning
RateLimit-LimitThe limit for the current window.
RateLimit-RemainingRequests left in the current window.
RateLimit-ResetSeconds until the window resets.
X-RateLimit-Limit-Second, X-RateLimit-Limit-Minute, X-RateLimit-Limit-HourThe limit for each window that applies to the endpoint.
X-RateLimit-Remaining-Second, -Minute, -HourRequests left in each of those windows.

Over the limit, you get 429 with a Retry-After header (seconds to wait):

{
  "message": "API rate limit exceeded",
  "request_id": "41c1544aa131c145725e5862fea4c031"
}

To stay within the limits:

  • Wait for Retry-After seconds before retrying, and spread requests out rather than sending them in bursts.
  • Only fetch the data your app needs, and cache data that changes rarely.
  • Watch RateLimit-Remaining and slow down before it reaches 0.

Parameters

Email and URL parameters you send in the calls must be in the correct format.

Status codes and errors

The API uses standard HTTP status codes. Errors lists the codes it returns, the exact error bodies, and how to handle each one.