VerticalAPI

Cancel Booking

Discover how to use Cancel API calls to cancel existing itineraries. This can be called directly with your API key with booking reference id. It returns details about a booking details associated with the itinerary id along with cancel links to cancel the booking.

Parameters

Name

Description

Accept

string

( header )

Must be application/json

Accept - Encoding

string

( header )

Must be gzip

Authorization

string

( header )

Must be Your PID

Must be Your API Key

Customer-Ip

string

( header )

Must be IP address of the customer, as captured by your integration. Send IPV4 addresses only.

Ensure your integration passes the customer’s IP, not your own. This value helps determine their location and other settings.

Also used for fraud recovery and other important analytics.

action

string

( query )

*required "cancelBooking" as a parameter

apiKey

string

( query )

Must be a valid API Key

The API Key provided to you is critical to the security of your request data – treat it like a password. Never include the raw value in any publicly accessible site or app code. You will be provided with an API key when you are approved to integrate TPS API.

reference

string

( query )

The Reference no generated at the time of booking.

order_id

string

( query )

Unique order id generated at the time of booking.

REQUEST

API Endpoint: https://your-end-point/api/v1/travel-api/activities/

header: array(
'Content-Type:application/json',
'Accept-encoding: gzip',
'PID:'ADD-YOUR-PID',
'x-api-key:'ADD-YOUR-KEY'
);

POST: 
{
  "action": "cancelBooking",
  "reference": "270-399717",
  "order_id": "626153A1B94FD"
}
					 

Response

The API returns an HTTP response, which generally includes the result of the request invocation

{
    "Status": 605,
    "status_message": "Booking has been cancelled ",
    "responseData": {
  "operationId" : "5688f67ad59ad523",
  "auditData" : {
    "processTime" : 0.0,
    "time" : "2022-04-21T12:34:42.500Z",
    "serverId" : "blank",
    "environment" : "blank"
  },
  "booking" : {
    "reference" : "270-399717",
    "status" : "CANCELLED",
    "currency" : "EUR",
    "pendingAmount" : 0.00,
    "agency" : {
      "code" : 30543,
      "branch" : 1,
      "comments" : "",
      "sucursal" : {
        "name" : "PRUEBAS SISTEMAS MINORISTA SUC 1 - 1",
        "street" : "PEREZ GALDOS 1",
        "zip" : "07006",
        "city" : "PALMA DE MALLORCA",
        "email" : "mfiol@activitiesbank.com",
        "region" : "07"
      }
    },
    "creationDate" : "2022-04-21T13:52:12.000Z",
    "cancellationDate" : "2022-04-21T02:00:00.000Z",
    "paymentData" : {
      "paymentType" : {
        "code" : "P"
      },
      "invoicingCompany" : {
        "code" : "HBD",
        "name" : "BEDSONLINE, S.L.U.",
        "registrationNumber" : "ESB28931681"
      },
      "description" : "Titular Beds on Line, Banco: BBVA(Pl. L' Olivar 6, 07002 Palma, Baleares, España) Cuenta:ES9101824899160200711397,  SWIFT:BBVAESMMXXX,  7 días antes de la llegada de los clientes (excepto reservas de grupos. Días de antelación fijados en el momento de la confirmación). En la orden de pago rogamos indiquen nuestro número de referencia.    Gracias por su colaboración., AVISO: CAMBIO CÓDIGO SWIFT"
    },
    "cancelValuationAmount" : 0.0,
    "clientReference" : "5F816749F3A14",
    "holder" : {
      "name" : "TEST",
      "title" : "",
      "email" : "praveen@thewebconz.com",
      "mailing" : false,
      "surname" : "BOOKING",
      "telephones" : [ "8802273456" ]
    },
    "total" : 0.00,
    "totalNet" : 0.00,
    "activities" : [ {
      "status" : "CANCELLED",
      "supplier" : {
        "name" : "HOTELBEDS SPAIN, S.L.U",
        "vatNumber" : "ESB28916765"
      },
      "comments" : [ {
        "type" : "CONTRACT_REMARKS",
        "text" : "Punto de encuentro: En el Hotel // Duración: 4 horas // Incluye: Transporte, Guía, Monumentos // Exclusiones: Propinas o cualquier otra comida que no se mencione // Nombre del proveedor: Distinct Destinations Private Ltd // Teléfono de emergencia del proveedor: 00 91 9818419730 // Tipo de bono: Bono impreso o bono electrónico. Imprime y trae el bono o muestra el bono en tu dispositivo móvil para disfrutar de la actividad. // Validez del bono: Solo fecha de servicio. // Recomendaciones: Los niños requieren un adulto mayor de 16 años para comprar boletos en su nombre y deben estar acompañados por este adulto al ingresar al parque. Todos los huéspedes bajo la misma reserva deben ingresar al parque juntos. Los boletos deben usarse en el día específico seleccionado. Los boletos solo se pueden usar una vez. No se permite el reingreso. Se requiere pasaporte en la fecha del viaje //"
      } ],
      "type" : "TICKET",
      "activityReference" : "270-399717",
      "code" : "E-E10-IN-JACITY",
      "name" : "Half Day City Tour",
      "modality" : {
        "code" : "PRIVATE@STANDARD|ENG|13:30",
        "name" : "Private english 13:30",
        "rates" : [ {
          "rateDetails" : [ {
            "languages" : [ {
              "code" : "en"
            } ]
          } ]
        } ],
        "amountUnitType" : "PAX"
      },
      "dateFrom" : "2022-04-30",
      "dateTo" : "2022-04-30",
      "cancellationPolicies" : [ {
        "dateFrom" : "2022-04-29T00:00:00.000Z",
        "amount" : 0.00
      } ],
      "paxes" : [ {
        "name" : "Test",
        "mailing" : false,
        "surname" : "Booking",
        "customerId" : "1",
        "age" : 30,
        "paxType" : "AD",
        "passport" : ""
      } ],
      "questions" : [ {
        "question" : {
          "code" : "EMAILCONTACTO",
          "text" : "Email – Contacto Clientes introducido en el proceso de reserva",
          "required" : true
        },
        "answer" : "praveen@thewebconz.com"
      }, {
        "question" : {
          "code" : "HOTEL",
          "text" : "Por favor, indique en qué hotel está vd. alojado.",
          "required" : true
        },
        "answer" : "oyohotel"
      }, {
        "question" : {
          "code" : "TLFCONTACTO",
          "text" : "Teléfono – Contacto Clientes introducido en el proceso de reserva",
          "required" : true
        },
        "answer" : "8802273456"
      } ],
      "id" : "270#O#1",
      "agencyCommission" : {
        "percentage" : 11.00,
        "amount" : 0.000,
        "vatAmount" : 0.000
      },
      "contactInfo" : {
        "country" : {
          "destinations" : [ {
            "code" : "JAI",
            "name" : "Jaipur"
          } ]
        }
      },
      "amountDetail" : {
        "paxAmounts" : [ {
          "paxType" : "ADULT",
          "amount" : 78.04
        } ],
        "totalAmount" : {
          "amount" : 0.00
        }
      },
      "providerInformation" : {
        "name" : "DISTINCT DESTINATIONS PVT LTD "
      }
    } ]
  }
}

}