Car Cancel Booking API
Guidance and examples for accessing the Car Cancel Booking API
The Car Cancel Booking API allows you to cancel an existing booking. It requires data that is only available at time of booking, so you will only be able to cancel trips that you have booked.
Endpoint
Method | Endpoint | Prerequisites* |
---|---|---|
PUT | https://apim.expedia.com/cars/bookings/[TripNumber] | An active TripNumber from the Car Booking API. |
Required Headers
Key: | Expedia API key |
Authorization: | Expedia API Authorization String |
Accept: | application/vnd.exp-car.v3+json |
User-Id: | username@domain.com The email address associated to the booking. |
Partner-Transaction-Id: | Partner TransactionID String |
Example of Cancel Request
Request
https://apim.expedia.com/cars/bookings/1065756938
Cancel Body
Optional - only include if partner wants to store meta data about cancellation for later retrieval.
{
"PartnerMetaData": {
"SampleKey1": "SampleValue1",
"SampleKey2": "SampleValue2"
}
}
Cancel Response
{
"TransactionId": "f06edfa3-27f4-44e6-838c-b8dd3d0a3210",
"SupplierConfirmationNumber": "221542",
"CancellationDateTime": "2021-07-20T22:01:00-0800",
"TotalRefund": {
"Value": "1487.12",
"Currency": "USD"
},
"TotalPenalty": {
"Value": "100.08",
"Currency": "USD"
},
"DeepLinkUrls": {
"WebItinRetrieve": {
"Href": "https://www.expedia.com/1234567"
},
"ApiItinRetrieve": {
"Accept": "application/vnd.exp-booking.v3+json",
"Method": "Get",
"Href": "https://apim.expedia.com/cars/bookings/12345"
}
}
}
Error Codes
Warning Codes
API details
Here, you can explore the endpoint definitions for this API, then go to the API Explorer to try out all the XAP endpoints, download OpenAPI specs, or download our Postman collections. Testing with one or all of these options will give you an understanding of how the examples and schema definitions compare to the actual output.