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"
}
]
}| Field | Description |
|---|---|
type | URI reference that identifies the problem type. about:blank means the problem has no meaning beyond its HTTP status. |
title | Short summary of the problem type. For about:blank, the HTTP status phrase. |
status | The HTTP status code. Always equal to the response status. |
detail | Human-readable explanation of this occurrence. |
instance | URI reference for this occurrence, typically the request path. |
errors | Always present. The list of errors that caused the request to fail. |
Each item in errors has:
| Field | Description |
|---|---|
code | Required. Machine-readable error code. |
message | Required. Human-readable description of the error. |
details | Additional context or field-level detail. |
pointer | JSON 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
| Status | Meaning | What to do |
|---|---|---|
400 Bad Request | The 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 Unauthorized | The 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 Forbidden | The request isn't permitted. | Check your access. See API scopes. |
404 Not Found | The resource doesn't exist. | Check the IDs in the path. |
409 Conflict | The resource's state prevents the operation. Documented for Initiate faster payout. | Check the resource's current state before retrying. |
429 Too Many Requests | You exceeded the applicable rate limit. | Back off and retry. |
500 Internal Server Error | An unexpected error occurred. | Retry with backoff. |
501 Not Implemented | The operation isn't supported. Documented for some Payments operations. | Don't retry. |
502 | A service the token endpoint depends on is temporarily unavailable. Authorization API only. | Retry the request. |
503 Service Unavailable | The 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:
| Header | Description | Where it's documented |
|---|---|---|
X-RateLimit-Limit | Request quota for the current window. | Shipping Management 429 responses; Get WFS inventory items |
X-RateLimit-Remaining | Requests remaining in the current window. | Shipping Management 429 responses; Get WFS inventory items |
X-RateLimit-Reset | Epoch seconds when the current window resets. | Shipping Management 429 responses |
Retry-After | Seconds 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
- Retry only what can succeed. Retry
429,500,502and503, and network timeouts. Don't retry other4xxresponses without changing the request. - Honor the server's timing. If the response includes
Retry-After, wait at least that many seconds. If it includesX-RateLimit-Reset, wait until that time. - Otherwise, back off exponentially. Wait 1 second, then 2, then 4 and so on, add random jitter, and cap the number of attempts.
- Be careful with writes. The APIs don't define an idempotency key. Before you retry a
POSTthat 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. - 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.
