Skip to main content
GET
/
bookings
/
{code}
Retrieve a Booking.
curl --request GET \
  --url https://b2b-api.markoub.dev/bookings/{code} \
  --header 'Authorization: Bearer <token>'
{
  "id": 123,
  "externalId": "<string>",
  "paymentToken": "<string>",
  "paymentTokenExpiresAtMinutes": 123,
  "code": "<string>",
  "type": "<string>",
  "inventory": "<string>",
  "paidPrice": 123,
  "status": "<string>",
  "totalPrice": 123,
  "paymentType": "<string>",
  "email": "<string>",
  "name": "<string>",
  "phone": "<string>",
  "cancellationReason": "<string>",
  "isCancelled": true,
  "cancellationType": "<string>",
  "cancelledAt": "<string>",
  "paidAt": "<string>",
  "createdAt": "<string>",
  "updatedAt": "<string>",
  "routes": [
    {
      "id": 123,
      "routeId": 123,
      "departureTime": "<string>",
      "departureCityId": 123,
      "departureStationId": 123,
      "departureMarkerId": 123,
      "departureCityName": "<string>",
      "departureStationName": "<string>",
      "arrivalTime": "<string>",
      "arrivalCityId": 123,
      "arrivalStationId": 123,
      "arrivalMarkerId": 123,
      "arrivalCityName": "<string>",
      "arrivalStationName": "<string>",
      "price": 123,
      "date": "<string>",
      "daysElapsed": 123,
      "seats": 123,
      "type": "<string>",
      "cancellationReason": "<string>",
      "isCancelled": true,
      "cancellationType": "<string>",
      "cancelledAt": "<string>",
      "createdAt": "<string>",
      "updatedAt": "<string>",
      "roadType": "<string>",
      "seatMapShown": true,
      "departureLat": 123,
      "departureLng": 123,
      "arrivalLat": 123,
      "arrivalLng": 123
    }
  ],
  "tickets": [
    {
      "id": 123,
      "code": "<string>",
      "bookingId": 123,
      "routeId": 123,
      "companyId": 123,
      "date": "<string>",
      "time": "<string>",
      "seat": 123,
      "price": 123,
      "status": "<string>",
      "cancelledAt": "<string>",
      "createdAt": "<string>",
      "updatedAt": "<string>"
    }
  ],
  "data": "<unknown>"
}

Authorizations

Authorization
string
header
required

Default authentication mechanism

Path Parameters

code
string
required

The unique identifier of the booking.

Required string length: 1 - 255

Response

The retrieved booking

id
number
required
externalId
string
required
paymentToken
string
required
paymentTokenExpiresAtMinutes
number
required
code
string
required
type
string
required
inventory
string
required
paidPrice
number
required
status
string
required
totalPrice
number
required
paymentType
string
required
email
string
required
name
string
required
phone
string
required
cancellationReason
string
required
isCancelled
boolean
required
cancellationType
string
required
cancelledAt
string
required
paidAt
string
required
createdAt
string
required
updatedAt
string
required
routes
object[]
required
tickets
object[]
required
data
any