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
| HTTP | Code | What to do |
|---|---|---|
| 401 | INVALID_API_KEY | The key is missing, wrong, revoked or for the other environment. |
| 403 | MERCHANT_NOT_ACTIVE | Your Selligate account isn’t active. Contact Selligate support. |
| 403 | SANDBOX_ONLY | Simulate only works in the sandbox, with a test key. |
| 404 | ORDER_NOT_FOUND | No order with that id on your account. |
| 404 | NOT_FOUND | The URL doesn’t exist. Check the path and base URL. |
| 409 | ORDER_NOT_CANCELLABLE | The order has already left and can’t be cancelled. |
| 409 | INVALID_TRANSITION | Simulate can’t make that move, e.g. assigned → returned. |
| 422 | VALIDATION_ERROR | A field is missing or invalid. See fields. |
| 422 | UNKNOWN_STATE | customer.state isn’t a Nigerian state. See List states. |
| 422 | UNKNOWN_PRODUCT | A product_code isn’t one of your products. fields says which item. |
| 422 | NO_COVERAGE | No single agent in that state holds every item in the quantities asked. Split the order or restock. |
| 429 | RATE_LIMITED | Too many requests. Wait a moment and try again. |
| 5xx | Something 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.