Skip to main content

Testing

Before connecting to the production environment, run the scenarios in the test environment https://dev-api.globalticket.uz/esbo.

Test scenarios​

Free visit​

  1. Get an accessToken via login
  2. Create an order for a card with saleType: FREE_VISIT
  3. Add a tariff by quantity via POST /orders/{orderId}/items without sessionId
  4. Call validate, then confirm
  5. Check that the response contains tickets with qrToken

Session with a seating map​

  1. Get a session and the map GET /sessions/{sessionId}/seating
  2. Add a seat via POST /orders/{orderId}/seats
  3. Re-read the map with ?orderId= — the seat is in the IN_ORDER status
  4. Confirm the order — the seat is in the SOLD status

Double booking​

Open two orders for the same card — this also works from one account: a seat in your other order appears as HELD.

  1. POST /orders twice → orders A and B
  2. POST /orders/{A}/seats with a seat → 200
  3. POST /orders/{B}/seats with the same seat → 409, code 1008
  4. GET /sessions/{sessionId}/seating?orderId={B} → the seat is in the HELD status
  5. DELETE /orders/{A} → 204; the seat is FREE again

Negative scenarios​

ScenarioExpected response
Wrong password400
Request without a token401, code 1004
Order with an outdated versionId409, code 1008
Standing sector: quantity greater than available409, code 1008
confirm after the order lifetime has expired409, code 1008
Card of another organization404, code 1003
warning

An order without confirmation becomes EXPIRED after 15 minutes. The storefront must not accept payment for an expired order.

Pre-launch checklist​

  • Login works, accessToken is refreshed via refresh-token before it expires
  • The catalog shows cards of the organizations available to you; filters and the period work
  • Free visit: order → items → validate → confirm → tickets with a QR code
  • Session without a seating map: items with sessionId → validate → confirm
  • Session with a seating map: after seats the seat is IN_ORDER in your order and HELD for others
  • Double booking: the second attempt gets 409, the storefront re-reads the map and offers another seat
  • Standing sector: available decreases; a quantity above the remainder gets 409
  • Deleting an order item or the order returns the seat to FREE
  • An order without confirmation becomes EXPIRED after 15 minutes, seats are released
  • A repeated confirm with the same Idempotency-Key results in one order and one set of tickets
  • Benefits: the discount is visible in discountAmount, finalAmount is charged
  • With requiresData: true payment starts only after filled equals total
  • The buyer receives the ticket QR code
  • orderId, Idempotency-Key and error traceId values are stored in the logs

Contacting support​

Send the traceId from the error response, the method and path, the request body without credentials, and the request time.