HTTP status codes
| Code | Meaning |
|---|---|
200 |
Success — check the body, see below |
400 |
Validation failure, or a request the handler could not process |
401 |
Missing, wrong or expired token; or a suspended account |
403 |
Authenticated but not permitted for this resource |
404 |
Unknown route, or an object you cannot see |
422 |
Laravel validation failure |
429 |
Rate limited. With an API key, see §15 |
402 |
API keys only. The account is locked for non payment, or its balance has passed the agreed credit limit. Distinct codes, see §15 |
500 / 504 |
Server error / timeout — usually too wide a date range |
A note on 402 for client authors: it is deliberately not 401. A 401 makes most HTTP clients discard the session and re-authenticate, which is the wrong response to an unpaid bill. Treat 402 as "stop, tell a human, retry later with the same credential".
status in the body
A 200 does not mean success. Most v1 endpoints return status: 0 with an
error body and an HTTP 200. Always check both.
{ "status": 1, "items": [ … ] }
{ "statusCode": 400, "status": 0,
"message": "The device ids field is required.",
"errors": { "device_ids": ["The device ids field is required."] } }
{ "statusCode": 404, "status": 0,
"message": "The endpoint you are looking for could not be found.",
"errors": { "id": "The endpoint you are looking for could not be found." } }
"Whoops, looks like something went wrong."
A generic handler that masks the real cause. In practice it means a malformed parameter that failed past validation. Check first:
- a datetime where a
YYYY-MM-DDdate was required (§3.2) device_idssent as a scalar rather than an array- a date range wider than the endpoint can serve