# PREXSELL API > REST API for the PREXSELL bus booking platform. ## Docs - [Book booking](https://docs.prexsell.com/api-reference/bookings/book-booking.md): Marks targeted orders as Booked. Authenticated via the api-key header; data scoped to the caller's partner. 409 Conflict when any targeted order is already Booked, Paid, Canceled, or Refund. A Paid order is blocked from a Booked downgrade (getUpdatedBookedOrders would overwrite unconditionally). Sin… - [Cancel booking](https://docs.prexsell.com/api-reference/bookings/cancel-booking.md): Cancels targeted orders (status → Canceled; Paid PrexSell orders → Refund + refundAmount). Authenticated via the api-key header; data scoped to the caller's partner. 409 Conflict when any targeted order is already Canceled or Refund. Unpaid/booked orders and external-operator orders cancel at any ti… - [Create booking](https://docs.prexsell.com/api-reference/bookings/create-booking.md): 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 — dis… - [Get booking by ID](https://docs.prexsell.com/api-reference/bookings/get-booking-by-id.md): Returns a single booking by its booking ID. Authenticated via the api-key header; data scoped to the caller's partner. Returns 404 when the booking does not exist or does not belong to the actor's partner (foreign and unknown are indistinguishable — ADR-0033 §1). - [Get refund rules for a booking](https://docs.prexsell.com/api-reference/bookings/get-refund-rules-for-a-booking.md): Returns refund rules for each partner-owned order within a booking. Authenticated via the api-key header; data scoped to the caller's partner. Returns 404 when the booking does not exist or does not belong to the actor's partner. Fixes legacy defect 3 (IDOR) and defect 4 (500 on unknown ID). - [List bookings](https://docs.prexsell.com/api-reference/bookings/list-bookings.md): Returns a paginated list of the caller's bookings, newest first. Authenticated via the api-key header; data scoped to the caller's partner. Optionally filter to a single departure date, matched against the booking's UTC onboarding instant for that calendar day. Omit it to list all your bookings. Onl… - [Pay booking](https://docs.prexsell.com/api-reference/bookings/pay-booking.md): Marks targeted orders as Paid. Authenticated via the api-key header; data scoped to the caller's partner. 409 Conflict when any targeted order is already Paid, Canceled, or Refund. paymentRecipient is always Agent; orders fiscalize only when the partner's website config carries Checkbox credentials… - [Get a city by slug](https://docs.prexsell.com/api-reference/cities/get-a-city-by-slug.md): Returns a single city record identified by its unique slug. - [List cities](https://docs.prexsell.com/api-reference/cities/list-cities.md): Returns a paginated list of cities. Optionally filtered by name search string and/or country code. - [List stops for a city](https://docs.prexsell.com/api-reference/cities/list-stops-for-a-city.md): Returns a paginated list of bus stops belonging to the specified city. - [Get schedule for a city pair on a date](https://docs.prexsell.com/api-reference/offers/get-schedule-for-a-city-pair-on-a-date.md): Returns a dated timetable of individual departures for the given city pair. Each row includes departure/arrival datetime (wall-clock, timezone-aware), company, route name, travel time, and price. Sorted by departure time ascending. Paginated with take/skip. - [Search bookable offers](https://docs.prexsell.com/api-reference/offers/search-bookable-offers.md): Returns bookable offers for the given city pair, date, and passenger count. Authenticated via the api-key header; data scoped to the caller's partner. Offer ids are 20-minute signed JWT booking tokens — use expiresAt to detect expiry before attempting to book. - [Get a stop by ID](https://docs.prexsell.com/api-reference/stops/get-a-stop-by-id.md): Returns a single bus stop record including coordinates and an embedded city summary. - [List stops](https://docs.prexsell.com/api-reference/stops/list-stops.md): Returns a paginated list of bus stops across all cities. Optionally filtered by city ID or country code. - [Cancel ticket](https://docs.prexsell.com/api-reference/tickets/cancel-ticket.md): Cancels a single ticket (order) by its ID, independent of the booking it currently belongs to — the ticket id is stable across a transfer to a new booking, unlike the booking id. (status → Canceled; Paid PrexSell orders → Refund + refundAmount). Authenticated via the api-key header; data scoped to t… - [Get ticket by ID](https://docs.prexsell.com/api-reference/tickets/get-ticket-by-id.md): Returns a single ticket (order) by its ID. Authenticated via the api-key header; data scoped to the caller's partner. Returns 404 when the ticket does not exist or does not belong to the actor's partner (foreign and unknown are indistinguishable — ADR-0033 §1). - [Getting started with the Distribution API](https://docs.prexsell.com/guides/distribution-getting-started.md): First integration walkthrough for partners: find cities, search offers, create a booking, and manage it through pay, book, and cancel. - [Migrating from /rest to /v2](https://docs.prexsell.com/guides/rest-to-v2-migration.md): Step-by-step guide for external partners moving from the legacy /rest endpoints to the v2 Distribution API. - [Introduction](https://docs.prexsell.com/introduction.md): REST API for the PREXSELL bus booking platform. ## OpenAPI Specs - [openapi](https://docs.prexsell.com/api-reference/openapi.json)