Skip to main content

Errors

Partner API domain errors and string-based HTTP errors usually use:

{
"error": "not_found",
"message": "Product not found or access denied"
}

Some endpoints return a structured detail object, and FastAPI request-schema validation can return its standard detail array. Feed endpoints also publish a typed feed-error envelope with an action and status URL. Generate clients from the current environment OpenAPI and handle the documented error shape for the endpoint rather than assuming one universal body.

Common statuses

StatusMeaningClient action
400Domain rule or request rejectedCorrect the request or business state; inspect error, message, or detail.
401Missing, expired, or invalid credentialRefresh the marketplace session and exchange again where appropriate.
402Account entitlement or count limit deniedDo not retry. Read the feature/limit fields and coordinate account access; paid checkout is currently disabled.
403Authenticated identity lacks permissionDo not switch seller IDs. Confirm the signed-in seller and required capability.
404Resource absent or hidden by seller scopingTreat as not found; do not use response differences to probe ownership.
409Duplicate, replay, or state conflictRead the current resource, reconcile idempotency, then decide whether a new operation is valid.
413Feed/upload exceeds the runtime envelopeRead /products/feed-contract, split the file, and use a new stable key for each part.
422Request or feed validation failedCorrect fields or rows using the returned validation details.
429Request limit reachedRespect Retry-After when present and use bounded backoff.
500Unexpected server failureRetain the request ID; retry only when the operation is replay-safe.
502 / 503Upstream or service unavailableUse bounded retry only for idempotent reads or replay-safe writes.

Domain error codes

Common machine-readable codes include:

  • validation_error
  • business_rule_violation
  • invalid_state
  • expired
  • insufficient_balance
  • not_found
  • access_denied
  • conflict
  • internal_error

Codes and fields outside this list can exist for a specific module. Branch on the current response contract, not the human-readable message.

Correlation and safe retry

Responses passing through the Partner API request-context middleware include X-Request-ID. Retain it with:

  • method and path;
  • timestamp;
  • seller-safe resource IDs;
  • idempotency key, if used;
  • response status and body; and
  • the current state observed before retry.

Never blindly retry a write after a timeout or 5xx. First read the resource or idempotency record to determine whether the operation committed. Feed runs and other replay-safe workflows document their own keys and status endpoints.

Examples

Domain/HTTP error:

{
"error": "invalid_state",
"message": "Cannot accept order in status 'shipped'"
}

FastAPI request validation can instead resemble:

{
"detail": [
{
"type": "missing",
"loc": ["body", "business_name"],
"msg": "Field required"
}
]
}

Use Authentication for credential failures and Seller Integration Program for feed and replay handling.