Client types
Distribution API
For agents (third-party resellers), the PREXSELL website, and the PREXSELL
app. Authenticated with a long-lived API key sent in the
x-api-key
header. Use this for booking flows, catalog reads, and any integration that
runs outside the PREXSELL backoffice.Backoffice API
For operators (bus companies) and internal tooling. Authenticated with
HTTP-only session cookies issued by the login endpoints. Not intended
for third-party use.
Base URL
/v2.
Authentication
Distribution API β API key
Distribution endpoints are authenticated with an API key passed in thex-api-key header:
API-key enforcement is being rolled out across the v2 Distribution surface.
Read-only catalog endpoints (cities, stops) are currently open while partner
provisioning is finalized; pass the
x-api-key header anyway so your client
keeps working once enforcement turns on.Backoffice API β session cookies
Backoffice endpoints use HTTP-only cookies set by the login flow:Pre-login
POST /v2/auth/pre-login β verify credentials and discover the list of
company contexts the user can log into. No session is created.Login
POST /v2/auth/login with email, password, and the chosen companyId.
The server automatically sets the access + refresh cookies
(backoffice_access_token, backoffice_refresh_token) via Set-Cookie
headers and returns the session payload β no client-side cookie handling
required.Call protected endpoints
Browsers send the cookies automatically on subsequent requests. Non-browser
clients must store and replay the
Set-Cookie values.Google-based login is also supported via
/v2/auth/google/pre-login and
/v2/auth/google/login.Quick start
- Distribution (API key)
Response envelope
Successful responses are wrapped in adata object:
total counter for the unpaginated
result set and accept take (max 100, default 50) and skip (default 0)
query parameters.
Errors
Errors are returned with an appropriate HTTP status and anerrors array
describing what went wrong:
| Status | Meaning |
|---|---|
200 | Success. |
201 | Resource created. |
204 | Success, no response body. |
400 | Validation error β check the request shape. |
401 | Missing or invalid API key / access token. |
403 | Authenticated, but not allowed to do this. |
404 | Resource not found. |
409 | Conflict β the resource is in an incompatible state. |
429 | Rate limit exceeded. |
500 | Unexpected server error. |
Next steps
Getting started
Walk through a full Distribution integration end to end β search offers,
create a booking, pay, and cancel.
