Order Intake API: Errors, Retries and Edge Cases

Every error status and body the Order Intake API returns, what to do about each, safe retry rules, and a checklist of edge cases to handle.

Errors

StatusBodyMeaningWhat to do
401emptyNo or wrong credentials, no key yet, or the store is deactivatedCheck the username and key. Ask your customer if they rotated the key or deactivated the store. Don't retry in a loop.
404{"errors": ["Please check your store number"]}{store_id} belongs to a different store than these credentialsUse the store ID that goes with this username.
404{"errors": [...]} from createMissing or invalid fields, malformed JSON, or the store's import filterFix what's listed and send again. Don't retry a filtered order.
404{"error": "could not find order"}No order with that ID or order_number in this storeCheck the ID, or use ?order_number=.
404{"errors": ["could not find item"]}No such line on the order, or it was deletedRe-read the order's items.
400{"errors": [...]}Invalid update, such as a SKU change or a quantity below 1Fix the request.
400{"errors": "supplied updated time is invalid"}updated_at_start or updated_at_end isn't RFC 3339Use a format like 2026-10-26T14:30:00Z.
400{"errors": ["supplied cursor is invalid"]}cursor isn't a next_cursor from this APIStart again from the first page, or resend the next_cursor you got.
403{"errors": ["Order can no longer be modified"]}The order isn't unverified any moreDon't retry. Contact your customer.
409{"errors": ["Order is being updated, try again"]}Another change to this order is in progressRetry after a second or two.
500{"error": "...", "request_id": "..."}Unexpected errorRetry with backoff. If it keeps happening, send the request_id to your customer.

Three error shapes

Parse errors defensively. There are three shapes:

ShapeWhen
{"errors": ["...", "..."]} (a list)Almost everything
{"error": "..."} (a string, singular key)An unknown order, and 500s (with request_id)
{"errors": "..."} (a string)A malformed updated_at_start or updated_at_end

And a 401 has no body at all.

def error_messages(response):
    if response.status_code == 401 or not response.content:
        return ["unauthorized"]
    body = response.json()
    value = body.get("errors", body.get("error"))
    return value if isinstance(value, list) else [value]

Validation is 404 on create, 400 on update

Create returns validation errors as 404. Updates and item changes return 400. Read the errors list either way.

Concurrency and retries

  • One change at a time per order. If two requests change the same order at once, one can get 409. Send changes to the same order in sequence, and retry a 409 after a second or two.
  • Parallel across orders is fine. Creating or reading different orders in parallel works. Keep it to a handful of concurrent requests per store.
  • Retry safely. Creates are idempotent on order_number, and reads have no side effects. Retry timeouts, 409 and 5xx with exponential backoff.
  • Don't retry unchanged: 400, 401, 403 and 404. They won't succeed without a change.
  • Log the request ID. A 500 has a request_id. Include it when you report a problem to your customer.
ResponseRetry?
Timeout, connection errorYes, with backoff. A repeated create returns the existing order.
409Yes, after 1–2 seconds
5xxYes, with exponential backoff
400, 404No. Fix the request.
403No. The warehouse has started; contact your customer.
401No. Pause the store and alert your customer.

Edge cases checklist

AreaWhat to handle
DuplicatesSending an order number that already exists returns the existing order with 200, even if it's cancelled. Order numbers can't be reused in a store.
Order numbersA number is stored as text: 10001 and "10001" are the same order.
AddressesResponses return the verified address, which can differ from what you sent.
Before a labelOrders with no label have "shipments": [].
Several shipmentsAn order can have more than one shipment (split, partial or replacement).
Several boxesA shipment can have several parcels, each with its own tracking number.
Merged ordersA shipment can belong to several of your orders. Write tracking to each one in orders.
Voided labelsThe voided shipment disappears. A replacement label is a new shipment with a new id.
No labelAn order can be fulfilled with no shipments (shipped without a Warehance label).
Skipped statesAn order can go straight from unfulfilled to fulfilled.
Warehouse cancelsThe warehouse can cancel an order at any point before it ships.
Split or mergedThese orders can't be edited, even while still unfulfilled.
ItemsDeleted lines disappear from responses. A line's SKU can't change. sku_id can be null while your customer maps a SKU.
Currencycurrency is set on create and can't change. All amounts and item prices are in it.
Unknown shipmentGET /shipments/{id}.json returns 200 with {"shipment": null}.
Error shapes{"error": "..."}, {"errors": "..."} and {"errors": [...]} all occur. A 401 is empty.
Error codesValidation errors return 404 on create and 400 on updates.

Did this page help you?