Errors and limits
The error shape#
Every error answers the same way:
{"error": {"code": "price_changed", "message": "The delivery price changed from KES 240.00 to KES 300.00. Confirm the new price to send it.",
"request_id": "9f2c1e…", "old_fee": "240.00", "new_fee": "300.00"}}
Branch on code; show message to people. Quote request_id when asking for help.
Common codes#
| HTTP | Code | Meaning |
|---|---|---|
| 401 | missing_key, invalid_key, key_expired | No key, a wrong key, or an expired one (a live key on a test server, or the other way round, is invalid_key). |
| 403 | ip_not_allowed, scope_missing, owner_inactive | The key can't be used from here, lacks the scope, or the store is not active. |
| 403 | test_only | Only test keys can simulate. |
| 404 | not_found | No such delivery for this store. |
| 400 | invalid_order, validation_error, invalid_quote | Something in the request is wrong. |
| 409 | not_approved, price_changed, wallet_short, needs_address, needs_price, not_cancellable, in_progress | See Approve and ready. |
| 429 | rate_limited, quote_limit | Slow down (retry_after_s). |
Limits#
- 120 requests a minute per key. Every answer has
X-RateLimit-LimitandX-RateLimit-Remaining. - 2000 prices a day per store.
- Every answer has
X-Request-Id.