Skip to content

Create booking

POST/bookings

Auth: X-API-Key headerhttps://warpdrive.staging.transferz.com/partners

Creates a booking using one or more provided quotes

Books one or more quotes. Each quote becomes a journey with its own traveller details and add-ons; a return trip is one booking with two quotes. partnerReference is your own order reference and is shown in the Transferz back office.

The booking is created with journeys in status NOT_PAID. It is only processed after payment: call one of the pay endpoints next (pay by invoice, a payment link or Stripe Connect).

Add-ons

Book add-ons with the quoteTravelAddonId from the quote's availableTravelAddons, within maxAllowed.

Expired quotes

Quotes expire (see expires). Book promptly after quoting, or request new quotes.

Guides: How a booking works, Create a booking

Headers

  • X-Request-IDstring

    The optional (ideally unique) request identifier used for later analysis or diagnostics

Request body

application/json · required

  • bookerobjectrequired

    The person or company making the booking.

  • quotesarray of objectsrequired

    The quotes to book, each with its traveller. Use two quotes for a return trip.

    Min items: 1 · Max items: 2147483647

  • partnerReferencestringrequired

    Your own order reference.

  • travelIntentenum

    Why the traveller travels, if known.

    BUSINESS
    Business travel.
    LEISURE
    Leisure travel.
    UNKNOWN
    Not known.

Responses

Created

  • idinteger · int64

    Booking id. Store it; there is no search for bookings.

  • codestring

    Booking reference shown to the traveller.

  • partnerReferencestring
  • partnerIdinteger · int64
  • travelIntentenum
    BUSINESS
    Business travel.
    LEISURE
    Leisure travel.
    UNKNOWN
    Not known.
  • bookerInfoobject
  • journeysarray of objects

    The journeys in this booking, one per booked quote.

Errors this endpoint can return

  • 400, failedQUOTE_EXPIRED

    When: The quote's expiry time has passed.

    What to do: Request new quotes and book with a fresh quote id.

  • 400, failedNULL_VALUE

    When: booker, quotes or partnerReference is missing.

    What to do: Send the field named in field. Required fields are marked in the reference.

  • 400, failedINVALID_SIZE

    When: The booker email is shorter than 6 characters or languageIsoCode is not 2 letters.

    What to do: Check the limits in the field description and shorten or complete the value.

  • When: More passengers or bags than the quoted vehicle carries.

    What to do: Request quotes with the right passenger and luggage counts and choose a vehicle that fits.

  • When: An add-on amount is above its maxAllowed.

    What to do: Stay within maxAllowed (and within combinedSeatBasedAddonCapacity for child seats).