RU
Docs sections

Errors and limits

The error format, every code with its HTTP status, request and size limits, and which requests to retry.

Error format

Every error comes as the same JSON:

Response 409

{
  "error": {
    "code": "sold_out",
    "message": "Билеты этого тарифа закончились",
    "details": {"tariff_id": "0193e0b2-4a7d-7a21-8c44-6e2f9a0b3c71"}
  }
}
  • code never changes. Base your logic on it.
  • message is written in Russian for a person, and its text may change. You can show it to an operator, but don't parse it.
  • details isn't always there. It holds a field, a tier, a seat or a reason: the set of keys depends on the error.

Codes

CodeHTTPWhenWhat to do
invalid_request400Bad JSON, field or parameter. The reason is in message, sometimes the field is in detailsFix the request. The same request won't pass again
unauthorized401No key, a wrong or revoked key, or a suspended organizationCheck the key
forbidden403The action is dashboard-only: details.reason: "session_only"Do it in the dashboard
not_found404No such object or endpoint. An object of another organization or mode isn't found eitherCheck the id and the key's mode
event_not_on_sale409The event isn't published, or sales of the tier and seats are still opening after publishingPublish the event. After publishing, wait a few seconds
sold_out409The tier is sold out, details.tariff_idOffer another tier or refund
seat_taken409The seat is held by another order or sold, details.seat_id and details.seatOffer another seat
reservation_expired409The reservation expired and no tickets are leftRefund the buyer
idempotency_conflict409The Idempotency-Key belongs to another request, is still running, or its outcome is unknownSee idempotency
limit_exceeded422More than 20 tickets in an order, or more than the tier allows per orderMake the order smaller or split it
rate_limited429Too many requestsWait Retry-After seconds
internal500A failure on our sideRetry with the same Idempotency-Key

While the service restarts, the proxy may answer 502, 503 or 504 without JSON. Retry such a request with the same Idempotency-Key.

Limits

WhatHow much
Requests per key600 per minute
JSON body1 MB
Seat file5 MB, up to 50,000 seats
Guest file1 MB, up to 2,000 lines
Cover5 MB, up to 25 megapixels
Tickets per order20
Reservation60 to 1,800 seconds, 900 by default
Idempotency-Keyup to 255 characters, kept 24 hours
Ticket email resendonce a minute per ticket
List pagetickets up to 200, seats up to 5,000

The request limit counts calendar minutes. Going over gives 429 rate_limited with the Retry-After header and details.retry_after_s: the seconds left until the next minute.

Which requests to retry

  • 429: after Retry-After seconds.
  • 5xx, a timeout or a dropped connection: with the same Idempotency-Key, with a pause that grows with each attempt (1, 2, 4 seconds…).
  • 400, 401, 403, 404, 422: don't retry, fix the request first.
  • 409: depends on the code. sold_out, seat_taken and reservation_expired are final. event_not_on_sale right after publishing passes in a few seconds. For idempotency_conflict see idempotency.