curl --request POST \
--url https://staging.api.prexsell.com/v2/bookings \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"offerId": "eyJ...",
"currency": "UAH",
"passengers": [
{
"firstName": "Іван",
"lastName": "Петренко",
"phones": [
{
"phone": "+380501234567",
"messengers": [
"Viber"
]
}
],
"email": "ivan@example.com",
"discountId": "<string>",
"prepaid": 0
}
],
"note": "Window seat please"
}
'{
"data": {
"booking": {
"id": "bkg_1",
"createdAt": "2026-06-14T00:05:00.000Z",
"updatedAt": "2026-06-14T00:05:00.000Z",
"departureDate": "2026-06-15T03:30:00.000Z",
"status": "Upcoming",
"bookingRequiredBy": "2026-06-14T00:25:00.000Z",
"paymentRequiredBy": "2026-06-14T00:25:00.000Z",
"tickets": [
{
"id": "ord_abc",
"bookingId": "bkg_1",
"note": null,
"status": "Processing",
"paymentStatus": "Unpaid",
"departureDate": "2026-06-15T00:00:00.000Z",
"source": "PrexSell",
"refundAmount": null,
"passenger": {
"id": "pass_1",
"firstName": "Іван",
"lastName": "Петренко",
"email": "ivan@example.com",
"phones": [
{
"id": "ph_1",
"phone": "+380501234567",
"messengers": [
"Viber"
]
}
]
},
"price": {
"id": "price-1",
"amount": 1450,
"currency": "UAH"
},
"discount": {
"id": "disc-1",
"name": "Студентська знижка",
"rule": "Percent",
"amount": 100,
"startDate": "2026-06-01T00:00:00.000Z",
"endDate": "2026-12-31T23:59:59.000Z"
},
"slices": [
{
"id": "sl_abc",
"duration": 480,
"departureDate": "2026-06-15T00:00:00.000Z",
"arrivalDate": "2026-06-15T08:00:00.000Z",
"seat": {
"id": "seat_1",
"label": "12A"
},
"bus": {
"id": "bus-1",
"seatsQty": 50,
"registrationNumber": "AA1234BB",
"brand": "Mercedes-Benz",
"model": "Tourismo",
"images": [
{
"id": "img-1",
"url": "https://example.com/bus.jpg",
"name": "Bus exterior"
}
]
},
"carriage": {
"id": "carriage-1",
"name": "Автопарк №1",
"phones": [
"+380501234567"
]
},
"route": {
"id": "route-1",
"name": "Київ — Варшава",
"slug": "kyiv-warsaw",
"description": "Щоденний нічний рейс",
"company": {
"id": "company-1",
"name": "PrexSell Lines",
"slug": "prexsell-lines",
"ceo": "Олена Коваль",
"partnerCompany": null,
"logoUrl": "https://example.com/logo.png",
"email": "ops@prexsell-lines.com",
"website": "https://prexsell-lines.com",
"rules": "Пасажир має прибути за 20 хвилин до відправлення.",
"socials": [
"https://facebook.com/prexsell.lines"
]
},
"permissions": [
{
"id": "perm-1",
"role": "Agent",
"accesses": [
"book",
"cancel"
],
"type": "Partner"
}
],
"services": [
{
"id": "svc-1",
"name": "Wi-Fi"
},
{
"id": "svc-2",
"name": "Кондиціонер"
}
]
},
"stops": [
{
"id": "stop-1",
"departureTime": "06:30",
"arrivalTime": null,
"platform": "3",
"arrivalDate": null,
"place": "Центральний автовокзал",
"latitude": 50.4501,
"longitude": 30.5234,
"city": {
"id": "city-kyiv",
"name": "Київ",
"slug": "kyiv",
"country": "UA",
"timeZone": "Europe/Kyiv"
}
},
{
"id": "stop-2",
"departureTime": null,
"arrivalTime": "08:00",
"platform": "5",
"arrivalDate": "2026-06-15T08:00:00.000Z",
"place": "Dworzec Zachodni",
"latitude": 52.2297,
"longitude": 21.0122,
"city": {
"id": "city-warsaw",
"name": "Варшава",
"slug": "warsaw",
"country": "PL",
"timeZone": "Europe/Warsaw"
}
}
]
}
]
}
]
}
}
}Create booking
Creates a booking for one or more passengers. Authenticated via the api-key header; data scoped to the caller’s partner. Returns 201 with the booking aggregate. offer token failures: expired → 400 OFFER_EXPIRED; malformed → 400 VALIDATION_ERROR. Undeclared body fields are rejected (strict body — discovery-gated per ADR-0033 §7).
curl --request POST \
--url https://staging.api.prexsell.com/v2/bookings \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"offerId": "eyJ...",
"currency": "UAH",
"passengers": [
{
"firstName": "Іван",
"lastName": "Петренко",
"phones": [
{
"phone": "+380501234567",
"messengers": [
"Viber"
]
}
],
"email": "ivan@example.com",
"discountId": "<string>",
"prepaid": 0
}
],
"note": "Window seat please"
}
'{
"data": {
"booking": {
"id": "bkg_1",
"createdAt": "2026-06-14T00:05:00.000Z",
"updatedAt": "2026-06-14T00:05:00.000Z",
"departureDate": "2026-06-15T03:30:00.000Z",
"status": "Upcoming",
"bookingRequiredBy": "2026-06-14T00:25:00.000Z",
"paymentRequiredBy": "2026-06-14T00:25:00.000Z",
"tickets": [
{
"id": "ord_abc",
"bookingId": "bkg_1",
"note": null,
"status": "Processing",
"paymentStatus": "Unpaid",
"departureDate": "2026-06-15T00:00:00.000Z",
"source": "PrexSell",
"refundAmount": null,
"passenger": {
"id": "pass_1",
"firstName": "Іван",
"lastName": "Петренко",
"email": "ivan@example.com",
"phones": [
{
"id": "ph_1",
"phone": "+380501234567",
"messengers": [
"Viber"
]
}
]
},
"price": {
"id": "price-1",
"amount": 1450,
"currency": "UAH"
},
"discount": {
"id": "disc-1",
"name": "Студентська знижка",
"rule": "Percent",
"amount": 100,
"startDate": "2026-06-01T00:00:00.000Z",
"endDate": "2026-12-31T23:59:59.000Z"
},
"slices": [
{
"id": "sl_abc",
"duration": 480,
"departureDate": "2026-06-15T00:00:00.000Z",
"arrivalDate": "2026-06-15T08:00:00.000Z",
"seat": {
"id": "seat_1",
"label": "12A"
},
"bus": {
"id": "bus-1",
"seatsQty": 50,
"registrationNumber": "AA1234BB",
"brand": "Mercedes-Benz",
"model": "Tourismo",
"images": [
{
"id": "img-1",
"url": "https://example.com/bus.jpg",
"name": "Bus exterior"
}
]
},
"carriage": {
"id": "carriage-1",
"name": "Автопарк №1",
"phones": [
"+380501234567"
]
},
"route": {
"id": "route-1",
"name": "Київ — Варшава",
"slug": "kyiv-warsaw",
"description": "Щоденний нічний рейс",
"company": {
"id": "company-1",
"name": "PrexSell Lines",
"slug": "prexsell-lines",
"ceo": "Олена Коваль",
"partnerCompany": null,
"logoUrl": "https://example.com/logo.png",
"email": "ops@prexsell-lines.com",
"website": "https://prexsell-lines.com",
"rules": "Пасажир має прибути за 20 хвилин до відправлення.",
"socials": [
"https://facebook.com/prexsell.lines"
]
},
"permissions": [
{
"id": "perm-1",
"role": "Agent",
"accesses": [
"book",
"cancel"
],
"type": "Partner"
}
],
"services": [
{
"id": "svc-1",
"name": "Wi-Fi"
},
{
"id": "svc-2",
"name": "Кондиціонер"
}
]
},
"stops": [
{
"id": "stop-1",
"departureTime": "06:30",
"arrivalTime": null,
"platform": "3",
"arrivalDate": null,
"place": "Центральний автовокзал",
"latitude": 50.4501,
"longitude": 30.5234,
"city": {
"id": "city-kyiv",
"name": "Київ",
"slug": "kyiv",
"country": "UA",
"timeZone": "Europe/Kyiv"
}
},
{
"id": "stop-2",
"departureTime": null,
"arrivalTime": "08:00",
"platform": "5",
"arrivalDate": "2026-06-15T08:00:00.000Z",
"place": "Dworzec Zachodni",
"latitude": 52.2297,
"longitude": 21.0122,
"city": {
"id": "city-warsaw",
"name": "Варшава",
"slug": "warsaw",
"country": "PL",
"timeZone": "Europe/Warsaw"
}
}
]
}
]
}
]
}
}
}Authorizations
Partner API key, sent in the x-api-key request header. Required for bookable offer search and all booking operations. To obtain a key, register as a PREXSELL partner in the backoffice (backoffice.prexsell.com, or staging.backoffice.prexsell.com for staging) and contact support if you need help.
Body
Create booking request body.
20-minute offer JWT from GET /v2/offers. Applies to all passengers in this booking.
"eyJ..."
Ticket currency (single source: CURRENCIES). Applies to all passengers in this booking.
CZK, UAH, EUR, USD, PLN "UAH"
One record per passenger. Minimum 1.
1Show child attributes
Show child attributes
Optional booking note.
"Window seat please"
Response
Booking created.
Create booking result.
Show child attributes
Show child attributes
