Skip to content

    API reference

    Errors

    Errors use standard HTTP status codes and a JSON body with a machine-readable error code and a readable message. Branch on the code, not the message; messages may be reworded.

    json
    {
      "error": "not_found",
      "message": "Item not found"
    }
    

    Some errors add fields. A validation_error for a body field includes a details list, and item_limit_reached adds the plan's numbers:

    json
    {
      "error": "item_limit_reached",
      "message": "You've reached your starter plan limit of 1000 items. Upgrade your plan to add more items.",
      "limit": 1000,
      "currentUsage": 1000,
      "currentPlan": "starter"
    }
    

    Error codes

    Status Code When
    400 validation_error A body field or query parameter is missing or invalid, or the body isn't valid JSON. Body field failures include a details list.
    400 variant_structure_immutable An item body names a variant-structure field (parentItemId, variantValues, variantOptions, variantPosition). Variant groups can't be built or reshaped through the API.
    400 invalid_event An event name isn't one of the six (POST /hooks, GET /events).
    400 invalid_target_url A subscription URL breaks the URL rules.
    401 unauthorized The Authorization header is missing or malformed; the key is unknown or revoked; the person who created it is no longer an Owner or Admin of the organization; or the organization was closed. On the inbound receiver: a missing, stale or wrong signature.
    402 subscription_required The organization's plan doesn't allow the request. See Subscription status.
    403 forbidden The key doesn't have the permission this endpoint needs.
    403 item_limit_reached Your plan's item limit is reached. The body adds limit, currentUsage and currentPlan.
    404 not_found There's no such item, subscription or inbound webhook in this organization.
    404 folder_not_found The folder isn't a folder of this organization, or was deleted.
    409 ambiguous_identifier An identifier or SKU matches more than one item. See Identifying an item.
    409 duplicate_sku Another item already has this SKU: exactly, archived items included, or ignoring letter case and surrounding spaces, among items that aren't archived.
    409 duplicate_barcode Another item that isn't archived already has this barcode.
    409 item_archived The item is archived, so the API won't change it. Restore it in the app first. (Inbound webhooks answer 200 with processed: false and reason: "Item is archived" instead; see Receive stock updates.)
    409 variant_parent_not_stockable A stock change, SKU, barcode or price was sent to a variant group. Send it to one of its variations.
    409 variant_child_field_inherited A folder change was sent to a variation; change its group instead. In the rare case the item became a variation during the request, the code is variant_field_owned_by_parent, with the same meaning.
    409 hook_limit_reached The organization already has 50 subscriptions made through the API.
    413 payload_too_large The body is over 5 MB (1 MB on the inbound receiver), or a form body has more than 1,000 fields.
    429 rate_limited You're over the rate limit. The response has a Retry-After header.
    500 internal_error Something went wrong on our side. Retry after a short wait.
    500 processing_error Inbound receiver only: the update couldn't be applied.

    Each endpoint's page lists the codes that endpoint can return.

    Other error responses

    One response is answered before a request reaches the API, so it doesn't follow the table above:

    • A client that keeps sending after a 429 can reach a wider limit, whose 429 has error: "RATE_LIMITED" in capitals. See Rate limits.