Hotel API V4
Modified on: 2024-03-28 17:38
TABLE OF CONTENTS
Introduction
Hotel API is used by DerbySoft to get the list of hotels and products from the hotel provider system periodically. The hotel provider system can manage the status of hotels and products through this API. This API Set includes 2 APIs, both are mandatory to implement.
- Hotel List (/hotels) - Get all hotels for a specific distributor.
- Hotel Products (/hotel/{hotelId}) - Get all available products of one hotel to a specific distributor.
Hotel List
This is an API for DerbySoft to call the Supplier's system to get all hotel summary information for a specific distributor.
Request Parameters
Name | Description | Required | Type | Example |
---|---|---|---|---|
distributorId | The ID of distributor in DerbySoft‘s system | Y | String | HOTELBEDS |
Response Specification
Element | Type | Required | Description | Example |
---|---|---|---|---|
distributorId | String | Y | Distributor ID in DerbySoft’s system | HOTELBEDS |
hotelId | String | Y | Hotel ID in supplier’s system | 100001 |
hotelName | String | N | Hotel Name | Test hotel |
Status | Enum | Y | Enum: [ Actived, Deactived ] Status in supplier's system | Actived |
Response Example
Success Response (HTTP Status 200)
Error Response (HTTP Status 500)
Hotel Products
This is an API for DerbySoft to call the Supplier's system to get all products of one hotel to a specific distributor. Fee & Cancel Policy are optional fields because some distributors get this information offline instead of through the API.
Request Parameters
Name | Description | Required | Type | Example |
---|---|---|---|---|
hotelId | The ID of the hotel in the Supplier's system | Y | String | 100001 |
distributorId | The ID of distributor in DerbySoft's system | Y | String | HOTELBEDS |
Response Specification
Element | Type | Required | Description | Example |
---|---|---|---|---|
hotelId | String | Y | Hotel id in supplier's system | 100001 |
hotelName | String | N | Hotel name | This is a test hotel |
distributorId | String | Y | Distributor id in DerbySoft's system | GTA |
status | Enum | Y | Enum: [ Actived, Deactived ] Status in supplier's system | Actived |
chainCode | String | N | The chain code may identify a hotel chain or management group, e.g. Hyatt, Hilton. The hotel chain code is decided between suppliers and is optional if the hotel is an independent property that can be identified by the hotelId field alone. | Marriott |
brandCode | String | N | The brand code may identify the brand within a chain, e.g. Courtyard, Hampton Inn. This field is optional if the hotel is an independent property that can be identified by the hotelId field alone. | Courtyard |
longitude | String | N | The information for hotel location. | 41.40338 |
latitude | String | N | The information for hotel location. | 2.17403 |
city | String | N | The information for hotel location. |
|
country | String | N | The information for hotel location. |
|
state | String | N | The information for hotel location. |
|
address | Array[String] | N | Support up to five enumeration values | [ "AddressLine1", "AddressLine2", "AddressLine3", "AddressLine4", "AddressLine5" ] |
phone | Object | N | / | / |
@countryAccessCode | String | Y | / | / |
@areaCityCode | String | N | / | / |
@phoneNumber | String | Y | / | / |
settings | Object | Y | A common extension object for extra attributes like account, extra setting required by a distributor, etc. | "settings": { |
ariType | Enum | Y | Emun:[ Daily, LOS ] Indicates which ARI model to be used for ARI API. | Daily |
timezone | String | Y | Timezone of property | America/Los_Angeles |
rateType | Enum | Y | Enum: [ AmountBeforeTax, AmountAfterTax, Both ]
| Both |
maxChildAge | Integer | N | If childRateType is set as ByAge, max child age must be provided and greater than zero. | 17 |
childRateType | Enum | N | Indicates which child rate type will be used in ARI OccupancyRate.
| |
products | Array[Object] | Y | / | / |
@roomId | String | Y | Room id in supplier's system | 10000101 |
@roomDescription | String | N | / | Soak in city views in our Deluxe room, which features a well-appointed ensuite bathroom and up-to-date entertainment offerings. |
@rateId | String | Y | Rate id in supplier system | 123456 |
@rateDescription | String | N | / | Begin your day with a hearty meal. |
@stayType | Enum | N | Enum: [ OverNightRoom, DayUseRoom ] Indicates if the product is specifically for day-use or regular over-night use. Default is OverNightRoom. | OverNightRoom |
@status | Enum | Y | Enum: [ Actived, Deactived ] | Actived |
@roomName | String | N | Room type name | Double Room |
@rateName | String | N | Rate plan name | Best Available Rate |
products / occupancy | Object | Y | / | / |
@maxAdult | Integer | Y | Max adult count | 3 |
@maxChild | Integer | Y | Max child count | 2 |
@maxOccupancy | Integer | Y | Max occupancy | 3 |
@paymentType | Enum | N | Enum: [ PayLater, PayNow ] Indicates the product is prepaid to hotel(PayNow) or pay at hotel(PayLater) | PayNow |
products / guarantee | Object | N | / | / |
@guaranteeType | String | Y | Guarantee information for this room rate. | CCG |
products / cancelPolicies | Array[Object] | N | / | / |
cancelPolicies / dateRange | Object | N | / | / |
@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 |
cancelPolicies / cancelPolicy | Object | N | / | / |
@code | String | Y | Cancel policy maxLength: 128 | AD100P_100P |
@description | String | N | The description of the cancel policy maxLength: 1024 | Non Refundable |
products / fees |
| N | / | / |
fees / dateRange |
| N | / | / |
@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 | Object | N | / | / |
name | String | Y | The name of fee or tax | Service Charge |
type | Enum | Y | Enum: [ Inclusive, Exclusive ] The fee or tax is included in the amount before tax or not. | Exclusive |
amount | Number | Y | Amount value of fee or tax | 10 |
amountType | Enum | Y | Enum: [ Fix, Percent ] Indicates how to charge the tax, 10% per room per night in this example. | Percent |
chargeType | Enum | Y | Enum: [ PerRoomPerNight, PerPersonPerNight, PerRoomPerStay, PerPersonPerStay ] | PerRoomPerNight |
paymentType | Enum | N | Enum: [ PayLater, PayNow ] | PayNow |
Response Example
Success Response (HTTP Status 200)
Error Response (HTTP Status 500)
Did you find it helpful? Yes No
Send feedback