Introduction

DerbySoft uses the APIs to get the list of hotels and products from the hotel provider periodically. Hotel providers can manage the status of hotels and products through this API. This set of APIs includes 2 APIs, both are mandatory to implement. (APIs marked with "☆" 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.

TABLE OF CONTENTS

Hotel List

This is an API for DerbySoft to call the Supplier's system to get all hotel summary information for a specific distributor.

GET /hotels HTTP/1.1
URL: {{endpoint}}/hotels?distributorId={{distributorId}}
Authorization: 53ac07777cdffac2d53000002d698728ce964432d7167596bc005c5fc
Accept-Encoding: gzip
Content-Encoding: gzip
Content-Type: application/json;charset=utf-8


Request Parameters

Name

DescriptionRequiredType

Example

distributorId

    

The ID of distributor in DerbySoft‘s system


Yesstring

HOTELBEDS


Response Example

  • Success Response (HTTP Status 200)
[
  {
    "hotelId": "100001",
    "hotelName": "This is a test hotel",
    "distributorId": "GTA",
    "status": "Actived"
  }
]
  • Error Response (HTTP Status 500)
{
  "errorCode": "InvalidField",
  "errorMessage": "Invalid Message"
}


Response Specification

Attribute

Type

RequiredDescriptionExample

distributorId

stringYesDistributor ID in DerbySoft's systemGTA
hotelIdstringYesHotel ID in supplier's system100001
hotelNamestringNoHotel NameTest hotel
statusenumYes

Enum: [ Actived, Deactived ]


Status in supplier's system

Actived


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.

GET /hotel/{hotelId} HTTP/1.1
URL: {{endpoint}}/hotel/{{hotelId}}?distributorId={{distributorId}}
Authorization: 53ac07777cdffac2d53000002d698728ce964432d7167596bc005c5fc
Accept-Encoding: gzip
Content-Encoding: gzip
Content-Type: application/json;charset=utf-8


Request Parameters

NameDescriptionRequiredTypeExample
hotelIdThe ID of the hotel in the Supplier's systemYesstring100001
distributorIdThe ID of distributor in DerbySoft's systemYesstringHOTELBEDS


Response Example

  • Success Response (HTTP Status 200)
{
  "hotelId": "100001",
  "hotelName": "This is a test hotel",
  "distributorId": "GTA",
  "status": "Actived",
  "chainCode": "Marriott",
  "brandCode": "Courtyard",
  "longitude": 41.40338,
  "latitude": 2.17403,
  "city": "string",
  "country": "string",
  "state": "string",
  "address": [
    "AddressLine1",
    "AddressLine2",
    "AddressLine3",
    "AddressLine4",
    "AddressLine5"
  ],
  "phone": {
    "countryAccessCode": "string",
    "areaCityCode": "string",
    "phoneNumber": "string"
  },
  "settings": {
    "key1": "value1",
    "key2": "value2"
  },
  "ariType": "Daily",
  "timezone": "America/Los_Angeles",
  "rateType": "AmountBeforeTax",
  "maxChildAge": 17,
  "childRateType": "ByAge",
  "products": [
    {
      "roomId": "10000101",
      "roomDescription": "Soak in city views in our Deluxe room, which features a well-appointed ensuite bathroom and up-to-date entertainment offerings.",
      "rateId": "123456",
      "rateDescription": "Begin your day with a hearty meal.",
      "stayType": "OverNightRoom",
      "status": "Actived",
      "roomName": "Double Room",
      "rateName": "Bar Rate",
      "occupancy": {
        "maxAdult": 3,
        "maxChild": 2,
        "maxOccupancy": 3
      },
      "paymentType": "PayNow",
      "guarantee": {
        "guaranteeType": "CCG"
      },
      "cancelPolicies": [
        {
          "dateRange": {
            "startDate": "2018-01-01",
            "endDate": "2018-01-04"
          },
          "cancelPolicy": {
            "code": "AD100P_100P",
            "description": "Non Refundable"
          }
        }
      ],
      "fees": [
        {
          "dateRange": {
            "startDate": "2018-01-01",
            "endDate": "2018-01-04"
          },
          "fee": {
            "name": "Service Charge",
            "type": "Exclusive",
            "amount": 10,
            "amountType": "Percent",
            "chargeType": "PerRoomPerNight",
            "paymentType": "PayNow"
          }
        }
      ]
    }
  ]
}
  • Error Response (HTTP Status 500)
{
  "errorCode": "InvalidField",
  "errorMessage": "Invalid Message"
}


Response Specification

Element

Type

Required

Description

Example

hotelId

string

Yes

Hotel id in supplier's system

100001

hotelName

string

No

Hotel name

This is a test hotel

distributorId

string

Yes

Distributor id in DerbySoft's system

GTA

status

enum

Yes

Enum: [ Actived, Deactived ]

Status in supplier's system

Actived

chainCode

string

No

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

No

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

No

The information for hotel location.

41.40338

latitude

string

No

The information for hotel location.

2.17403

city

string

No

The information for hotel location.

 

country

string

No

The information for hotel location.

 

state

string

No

The information for hotel location.

 

address

array[string]

No

Support up to five enumeration values

[ "AddressLine1", "AddressLine2", "AddressLine3", "AddressLine4", "AddressLine5" ]

phone

object

No

 /

 / 

@countryAccessCode

string

Yes

 / 

 / 

@areaCityCode

string

No

 / 

 / 

@phoneNumber

string

Yes

 / 

 /

settings

object

Yes

A common extension object for extra attributes like account, extra setting required by a distributor, etc.

"settings": {
"key1": "value1",
"key2": "value2"
}

ariType

enum

Yes

Emun:[ Daily, LOS ]

Indicates which ARI model to be used for ARI API.

Daily

timezone

string

Yes

Timezone of property

America/Los_Angeles

rateType

enum

Yes

Enum: [ AmountBeforeTax, AmountAfterTax, Both ]

  • AmountBeforeTax: only AmountBeforeTax be pushed out to distributor, and only AmountBeforeTax be sent back to the supplier.
  • AmountAfterTax: only AmountAfterTax be pushed out to distributor, and only AmountAfterTax be sent back to the supplier.
  • Both: both of AmountBeforeTax & AmountAfterTax to be pushed out to distributor, and both AmountBeforeTax & AmountAfterTax be sent back to supplier.

Both

maxChildAge

integer

No

If childRateType is set as ByAge, max child age must be provided and greater than zero.

17

childRateType

enum

No

Enum: [ Normal, ByAge, Free, AsAdult ]

Indicates which child rate type will be used in ARI OccupancyRate.

  • Normal: by default, occupancy rate is combined by adult rate and child rate without age settings.
  • ByAge: the child will be charged by age, maxChildAge must be provided, and extraChildRates should be provided in ARI.
  • Free: the child is free, maxChildAge may be provided.
  • AsAdult: the child will be charged as an adult.

ByAge

products

array[object]

Yes

 /

 /

@roomId

string

Yes

Room id in supplier's system

10000101

@roomDescription

string

No

 /

Soak in city views in our Deluxe room, which features a well-appointed ensuite bathroom and up-to-date entertainment offerings.

@rateId

string

Yes

Rate id in supplier system

123456

@rateDescription

string

No

 /

Begin your day with a hearty meal.

@stayType

enum

No

Enum: [ OverNightRoom, DayUseRoom ]

 Indicates if the product is specifically for day-use or regular over-night use. Default is OverNightRoom.

OverNightRoom

@status

enum

Yes

Enum: [ Actived, Deactived ]

Actived

@roomName

string

No

Room type name

Double Room

@rateName

string

No

Rate plan name

Best Available Rate

products / occupancy

object

Yes

 /

 /

@maxAdult

integer

Yes

Max adult count

3

@maxChild

integer

Yes

Max child count

2

@maxOccupancy

integer

Yes

Max occupancy

3

@paymentType

enum

No

Enum: [ PayLater, PayNow ]

Indicates the product is prepaid to hotel(PayNow) or pay at hotel(PayLater)

PayNow

products / guarantee

object

No

 /

 /

@guaranteeType

string

Yes

Guarantee information for this room rate.
The type of guarantee method, ref to the standard guarantee type list.

CCG

products / cancelPolicies

array[object]

No

 /

 /

cancelPolicies / dateRange

object

No

 /

 /

@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

cancelPolicies / cancelPolicy

object

No

 /

 /

@code

string

Yes

Cancel policy

maxLength: 128

AD100P_100P

@description

string

No

The description of the cancel policy

maxLength: 1024

Non Refundable

products / fees

 

No

 /

 /

fees / dateRange

 

No

 /

 /

@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

object

No

 /

 /

name

string

Yes

The name of fee or tax

Service Charge

type

enum

Yes

Enum: [ Inclusive, Exclusive ]

The fee or tax is included in the amount before tax or not.

Exclusive

amount

number

Yes

Amount value of fee or tax

10

amountType

enum

Yes

Enum: [ Fix, Percent ]

Indicates how to charge the tax, 10% per room per night in this example.

Percent

chargeType

enum

Yes

Enum: [ PerRoomPerNight, PerPersonPerNight, PerRoomPerStay, PerPersonPerStay ]

PerRoomPerNight

paymentType

enum

No

Enum: [ PayLater, PayNow ]
Indicates the fee is prepaid to hotel(PayNow) or pay at hotel(PayLater)

PayNow

Notes:
Please follow the process below to activate/deactivate hotels or products. If the process doesn't work for you, please kindly share with us your actual scenario.

*** Please note that when deactivating a hotel or product, please indicate the status as Deactived for the hotel or product through the API rather than removing it from the response. Otherwise, the hotel or product will be processed as Deactivated by default, and will be close out for the rooms.
  • To Activate or Deactivated hotels, GO Suppliers activate or deactivate hotels in their system. Upon returning the status of each hotel is either Actived or Deactived on the response of the Hotel List and Hotel Product API.
  • To Activate or Deactivated products, GO Suppliers activate or deactivate products in their system. Upon returning the status of each product is either Actived or Deactived on the response of the Hotel Product API.