Errors
Errors use one shape. Branch on code. Don't branch on message; it may change. OAuth endpoints answer in the shape the OAuth spec defines instead.
Retry 429 and 5xx responses with backoff. Honor Retry-After when present.
| HTTP | code | When |
|---|---|---|
| 400 | missing_version | No Flashline-Version header. |
| 400 | unsupported_version | A version this API does not serve. |
| 401 | unauthorized | Missing, unknown or revoked token. |
| 404 | not_found | Nothing with that id on this team. |
| 422 | validation_failed | The request is invalid. error.errors lists the fields. |
| 429 | rate_limited | Too many requests: 600 per hour per connected team. Wait for Retry-After seconds. |
| 500 | server_error | Flashline could not complete the request. |
| 501 | not_implemented | A documented endpoint that is not live yet. |
Error response
// 401 Unauthorized
{
"error": {
"code": "unauthorized",
"message": "This access token is unknown or revoked."
}
}
Validation error
// 422 Unprocessable Entity
{
"error": {
"code": "validation_failed",
"message": "The request is invalid.",
"errors": [
{ "field": "customer", "message": "email or phone is required" }
]
}
}