Cancel Booking

This endpoint cancels a booking created through the Book Tickets API. All tickets attached to the booking are cancelled.

Only the API key whose user originally created the booking can cancel it. Requests made with a different API key — even from the same merchant — will receive 404 not_found.

A booking can only be cancelled when:

  • the booking is not already cancelled,
  • the booking start date and time is still in the future,
  • none of the tickets have already been checked in.
POST https://api.e-guma.ch/v1/ticketing/cancel-booking.json?apikey={api-key}

Parameters

api-key
required
API key of a user that is approved for third-party integrations.

POST Data

booking_id
required
ID of the booking to cancel. Use the booking_id returned by the Book Tickets API.

Return

booking_idID of the cancelled booking.
booking_referenceHuman readable booking reference (order number) of the cancelled booking.
cancelled_ticketsList of tickets that were cancelled as part of this call. Each ticket has the following property:
  • ticket_number: Ticket number of the cancelled ticket. Matches a value previously returned by the

    Book Tickets API

    .

Example

POST https://api.e-guma.ch/v1/ticketing/cancel-booking.json?apikey=510e32c594d84816a4af9df1
{
  "booking_id": "69d86bc39927d941d4dab89a"
}
{
  "booking_id": "69d86bc39927d941d4dab89a",
  "booking_reference": "1000053",
  "cancelled_tickets": [
    {
      "ticket_number": "4666825950402448933"
    },
    {
      "ticket_number": "5520724186522287244"
    }
  ]
}