Reservation groups
Create reservation group
Create a group of one or more reservations, i.e. make a reservation.
Request
[ApiBaseUrl]/api/distributor/v1/reservationGroups/create
Property | Type | Contract | Description |
---|---|---|---|
| string | required | Client application name, as described in Authorization. |
| string | required | Unique identifier of the Booking Engine configuration used. |
| string | required | Unique identifier of the hotel. |
| required | Information about the customer or guest. | |
| optional | Information about the person making the booking. | |
| array of Reservation data | required | Reservation parameters, such as dates and quantities of persons. |
| optional | Credit card data, required if hotel has payment gateway. | |
| string | optional | Unique identifier of availability block if present. Provide always when you have it. |
Customer
Property | Type | Contract | Description |
---|---|---|---|
| string | required | Email of the customer. |
| string | required | First name of the customer. |
| string | required | Last name of the customer. |
| string | optional | Telephone number of the customer. |
| string | optional | First line of the address. |
| string | optional | Second line of the address. |
| string | optional | City. |
| string | optional | Postal code of the address. |
| string | optional | ISO 3166-2 code of the state, e.g. |
| string | optional | ISO 3166-1 Aplha-2 code of the customer’s nation country, e.g. |
| boolean | optional | Subscribe to marketing emails. When |
Booker
Property | Type | Contract | Description |
---|---|---|---|
| string | required | Email of the booker. |
| string | required | First name of the booker. |
| string | required | Last name of the booker. |
| string | optional | Telephone number of the booker. |
| boolean | optional |
Send marketing emails
The boolean flag SendMarketingEmails
indicates if the user has opted in to receive marketing communication or not. The API accepts the following values:
true
- subscription is createdfalse
- subscription is disablednull
- subscription remains untouched
When Booker
is present in the request, we assume that the booker is booking on behalf of the customer, but their opt-in to marketing communication is for them as user and not for the customer. Therefore, the SendMarketingEmails
property for the booker should be set according to the user's choice, while the SendMarketingEmails
property for the customer should be set to false
or null
.
Reservation data
Property | Type | Contract | Description |
---|---|---|---|
| string | required | Identifier of the requested room or space category. |
| string | required | Start date of the reservation, i.e. arrival date. |
| string | required | End date of the reservation, i.e. departure date. |
| string | optional | A voucher code, to be paired with reservation for later retrieval only. The actual voucher rate used is determined by setting a proper |
| string | required | Identifier of the chosen rate. |
| number | required | Number of adults. |
| number | required | Number of children. |
| array of string | optional | Unique identifiers of the requested products. |
| string | optional | Additional notes. |
Credit card data
Property | Type | Contract | Description |
---|---|---|---|
| string | required | Encoded payment card data obtained from the payment gateway specific library. For more details, see our Supporting payment cards use case. |
| string | required | Expiration date of payment card, in format |
| string | required | Name of the card holder. |
Response
Property | Type | Contract | Description |
---|---|---|---|
| string | required | Unique identifier of the created reservation group. |
| string | required | Unique identifier of the reservation group customer. |
| array of Reservation | required | Details of the reservations in the group. |
| string | optional | Unique identifier of the Payment request that can be used to complete on session payment. |
| string | optional | Unique identifier of the Payment card that can be used to complete on session payment card authorization. |
| required | Total amount of the whole group. |
Reservation
Property | Type | Contract | Description |
---|---|---|---|
| string | required | Identifier of the reservation. |
| string | required | Confirmation number of the reservation. |
| string | required | Identifier of the requested room or space category. |
| string | required | Start date of the reservation, i.e. arrival date. |
| string | required | End date of the reservation, i.e. departure date. |
| number | required | Number of adults. |
| number | required | Number of children. |
| array of string | optional | Unique identifiers of the requested products. |
| string | required | Identifier of the chosen rate. |
| string | optional | Additional notes. |
| required | Total amount of the reservation. |
Documentation Update: Reservation Status Based on Feature Setting
Enable Automatic Cancellation for Optional Reservations
When the feature Enable automatic cancellation for optional reservations is activated on your bookable service under Visit Options:
Reservations with a balance due upon confirmation will initially be set to an Optional state.
These reservations will only transition to a Confirmed status upon successful payment of the due amount.
If the feature is not activated:
Reservations will be created directly in the Confirmed state.
Error response
In case of an error caused by insufficient availability (which might have decreased since the time it was provided to the client), the error response may contain the following fields on top of the standard ones:
Property | Type | Contract | Description |
---|---|---|---|
| array of number | optional | Indexes of reservations from the request that are not available anymore. |
Get reservation group
Fetch details of the specified reservation group.
Request
[ApiBaseUrl]/api/distributor/v1/reservationGroups/get
Property | Type | Contract | Description |
---|---|---|---|
| string | required | Client application name, as described in Authorization. |
| string | required | Unique identifier of the hotel. |
| string | required | Unique identifier of the reservation group. |
| optional | Extent of data to be returned. e.g. it is possible to specify that together with the reservation group, payment requests and payments will be returned. |
Reservation group extent
Property | Type | Contract | Description |
---|---|---|---|
| boolean | optional | Whether the response should contain Payment requests related to the reservation group. |
| boolean | optional | Whether the response should contain Payment attempts related to the Payment requests for reservation group. |
Response
Property | Type | Contract | Description |
---|---|---|---|
| string | required | Unique identifier of the created reservation group. |
| string | required | Unique identifier of customer who created reservation group. |
| array of Reservation | required | Details of the created reservations in the group. |
| string | optional | Unique identifier of payment request that can be used to complete on session payment. |
| required | Total amount of the whole group. | |
| array of Payment request | optional | Contains payment requests related to the reservation group. |
| array of Payment | optional | Contains Payments related to the payment requests. |
Payment request
Property | Type | Contract | Description |
---|---|---|---|
| string | required | Unique identifier of the payment request. |
| string | required | Identifier of the related reservation group. |
| string Payment request state | required | State of the payment request. |
Payment request state
Pending
- Non-finite state. Awaiting a next action.Completed
- Finite state. Payment request that has been covered by payment.Canceled
- Finite state. Payment request has been manually canceled by the creator (enterprise).Expired
- Finite state. Payment request has not been completed within its expiration time.
Payment
Property | Type | Contract | Description |
---|---|---|---|
| string | required | Unique identifier of the payment. |
| required | Amount in a currency which was used to create the Payment request - usually the default currency of the enterprise. | |
| required | Amount in currency which was used for the payment during the charge. i.e. currency that will be visible on the user bank statement for the payment. | |
| string | required | Date and time of the payment creation in UTC timezone in ISO 8601 format. |
| string | required | Identifier of the enterprise receiving the payment. |
| string | required | Identifier of the payment request. |
| string Payment state | required | State of the payment attempt. |
Amount
Property | Type | Contract | Description |
---|---|---|---|
| string | required | ISO 4217 code of the currency. |
| number | required | Gross value of the amount. (Net + sum of |
| number | required | Net value of the amount. |
| array of Tax values | required | Tax values of the amount. |
Payment state
Pending
- Non-finite state. Payment has been created, but the state is not known yet.Verifying
- Non-finite state. Payment is awaiting a 3DS verification.Charged
- Finite state. Payment has been successfully charged.Canceled
- Finite state. Payment has been canceled, and it has not been charged.Failed
- Finite state. Payment has not been charged.
Last updated