Skip to content

Public Events API

Five requests from the key to a ticket barcode. The samples below are set to the test environment — start there. A full description of every method is in the interactive reference, which lives on the same host as the API.

Method prefix
/api/v2
Authorization
Bearer JWT, 24 h
Pagination
page · itemsPerPage ≤ 100

The set of methods, the formats and the behavior are identical. The address, the data and the key differ.

Test · start here

Staging

https://st-pa.tbx.pp.ua

A sandbox for the integration: test events, free orders, refunds without real money. This is where you run the smoke test and debug your code.

Staging reference →

Live · after testing

Production

https://api.ticketcrm.net

Real events, real sales. You move here once the integration has passed on staging.

Production reference →

Each environment has its own key. For the live API we will issue a separate, new API key — the staging one does not work there. Moving to production is exactly two changes: a different address in the base URL and a new key. The code, the response structures and the logic stay the same.

Every sample below updates. Nothing is stored or sent anywhere — the values live only in your tab.

You get the token in step 1, the event and price category ids in steps 2 and 3, the order id in step 4. The company id is only needed for the socket — it is the number in the jwtId claim of your token (Company:{companyId}). Come back here and fill them in as you go. The “Base URL” select at the top of the page changes the address in every sample; the key differs per environment too.

The order is mandatory: every step produces the identifier the next one needs.

Get a token

The key is exchanged for a JWT. The token lives for 24 hours — cache it instead of requesting one before every call. A staging key only works on staging; for production you will be issued a separate one.

curl -X POST "https://st-pa.tbx.pp.ua/api/v2/token" \
  -H "Content-Type: application/json" \
  -d '{"apiKey": "YOUR_KEY"}'

In the response: {"token": "eyJ0eXAiOiJKV1Qi…"}. From there it travels in the Authorization: Bearer … header of every request.

Pull the event catalog

The main endpoint of the integration. Your key only sees the events opened to you, and only those that are still on sale.

curl "https://st-pa.tbx.pp.ua/api/v2/event-points?itemsPerPage=20&order[dateStarted]=asc" \
  -H "Authorization: Bearer TOKEN" \
  -H "X-API-Language: en"

# filters you will need in production:
#   dateStarted[after]=2026-10-01&dateStarted[before]=2026-10-31
#   city.id[]=1&categories.id[]=3&genres.id[]=7&venueHall.id=42

Take from here: the event id for the next step. Export the reference lists /cities, /countries, /venues, /venue-halls, /categories, /genres once, separately, and cache them.

Look at sectors and places

The heaviest block by volume — request it when a specific event is opened, not across the whole catalog.

curl "https://st-pa.tbx.pp.ua/api/v2/event-points/{eventPointId}/sectors" \
  -H "Authorization: Bearer TOKEN"

curl "https://st-pa.tbx.pp.ua/api/v2/event-points/{eventPointId}/places?itemsPerPage=100" \
  -H "Authorization: Bearer TOKEN"

Take from here: the id of a free place and an id from its priceCategories — that is the price category you name in the order. A place with saleMode: table is part of a table sold only whole: see «One seat — and the whole table in the order».

Create an order

The order goes straight into reserved_to_time. The default hold is 15 minutes.

curl -X POST "https://st-pa.tbx.pp.ua/api/v2/orders" \
  -H "Authorization: Bearer TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "eventPoint": "{eventPointId}",
    "places": ["{placeId}"],
    "priceCategory": "{priceCategoryId}",
    "reservedMinutes": 15
  }'

In the response: the order id, status, reservedToDate and totalPrice. Extend the hold with PUT /orders/{id}/reserve, add to the cart with PUT /orders/{id}/add-place. If a table seat is among the places, the order holds the whole table — more tickets than places in the request.

Pay and take the barcodes

You take the payment on your side and tell us the result with one request: move the order to paid. No separate call for the barcodes afterwards — they are already in the response. If the buyer is to pay through us, see «Payment on our side».

curl -X PUT "https://st-pa.tbx.pp.ua/api/v2/orders/{orderId}/status" \
  -H "Authorization: Bearer TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"toStatus": "paid"}'

The response is the whole order: status, totalPrice, totalDiscount and tickets, where every ticket carries ticketId, barcode, placeId, placeName, sectorName, rowName, price and discountPrice. That is enough to build your own ticket layout.

An optional path: if you take the payment yourself, skip this section. If TicketCRM is to take it, you only send the buyer to the gateway page, and the gateway itself reports the result to us.

Whose gateway
The money goes to the organizer’s own account, so a payment starts only in a gateway the organizer has payment settings of its own for: for your company or for the event of the order.
Access
The same token as in step 1. An order of another company answers 404. The responses are not cached.
Gateways
liqpaywayforpaymonobankpaypluscontipaywiremitwiremit_ecocashwiremit_visa

See the available gateways

It creates and changes nothing and does not check the order status, so it is safe to call before choosing a gateway.

curl "https://st-pa.tbx.pp.ua/api/v2/orders/{orderId}/payment-types" \
  -H "Authorization: Bearer TOKEN"
{
  "id": 111,
  "paymentTypes": ["liqpay", "wayforpay"],
  "paymentType": "liqpay"
}

In the response: paymentTypes — the gateways the organizer has payment settings of its own for, in the order the default is picked from; an empty list means the order cannot be paid through us. paymentType — the gateway payment-data takes without a parameter: the one chosen for this order before, else the first of the list; null when payment-data would answer 422.

Start the payment

The order must be in reserved_to_time with its hold still running (extend it with PUT /orders/{id}/reserve). Every call starts a new payment at the gateway for the current total, so call it right before sending the buyer to pay. paymentType picks the gateway; without it the one chosen for this order before is taken, else the first available — liqpay whenever there is one. The gateway chosen is remembered on the order.

curl "https://st-pa.tbx.pp.ua/api/v2/orders/{orderId}/payment-data?paymentType=wayforpay" \
  -H "Authorization: Bearer TOKEN"
{
  "id": "0b8e7d2c-3f4a-4c1e-9a6b-5d2f8e1c7a90",
  "type": "liqpay",
  "paymentData": {"data": "eyJhbW91bnQiOiIxMDAuMDAifQ==", "signature": "a1b2c3d4"},
  "checkout": {
    "kind": "redirect",
    "url": "https://www.liqpay.ua/api/3/checkout?data=eyJhbW91bnQiOiIxMDAuMDAifQ%3D%3D&signature=a1b2c3d4"
  }
}

In the response: type — the gateway the payment was started in; id — a new UUID on every call, not the order id; paymentData — the gateway’s raw answer, in its own format for each; checkout — how to send the buyer. Most integrations need only checkout: an integration that builds a LiqPay form from paymentData itself works only for orders paid through liqpay.

Send the buyer

What to do is set by checkout.kind.

redirect
Open checkout.url for the buyer (liqpay, monobank, payplus, contipay, wiremit*).
form-post
Submit an HTML form to checkout.action with checkout.method, one hidden input per entry of checkout.fields (wayforpay). All values are strings.
{
  "kind": "form-post",
  "action": "https://secure.wayforpay.com/pay",
  "method": "POST",
  "fields": {
    "merchantAccount": "test_merch",
    "orderReference": "111-1731500000",
    "productName[0]": "Ticket",
    "productPrice[0]": "100",
    "productCount[0]": "1",
    "merchantSignature": "f0e1d2c3"
  }
}

After the payment the order becomes paid — check it with GET /orders/{id}; the response carries the tickets with their barcodes. You do not pass the gateway callbacks or the address the buyer returns to: the callbacks are ours, and the return address comes from the organizer’s settings.

422

No payment was started

The reason is in violations[] of the response. In all these cases no payment is created at the gateway.

order state
propertyPath is empty: Cannot get payment data. Please check status or reserved time. The order is not in reserved_to_time or its hold has expired: it is paid, cancelled or overdue.
paymentType
Payment type "stripe" is not supported through the API. Supported types: … The gateway is not one of the list above, or paymentType is not a single value.
paymentType
The company has no payment settings of its own for payment type "monobank". Available types: liqpay. The organizer has no settings of its own for this gateway (without the parameter — for the one chosen before). When there are none for any, the list reads Available types: none.
paymentType
No payment type is available: the company has no payment settings of its own for any of … Without the parameter, and there are no settings of its own for any gateway.

Changes of seat availability and of the events themselves come to you on their own — no need to poll /places or the event. The socket only reports changes; every action is still a request to the HTTP API.

wss://st-pa.tbx.pp.ua/ws
The socket address — the same host you call the API on. The “Base URL” select changes it too.
MQTT 5 · 3.1.1
The protocol over WebSocket — any MQTT client will do.
username: papi:company-{companyId}
companyId is the number in the jwtId claim of your token: Company:{companyId}.
password: socket token
From POST /socket-token, valid for 15 minutes. The broker refuses the token from step 1.
clientId: company-{companyId}-…
Must start with this prefix, for example company-42-shop-1; one per connection.
up to 20 connections
At a time per company; the broker refuses one more right at sign-in.

Get a socket token

The socket can be opened from your server or straight from your site’s pages. Either way the password is a socket token, not the JWT from step 1: that one gives full access to the API. Your server requests a socket token with its own JWT and passes it to the page that connects.

curl -X POST "https://st-pa.tbx.pp.ua/api/v2/socket-token" \
  -H "Authorization: Bearer TOKEN"

In the response: {"token": "42.1792489232.c2lnbmF0dXJl", "expiresAt": "2026-10-20T12:40:32+03:00"}. This token opens the socket and nothing else — the HTTP API refuses it. Your API key and JWT stay on your server.

Connect and subscribe

The sample uses mqtt.js. Subscribe to the events you sell, or to all of them at once: companies/{companyId}/event-points/+/places and companies/{companyId}/event-points/+/event, or companies/{companyId}/# for both. The broker refuses a subscription outside companies/{companyId}/ and closes the connection.

// mqtt.js
const client = mqtt.connect('wss://st-pa.tbx.pp.ua/ws', {
  username: 'papi:company-{companyId}',
  password: socketToken,
  clientId: 'company-{companyId}-' + crypto.randomUUID(),
});
client.on('connect', () => client.subscribe('companies/{companyId}/event-points/{eventPointId}/+'));
client.on('message', (topic, payload) => {
  const { data } = JSON.parse(payload.toString());
  if (topic.endsWith('/places')) {
    data.places.forEach((place) => updateSeat(place.id, place.status, place.availableCount));
  } else {
    reloadEvent(data.eventPointId, data.changes, data.changedAt);
  }
});

Changes arrive only for events you can read through the API: your own and those issued to you, while they are on sale. …/places says what happened to an event’s places, …/event says what to read again about it.

Update the places

A message on …/places lists the places that changed and their state at changedAt. availableCount is the same number GET /event-points/{id}/places shows. Changes made within about a second arrive together, up to 500 places per message.

{
  "data": {
    "eventPointId": 1001,
    "changedAt": "2026-10-14T18:16:22.481+03:00",
    "places": [
      {"id": 6810554, "status": "unavailable", "availableCount": 0},
      {"id": 6810555, "status": "available", "availableCount": 1}
    ]
  }
}
available
On sale — availableCount tickets can be bought
unavailable
Cannot be bought now: sold, in someone’s cart, closed for sale or no longer offered to you

A place in someone’s cart may come back on sale when the cart expires — you get a message then too. Treat a status not listed here as unavailable.

Read the event again

A message on …/event says what changed, not how: take the new values from the HTTP API. Changes made within about a second arrive together. For a value not in the list below, reload the whole event.

{
  "data": {
    "eventPointId": 1001,
    "changedAt": "2026-10-14T18:16:22.481+03:00",
    "changes": ["details", "prices"]
  }
}
details
GET /event-points/{id} — dates, poster, age limits, hall, venue, name, description, genres, media
sale
GET /event-points/{id} and your list GET /event-points — the sale opened or closed, or its end date changed
prices
GET /event-points/{id}/places — prices or price categories of the places changed
places
GET /event-points/{id}/places — which places are offered to you changed
access
GET /event-points/{id} — the event was issued to you or taken back, created or deleted. An error in the response means you can no longer sell it

sale and access arrive even when the event is not on sale; the other changes only while it is. An event taken back from you sends you access alone. Access can take up to a minute to show in the HTTP API — if the answer has not changed yet, read again a minute later.

changedAt

You read the event again and it is stale

API responses are cached, an event for up to 10 minutes. Add the message’s changedAt to the read that follows it: GET /event-points/1001?changedAt=2026-10-14T18%3A16%3A22.481%2B03%3A00. The API ignores the parameter, and the cache keeps a separate copy for each URL. Leave it out of regular polling.

reconnect

Changes missed while disconnected

Messages are not kept for you while you are offline. After reconnecting, reload /places and the events themselves for the events you show, passing the time you reconnected in changedAt: ?changedAt=1791990982481. A message only signals a change; the HTTP API always has the full state.

15 min

The reconnect is refused

The broker checks the socket token only at sign-in: an open connection stays after 15 minutes, but every reconnect needs a fresh token — request one before reconnecting. When your API key is regenerated or the API is switched off, open connections are closed and tokens of the old key are refused.

order

An old message after a new one

Messages about one place may arrive out of order. Keep the state with the newest changedAt for each place and drop older ones.

It exists in the API, but the partner flow above does not need it — do not build it into your integration without a reason.

GET /event-points/{id}/barcodes
A bulk export of every barcode of an event — sold in any channel and unsold. It works only for events your own company organises; on events you sell as a partner it answers 403. A partner takes its own barcodes from the payment response or from GET /orders/{id}.
curl "https://st-pa.tbx.pp.ua/api/v2/event-points/{eventPointId}/barcodes" \
  -H "Authorization: Bearer TOKEN"

In the export response: barcode, placeId, placeName, sectorId, sectorName — one record per ticket.

Through PUT /orders/{id}/status you can ask for only three of them.

created→reserved_to_time→paid→refund·expired — set by the system

Seven things that make an integration look broken while everything works as designed.

empty list

The event list comes back empty

Your key only sees events linked to your company, and only those whose dateEndOfSale has not passed yet. Finished ones have their own endpoint, /event-points-archived. If an event you expect is missing, write to us — that is an access setting.

availableCount

A sold-out place does not disappear

It stays in the response with availableCount: 0, so you can close it on your side instead of showing a stale offer. Go by that field, not by whether the place is in the list.

saleMode · table

One seat — and the whole table in the order

Some halls have tables that the organizer sells only whole. Their places carry saleMode: table and a shared row (a table is always one row); the rest are single. List one seat of a table in places, or all of them — the result is the same: the order takes every seat of that table that is on sale at that moment, under one priceCategory.

total
totalPrice is the sum of the prices of the table’s free seats (availableCount above zero), and tickets lists all their tickets.
not every seat is free
A seat sold before, held by another buyer or without a ticket does not block the order: the rest of the table is sold. Seats that go on sale later are sold in a later order.
price category
One priceCategory for the whole table. If a seat does not have it, or a seat has several and you named none — 422 with propertyPath: priceCategory, and nothing is reserved.
removing
PUT /orders/{id}/tickets/{ticketId}/remove on one ticket removes the whole table from the order and puts it back on sale.
refunds
refund is per ticket; that seat is then sold on its own once the rest of the table is sold.
limits
The tickets-per-order limit counts a table as one item, while the reservation limit counts every ticket: a table bigger than what is left of it answers 422 with no propertyPath («The maximum number of reserved tickets by event …»).
no seat on sale
422 with propertyPath: places[id] («Not found available ticket with place …») — the seat you listed has nothing on sale. Seats of the table that you did not list never cause it.
id ≠ eventId

An event and a session are different things

id is one specific session — every request uses it. eventId is the shared identifier of the event across all of its dates: group “event → schedule” by that one.

422

The limits are ours to set

The maximum number of tickets in one order and the maximum number of simultaneously reserved tickets across your whole account are configured on our side. Do not hard-code your own constants: catch 422 and read the response body. Release holds you no longer need right away — while they are alive they eat into your limit.

id format

Identifiers are numeric strings

The request body expects "places": ["456", "765"], not resource URLs. The same goes for eventPoint and priceCategory.

401 · 429

The token and your request rate

401 means the 24 hours are up — request the token again and repeat the call. 429 means there are too many requests: you need a backoff, not a retry loop.

The rest are in the reference; these are enough to build a listing and an event page.

id
The session identifier — every other request uses it
eventId
The shared event id across all of its dates
eventName · description
Name and description, in the language from X-API-Language
poster · media
The poster and the rest of the images
dateStarted · dateEnd
Start and end of the session
dateEndOfSale
When sales stop — after this date the event moves to the archive
venue · venueHall
The venue and the specific hall
city · country
For the geographic filters of your storefront
categories · genres
Classification — maps onto your own reference lists
minPrice · maxPrice
Price range: { amount, currency }
countAvailableTickets
How many tickets are left — enough for a list, without the hall plan
minAgeLimit · maxAgeLimit
Age restrictions
widgetHash
The identifier of our sales widget for this event

Every path starts from https://st-pa.tbx.pp.ua/api/v2.

Catalog
GET /event-pointsThe list of events: filters by date, city, country, category, genre and hall
GET /event-points/{id}A single event
GET /event-points-archivedEvents whose sales have already ended
Hall plan
GET /event-points/{id}/sectorsThe sectors of an event
GET /event-points/{id}/sectors/{sectorId}/placesThe places of one sector
GET /event-points/{id}/placesEvery place of an event with prices, price categories and availability
Orders
POST /ordersCreate an order and reserve the places
GET /orders/{id}The state of an order: total, discount, hold deadline; once paid, the tickets with their barcodes
PUT /orders/{id}/add-placeAdd a place to an order that already exists
PUT /orders/{id}/tickets/{ticketId}/removeRemove a ticket from an order
PUT /orders/{id}/reserveExtend the hold
GET /orders/{id}/payment-typesThe gateways an order can be paid in through us, and the one taken by default; creates nothing
GET /orders/{id}/payment-dataStart the payment at the organizer’s gateway; checkout says where to send the buyer. Only needed when the payment goes through us
PUT /orders/{id}/statusChange the status of an order
PUT /orders/{id}/tickets/{ticketId}/statusChange the status of a single ticket
GET /event-points/{id}/ordersYour orders for an event, without tickets; filters status and payAt[after]
GET /event-points/{id}/barcodesEvery barcode of an event, sold and unsold — only for events your company organises
Reference lists
GET /countries · /citiesGeography
GET /venues · /venue-hallsVenues and halls
GET /categories · /genresEvent classification
GET /promocodesThe promo codes available to your company
Sales through our widget
GET /widget-ordersOrders placed in the widget on your site
GET /widget-orders-refundsRefunds on those orders
Live updates
POST /socket-tokenThe password for the live updates socket, valid for 15 minutes; the HTTP API refuses it
  • Moving to the live API. Two things change: the base URL becomes https://api.ticketcrm.net, and we issue a new API key separately. The staging key does not work in production; the rest of the code stays as it is.
  • Synchronization. A working minimum: the catalog every 5–15 minutes, the reference lists once a day, places on user demand. To get changes of places and events between requests, connect the live updates.
  • Webhooks instead of polling. If you need near real time — a new event, an event update, a sale, a refund — give us a URL and we will set up delivery. Polling then stays as a safety net.
  • If something does not add up. Send us the endpoint, the time of the request and the response body — we will look on our side. Address: support@ticketsbox.com.

TicketCRM Public API v2 · the reference opens at the address of the environment itself · support@ticketsbox.com