v1

latestOpenAPI 3.0.02026-07-141046209.2 KB
Bookings

Change a booking contact

Updates a confirmed booking with the booking contact details you provide in the request body.

In addition, we require you to supply a updateBookingVersionAtTimestamp field with the updatedAt timestamp of the booking. You can find this value by looking up the booking via the Retrieve a booking endpoint. This is to avoid race conditions where another update might have happened since the last time you have checked for the current details of this booking.

put/bookings/{bookingId}/booking-contact

Path parameters

bookingIdstring required

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

Request body

updateBookingVersionAtTimestampstring date-time required

The timestamp of when the booking was last updated

Example request

{
  "bookingContact": {
    "email": "jocelin.carreon.crespo@example.com",
    "firstName": "Jocelín",
    "lastName": "Carreón Sample"
  },
  "updateBookingVersionAtTimestamp": "2020-12-20T11:01:30.745Z"
}

Response

We've submitted the change to the hotel and are returning the booking details in the response body.

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"
}