ExtranetUSB-Reservation API
Modified on: 2024-03-06 18:31
Introduction
Reservation API is used by DerbySoft to book a new booking/cancellation to the supplier from the distributor.
Availability API is calling by distributor through DerbySoft, but NOT all distributors are getting availability before a booking.
Modification API is NOT supported in this version but will be added in the near future.
Supplier can call DerbySoft's query reservation API to troubleshoot things like ghost booking, etc.
In this article, 5 types of API will be introduced:
Book Notify (/reservation/bookNotify) - Notify a new reservation from distributor.
Modify Nofity (/reservation/modifyNotify) - Modify an existing reservation from distributor.
Cancel Notify (/reservation/cancelNotify) - Notify a cancellation from distributor.
Query Res List (/reservations) - Query reservation ids by a timestamp range.
Query Res Details (/reservation/{distributorResId}) - Query a reservation.
TABLE OF CONTENTS
Book Notify
This is an API for DerbySoft to call the Supplier's system to notify for a new booking. DerbySoft might split one reservation into multiple ones if there is more than one room type or rate plan. The supplier should identify each one by unique derbyResId.
Notes:
① IATA and payment are optional fields as some distributors do not support it.
② notifyRequired indicates if the distributor does support force sell or rate overwrite. Empty if unknown by default.
POST /reservation/bookNotify HTTP/1.1
URL: {{endpoint}}/reservation/bookNotify
Authorization: 53ac07777cdffac2d53000002d698728ce964432d7167596bc005c5fc
Accept-Encoding: gzip
Content-Encoding: gzip
Content-Type: application/json;charset=utf-8
Request Example
{
"header": {
"sourceId": "HHBIJSOPLS",
"distributorId": "BOOKINGCOM",
"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": "[email protected]",
"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"
},
"guests": [
{
"firstName": "James",
"lastName": "Bond",
"email": "[email protected]",
"phone": "string",
"address": "string",
"age": 53,
"gender": "Male",
"birthday": "1970-12-20",
"type": "Adult",
"extensions": {
"key": "value"
},
"index": "1"
}
],
"comments": [
"no smoking",
"high floor"
],
"promoteCode": "discount001",
"roomRates": [
{
"roomId": "10000101",
"rateId": "123456",
"currency": "USD",
"amountBeforeTax": [
100,
100,
120
],
"amountAfterTax": [
110,
110,
130
],
"mealPlan": "RO",
"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"
}
},
"notifyRequired": {
"forceSell": true,
"rateOverride": true
}
}
Request Specification
Attribute | Type | Required | Description | Example |
---|---|---|---|---|
header | object | Yes | / | / |
@sourceId | string | Yes | MaxLength: 32 id of hotel's source in DerbySoft's system | HHBIJSOPLS |
@distributorId | string | Yes | MaxLength: 32 id of distributor in DerbySoft's system | GTA |
@version | string | Yes | MaxLength: 20 version of API | v4 |
@token | string | Yes | MaxLength: 64 a unique id to identify request and response, normally it should be UUID. | 18393849028490234 |
reservationIds | / | Yes | / | / |
@distributorResId | string | Yes | Reservation id in distributor's system | C2084DFL0 |
@derbyResId | string | No | Reservation id in Derbysoft's system, this is a unique id as DerbySoft would be splitting the reservation. | D15F893D34DF |
IATA | string | No | IATA | / |
hotelId | string | Yes | Hotel ID in distributor's system | 100001 |
stayRange | object | Yes | / | / |
@checkin | string | Yes | Checkin, format with yyyy-MM-dd | 2018-01-01 |
@checkout | string | Yes | Checkout, format with yyyy-MM-dd | 2018-01-04 |
contactPerson | object | Yes | / | / |
@firstName | string | Yes | First Name | James |
@lastName | string | Yes | Last Name | Bond |
string | No | |||
@phone | string | No | / | / |
@address | string | No | / | / |
@extensions | object | No | A common extension object for extra attributes like account, extra setting required by a distributor, etc. | { "key": "value"} |
roomCriteria | object | Yes | / | / |
@roomCount | integer | Yes | Total room count per request | / |
@adultCount | integer | Yes | Adult count per room | / |
@childCount | integer | No | Child count per room | / |
@childAges | integer | No | Child ages for each child, array size MUST be same as child count. | / |
total | object | Yes | / | / |
@amountBeforeTax | number | No | / | 640 |
@amountAfterTax | number | No | / | 700 |
payment | / | / | / | / |
@cardCode | string | No | VI, MC, AX, etc. Ref to Appendix: Card Code | VI |
@cardNumber | string | No | Credit card number | 4111111111111111 |
@cardHolderName | string | No | Card holder name | Sherlock Holmes |
@expireDate | string | No | It should be 2 digits for the month, 2 digits for the year, as "MMYY". | 0119 |
loyaltyAccount | object | No | / | / |
@programCode | string | Yes | Loyalty program code of the supplier | BW |
@accountId | string | Yes | Loyalty program account id | 1234567890123457 |
corpAccount | object | No | / | / |
@corpProgramCode | string | Yes | Corporate Hotel Program of hotel supplier | CR |
@corpId | string | Yes | Corporate id in the program account | A-1232 |
promoteCode | string | No | The promotion code is defined by the hotel, the promotion code is required if making a reservation under the promotion. | / |
guests | / | / | / | / |
@firstName | string | Yes | First Name | James |
@lastName | string | Yes | Last Name | Bond |
string | No | |||
@phone | string | No | / | / |
@address | string | No | / | / |
@age | integer | No | Age of guest | / |
@gender | enum | No | Enum: [Male, Female] | / |
@birthday | string | No | Birthday of guest format with yyyy-MM-dd | / |
@type | string | No | Type of guest, Adult, Child, or Infant. Enum: [ Adult, Child, Infant ] | / |
@extensions | object | No | A common extension object for extra attributes like account, extra setting required by a distributor, etc | { "key": "value"} |
@index | integer | No | Room index of room rate | 1 |
comments | array[string] | No | / | [ "no smoking", "high floor" ] |
roomRates | array[object] | Yes | 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 | Yes | Room id in distributor's system | 10000101 |
@rateId | string | Yes | Rate id in distributor's system | 123456 |
@currency | string | Yes | Currency code[ISO-4217] | USD |
@amountBeforeTax | array[number] | No | The daily amount of rate without tax & fee | [ 100, 100, 120 ] |
@amountAfterTax | array[number] | No | The daily amount of rate with tax & fee | [ 110, 110, 130 ] |
@mealPlan | string | No | Meal plan code, refer to the standard meal plan code list. | RO |
roomRates / fees | array[object] | No | Fee or tax by date range. | / |
fees / dateRange | object | Yes | / | / |
@startDate | string | Yes | Start date of date range, format with yyyy-MM-dd | 2018-01-01 |
@endDate | string | Yes | End date of date range, format with yyyy-MM-dd | 2018-01-04 |
fees/fee | Yes | / | / | |
@name | string | Yes | Pattern: \w[\w\d]+ | Service Charge |
@type | enum | Yes | The fee or tax is included in the amount before tax or not. Enum: [ Inclusive, Exclusive ] | Exclusive |
@amount | number | Yes | Amount value of fee or tax | 10 |
@amountType | string | Yes | Indicates how to charge the tax, 10% per room per night in this example. Enum: [ Fix, Percent ] | Percent |
@chargeType | string | Yes | Enum: [ PerRoomPerNight, PerPersonPerNight, PerRoomPerStay, PerPersonPerStay ] | PerRoomPerNight |
@paymentType | enum | No | Indicates the fee is prepaid to the hotel(PayNow) or pay at the hotel(PayLater). Enum: [ PayLater, PayNow ] | PayNow |
roomRates / cancelPolicy | object | No | 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 | No | A common extension object for extra attributes like account, extra setting required by the distributor, etc. | / |
threeDomainSecurity | object | No | / | / |
@cavv | string | No | Cardholder Authentication Verification Value Information retrieved from the 3DS provider when authentication is successful. | / |
@eci | string | No | The electronic commerce indicator | / |
@xid | string | No | Transaction identifier for a 3DS Version 1 provider, assigned by the Directory Server to identify a single transaction. | / |
@threeDomainSecurityVersion | string | No | Include this only for 3D Secure 2 | / |
@transactionId | string | No | Transaction identifier for a 3DS Version 2 provider, assigned by the Directory Server to identify a single transaction. | / |
@merchantName | string | No | Identifier of the merchant completing the 3DS transaction. | / |
@extensions | object | No | A common extension object for extra attributes like account, extra setting required by a distributor, etc. | / |
notifyRequired | object | No | / | / |
@forceSell | boolean | Yes | / | true |
@rateOverride | boolean | Yes | / | true |
Response Example
Success Response (HTTP Status 200)
{
"header": {
"sourceId": "HHBIJSOPLS",
"distributorId": "BOOKINGCOM",
"version": "v4",
"token": "18393849028490234"
},
"reservationIds": {
"distributorResId": "C2084DFL0",
"derbyResId": "D15F893D34DF",
"supplierResId": "89389494"
},
"notifyStatus": {
"forceSell": true,
"rateOverride": true
},
"extensions": {
"key": "value"
}
}
- Error Response (HTTP Status 500)
{
"errorCode": "InvalidField",
"errorMessage": "Invalid Message"
}
Response Specification
Attribute | Type | Required | Description | Example |
---|---|---|---|---|
header | object | Yes | / | / |
@sourceId | string | Yes | MaxLength: 32 The ID of the hotel's source in DerbySoft's system | HHBIJSOPLS |
@distributorId | string | Yes | MaxLength: 32 ID of distributor in DerbySoft's system | GTA |
@version | string | Yes | MaxLength: 20 version of API | v4 |
@token | string | Yes | MaxLength: 64 A unique id to identify request and response, normally it should be UUID. | 18393849028490234 |
reservationIds | object | Yes | / | 100001 |
@distributorResId | string | Yes | Reservation id in distributor's system | C2084DFL0 |
@derbyResId | string | Yes | Reservation id in Derbysoft's system, this is a unique id as DerbySoft would be splitting the reservation. | D15F893D34DF |
@supplierResId | string | Yes | Reservation confirmation id in supplier's system, required for a successful reservation. | 89389494 |
notifyStatus | object | No | / | / |
@forceSell | boolean | Yes | / | true |
@rateOverride | boolean | Yes | / | true |
extensions | object | No | A common extension object for extra attributes like account, extra setting required by a distributor, etc. | / |
Modify Notify
This is an API for DerbySoft to call Supplier's system to modify an existing booking. This is an optional API. If NOT support, DerbySoft will do cancel+rebook.
Notes:
① IATA and payment are optional fields as some distributor does not support it.
② notifyRequired indicates if the distributor does support force sell or rate overwrite. Empty if unknown by default.
POST /reservation/modifyNotify HTTP/1.1
URL: {{endpoint}}/reservation/modifyNotify
Authorization: 53ac07777cdffac2d53000002d698728ce964432d7167596bc005c5fc
Accept-Encoding: gzip
Content-Encoding: gzip
Content-Type: application/json;charset=utf-8
Request Example
{
"header": {
"sourceId": "HHBIJSOPLS",
"distributorId": "BOOKINGCOM",
"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": "[email protected]",
"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"
},
"guests": [
{
"firstName": "James",
"lastName": "Bond",
"email": "[email protected]",
"phone": "string",
"address": "string",
"age": 53,
"gender": "Male",
"birthday": "1970-12-20",
"type": "Adult",
"extensions": {
"key": "value"
},
"index": "1"
}
],
"comments": [
"no smoking",
"high floor"
],
"promoteCode": "discount001",
"roomRates": [
{
"roomId": "10000101",
"rateId": "123456",
"currency": "USD",
"amountBeforeTax": [
100,
100,
120
],
"amountAfterTax": [
110,
110,
130
],
"mealPlan": "RO",
"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"
}
},
"notifyRequired": {
"forceSell": true,
"rateOverride": true
}
}
Request Specification
Attribute | Type | Required | Description | Example |
---|---|---|---|---|
header | object | Yes | / | / |
@sourceId | string | Yes | MaxLength: 32 The ID of the hotel's source in DerbySoft's system | HHBIJSOPLS |
@distributorId | string | Yes | MaxLength: 32 The ID of the distributor in DerbySoft's system | GTA |
@version | string | Yes | MaxLength: 20 version of API | v4 |
@token | string | Yes | MaxLength: 64 A unique id to identify request and response, normally it should be UUID. | 18393849028490234 |
reservationIds | / | Yes | / | / |
@distributorResId | string | Yes | Reservation id in distributor's system | C2084DFL0 |
@derbyResId | string | Yes | Reservation id in Derbysoft's system, this is a unique id as DerbySoft would be splitting the reservation. | D15F893D34DF |
@supplierResId | string | No | Reservation id in supplier's system | 89389494 |
IATA | string | No | IATA | / |
hotelId | string | Yes | Hotel ID in supplier's system | 100001 |
stayRange | object | Yes | / | / |
@checkin | string | Yes | Check-in, format with yyyy-MM-dd | 2018-01-01 |
@checkout | string | Yes | Check out, format with yyyy-MM-dd | 2018-01-04 |
contactPerson | object | Yes | / | / |
@firstName | string | Yes | First Name | James |
@lastName | string | Yes | Last Name | Bond |
string | No | |||
@phone | string | No | / | / |
@address | string | No | / | / |
@extensions | object | No | A common extension object for extra attributes like account, extra setting required by a distributor, etc. | { "key": "value"} |
roomCriteria | object | Yes | / | / |
@roomCount | integer | Yes | Total room count per request | / |
@adultCount | integer | Yes | Adult count per room | / |
@childCount | integer | No | Child count per room | / |
@childAges | integer | No | Child ages for each child, array size MUST be same as @childCount. | / |
total | object | Yes | / | / |
@amountBeforeTax | number | No | / | 640 |
@amountAfterTax | number | No | / | 700 |
payment | / | / | / | / |
@cardCode | string | No | VI, MC, AX, etc. Ref to Appendix: Card Code | VI |
@cardNumber | string | No | Credit card number | 4111111111111111 |
@cardHolderName | string | No | Cardholder name | Sherlock Holmes |
@expireDate | string | No | It should be 2 digits for the month, 2 digits for the year, as "MMYY". | 0119 |
loyaltyAccount | object | No | / | / |
@programCode | string | Yes | Loyalty program code of the supplier | BW |
@accountId | string | Yes | Loyalty program account ID | 1234567890123457 |
guests | / | / | / | / |
@firstName | string | Yes | First Name | James |
@lastName | string | Yes | Last Name | Bond |
string | No | |||
@phone | string | No | / | / |
@address | string | No | / | / |
@age | integer | No | The age of guest | / |
@gender | enum | No | Gender of guest Enum: [Male, Female] | / |
@birthday | string | No | Birthday of guest format with yyyy-MM-dd 1970-12-20 | / |
@type | string | No | Type of guest, Adult, Child, or Infant. Enum: [ Adult, Child, Infant ] | / |
@extensions | object | No | A common extension object for extra attributes like account, extra setting required by a distributor, etc. | { "key": "value"} |
@index | integer | No | Room index of room rate | 1 |
comments | array[string] | No | / | [ "no smoking", "high floor" ] |
promoteCode | string | No | The promotion code is defined by the hotel, the promotion code is required if making a reservation under the promotion. | / |
roomRates | array[object] | Yes | 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 | Yes | Room id in distributor's system | 10000101 |
@rateId | string | Yes | Rate id in distributor's system | 123456 |
@currency | string | Yes | Currency code[ISO-4217] | USD |
@amountBeforeTax | array[number] | No | The daily amount of rate without tax & fee | [ 100, 100, 120 ] |
@amountAfterTax | array[number] | No | The daily amount of rate with tax & fee | [ 110, 110, 130 ] |
@mealPlan | string | No | Meal plan code, refer to the standard meal plan code list. | RO |
roomRates / fees | array[object] | No | Fee or tax by date range. | / |
fees / dateRange | object | Yes | / | / |
@startDate | string | Yes | Start date of date range, format with yyyy-MM-dd | 2018-01-01 |
@endDate | string | Yes | End date of date range, format with yyyy-MM-dd | 2018-01-04 |
fees/fee | Yes | / | / | |
@name | string | Yes | Pattern: \w[\w\d]+ | Service Charge |
@type | enum | Yes | The fee or tax is included in the amount before tax or not. Enum: [ Inclusive, Exclusive ] | Exclusive |
@amount | number | Yes | Amount value of fee or tax | 10 |
@amountType | string | Yes | Indicates how to charge the tax, 10% per room per night in this example. Enum: [ Fix, Percent ] | Percent |
@chargeType | string | Yes | Enum: [ PerRoomPerNight, PerPersonPerNight, PerRoomPerStay, PerPersonPerStay ] | PerRoomPerNight |
@paymentType | enum | No | Indicates the fee is prepaid to the hotel(PayNow) or pay at the hotel(PayLater). Enum: [ PayLater, PayNow ] | PayNow |
roomRates / cancelPolicy | object | No | 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 | No | A common extension object for extra attributes like account, extra setting required by the distributor, etc. | / |
threeDomainSecurity | object | No | / | / |
@cavv | string | No | Cardholder Authentication Verification Value Information retrieved from the 3DS provider when authentication is successful. | / |
@eci | string | No | The electronic commerce indicator. | / |
@xid | string | No | Transaction identifier for a 3DS Version 1 provider, assigned by the Directory Server to identify a single transaction. | / |
@threeDomainSecurityVersion | string | No | Include this only for 3D Secure 2. | / |
@transactionId | string | No | Transaction identifier for a 3DS Version 2 provider, assigned by the Directory Server to identify a single transaction. | / |
@merchantName | string | No | Identifier of the merchant completing the 3DS transaction. | / |
@extensions | object | No | A common extension object for extra attributes like account, extra setting required by the distributor, etc. | / |
notifyRequired | object | No | / | / |
@forceSell | boolean | Yes | / | true |
@rateOverride | boolean | Yes | / | true |
Response Example
Success Response (HTTP Status 200)
{
"header": {
"sourceId": "HHBIJSOPLS",
"distributorId": "BOOKINGCOM",
"version": "v4",
"token": "18393849028490234"
},
"reservationIds": {
"distributorResId": "C2084DFL0",
"derbyResId": "D15F893D34DF",
"supplierResId": "89389494"
},
"notifyStatus": {
"forceSell": true,
"rateOverride": true
},
"extensions": {
"key": "value"
}
}
- Error Response (HTTP Status 500)
{
"errorCode": "InvalidField",
"errorMessage": "Invalid Message"
}
Response Specification
Attribute | Type | Required | Description | Example |
---|---|---|---|---|
header | object | Yes | / | / |
@sourceId | string | Yes | MaxLength: 32 The ID of the hotel's source in DerbySoft's system | HHBIJSOPLS |
@distributorId | string | Yes | MaxLength: 32 id of distributor in DerbySoft's system | GTA |
@version | string | Yes | MaxLength: 20 version of API | v4 |
@token | string | Yes | MaxLength: 64 A unique id to identify request and response, normally it should be UUID. | 18393849028490234 |
reservationIds | object | Yes | 100001 | |
@distributorResId | string | Yes | Reservation id in distributor's system | C2084DFL0 |
@derbyResId | string | Yes | 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 | ||
notifyStatus | object | No | / | / |
@forceSell | boolean | Yes | / | true |
@rateOverride | boolean | Yes | / | true |
extensions | object | No | A common extension object for extra attributes like account, extra setting required by a distributor, etc. | / |
Cancel Notify
This is an API for DerbySoft to call the Supplier's system to notify a cancellation. Since DerbySoft does splitting on original reservations, The Supplier should cancel the reservation by unique derbyResId or supplierResId.
POST /reservation/cancelNotify HTTP/1.1
URL: {{endpoint}}/reservation/cancelNotify
Authorization: 53ac07777cdffac2d53000002d698728ce964432d7167596bc005c5fc
Accept-Encoding: gzip
Content-Encoding: gzip
Content-Type: application/json;charset=utf-8
Request Example
{
"header": {
"sourceId": "HHBIJSOPLS",
"distributorId": "BOOKINGCOM",
"version": "v4",
"token": "18393849028490234"
},
"reservationIds": {
"distributorResId": "C2084DFL0",
"derbyResId": "D15F893D34DF",
"supplierResId": "89389494"
},
"extensions": {
"key": "value"
}
}
Request Specification
Attribute | Type | Required | Description | Example |
---|---|---|---|---|
header | object | Yes | / | / |
@sourceId | string | Yes | MaxLength: 32 The ID of the hotel's source in DerbySoft's system | HHBIJSOPLS |
@distributorId | string | Yes | MaxLength: 32 ID of distributor in DerbySoft's system | GTA |
@version | string | Yes | MaxLength: 20 version of API | v4 |
@token | string | Yes | MaxLength: 64 A unique id to identify request and response, normally it should be UUID. | 18393849028490234 |
reservationIds | Yes | / | / | |
@distributorResId | string | Yes | Reservation id in distributor's system | C2084DFL0 |
@derbyResId | string | Yes | Reservation id in Derbysoft's system, this is a unique id as DerbySoft would be splitting the reservation. | D15F893D34DF |
@supplierResId | string | Yes | Reservation id in supplier's system | 89389494 |
extensions | object | No | A common extension object for extra attributes like account, extra setting required by a distributor, etc. | {"key": "value"} |
Response Example
Success Response (HTTP Status 200)
{
"header": {
"sourceId": "HHBIJSOPLS",
"distributorId": "GTA",
"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"
}
Response Specification
Attribute | Type | Required | Description | Example |
---|---|---|---|---|
header | object | Yes | / | / |
@sourceId | string | Yes | MaxLength: 32 id of hotel's source in DerbySoft's system | HHBIJSOPLS |
@distributorId | string | Yes | MaxLength: 32 id of distributor in DerbySoft's system | GTA |
@version | string | Yes | MaxLength: 20 Version of API | v4 |
@token | string | Yes | MaxLength: 64 A unique id to identify request and response, normally it should be UUID. | 18393849028490234 |
reservationIds | object | Yes | / | 100001 |
@distributorResId | string | Yes | Reservation id in distributor's system | C2084DFL0 |
@derbyResId | string | Yes | Reservation id in Derbysoft's system, this is a unique id as DerbySoft would be splitting the reservation. | D15F893D34DF |
@supplierResId | string | Yes | Reservation id in supplier's system | 89389494 |
cancellationId | string | Yes | Cancel confirmation number in supplier's system | C89389494 |
extensions | object | No | A common extension object for extra attributes like account, extra setting required by a distributor, etc. | / |
Query Res List
This is an API to query reservation list in DerbySoft's system and Supplier's system with a timestamp range of reservation's last modified date. It should be implemented by both DerbySoft and Supplier.
GET /reservations HTTP/1.1
URL: {{endpoint}}/reservations?sourceId={{sourceId}}&distributorId={{distributorId}}&start={{start}}&end={{end}}
URL Example: https://www.testdistributor.com/reservations?sourceId=ABC&distributorId=XYZ&start=2018-01-01T00:00:00.000Z&end=2018-01-02T00:00:00.000Z
Authorization: 53ac07777cdffac2d53000002d698728ce964432d7167596bc005c5fc
Accept-Encoding: gzip
Content-Encoding: gzip
Content-Type: application/json;charset=utf-8
Request Parameters
Name | Description | Required | Type | Example |
---|---|---|---|---|
sourceId | ID of source in DerbySoft's system | Yes | string | PEGASUS |
distributorId | ID of distributor in DerbySoft's system | No | string | HOTELBEDS |
start | Start timestamp of reservation's last modified date Format with yyyy-MM-ddTHH:mm: ss.SSSZ | Yes | string | 2018-01-01T00:00:00.000Z |
end | End timestamp of reservation's last modified date Format with yyyy-MM-ddTHH:mm:ss.SSSZ | Yes | string | 2018-01-07T00:00:00.000Z |
Response Example
Success Response (HTTP Status 200)
[
{
"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": "[email protected]",
"phone": "string",
"address": "string",
"age": 0,
"type": "Adult",
"extensions": {
"key": "value"
},
"index": "1"
},
"roomCriteria": {
"roomCount": 2,
"adultCount": 1,
"childCount": 2,
"childAges": [
4,
8
]
},
"total": {
"amountBeforeTax": 640,
"amountAfterTax": 700
},
"distributorId": "BOOKINGCOM",
"status": "Confirmed",
"result": "Successful",
"cancellationId": "C89389494",
"notifyStatus": {
"forceSell": true,
"rateOverride": true
},
"errorMessage": "string"
}
]
- Error Response (HTTP Status 500)
{
"errorCode": "InvalidField"
"errorMessage": "Invalid Messag
Response Specification
Attribute | Type | Required | Description | Example |
---|---|---|---|---|
reservationIds | object | Yes | / | 100001 |
@distributorResId | string | Yes | Reservation id in distributor's system | C2084DFL0 |
@derbyResId | string | Yes | Reservation id in Derbysoft's system, this is a unique id as DerbySoft would be splitting the reservation. | D15F893D34DF |
@supplierResId | string | Yes | Reservation confirmation id in supplier's system, required in success reservation. | 89389494 |
IATA | string | No | / | / |
hotelId | string | Yes | Hotel id in supplier’s system | 100001 |
stayRange | object | Yes | / | / |
@checkin | string | Yes | Check-in, format with yyyy-MM-dd | 2018-01-01 |
@checkout | string | Yes | Check out, format with yyyy-MM-dd | 2018-01-04 |
contactPerson | object | Yes | / | / |
@firstName | string | Yes | First Name | James |
@lastName | string | Yes | Last Name | Bond |
string | No | |||
@phone | string | No | / | / |
@address | string | No | / | / |
@age | integer | No | Age of guest | / |
@type | string | No | Type of guest, Adult, Child, or Infant. Enum: [ Adult, Child, Infant ] | / |
@extensions | object | No | A common extension object for extra attributes like account, extra setting required by the distributor, etc. | { "key": "value"} |
@index | integer | No | Room index of room rate | 1 |
roomCriteria | object | Yes | / | / |
@roomCount | integer | Yes | Total room count per request | / |
@adultCount | integer | Yes | Adult count per room | / |
@childCount | integer | No | Child count per room | / |
@childAges | integer | No | Child ages for each child, array size MUST be same as @child Count. | / |
total | object | Yes | / | / |
@amountBeforeTax | number | No | / | 640 |
@amountAfterTax | number | No | / | 700 |
distributorId | string | No | MaxLength: 32 ID of distributor in DerbySoft's system | GTA |
status | enum | Yes | Enum: [ Confirmed, Modified, Cancelled ] Status of reservation | / |
result | enum | Yes | Enum: [ Successful, Failed, Processing ] Status of the reservation to send to supplier | / |
cancellationId | string | No | Cancel confirmation number in supplier's system | C89389494 |
notifyStatus | object | No | / | / |
@forceSell | boolean | Yes | / | true |
@rateOverride | boolean | Yes | / | true |
errorMessage | string | No | Error message | / |
Query Res Details
This is an API to query reservation detail in DerbySoft's system and Supplier's system. It should be implemented by both DerbySoft and Supplier. Suppliers can use this API to check reservation status of things like ghost bookings.
GET /reservation/{distributorResId} HTTP/1.1
URL: {{endpoint}}/reservation/{distributorResId}
Authorization: 53ac07777cdffac2d53000002d698728ce964432d7167596bc005c5fc
Accept-Encoding: gzip
Content-Encoding: gzip
Content-Type: application/json;charset=utf-8
Request Parameters
Name | Description | Required | Type | Example |
---|---|---|---|---|
sourceId | The ID of source in DerbySoft's system | Yes | string | PEGASUS |
distributorId | The ID of the distributor in DerbySoft's system | Yes | string | BOOKINGCOM |
distributorResId | Res ID in distributor's system | Yes | string | D15F893D34DF |
Response Example
Success Response (HTTP Status 200)
[
{
"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": "[email protected]",
"phone": "string",
"address": "string",
"age": 0,
"type": "Adult",
"extensions": {
"key": "value"
},
"index": "1"
},
"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"
},
"guests": [
{
"firstName": "James",
"lastName": "Bond",
"email": "[email protected]",
"phone": "string",
"address": "string",
"age": 0,
"type": "Adult",
"extensions": {
"key": "value"
},
"index": "1"
}
],
"comments": [
"no smoking",
"high floor"
],
"promoteCode": "discount001",
"roomRates": [
{
"roomId": "10000101",
"rateId": "123456",
"currency": "USD",
"amountBeforeTax": [
100,
100,
120
],
"amountAfterTax": [
110,
110,
130
],
"mealPlan": "RO",
"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"
},
"distributorId": "BOOKINGCOM",
"status": "Confirmed",
"result": "Successful",
"cancellationId": "C89389494",
"notifyStatus": {
"forceSell": true,
"rateOverride": true
},
"errorMessage": "string"
}
]
- Error Response (HTTP Status 500)
{
"errorCode": "InvalidField",
"errorMessage": "Invalid Message"
}
Response Specification
Attribute | Type | Required | Description | Example |
---|---|---|---|---|
reservationIds | object | Yes | / | 100001 |
@distributorResId | string | Yes | Reservation id in distributor's system | C2084DFL0 |
@derbyResId | string | Yes | Reservation id in Derbysoft's system, this is a unique id as DerbySoft would be splitting the reservation. | D15F893D34DF |
@supplierResId | string | Yes | reservation id in supplier's system | 89389494 |
IATA | string | No | / | / |
hotelId | string | Yes | Hotel ID in supplier’s system | 100001 |
stayRange | object | Yes | / | / |
@checkin | string | Yes | Check-in, format with yyyy-MM-dd | 2018-01-01 |
@checkout | string | Yes | Check out, format with yyyy-MM-dd | 2018-01-04 |
contactPerson | object | Yes | / | / |
@firstName | string | Yes | First Name | James |
@lastName | string | Yes | Last Name | Bond |
string | No | |||
@phone | string | No | / | / |
@address | string | No | / | / |
@age | integer | No | Age of guest | / |
@type | string | No | Type of guest, Adult, Child, or Infant. Enum: [ Adult, Child, Infant ] | / |
@extensions | object | No | A common extension object for extra attributes like account, extra setting required by a distributor, etc. | { "key": "value"} |
@index | integer | No | Room index of room rate | 1 |
roomCriteria | object | Yes | / | / |
@roomCount | integer | Yes | Total room count per request | / |
@adultCount | integer | Yes | Adult count per room | / |
@childCount | integer | No | Child count per room | / |
@childAges | integer | No | Child ages for each child, array size MUST be same as @childCount. | / |
total | object | Yes | / | / |
@amountBeforeTax | number | No | / | 640 |
@amountAfterTax | number | No | / | 700 |
payment | / | / | / | / |
@cardCode | string | No | VI, MC, AX, etc. Refer to Appendix: Card Code. | VI |
@cardNumber | string | No | Credit card number | 4111111111111111 |
@cardHolderName | string | No | Cardholder name | Sherlock Holmes |
@expireDate | string | No | It should be 2 digits for the month, 2 digits for the year, as "MMYY" | 0119 |
loyaltyAccount | object | No | / | / |
@programCode | string | Yes | Loyalty program code of the supplier | BW |
@accountId | string | Yes | Loyalty program account id | 1234567890123457 |
guests | / | / | / | / |
@firstName | string | Yes | First Name | James |
@lastName | string | Yes | Last Name | Bond |
string | No | |||
@phone | string | No | / | / |
@address | string | No | / | / |
@age | integer | No | Age of guest | / |
@type | string | No | Type of guest, Adult, Child, or Infant Enum: [ Adult, Child, Infant ]. | / |
@extensions | object | No | A common extension object for extra attributes like account, extra setting required by a distributor, etc. | { "key": "value"} |
@index | integer | No | Room index of room rate | 1 |
comments | array[string] | No | / | [ "no smoking", "high floor" ] |
promoteCode | string | No | The promotion code is defined by the hotel, the promotion code is required if making a reservation under the promotion. | / |
roomRates | array[ object ] | Yes | 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 | Yes | Room ID in distributor's system | 10000101 |
@rateId | string | Yes | Rate ID in distributor's system | 123456 |
@currency | string | Yes | Currency code [ ISO-4217 ] | USD |
@amountBeforeTax | array[number] | No | The daily amount of rate without tax & fee | [ 100, 100, 120 ] |
@amountAfterTax | array[number] | No | The daily amount of rate with tax & fee | [ 110, 110, 130 ] |
@mealPlan | string | No | Meal plan code, refer to the standard meal plan code list. | RO |
roomRates/fees | array[object] | No | Fee or tax by date range. | / |
fees / dateRange | object | Yes | / | / |
@startDate | string | Yes | Start date of date range, format with yyyy-MM-dd | 2018-01-01 |
@endDate | string | Yes | End date of date range, format with yyyy-MM-dd | 2018-01-04 |
fees/fee | / | Yes | / | / |
@name | string | Yes | Pattern: \w[\w\d]+ | Service Charge |
@type | enum | Yes | The fee or tax is included in the amount before tax or not. Enum: [ Inclusive, Exclusive ] | Exclusive |
@amount | number | Yes | Amount value of fee or tax | 10 |
@amountType | string | Yes | Indicates how to charge the tax, 10% per room per night in this example. Enum: [ Fix, Percent ] | Percent |
@chargeType | string | Yes | Enum: [ PerRoomPerNight, PerPersonPerNight, PerRoomPerStay, PerPersonPerStay ] | PerRoomPerNight |
@paymentType | enum | No | Indicates the fee is prepaid to the hotel(PayNow) or pay at hotel(PayLater).a Enum: [ PayLater, PayNow ] | PayNow |
roomRates/cancelPolicy | object | No | 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 | No | A common extension object for extra attributes like account, extra setting required by a distributor, etc. | / |
distributorId | string | No | MaxLength: 32 Id of distributor in DerbySoft's system | GTA |
status | enum | Yes | Enum: [ Confirmed, Modified, Cancelled ] Status of reservation | / |
result | enum | Yes | Enum: [ Successful, Failed, Processing ] status of the reservation to send to supplier | / |
cancellationId | string | No | Cancel confirmation number in supplier's system | C89389494 |
notifyStatus | object | No | / | / |
@forceSell | boolean | Yes | / | true |
@rateOverride | boolean | Yes | / | true |
errorMessage | string | No | Error message | / |
Did you find it helpful? Yes No
Send feedback