Errors and limits
Every error comes in the same shape, with a code your system can rely on.
Errors
code is for your system and never changes, message is for a person, and details, when there is one, says what was wrong field by field.
{
"error": {
"code": "validation_failed",
"message": "Some items are not valid, so none were added.",
"details": {
"items.1.location_path": [
"No location with that path in this inventory. Its locations: Garage; Garage > Shelf 2."
]
}
}
}
| Code | Status | When |
|---|---|---|
unauthenticated | 401 | No key, a key that doesn't exist, or one that was revoked. |
key_expired | 401 | The key has expired. Make a new one. |
forbidden | 403 | The key wasn't made to make that change, or your role doesn't allow it. |
plan_required | 403 | The inventory's owner isn't on Business. |
not_found | 404 | It doesn't exist, or your key can't reach it. |
validation_failed | 422 | Something you sent isn't valid. details says what, field by field. |
conflict | 409 | It clashes with how things are, such as checking out an item that's already out, or an Idempotency-Key used for a different request. |
rate_limited | 429 | Too many requests. Wait for the seconds in Retry-After. |
server_error | 500 | Something went wrong on our side. Try again, and tell us if it keeps happening. |
Limits
- 120 calls a minute for each key.
- 600 calls a minute across all the keys reaching one Business's inventories.
- 100 items in one call to add items, and 200 in a page.
Every reply says how many calls you have left this minute in X-RateLimit-Remaining. Over the limit you get rate_limited with a Retry-After header, in seconds. If your system needs more, tell us.