Reservation API V4
Modified on: 2024-03-28 18:19
TABLE OF CONTENTS
Introduction
Reservation API is used by DerbySoft to book a new booking/cancellation to the supplier from the distributor.
- Availability API is called by Distributors through DerbySoft, but NOT all Distributors get availability before making a booking.
- Modification API is called by Distributors through DerbySoft to modify a reservation in real-time.
In this article, 4 types of Reservation APIs will be introduced:
- Live-check(/availability) - Get availability of one hotel for one distributor.
- Book(/reservation/book) - Book a new reservation from distributor.
- Modify(/reservation/modify) - Modify an existing reservation from distributor.
- Cancel(/reservation/cancel) - Cancel a booking from distributor.
Live-check
This is an API for DerbySoft to call the Supplier's system to get availability before a booking. Normally the requests are started by distributors, but some distributors do NOT support it. Suppliers should only return available rates in the response.
Notes:
① IATA is an optional field as some distributors do NOT support it.
② childCount are per room.
POST /availability HTTP/1.1 URL: {{endpoint}}/availability Authorization: Bearer 53ac07777cdffac2d53000002d698728ce964432d7167596bc005c5fc Accept-Encoding: gzip Content-Encoding: gzip Content-Type: application/json;charset=utf-8
Request Specification
Element | Type | Required | Description | Example |
---|---|---|---|---|
header | Object | Y | / | / |
@sourceId | String | Y | MaxLength: 32 id of hotel's source in DerbySoft's system | HHBIJSOPLS |
@distributorId | String | Y | MaxLength: 32 id of distributor in DerbySoft's system | HOTELBEDS |
@version | String | Y | MaxLength: 20 version of API | v4 |
@token | String | Y | MaxLength: 64 A unique id to identify requests and responses, normally it should be UUID. | 18393849028490234 |
hotelId | String | Y | / | 100001 |
stayRange | Object | Y | / | / |
@checkin | String | Y | Checkin, format with yyyy-MM-dd | 2018-01-01 |
@checkout | String | Y | Checkout, format with yyyy-MM-dd | 2018-01-04 |
roomCriteria | Object | Y | / | / |
@roomCount | Integer | Y | Total room count per request | 2 |
@adultCount | Integer | Y | Adult count per room | 1 |
@childCount | Integer | N | Child count per room | 2 |
@childAges | Integer | N | Child ages for each child, array size MUST be same as child count. | [ 4, 8 ] |
productCandidate | Object | N | / | / |
@roomId | String | N | Room id in supplier's system | K1D |
@rateId | String | N | Rate id in supplier's system | ODAD01 |
IATA | String | N | IATA of distributor | / |
loyalty account | Object | N | / | / |
@programCode | String | Y | Loyalty program code of the supplier | BW |
@accountId | String | Y | Loyalty program account id | 1234567890123457 |
corpAccount | Object | N | / | / |
@corpProgramCode | String | Y | Corporate Hotel Program of hotel supplier | CR |
@corpId | String | Y | Corporate id in the program account | A-1232 |
isAfterPromotion | Boolean | N | The flag indicates calculating the avail room rates with the promotion rules or not.
| false |
promoteCode | String | N | Promote code defined by the hotel. it is an optional field when you want to request the promotion rates (isAfterPromotion = true). If the promotion code is empty and there are multiple promotions available for one product simultaneously, the promotion rule will be chosen according to multiPromotionsStategy. | / |
countryCode | String | N | CountryCode from guest | / |
device | String | N | Device type of the guest | / |
extensions | Object | N |
| { "key1": "value1", "key2": "value2" } |
Request Example
General Request
{ "header": { "sourceId": "HHBIJSOPLS", "distributorId": "HOTELBEDS", "version": "v4", "token": "18393849028490234" }, "hotelId": "100001", "stayRange": { "checkin": "2018-01-01", "checkout": "2018-01-04" }, "roomCriteria": { "roomCount": 2, "adultCount": 2, "childCount": 2, "childAges": [ 4, 8 ] } }
Full-Size Request
{ "header": { "sourceId": "HHBIJSOPLS", "distributorId": "HOTELBEDS", "version": "v4", "token": "18393849028490234" }, "hotelId": "100001", "stayRange": { "checkin": "2018-01-01", "checkout": "2018-01-04" }, "roomCriteria": { "roomCount": 2, "adultCount": 2, "childCount": 2, "childAges": [ 4, 8 ] }, "productCandidate": { "roomId": "K1D", "rateId": "ODAD01" }, "iata": "string", "loyaltyAccount": { "programCode": "BW", "accountId": "1234567890123457" }, "corpAccount": { "corpProgramCode": "CR", "corpId": "A-1232" }, "isAfterPromotion": false, "promoteCode": "string", "countryCode": "string", "device": "string", "extensions": { "key1": "value1", "key2": "value2" } }
Response Specification
Element | Type | Required | Description | Example |
---|---|---|---|---|
header | Object | Y | / | / |
@sourceId | String | Y | maxLength: 32 id of hotel's source in DerbySoft's system | HHBIJSOPLS |
@distributorId | String | Y | maxLength: 32 id of distributor in DerbySoft's system | HOTELBEDS |
@version | String | Y | maxLength: 20 version of API | v4 |
@token | String | Y | maxLength: 64 A unique id to identify requests and responses, normally it should be UUID. | 18393849028490234 |
hotelId | String | Y | / | 100001 |
stayRange | Object | Y | / | / |
@checkin | String | Y | check-in, format with yyyy-MM-dd | 2018-01-01 |
@checkout | String | Y | checkout, format with yyyy-MM-dd | 2018-01-04 |
roomCriteria | Object | Y | / | / |
@roomCount | Integer | Y | total room count per request | 2 |
@adultCount | Integer | Y | adult count per room | 1 |
@childCount | Integer | N | child count per room | 2 |
@childAges | Integer | N | Child ages for each child, array size MUST be same as child count. | [ 4, 8 ] |
productCandidate | Object | N | / | / |
@roomId | String | N | room id in supplier's system | K1D |
@rateId | String | N | rate id in supplier's system | ODAD01 |
IATA | String | N | IATA of distributor | / |
roomRates | Array[Object] | Y | Meal plan, fee, and cancel policy are optional fields as some distributors do not support these in API. | / |
@inventory | Integer | Y | available inventory count according to request criteria | 1 |
@isAfterPromotion | Boolean | N | The flag indicates calculating the avail room rates with the promotion rules or not. Default is false if null.
| false |
@promoteCode | String | N | The code for the promotion applied to this rate, it is required when isAfterPromotion=true. | discount001 |
@roomId | String | Y | room id in supplier's system | 10000101 |
@rateId | String | Y | rate id in supplier's system | 123456 |
@currency | String | Y | currency code[ISO-4217] | USD |
@amountBeforeTax | Array[Number] | N | the daily amount of rate without tax&fee | [ 100, 100, 120 ] |
@amountAfterTax | Array[Number] | N | the daily amount of rate with tax&fee | [ 110, 110, 130 ] |
@mealPlan | String | N | meal plan code, ref to the standard meal plan code list | RO |
@paymentType | Enum | N | indicates the product is prepaid to the hotel(PayNow) or pay at a hotel(PayLater) | PayNow |
roomRates / guarantee | Object | N | Guarantee information for this room rate. | / |
@guaranteeType | String | Y | The type of guarantee method, ref to the standard guarantee type list. | CCG |
roomRates / fees | Array[Object] | N | fee or tax by date range. | / |
fees / dateRange | Object | Y | / | / |
@startDate | String | Y | start date of date range, format with yyyy-MM-dd | 2018-01-01 |
@endDate | String | Y | end date of date range, format with yyyy-MM-dd | 2018-01-04 |
fees/fee |
| Y | / | / |
@name | String | Y | pattern: \w[\w\d]+ | Service Charge |
@type | Enum | Y | the fee or tax is included in the amount before tax or not Enum: [ Inclusive, Exclusive ] | Exclusive |
@amount | Number | Y | amount value of fee or tax | 10 |
@amountType | String | Y | Indicates how to charge the tax, 10% per room per night in this example. Enum: [ Fix, Percent ] | Percent |
@chargeType | String | Y | Enum: [ PerRoomPerNight, PerPersonPerNight, PerRoomPerStay, PerPersonPerStay ] | PerRoomPerNight |
@paymentType | Enum | N | Indicates the fee is prepaid to hotels (PayNow) or Pay at Hotel(PayLater). Enum: [ PayLater, PayNow ] | PayNow |
roomRates / cancelPolicy | Object | N | Cancellation policy defines what penalty will be charged when a guest cancels the booking at a certain advance time range. The penalty is related to no show or a time range before no show. | / |
@code | String | Y | maxLength: 128 code of cancel policy | AD100P_100P |
@description | String | N | maxLength: 1024 cancel policy description | Non Refundable |
extensions | Object | N |
| { "key1": "value1", "key2": "value2" } |
Response Example
Success Response (HTTP Status 200)
{ "header": { "sourceId": "HHBIJSOPLS", "distributorId": "HOTELBEDS", "version": "v4", "token": "18393849028490234" }, "hotelId": "100001", "stayRange": { "checkin": "2018-01-01", "checkout": "2018-01-04" }, "roomCriteria": { "roomCount": 2, "adultCount": 2, "childCount": 2, "childAges": [ 4, 8 ] }, "productCandidate": { "roomId": "K1D", "rateId": "ODAD01" }, "iata": "string", "roomRates": [ { "inventory": 2, "isAfterPromotion": false, "promoteCode": "discount001", "roomId": "10000101", "rateId": "123456", "currency": "USD", "amountBeforeTax": [ 100, 100, 120 ], "amountAfterTax": [ 110, 110, 130 ], "mealPlan": "RO", "paymentType": "PayNow", "guarantee": { "guaranteeType": "CCG" }, "fees": [ { "dateRange": { "startDate": "2018-01-01", "endDate": "2018-01-04" }, "fee": { "name": "Service Charge", "type": "Exclusive", "amount": 10, "amountType": "Percent", "chargeType": "PerRoomPerNight", "paymentType": "PayNow" } } ], "cancelPolicy": { "code": "AD100P_100P", "description": "Non Refundable" } } ], "extensions": { "key1": "key1", "key2": "key2" } }
Error Response (HTTP Status 500)
{ "errorCode": "InvalidField", "errorMessage": "Invalid Message" }
Book
This is an API for DerbySoft to call the Supplier’s system to book a new booking. DerbySoft might split one reservation into multiple ones if there is more than one room type or rate plan. Suppliers should identify each one by unique derbyResId.
Note:
IATA and payment are optional fields as some distributor does not support it.
POST /reservation/book HTTP/1.1 URL: {{endpoint}}/reservation/book Authorization:Bearer 53ac07777cdffac2d53000002d698728ce964432d7167596bc005c5fc Accept-Encoding: gzip Content-Encoding: gzip Content-Type: application/json;charset=utf-8
Request Specification
Element | Type | Required | Description | Example |
---|---|---|---|---|
header | Object | Y | / | / |
@sourceId | String | Y | maxLength: 32 id of hotel's source in DerbySoft's system | HHBIJSOPLS |
@distributorId | String | Y | maxLength: 32 id of distributor in DerbySoft's system | HOTELBEDS |
@version | String | Y | maxLength: 20 version of API | v4 |
@token | String | Y | maxLength: 64 a unique id to identify request and response, normally it should be UUID | 18393849028490234 |
reservationIds | / | Y | / | / |
@distributorResId | String | Y | reservation id in distributor's system | C2084DFL0 |
@derbyResId | String | Y | Reservation id in Derbysoft's system, this is a unique id as DerbySoft would be splitting the reservation. | D15F893D34DF |
IATA | String | N | IATA | / |
hotelId | String | Y | hotel id in supplier's system | 100001 |
stayRange | Object | Y | / | / |
@checkin | String | Y | check-in, format with yyyy-MM-dd | 2018-01-01 |
@checkout | String | Y | checkout, format with yyyy-MM-dd | 2018-01-04 |
contactPerson | Object | Y | / | / |
@firstName | String | Y | First Name | James |
@lastName | String | Y | Last Name | Bond |
String | N | 007@james.com | ||
@phone | String | N | / | / |
@address | String | N | / | / |
@extensions | Object | N | a common extension object for extra attributes like account, extra setting required by a distributor, etc | { "key": "value"} |
roomCriteria | Object | Y | / | / |
@roomCount | Integer | Y | total room count per request | / |
@adultCount | Integer | Y | adult count per room | / |
@childCount | Integer | N | child count per room | / |
@childAges | Integer | N | child ages for each child, array size MUST be same as child count. | / |
total | Object | Y | / | / |
@amountBeforeTax | Number | N | / | 640 |
@amountAfterTax | Number | N | / | 700 |
payment | Object | N | / | / |
@cardCode | String | Y | VI, MC, AX etc. Card Code | VI |
@cardNumber | String | Y | Credit card number | 4111111111111111 |
@cardHolderName | String | Y | Cardholder name | Sherlock Holmes |
@expireDate | String | Y | it should be 2 digits for month, 2 digits for year, as "MMYY". | 0119 |
loyaltyAccount | Object | N | / | / |
@programCode | String | Y | Loyalty program code of the supplier | BW |
@accountId | String | Y | Loyalty program account id | 1234567890123457 |
corpAccount | Object | N | / | / |
@corpProgramCode | String | Y | Corporate Hotel Program of hotel supplier | CR |
@corpId | String | Y | Corporate id in the program account | A-1232 |
promoteCode | String | N | Promotion code defined by hotel, the promotion code is required if making a reservation under the promotion. | / |
guests | / | / | / | / |
@firstName | String | Y | First Name | James |
@lastName | String | Y | Last Name | Bond |
String | N | 007@james.com | ||
@phone | String | N | / | / |
@address | String | N | / | / |
@age | Integer | N | Age of guest | / |
@gender | Enum | N | Gender of guest | Male |
@birthday | String | N | Birthday of guest | 1970-12-20 |
@type | String | N | type of guest, Adult, Child or Infant Enum: [ Adult, Child, Infant ] | / |
@extensions | Object | N | a common extension object for extra attributes like account, extra setting required by distributor, etc | { "key": "value"} |
@index | Integer | N | room index of room rate | 1 |
comments | Array[String] | N | / | [ "no smoking", "high floor" ] |
roomRates | Array[Object] | Y | min Items: 1 max items: 1 Meal plan, fee, and cancel policy are optional fields as some distributors do not support these in API. | / |
@roomId | String | Y | room id in supplier's system | 10000101 |
@rateId | String | Y | rate id in supplier's system | 123456 |
@currency | String | Y | currency code[ISO-4217] | USD |
@amountBeforeTax | Array[Number] | N | the daily amount of rate without tax & fee | [ 100, 100, 120 ] |
@amountAfterTax | Array[Number] | N | the daily amount of rate with tax & fee | [ 110, 110, 130 ] |
@mealPlan | String | N | meal plan code, ref to the standard meal plan code list | RO |
@paymentType | Enum | N | indicates the product is prepaid to hotels (PayNow) or pay at hotels (PayLater) | PayNow |
roomRates/guarantee | Object | N | Guarantee information for this room rate. | / |
@guaranteeType | String | Y | The type of guarantee method, ref to the standard guarantee type list. | CCG |
roomRates/fees | Array[Object] | N | fee or tax by date range | / |
fees/dateRange | Object | Y | / | / |
@startDate | String | Y | start date of date range, format with yyyy-MM-dd | 2018-01-01 |
@endDate | String | Y | end date of date range, format with yyyy-MM-dd | 2018-01-04 |
fees/fee | / | Y | / | / |
@name | String | Y | pattern: \w[\w\d]+ | Service Charge |
@type | Enum | Y | The fee or tax is included in the amount before tax or not. Enum: [ Inclusive, Exclusive ] | Exclusive |
@amount | Number | Y | amount value of fee or tax | 10 |
@amountType | String | Y | Indicates how to charge the tax, 10% per room per night in this example. Enum: [ Fix, Percent ] | Percent |
@chargeType | String | Y | Enum: [ PerRoomPerNight, PerPersonPerNight, PerRoomPerStay, PerPersonPerStay ] | PerRoomPerNight |
@paymentType | Enum | N | Indicates the fee is prepaid to hotel(PayNow) or pay at hotel(PayLater). Enum: [ PayLater, PayNow ] | PayNow |
roomRates/cancelPolicy | Object | N | Cancellation policy defines what penalty will be charged when a guest cancels the booking at a certain advance time range. The penalty is related to no show or a time range before no show. | / |
@code | String | / | maxLength: 128 code of cancel policy | AD100P_100P |
@description | String | / | maxLength: 1024 the description of the cancel policy | Non Refundable |
extensions | Object | N | a common extension object for extra attributes like account, extra setting required by a distributor, etc | / |
threeDomainSecurity | Object | N | / | / |
@cavv | String | N | Cardholder Authentication Verification Value Information retrieved from the 3DS provider when authentication is successful. | / |
@eci | String | N | The electronic commerce indicator. | / |
@xid | String | N | Transaction identifier for a 3DS Version 1 provider, assigned by the Directory Server to identify a single transaction. | / |
@threeDomainSecurityVersion | String | N | Include this only for 3D Secure 2. | / |
@transactionId | String | N | Transaction identifier for a 3DS Version 2 provider, assigned by the Directory Server to identify a single transaction. | / |
@merchantName | String | N | Identifier of the merchant completing the 3DS transaction. | / |
@extensions | Object | N | a common extension object for extra attributes like account, extra setting required by distributors, etc | / |
Request Example
{ "header": { "sourceId": "HHBIJSOPLS", "distributorId": "HOTELBEDS", "version": "v4", "token": "18393849028490234" }, "reservationIds": { "distributorResId": "C2084DFL0", "derbyResId": "D15F893D34DF" }, "iata": "string", "hotelId": "100001", "stayRange": { "checkin": "2018-01-01", "checkout": "2018-01-04" }, "contactPerson": { "firstName": "James", "lastName": "Bond", "email": "007@james.com", "phone": "string", "address": "string", "extensions": { "key": "value" } }, "roomCriteria": { "roomCount": 2, "adultCount": 1, "childCount": 2, "childAges": [ 4, 8 ] }, "total": { "amountBeforeTax": 640, "amountAfterTax": 700 }, "payment": { "cardCode": "VI", "cardNumber": "4111111111111111", "cardHolderName": "Sherlock Holmes", "expireDate": "0119" }, "loyaltyAccount": { "programCode": "BW", "accountId": "1234567890123457" }, "corpAccount": { "corpProgramCode": "CR", "corpId": "A-1232" }, "promoteCode": "string", "guests": [ { "firstName": "James", "lastName": "Bond", "email": "007@james.com", "phone": "string", "address": "string", "age": 53, "gender": "Male", "birthday": "1970-12-20", "type": "Adult", "extensions": { "key": "value" }, "index": 1 } ], "comments": [ "no smoking", "high floor" ], "roomRates": [ { "roomId": "10000101", "rateId": "123456", "currency": "USD", "amountBeforeTax": [ 100, 100, 120 ], "amountAfterTax": [ 110, 110, 130 ], "mealPlan": "RO", "paymentType": "PayNow", "guarantee": { "guaranteeType": "CCG" }, "fees": [ { "dateRange": { "startDate": "2018-01-01", "endDate": "2018-01-04" }, "fee": { "name": "Service Charge", "type": "Exclusive", "amount": 10, "amountType": "Percent", "chargeType": "PerRoomPerNight", "paymentType": "PayNow" } } ], "cancelPolicy": { "code": "AD100P_100P", "description": "Non Refundable" } } ], "extensions": { "key": "value" }, "threeDomainSecurity": { "cavv": "string", "eci": "string", "xid": "string", "threeDomainSecurityVersion": "string", "transactionId": "string", "merchantName": "string", "extensions": { "key": "value" } } }
Response Specification
Element | Type | Required | Description | Example |
---|---|---|---|---|
header | Object | Y | / | / |
@sourceld | String | Y | MaxLength: 32 The ID of hotels source in DerbySoft's system | HHBIJSOPLS |
@distributorld | String | Y | MaxLength: 32 ID of distributor in DerbySoft's system | HOTELBEDS |
@version | String | Y | MaxLength: 20 Version of API | v4 |
@token | String | Y | MaxLength: 64 A unique id to identify request and response, normally it should be UUID. | 18393849028490234 |
reservations | Object | Y | / | 100001 |
@distributorResld | String | Y | Reservation id in distributor's system | C2084DFL0 |
@derbyResld | String | Reservation id in Derbysoft's system, this is a unique id as DerbySoft would be splitting the reservation. | D15F893D34DF | |
@supplierResld | / | / | Reservation id in supplier's system | 89389494 |
extensions | Object | N | A common extension object for extra attributes like account, extra setting required by a distributor, etc. | / |
Response Example
Success Response (HTTP Status 200)
{ "header": { "sourceId": "HHBIJSOPLS", "distributorId": "HOTELBEDS", "version": "v4", "token": "18393849028490234" }, "reservationIds": { "distributorResId": "C2084DFL0", "derbyResId": "D15F893D34DF", "supplierResId": "89389494" }, "extensions": { "key": "value" } }
Error Response (HTTP Status 500)
{ "errorCode": "InvalidField", "errorMessage": "Invalid Message" }
Modify
This is an API for DerbySoft to call the Supplier's system to modify an existing booking. This is an optional API. If NOT supported, DerbySoft will do cancel+rebook.
POST /reservation/modify HTTP/1.1 URL: {{endpoint}}/reservation/modify Authorization: Bearer 53ac07777cdffac2d53000002d698728ce964432d7167596bc005c5fc Accept-Encoding: gzip Content-Encoding: gzip Content-Type: application/json;charset=utf-8
Note: IATA and payment are optional fields as some distributor does not support it
POST /reservation/modify HTTP/1.1 URL: {{endpoint}}/reservation/modify Authorization: Bearer 53ac07777cdffac2d53000002d698728ce964432d7167596bc005c5fc Accept-Encoding: gzip Content-Encoding: gzip Content-Type: application/json;charset=utf-8
Request Specification
Element | Type | Required | Description | Example |
---|---|---|---|---|
header | Object | Y | / | / |
@sourceId | String | Y | maxLength: 32 id of hotel's source in DerbySoft's system | HHBIJSOPLS |
@distributorId | String | Y | maxLength: 32 id of distributor in DerbySoft's system | HOTELBEDS |
@version | String | Y | maxLength: 20 version of API | v4 |
@token | String | Y | maxLength: 64 A unique id to identify request and response, normally it should be UUID. | 18393849028490234 |
reservations | / | Y | / | / |
@distributorResId | String | Y | Reservation id in distributor's system | C2084DFL0 |
@derbyResId | String | Y | Reservation id in Derbysoft's system, this is a unique id as DerbySoft would be splitting the reservation. | D15F893D34DF |
@supplierResId | String | N | reservation id in supplier's system | 89389494 |
iata | String | N | IATA | / |
hotelId | String | Y | hotel id in supplier's system | 100001 |
stayRange | Object | Y | / | / |
@checkin | String | Y | check-in, format with yyyy-MM-dd | 2018-01-01 |
@checkout | String | Y | checkout, format with yyyy-MM-dd | 2018-01-04 |
contactperson | Object | Y | / | / |
@firstName | String | Y | First Name | James |
@lastName | String | Y | Last Name | Bond |
String | N | 007@james.com | ||
@phone | String | N | / | / |
@address | String | N | / | / |
@extensions | Object | N | a common extension object for extra attributes like account, extra setting required by a distributor, etc. | { "key": "value"} |
roomCriteria | Object | Y | / | / |
@roomCount | Integer | Y | total room count per request | / |
@adultCount | Integer | Y | adult count per room | / |
@childCount | Integer | N | child count per room | / |
@childAges | Integer | N | Child ages for each child, array size MUST be same as child count. | / |
total | Object | Y | / | / |
@amountBeforeTax | Number | N | / | 640 |
@amountAfterTax | Number | N | / | 700 |
payment | Object | N | / | / |
@cardCode | String | Y | VI, MC, AX, etc. Card Code | VI |
@cardNumber | String | Y | Credit card number | 4111111111111111 |
@cardHolderName | String | Y | Cardholder name | Sherlock Holmes |
@expireDate | String | Y | It should be 2 digits for the month, 2 digits for the year, as "MMYY". | 0119 |
loyalty account | Object | N | / | / |
@programCode | String | Y | Loyalty program code of the supplier | BW |
@accountId | String | Y | Loyalty program account id | 1234567890123457 |
corpAccount | Object | N | / | / |
@corpProgramCode | String | Y | Corporate Hotel Program of hotel supplier | CR |
@corpId | String | Y | Corporate id in the program account | A-1232 |
promoteCode | String | N | The promotion code is defined by the hotel, the promotion code is required if making a reservation under the promotion. | / |
guests | / | / | / | / |
@firstName | String | Y | First Name | James |
@lastName | String | Y | Last Name | Bond |
String | N | 007@james.com | ||
@phone | String | N | / | / |
@address | String | N | / | / |
@age | Integer | N | age of guest | / |
@gender | Enum | N | Gender of guest | Male |
@birthday | String | N | Birthday of guest format with yyyy-MM-dd | 1970-12-20 |
@type | String | N | type of guest, Adult, Child or Infant Enum: [ Adult, Child, Infant ] | / |
@extensions | Object | N | a common extension object for extra attributes like account, extra setting required by a distributor, etc | { "key": "value"} |
@index | Integer | N | room index of room rate | 1 |
comments | Array[String] | N | / | [ "no smoking", "high floor" ] |
roomRates | Array[Object] | Y | min Items: 1 max Items: 1 Meal plan, fee, and cancel policy are optional fields as some distributors do not support these in API. | / |
@roomId | String | Y | room id in supplier's system | 10000101 |
@rateId | String | Y | rate id in supplier's system | 123456 |
@currency | String | Y | currency code[ISO-4217] | USD |
@amountBeforeTax | Array[Number] | N | the daily amount of rate without tax & fee | [ 100, 100, 120 ] |
@amountAfterTax | Array[Number] | N | the daily amount of rate with tax & fee | [ 110, 110, 130 ] |
@mealPlan | String | N | meal plan code, ref to the standard meal plan code list | RO |
@paymentType | Enum | N | Indicates the product is prepaid to the hotel(PayNow) or pay at a hotel(PayLater). | PayNow |
roomRates / guarantee | Object | N | Guarantee information for this room rate. | / |
@guaranteeType | String | Y | The type of guarantee method, ref to the standard guarantee type list. | CCG |
roomRates / fees | Array[Object] | N | fee or tax by date range. | / |
fees / dateRange | Object | Y | / | / |
@startDate | String | Y | start date of date range, format with yyyy-MM-dd | 2018-01-01 |
@endDate | String | Y | end date of date range, format with yyyy-MM-dd | 2018-01-04 |
fees/fee | / | Y | / | / |
@name | String | Y | pattern: \w[\w\d]+ | Service Charge |
@type | Enum | Y | The fee or tax is included in the amount before tax or not. Enum: [ Inclusive, Exclusive ] | Exclusive |
@amount | Number | Y | amount value of fee or tax | 10 |
@amountType | String | Y | Indicates how to charge the tax, 10% per room per night in this example. Enum: [ Fix, Percent ] | Percent |
@chargeType | String | Y | Enum: [ PerRoomPerNight, PerPersonPerNight, PerRoomPerStay, PerPersonPerStay ] | PerRoomPerNight |
@paymentType | Enum | N | Indicates the fee is prepaid to hotels (PayNow) or pay at the hotel (PayLater) Enum: [ PayLater, PayNow ] | PayNow |
roomRates / cancelPolicy | Object | N | Cancellation policy defines what penalty will be charged when a guest cancels the booking in a certain advance time range. The penalty is related to no show or a time range before no show. | / |
@code | String | / | maxLength: 128 code of cancel policy | AD100P_100P |
@description | String | / | maxLength: 1024 the description of the cancel policy | Non Refundable |
extensions | Object | N | a common extension object for extra attributes like account, extra setting required by a distributor, etc | / |
threeDomainSecurity | Object | N | / | / |
@cavv | String | N | Cardholder Authentication Verification Value Information retrieved from the 3DS provider when authentication is successful. | / |
@eci | String | N | The electronic commerce indicator. | / |
@xid | String | N | Transaction identifier for a 3DS Version 1 provider, assigned by the Directory Server to identify a single transaction. |
|
@threeDomainSecurityVersion | String | N | Include this only for 3D Secure 2. | / |
@transactionId | String | N | Transaction identifier for a 3DS Version 2 provider, assigned by the Directory Server to identify a single transaction. | / |
@merchantName | String | N | Identifier of the merchant completing the 3DS transaction. | / |
@extensions | Object | N | a common extension object for extra attributes like account, extra setting required by a distributor, etc. | / |
Request Example
{ "header": { "sourceId": "HHBIJSOPLS", "distributorId": "HOTELBEDS", "version": "v4", "token": "18393849028490234" }, "reservationIds": { "distributorResId": "C2084DFL0", "derbyResId": "D15F893D34DF", "supplierResId": "89389494" }, "iata": "string", "hotelId": "100001", "stayRange": { "checkin": "2018-01-01", "checkout": "2018-01-04" }, "contactPerson": { "firstName": "James", "lastName": "Bond", "email": "007@james.com", "phone": "string", "address": "string", "extensions": { "key": "value" } }, "roomCriteria": { "roomCount": 2, "adultCount": 1, "childCount": 2, "childAges": [ 4, 8 ] }, "total": { "amountBeforeTax": 640, "amountAfterTax": 700 }, "payment": { "cardCode": "VI", "cardNumber": "4111111111111111", "cardHolderName": "Sherlock Holmes", "expireDate": "0119" }, "loyaltyAccount": { "programCode": "BW", "accountId": "1234567890123457" }, "corpAccount": { "corpProgramCode": "CR", "corpId": "A-1232" }, "promoteCode": "string", "guests": [ { "firstName": "James", "lastName": "Bond", "email": "007@james.com", "phone": "string", "address": "string", "age": 53, "gender": "Male", "birthday": "1970-12-20", "type": "Adult", "extensions": { "key": "value" }, "index": 1 } ], "comments": [ "no smoking", "high floor" ], "roomRates": [ { "roomId": "10000101", "rateId": "123456", "currency": "USD", "amountBeforeTax": [ 100, 100, 120 ], "amountAfterTax": [ 110, 110, 130 ], "mealPlan": "RO", "paymentType": "PayNow", "guarantee": { "guaranteeType": "CCG" }, "fees": [ { "dateRange": { "startDate": "2018-01-01", "endDate": "2018-01-04" }, "fee": { "name": "Service Charge", "type": "Exclusive", "amount": 10, "amountType": "Percent", "chargeType": "PerRoomPerNight", "paymentType": "PayNow" } } ], "cancelPolicy": { "code": "AD100P_100P", "description": "Non Refundable" } } ], "extensions": { "key": "value" }, "threeDomainSecurity": { "cavv": "string", "eci": "string", "xid": "string", "threeDomainSecurityVersion": "string", "transactionId": "string", "merchantName": "string", "extensions": { "key": "value" } } }
Response Specification
Element | Type | Required | Description | Example |
---|---|---|---|---|
header | Object | Y | / | / |
@sourceId | String | Y | maxLength: 32 id of hotel's source in DerbySoft's system | HHBIJSOPLS |
@distributorId | String | Y | maxLength: 32 id of distributor in DerbySoft's system | GTA |
@version | String | Y | maxLength: 20 version of API | v4 |
@token | String | Y | maxLength: 64 A unique id to identify request and response, normally it should be UUID. | 18393849028490234 |
reservationIds | Object | Y | / | 100001 |
@distributorResId | String | Y | reservation id in distributor's system | C2084DFL0 |
@derbyResId | String | Y | Reservation id in Derbysoft's system, this is a unique id as DerbySoft would be splitting the reservation. | D15F893D34DF |
@supplierResId | / | / | reservation id in supplier's system | 89389494 |
extensions | Object | N | a common extension object for extra attributes like account, extra setting required by a distributor, etc. | / |
Response Example
Success Response (HTTP Status 200)
{ "header": { "sourceId": "HHBIJSOPLS", "distributorId": "GTA", "version": "v4", "token": "18393849028490234" }, "reservationIds": { "distributorResId": "C2084DFL0", "derbyResId": "D15F893D34DF", "supplierResId": "89389494" }, "extensions": { "key": "value" } }
Error Response (HTTP Status 500)
{ "errorCode": "InvalidField", "errorMessage": "Invalid Message" }
Cancel
This is an API for DerbySoft to call the Supplier's system to cancel a booking. Since DerbySoft does splitting on original reservation, Supplier should cancel the reservation by unique derbyResId or supplierResId.
POST /reservation/cancel HTTP/1.1 URL: {{endpoint}}/reservation/cancel Authorization: Bearer 53ac07777cdffac2d53000002d698728ce964432d7167596bc005c5fc Accept-Encoding: gzip Content-Encoding: gzip Content-Type: application/json;charset=utf-8
Request Specification
Element | Type | Required | Description | Example |
---|---|---|---|---|
header | Object | Y | / | / |
@sourceId | String | Y | MaxLength: 32 ID of hotel's source in DerbySoft's system | HHBIJSOPLS |
@distributorId | String | Y | maxLength: 32 The ID of the distributor in DerbySoft's system | GTA |
@version | String | Y | MaxLength: 20 Version of API | v4 |
@token | String | Y | MaxLength: 64 A unique id to identify request and response, normally it should be UUID. | 18393849028490234 |
reservationIds | / | Y | / | / |
@distributorResId | String | Y | Reservation id in distributor's system | C2084DFL0 |
@derbyResId | String | Y | Reservation id in Derbysoft's system, this is A unique id as DerbySoft would be splitting the reservation. | D15F893D34DF |
@supplierResId | String | Y | Reservation id in supplier's system | 89389494 |
extensions | Object | N | A common extension object for extra attributes like account, extra setting required by a distributor, etc. | {"key": "value"} |
Request Example
{ "header": { "sourceId": "HHBIJSOPLS", "distributorId": "HOTELBEDS", "version": "v4", "token": "18393849028490234" }, "reservationIds": { "distributorResId": "C2084DFL0", "derbyResId": "D15F893D34DF", "supplierResId": "89389494" }, "extensions": { "key": "value" } }
Response Specification
Element | Type | Required | Description | Example |
---|---|---|---|---|
header | Object | Y | / | / |
@sourceId | String | Y | maxLength: 32 id of hotel's source in DerbySoft's system | HHBIJSOPLS |
@distributorId | String | Y | maxLength: 32 id of distributor in DerbySoft's system | GTA |
@version | String | Y | maxLength: 20 version of API | v4 |
@token | String | Y | maxLength: 64 a unique id to identify request and response, normally it should be UUID. | 18393849028490234 |
reservationIds | Object | Y | / | 100001 |
@distributorResId | String | Y | reservation id in distributor's system | C2084DFL0 |
@derbyResId | String | Y | Reservation id in Derbysoft's system, this is a unique id as DerbySoft would be splitting the reservation. | D15F893D34DF |
@supplierResId | String | Y | reservation id in supplier's system | 89389494 |
cancellationId | String | Y | cancel confirmation number in supplier's system | C89389494 |
extensions | Object | N | A common extension object for extra attributes like account, extra setting required by a distributor, etc. | / |
Response Example
Success Response (HTTP Status 200)
{ "header": { "sourceId": "HHBIJSOPLS", "distributorId": "HOTELBEDS", "version": "v4", "token": "18393849028490234" }, "reservationIds": { "distributorResId": "C2084DFL0", "derbyResId": "D15F893D34DF", "supplierResId": "89389494" }, "cancellationId": "C89389494", "extensions": { "key": "value" } }
Error Response (HTTP Status 500)
{ "errorCode": "InvalidField", "errorMessage": "Invalid Message" }
Did you find it helpful? Yes No
Send feedback