Skip to content

Cancel booking

POST/bookings/{id}/cancel

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

Cancels the journeys in a previously created booking

Cancels every journey in the booking that can still be cancelled and returns the updated booking. Journeys that can no longer be cancelled (for example completed ones) are left as they are; check each journey's status in the response.

Inside the free cancellation window (cancellationDetails.freeCancellationUntil) the result is CANCELLED_FREE. After it, send acceptCharges true to cancel with costs; the journey then becomes CANCELLED_WITH_COSTS.

Guide: Cancel a journey or a booking

Path parameters

  • idinteger · int64required

    The id of the booking to cancel

Headers

  • X-Request-IDstring

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

Request body

application/json · required

  • reasonenumrequired

    Why the booking is cancelled.

    NOT_NEEDED_ANYMORE
    The traveller no longer needs the transfer.
    DRIVER_NO_SHOW
    The driver did not show up.
    NO_AVAILABILITY
    No availability.
    ADDRESS_INVALID
    The address is wrong or cannot be served.
    INSUFFICIENT_TRAVELLER_DETAILS
    Traveller details are missing.
    TECHNICAL_ISSUE
    A technical problem.
  • acceptChargesboolean

    Set to true to cancel after the free cancellation window, accepting the costs.

Responses

OK

  • 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

  • When: The free cancellation window has passed and acceptCharges is false.

    What to do: Confirm the costs with the traveller and send acceptCharges true.

  • 400, failedNULL_VALUE

    When: reason is missing.

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