The error object
{
"error": {
"type": "invalid_request_error",
"code": "unavailable",
"message": "Ticket type 9001 is not on sale for this event.",
"param": "items[0].ticket_type_id",
"request_id": "req_6f1c2a9e4b7d3f8a0c5e2b1d",
"doc_url": "https://aveoevents.com/eos/api/documents/errors#unavailable"
}
}| Field | Meaning |
|---|---|
type | One of the six types below. Branch on it for broad handling. |
code | The exact reason, from the list below. Branch on it for specific handling. |
message | A sentence for people. It may be reworded, so do not match on it. |
param | The parameter at fault, such as items[0].quantity, or null. |
request_id | The request’s id, also in the X-Request-Id header. Quote it when you ask AVEO for help. |
doc_url | This page, at the code’s entry. |
Types and statuses
| Type | Status | When |
|---|---|---|
invalid_request_error | 400, 404, 409, 422 | Something in the request is wrong: a missing or bad parameter, an unknown id, or a state the action does not allow. |
authentication_error | 401 | No key, a key that does not exist, or one that has expired or been revoked. |
permission_error | 403 | The key is fine but lacks the permission, or the address or web page it was used from is not allowed. |
idempotency_error | 409 | An Idempotency-Key was reused with a different request. |
rate_limit_error | 429 | Too many requests for this key in the last minute. Wait for the time in Retry-After. |
api_error | 500, 502 | Something went wrong on our side or in the ticket engine. Safe to retry with the same Idempotency-Key. |
Retry only what can change by itself: 429 after Retry-After, and 5xx with the same Idempotency-Key. A 4xx answer will be the same until the request or the data changes.
The request
invalid_request_error. Something in the request is wrong: a missing or bad parameter, an unknown id, or a state the action does not allow.
- parameter_invalid
- 400
- A parameter has the wrong type or form. param names it and message says what is expected.
- plan_limit
- 422
- The company's plan has no room for this: another webhook endpoint (Starter has none), or another device scanning at the same time (a door app counts as one for each key). message says the limit: move up a plan, or ask AVEO.
The key
authentication_error. No key, a key that does not exist, or one that has expired or been revoked.
What the key may do
permission_error. The key is fine but lacks the permission, or the address or web page it was used from is not allowed.
- plan_scope
- 403
- The company's AVEO EOS plan does not include this permission, whatever the key holds. param names it; a bigger plan opens it.
- secret_key_in_browser
- 403
- A secret key was sent from a web page (the request had an Origin header). Use a publishable key in web pages.
Idempotency
idempotency_error. An Idempotency-Key was reused with a different request.
Rate limit
rate_limit_error. Too many requests for this key in the last minute. Wait for the time in Retry-After.
- rate_limited
- 429
- Too many requests for this key in the last minute. Wait for the seconds in Retry-After.
- too_many_failures
- 429
- Too many requests from this address failed the key check in the last minute. Wait a minute and check the key.
- too_many_holds
- 429
- This visitor already holds as many checkout sessions as a publishable key allows. Complete or cancel one first.
On our side
api_error. Something went wrong on our side or in the ticket engine. Safe to retry with the same Idempotency-Key.
- internal
- 500
- Something went wrong on our side. It is logged, and retrying with the same Idempotency-Key is safe.