Before you launch

Errors & limits

Errors use normal HTTP status codes, plus a stable code your system can check and a message written for people.

{
  "success": false,
  "message": "Unknown state \"Lagoss\". Use a Nigerian state name, e.g. \"Lagos\" or \"Federal Capital Territory\" (see GET /v1/locations).",
  "code": "UNKNOWN_STATE",
  "fields": {
    "customer.state": ["Unknown state."]
  }
}

fields appears when specific fields are wrong. Its keys are the field names you sent.

Error codes

HTTPCodeWhat to do
401INVALID_API_KEYThe key is missing, wrong, revoked or for the other environment.
403MERCHANT_NOT_ACTIVEYour Selligate account isn’t active. Contact Selligate support.
403SANDBOX_ONLYSimulate only works in the sandbox, with a test key.
404ORDER_NOT_FOUNDNo order with that id on your account.
404NOT_FOUNDThe URL doesn’t exist. Check the path and base URL.
409ORDER_NOT_CANCELLABLEThe order has already left and can’t be cancelled.
409INVALID_TRANSITIONSimulate can’t make that move, e.g. assigned → returned.
422VALIDATION_ERRORA field is missing or invalid. See fields.
422UNKNOWN_STATEcustomer.state isn’t a Nigerian state. See List states.
422UNKNOWN_PRODUCTA product_code isn’t one of your products. fields says which item.
422NO_COVERAGENo single agent in that state holds every item in the quantities asked. Split the order or restock.
429RATE_LIMITEDToo many requests. Wait a moment and try again.
5xxSomething went wrong on our side. Retry with the same external_id; you won’t get a duplicate.

Rate limits

Each secret key can make 60 requests a minute. Over that, requests get 429 RATE_LIMITED until the minute is up.

If you need to send a large batch, spread it out, or wait and retry when you get a 429. Rather than checking order status repeatedly, use webhooks.

Retrying safely

Creating an order is idempotent on external_id. If a request times out and you’re not sure it worked, send it again with the same external_id. If the order exists you get it back with 200 instead of 201.