Get started
Errors
Errors return a non-2xx status and a JSON body with a stable code and a readable message.
Shape
Branch on error.code, not on the message. Validation errors add a details array with one entry per problem.
json
{
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid request parameters",
"details": ["rates[0].origin must be a 2-letter ISO country code"]
}
}Codes
| Status | Code | Meaning |
|---|---|---|
| 400 | VALIDATION_ERROR | The body failed validation. `details` lists every problem. |
| 401 | MISSING_API_KEY | No X-API-Key header. |
| 401 | INVALID_API_KEY_FORMAT | The key does not start with tflo_. |
| 401 | INVALID_API_KEY | The key is unknown, revoked or wrong. |
| 401 | EXPIRED_API_KEY | The key has passed its expiry date. |
| 403 | INSUFFICIENT_PERMISSIONS | The key lacks a scope the endpoint requires. `details` lists both. |
| 403 | ECCN_NOT_ENABLED / ORIGIN_NOT_ENABLED | The feature is not enabled for your organization. |
| 404 | NOT_FOUND | No job with this id exists in your organization. |
| 413 | FILE_TOO_LARGE / TOO_MANY_ITEMS | A batch is over its size limit. |
| 429 | RATE_LIMIT_EXCEEDED / DAILY_RATE_LIMIT_EXCEEDED | Too many requests. Wait `retryAfter` seconds. |
| 500 | INTERNAL_SERVER_ERROR | Something failed on our side. Retry with backoff. |
Failed jobs
A job that was accepted and then failed does not change the HTTP status of the poll. GET on the job returns 200 with "status": "failed" and an error object.