Skip to Content

Rate limiting and errors

The error response shapes, status codes and rate limit headers the Marketplace APIs use, and how to retry safely.

When a request fails, the Marketplace APIs return an HTTP status code and a JSON body that tells you what went wrong. This page describes those responses and how to handle them, including rate limiting.

Error response shape

Most APIs return an RFC 9457 problem details object with an errors array:

{
  "type": "about:blank",
  "title": "Bad Request",
  "status": 400,
  "instance": "/v4/orders",
  "errors": [
    {
      "code": "VALIDATION_ERROR",
      "message": "pageSize must be between 1 and 200",
      "details": "pageSize=500"
    }
  ]
}
FieldDescription
typeURI reference that identifies the problem type. about:blank means the problem has no meaning beyond its HTTP status.
titleShort summary of the problem type. For about:blank, the HTTP status phrase.
statusThe HTTP status code. Always equal to the response status.
detailHuman-readable explanation of this occurrence.
instanceURI reference for this occurrence, typically the request path.
errorsAlways present. The list of errors that caused the request to fail.

Each item in errors has:

FieldDescription
codeRequired. Machine-readable error code.
messageRequired. Human-readable description of the error.
detailsAdditional context or field-level detail.
pointerJSON Pointer to the request-body member the error is about, for example #/orderLines/0/quantity. Present only for request-body validation errors, and only in APIs that define it.

Handle errors by their code, not by the message or detail text. Error codes are open-ended strings, so be ready for codes you haven't seen: handle an unknown code by its HTTP status. Ignore response members you don't recognize.

Two exceptions

The Product Pricing API returns the errors array itself as the error body, without the problem details wrapper. The Authorization API returns OAuth 2.0 errors with error, error_description and error_uri. See OAuth 2.0 authorization.

Status codes

StatusMeaningWhat to do
400 Bad RequestThe request is invalid: a malformed body, a missing required field, an unknown enum value or an unsupported filter.Fix the request. Don't retry it unchanged.
401 UnauthorizedThe token is missing, expired or invalid. Documented by the Payments, Messaging, Notifications, Solicitations and Shipping Management APIs, and by the token endpoint.Get a new access token and retry once.
403 ForbiddenThe request isn't permitted.Check your access. See API scopes.
404 Not FoundThe resource doesn't exist.Check the IDs in the path.
409 ConflictThe resource's state prevents the operation. Documented for Initiate faster payout.Check the resource's current state before retrying.
429 Too Many RequestsYou exceeded the applicable rate limit.Back off and retry.
500 Internal Server ErrorAn unexpected error occurred.Retry with backoff.
501 Not ImplementedThe operation isn't supported. Documented for some Payments operations.Don't retry.
502A service the token endpoint depends on is temporarily unavailable. Authorization API only.Retry the request.
503 Service UnavailableThe capability is temporarily disabled or a dependency is in maintenance. Documented for several Orders operations.Retry after the Retry-After interval.

For example, Get orders returns 400 with the code FILTER_NOT_SUPPORTED when you pass a filter the Orders API doesn't support yet, such as more than one value in orderStatuses.

Rate limiting

Most operations document 429 Too Many Requests, returned when you exceed the applicable rate limit. The body uses the API's normal error shape.

Some APIs also tell you where you stand against the limit:

HeaderDescriptionWhere it's documented
X-RateLimit-LimitRequest quota for the current window.Shipping Management 429 responses; Get WFS inventory items
X-RateLimit-RemainingRequests remaining in the current window.Shipping Management 429 responses; Get WFS inventory items
X-RateLimit-ResetEpoch seconds when the current window resets.Shipping Management 429 responses
Retry-AfterSeconds to wait before retrying.Orders 503 responses

Get WFS inventory items returns at most 300 items per page. Requests for more than 100 items per page receive the X-RateLimit-Limit and X-RateLimit-Remaining headers.

Retry safely

  1. Retry only what can succeed. Retry 429, 500, 502 and 503, and network timeouts. Don't retry other 4xx responses without changing the request.
  2. Honor the server's timing. If the response includes Retry-After, wait at least that many seconds. If it includes X-RateLimit-Reset, wait until that time.
  3. Otherwise, back off exponentially. Wait 1 second, then 2, then 4 and so on, add random jitter, and cap the number of attempts.
  4. Be careful with writes. The APIs don't define an idempotency key. Before you retry a POST that may have reached the server, such as shipping, cancelling or refunding order lines, read the resource first to check whether the change already took effect.
  5. Stay under the limit. Cache access tokens and reference data, use bulk operations and feeds for large updates, and subscribe to notifications instead of polling.

SDKs retry for you

By default, the official SDKs retry 408, 429, 500, 502, 503 and 504 responses to GET, HEAD, PUT and OPTIONS requests, up to three times with exponential backoff. They don't retry POST requests unless you configure them to. See Integrate with SDKs and AI tools.

On this page