v1

latestOpenAPI 3.0.02026-07-141046209.2 KB
Bookings

Cancel a booking

<!-- theme: danger -->

Cancels the specified booking with immediate effect. This action might result in a cancellation charge being charged.

Submitting this request means we'll notify the hotel of the cancellation and that they won't expect your guest.

You can use GET /bookings/{bookingId}to see the cancellation policies that apply to a booking at a given point in time. Please note that cancelling a booking will incur a cancellation fee according to the rules that apply at the time of cancellation. You can find the cancellation fee that has been charged in the response of this call in the cancellation.fee object.

If the booking you cancelled allows for a partial or full refund, we'll credit your Impala balance with the amount we charged you as the seller of this booking – meaning we'll deduct the amount the next time we're requesting payment for the sum of all the bookings you made.

delete/bookings/{bookingId}

Path parameters

bookingIdstring required

The unique identifier of the booking you would like to update.

Response

Returns the cancelled booking. This includes the cancellation.fee object with details on the fee for this cancellation (most frequently this means either a zero fee, so the booking is fully refundable, or the full amount of the stay is due as a fee, meaning the booking was non-refundable).

bookingIdstring required

Unique identifier for this booking within the Impala platform.

createdAtstring date-time required

Date and time (in UTC and ISO 8601 format) when the booking was created.

endstring date required

The departure date of the booking.

hotelConfirmationCodestring nullable

The hotel's confirmation identifier for this booking.

paymentBearerTokenstring nullable

If status is PAYMENT_REQUIRED, then this should be used as the Authorisation header for the POST to the /payments endpoint.

paymentClientSecretstring nullable

If status is PAYMENT_REQUIRED, then this should be used as the client secret when rendering Impala Payment Elements in the UI.

startstring date required

The arrival date of the booking.

status'CANCELLED' | 'PENDING' | 'ACCEPTED' | 'PAYMENT_REQUIRED' | 'PAYMENT_ABANDONED' required

Status of this booking within the Impala platform. When you make a booking, it'll first appear as PENDING until we receive the hotel's confirmation details. At this point your booking will move to ACCEPTED.

updatedAtstring date-time required

Date and time (in UTC and ISO 8601 format) when the booking was last updated.

Example response

{
  "bookedRooms": [
    {
      "rate": {
        "cancellationPolicies": [
          {
            "end": "2020-12-17 23:59:59.999",
            "fee": {
              "count": 100,
              "price": {
                "amount": 9500,
                "currency": {
                  "code": "EUR"
                }
              },
              "type": "PERCENTAGE"
            },
            "formatted": "Non-refundable after October 19, 2021 00:00",
            "start": "2020-12-15 23:59:59.999"
          }
        ],
        "components": [
          {
            "formatted": "breakfast",
            "type": "BREAKFAST"
          }
        ],
        "end": "2021-11-23",
        "hotelAgreement": {
          "conditions": [
            "PRIVATE_RATE"
          ],
          "dealId": "D1234",
          "dealsSellable": {
            "remaining": 5
          },
          "discount": {
            "count": 10,
            "type": "PERCENTAGE"
          },
          "hotelAgreementId": "A82983",
          "href": "v1/deal-requests/D1234/agreements/A76543",
          "specialInstructions": "This deal can only be sold via desktop (not allowed for mobile apps)"
        },
        "retailRate": {
          "taxesAndFees": {
            "includedInRate": [
              {
                "charges": {
                  "amount": 9500,
                  "currency": {
                    "code": "EUR"
                  }
                },
                "formatted": "10% VAT"
              }
            ],
            "payAtHotel": [
              {
                "charges": {
                  "amount": 9500,
                  "currency": {
                    "code": "EUR"
                  }
                },
                "formatted": "10% VAT"
              }
            ]
          },
          "total": {
            "amount": 9500,
            "currency": {
              "code": "EUR"
            }
          }
        },
        "sellerCommissionPercentage": 9.5,
        "start": "2021-11-20"
      },
      "roomType": {
        "name": "Penthouse Suite",
        "roomTypeId": "d5b192ce-c45f-46da-abf5-3880b429b7cc"
      },
      "sellerToImpalaPayment": {
        "amount": 9500,
        "currency": {
          "code": "EUR"
        }
      }
    }
  ],
  "bookingId": "IM-0199-00000103",
  "cancellation": {
    "fee": {
      "count": 100,
      "price": {
        "amount": 9500,
        "currency": {
          "code": "EUR"
        }
      },
      "type": "PERCENTAGE"
    }
  },
  "contact": {
    "email": "jocelin.carreon.crespo@example.com",
    "firstName": "Jocelín",
    "lastName": "Carreón Sample",
    "contactId": "3c8aa2ff-5e5e-4f23-bcfc-9036ba818a84"
  },
  "createdAt": "2020-10-20T12:38:22Z",
  "end": "2020-10-24",
  "hotel": {
    "address": {
      "city": "Impalaland",
      "country": "GBR",
      "countryName": "United Kingdom",
      "line1": "12 Sample Avenue",
      "postalCode": "12345"
    },
    "checkIn": {
      "from": "12:00",
      "to": "21:00"
    },
    "checkOut": {
      "from": "12:00",
      "to": "21:00"
    },
    "hotelId": "60a06628-2c71-44bf-9685-efbd2df4179e",
    "href": "/v1/hotels/60a06628-2c71-44bf-9685-efbd2df4179e",
    "images": [
      {
        "altText": "A photo of an object",
        "height": 4000,
        "url": "https://cdn.impala.travel/ckhlsuxbb000b3b666rr9ussq.jpg",
        "width": 4000
      }
    ],
    "location": {
      "latitude": 58.386186,
      "longitude": -9.952549
    },
    "name": "Impala Minimalist Palace",
    "starRating": 2.5,
    "timezone": "AST"
  },
  "hotelConfirmationCode": "04M3995",
  "start": "2020-10-21",
  "status": "ACCEPTED",
  "updatedAt": "2020-10-22T20:12:33Z"
}