PreBook
Modified on: 2025-07-29 17:59
TABLE OF CONTENTS
PreBook API
The Prebook API allows distributors to perform a final check on the availability and rates of a selected product before proceeding with a booking. This step ensures that the room and rate are still available and accurate at the time of booking, reducing the risk of discrepancies or overbooking. If the hotel supplier supports it, the Prebook API can handle reservations with a maximum stay length of up to 61 days. By executing this final check, distributors can confidently proceed with the booking process, knowing that the selected room and rate remain available. This API is essential for ensuring a smooth and reliable booking experience for both distributors and customers..
POST /reservation/prebook HTTP/1.1 URL: {BookingUSB-Endpoint}/reservation/prebook Authorization: 53ac07777cdffac2d53000002d698728ce964432d7167596bc005c5fc Accept-Encoding: gzip Content-Encoding: gzip Content-Type: application/json;charset=utf-8
PreBook Request Schema
Request(METHOD: POST) | |||||
---|---|---|---|---|---|
Level | Field Name | Data Type | Required | Description | Example |
1 | header | object | Y | / | / |
2 | @supplierId | string | Y | The ID of hotel supplier in DerbySoft's system. Max Length: 32 | HILTON |
2 | @distributorId | string | Y | The ID of the distributor in DerbySoft's system Max Length: 32 | GTA |
2 | @version | string | Y | Version of API Max Length: 20 | v4 |
2 | @token | string | Y | A unique identifier is used for requests and responses, typically a UUID. Note that this is an echo token, not an access token. Max Length: 64 | 18393849028490234 |
1 | reservationIds | / | Y | / | / |
2 | @distributorResId | string | Y | Distributor's reservation ID. Distributors should keep the ID unique on their system to avoid any potential issues caused by duplicate reservation IDs. PS: If distributors don't generate reservation IDs during the stage, you can fill in a blank value in the request for the field like distributorResId="", but the null value is not accepted since it's a mandatory field. | C2084DFL0 |
1 | iata | string | N | IATA | / |
1 | hotelId | string | Y | Hotel IDs provided by hotel suppliers, only the following characters are allowed. 1. Digits (0-9) 2. Uppercase letters (A-Z) 3. Hyphen ('-') | 100001 GATHI 00016 PEP-B3T2 B8W7 |
1 | stayRange | object | Y | / | / |
2 | @checkin | string | Y | Check in date expressed YYYY-MM-DD | 2028-01-01 |
2 | @checkout | string | Y | Check out date expressed YYYY-MM-DD | 2028-01-04 |
1 | contactPerson | object | Y | / | / |
2 | @firstName | string | Y | Contact person first name | James |
2 | @lastName | string | Y | Contact person last name | Bond |
2 | string | N | Contact person email | 007@james.com | |
2 | @phone | string | N | Contact person phone number, including country code | 34123456789 |
2 | @address | string | N | Contact person home address | King's Road in Chelsea, specifically in Wellington Square |
1 | roomCriteria | object | Y | / | / |
2 | @roomCount | integer | Y | Total room count per request | / |
2 | @adultCount | integer | Y | Adult count per room | / |
2 | @childCount | integer | N | Child count per room | / |
2 | @childAges | array | N | Child ages for each child, array size MUST be the same as the child count | / |
1 | total | object | Y | Object used to share the total amount of the reservation, either ABT or AAT, or both | / |
2 | @amountBeforeTax | number | C | ABT, mandatory if AAT is not provided | 640 |
2 | @amountAfterTax | number | C | AAT, mandatory if ABT not provided The total room rate for the entire reservation, including taxes and fees. | 700 |
1 | payment | object | No | It is used to share payment information with property. If the credit card information is not going to be passed to the property, this information will be ignored. | / |
2 | @cardType | string | N | If the payment card type is not specified, it will be treated as the default value "CC" which stands for Credit Card. The type value can be one of the options listed below. CC: Credit Card VCC: Virtual Credit Card CBILL: Central Bill | CC |
2 | @cardCode | string | Y | VI, MC, AX, etc. | VI |
2 | @cardNumber | string | C | Credit card number | 4111111111111111 |
2 | @cardHolderName | string | C | Cardholder name | Sherlock Holmes |
2 | @expireDate | string | C | It should be 2 digits for month, 2 digits for year, expressed MMYY | 0119 |
2 | @securityCode | string | N | Card verification value | 123 |
2 | @vccEffectiveDate | string | C | The date the VCC becomes effective, expressed YYYY-MM-DD | 2025-06-30 |
2 | @vccInvalidDate | string | N | The expiry date of the VCC, expressed YYYY-MM-DD | 2025-07-30 |
2 | @vccAmountOnCard | number | N | Amount put on the virtual card | 1000.00 |
2 | @vccCurrency | string | N | The currency code [ISO-4217] of the amount | USD |
1 | loyaltyAccount | object | N | / | / |
2 | @programCode | string | C | Loyalty program code of the supplier | BW |
2 | @accountId | string | C | Loyalty program account ID | 1234567890123457 |
1 | corpAccount | object | N | Please note that the current feature will be deprecated. Instead, please implement the 'corpCodes' node. | / |
2 | @corpProgramCode | string | C | Corporate Hotel Program of hotel supplier | CR |
2 | @corpId | string | C | Corporate ID in the program account | A-1232 |
1 | promoteCode | string | N | Promotion code defined by the hotel, the promotion code is required if making a reservation under the promotion | / |
1 | guests | array[object] | Y | / | / |
2 | @firstName | string | Y | Guest First Name | James |
2 | @lastName | string | Y | Guest Last Name | Bond |
2 | string | N | Guest Email | 007@james.com | |
2 | @phone | string | N | Guest phone number including country code | 34123456789 |
2 | @address | string | N | Guest home address | King's Road in Chelsea, specifically in Wellington Square |
2 | @age | integer | N | Age of guest | / |
2 | @gender | enum | N | Gender of guest Enum: [Male, Female ] | Male |
2 | @birthday | string | N | Birthday of guests | 1970-12-20 |
2 | @type | string | N | Enum: [ Adult, Child, Infant ] Type of guest | Adult |
2 | @index | integer | N | Indicate guest will be allocated to which room. For a one-room reservation, the room index is 1 for all guests. For multi-room reservations, the index starts from 1, and the max room index is equal to the number of booked rooms. | index = 1, Indicate the guest will be allocated to the first room. index = 2, Indicate the guest will be allocated to the second room. |
2 | @extensions | object | N | Optional: Additional agreed-upon attributes between suppliers and distributors (DerbySoft will provide the specified format). | / |
1 | comments | array[string] | N | Any preference or comment can be communicated in this field | [ "no smoking", "high floor" ] |
1 | 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 the API. | / |
2 | @roomId | string | Y | Room ID in supplier's system | 10000101 |
2 | @rateId | string | Y | Rate ID in supplier's system | 123456 |
2 | @currency | string | Y | Currency code [ISO-4217] | USD |
2 | @amountBeforeTax | array[number] | N | ABT, mandatory if AAT is not provided | [ 100, 100, 120 ] |
2 | @amountAfterTax | array[number] | C | AAT, mandatory if ABT is not provided The daily amount of rate with tax and fee | [ 110, 110, 130 ] |
2 | @mealPlan | string | N | Meal plan code, refers to the standard meal plan code list. | RO |
2 | @paymentType | enum | N | Indicates the product is prepaid to the hotel (PayNow) or pay at the hotel (PayLater) | PayNow |
2 | rguarantee | object | N | Guarantee information for this room rate. | / |
3 | @guaranteeType | string | C | The type of guarantee method, refers to the standard guarantee type list. | CCG |
2 | fees | array[object] | N | Fee or tax by date range. | / |
3 | dateRange | object | C | / | / |
4 | @startDate | string | C | Start date expressed as YYYY-MM-DD | 2028-01-01 |
4 | @endDate | string | C | End date expressed as YYYY-MM-DD | 2028-01-04 |
3 | fee |
| C | / | / |
4 | @name | string | C | pattern: \w[\w\d]+ starts with a word character (letter, number, or underscore) followed by one or more word characters or digits. | Service Charge |
4 | @type | enum | C | The fee or tax is included in the amount before tax or not Enum: [ Inclusive, Exclusive ] | Exclusive |
4 | @amount | number | C | Amount value of fee or tax | 10 |
4 | @amountType | string | C | Indicates how to charge the tax, 10% per room per night in this example Enum: [ Fix, Percent ] | Percent |
4 | @chargeType | string | C | Enum: [ PerRoomPerNight, PerPersonPerNight, PerRoomPerStay, PerPersonPerStay ] | PerRoomPerNight |
4 | @paymentType | enum | N | Enum: [ PayLater, PayNow ] Indicates if the fee is prepaid to hotels(PayNow) or paid at the hotel(PayLater). Note: The 'paymentType' field will be replaced by 'collectBy' and removed from the API in the future. | PayNow |
4 | @collectBy | enum | N | Enum: [Distributor, Property] Indicates that the fee (e.g., City Tax, Tourist Tax) should be collected by the hotel(Property) at check-in or by distributors when guests make a reservation(Distributor). | Distributor |
4 | @effectivePerson | number | N | It indicates the fee will be charged starting from which occupancy, such as the "Extra Person Charge" fee. The EffectivePerson is 3, meaning an extra fee will be applied from the third person onward. | / |
2 | 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 | / |
3 | @code | string | C | Code of cancel policy | AD100P_100P |
3 | @description | string | N | MaxLength: 1024 the description of the cancel policy | Non Refundable |
3 | cancelPenalties | array | Y | Details about the cancel Penalty | / |
4 | @noShow | boolean | Y | If true, it means the penaltyCharge applied for No-Show, and the cancellable, cancelDeadline will NOT exist. | / |
4 | @cancellable | boolean | N | Indicates whether cancel is allowed or not. If false, it cannot be canceled. If true, the cancelDeadline will exist. | / |
4 | cancelDeadline | object | N | Object that defines the cancel deadline for the reservation. | / |
5 | @offsetTimeDropType | enum | N | Enum: [ BeforeArrival ] An enumerated type indicates when the deadline drop time goes into effect. | / |
5 | @offsetTimeUnit | enum | N | Enum: [ D, H ]
| / |
5 | @offsetTimeValue | number | N | The number of offset times with the time unit/ | / |
5 | @deadline | string | N | local deadline allowed for cancellation, like | / |
4 | penaltyCharge | object | N | / | / |
5 | @chargeBase | enum | N | Enum: [ FullStay, NightBase ] If FullStay, it will be a percentage or an amount. If NightBase, the nights are required. | / |
5 | @nights | number | N | Exists if the penalty charge is based on the night, like the first night | / |
5 | @amount | number | N | Exists if the penalty charge is a flat charge, like USD 30.00 | / |
5 | @percent | number | N | Exists if the penalty charge is a percent, like 15.5 means 15.5% | / |
1 | bookingChannel | string | N | Sub-distributor ID | / |
1 | productAddons | array[object] | N | Only available for some suppliers | / |
2 | @type | string | C | product addon type | / |
2 | @code | string | C | product addon code | / |
2 | @date | string | C | format with yyyy-MM-dd | 2022-01-01 |
2 | @quantity | integer | C | / | 1 |
2 | @officeId | string | N | / | / |
2 | rate | object | N | / | / |
3 | ageQualifyingType | object | N | / | / |
3 | @type | enum | C | Enum: [Adult, Child] | Adult |
3 | @minAge | integer | C | / | 18 |
3 | @maxAge | integer | C | / | 18 |
2 | currency | string | Y | / | USD |
2 | amountBeforeTax | number | N | / | 123.23 |
2 | amountAfterTax | number | N | / | 134.34 |
1 | corpCode | string | N | Corporate code in Distributor's system Note: This field is primarily used by Travel Management Companies (TMCs) distributors. | D_XXX |
1 | extensions | object | N | Optional: Additional agreed-upon attributes between suppliers and distributors (DerbySoft will provide the specified format). Please don't transmit sensitive information through this field. For more information refer to: | / |
PreBook Request Example
{ "header": { "supplierId": "HILTON", "distributorId": "GTA", "version": "v4", "token": "18393849028490234" }, "reservationIds": { "distributorResId": "C2084DFL0" }, "iata": "string", "hotelId": "GATHI", "stayRange": { "checkin": "2028-01-01", "checkout": "2028-01-04" }, "contactPerson": { "firstName": "Thomas", "lastName": "Hintz", "email": "Thomas.Hintz@yahoo.com", "phone": "260-975-4091", "address": "3946 Freddy Locks" }, "roomCriteria": { "roomCount": 1, "adultCount": 2, "childCount": 1, "childAges": [ 5 ] }, "total": { "amountBeforeTax": 640, "amountAfterTax": 700 }, "payment": { "cardType": "CC", "cardCode": "VI", "cardNumber": "4111111111111111", "cardHolderName": "Sherlock Holmes", "expireDate": "0119", "securityCode": "123", "vccEffectiveDate": "2028-01-01", "vccInvalidDate": "2028-01-02", "vccAmountOnCard": 502.19, "vccCurrency": "USD" }, "loyaltyAccount": { "programCode": "BW", "accountId": "1234567890123457" }, "corpAccount": { "corpProgramCode": "CR", "corpId": "A-1232" }, "promoteCode": "string", "guests": [ { "firstName": "Thomas", "lastName": "Hintz", "email": "Thomas.Hintz@yahoo.com", "phone": "260-975-4091", "address": "3946 Freddy Locks", "age": 32, "gender": "Male", "birthday": "1990-01-01", "type": "Adult", "index": 1, "extensions": { "key1": "value1", "key2": "value2" } }, { "firstName": "Hillary", "lastName": "Ullrich", "email": "Xavier.Lind49@yahoo.com", "phone": "260-975-4091", "address": "3946 Freddy Locks", "age": 28, "gender": "Female", "birthday": "1994-01-01", "type": "Adult", "index": 1 }, { "firstName": "Alex", "lastName": "Hintz", "age": 5, "type": "Child", "index": 1 } ], "comments": [ "no smoking", "high floor" ], "roomRates": [ { "roomId": "K1D", "rateId": "ODAD01", "currency": "USD", "amountBeforeTax": [ 100, 100, 120 ], "amountAfterTax": [ 110, 110, 130 ], "mealPlan": "RO", "paymentType": "PayNow", "guarantee": { "guaranteeType": "CCG" }, "fees": [ { "dateRange": { "startDate": "2028-01-01", "endDate": "2028-01-04" }, "fee": { "name": "Service Charge", "type": "Exclusive", "amount": 10, "amountType": "Percent", "chargeType": "PerRoomPerNight", "paymentType": "PayNow", "collectBy": "Distributor", "effectivePerson": 0 } }, { "dateRange": { "startDate": "2028-01-01", "endDate": "2028-01-04" }, "fee": { "name": "City Tax", "type": "Exclusive", "amount": 5, "amountType": "Fix", "chargeType": "PerPersonPerNight", "paymentType": "PayLater", "collectBy": "Property", "effectivePerson": 0 } } ], "cancelPolicy": { "code": "AD100P_100P", "description": "Non Refundable", "cancelPenalties": [ { "noShow": true, "cancellable": true, "cancelDeadline": { "offsetTimeDropType": "BeforeArrival", "offsetTimeUnit": "D", "offsetTimeValue": 0, "deadline": "string" }, "penaltyCharge": { "chargeBase": "FullStay", "nights": 0, "amount": 0, "percent": 0 } } ] } } ], "bookingChannel": "string", "productAddons": [ { "type": "DisneyTicket", "code": "code", "date": "2028-01-01", "quantity": 1, "officeId": "string", "rate": { "ageQualifyingType": { "type": "Adult", "minAge": 18, "maxAge": 99 }, "currency": "USD", "amountBeforeTax": 123.23, "amountAfterTax": 134.34 } } ], "corpCode": "D_XXX", "extensions": { "key1": "value1", "key2": "value2" } }
PreBook Response Schema
Response | |||||
---|---|---|---|---|---|
Level | Field Name | Data Type | Required | Description | Example |
1 | header | object | Y | / | / |
2 | @supplierId | string | Y | MaxLength: 32 The ID of the hotel supplier in DerbySoft's system | HILTON |
2 | @distributorId | string | Y | The ID of the distributor in DerbySoft's system MaxLength: 32 | GTA |
2 | @version | string | Y | MaxLength: 20 Version of API | v4 |
2 | @token | string | Y | MaxLength: 64 A unique identifier is used for requests and responses, typically a UUID. Note that this is an echo token, not an access token. | 18393849028490234 |
1 | bookingToken | string | Y | Booking token used for booking | / |
1 | extensions | object | N | Optional: Additional agreed-upon attributes between suppliers and distributors (DerbySoft will provide the specified format). Please don't transmit sensitive information through this field. For more information refer to: | / |
1 | error | string | N | error response | Key not authorized |
1 | errorCode | string | C | error response | InvalidField |
1 | supplierErrorCode | string | C | error response | InvalidField |
1 | errorMessage | string | C | error response | Invalid Message |
PreBook Response Example
{ "header": { "supplierId": "HILTON", "distributorId": "GTA", "version": "v4", "token": "18393849028490234" }, "bookingToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c", "extensions": { "key1": "value1", "key2": "value2" } }
{ "error": "Key not authorised" }
{ "errorCode": "string", "supplierErrorCode": "string", "errorMessage": "string" }
Did you find it helpful? Yes No
Send feedback