ExtranetUSB-ARI API
Modified on: Mon, 18 Oct, 2021 at 11:15 AM
Introduction
ARI API is used by DerbySoft to sync ARI from a supplier and publish it to distributors automatically. DerbySoft does support two ways to sync ARI.
doesWith CDS API, DerbySoft does get ARI changes by calling CDS API with a regular schedule and then get ARI to change details accordingly.
Without CDS API, DerbySoft gets ARI details by a regular schedule.
In this article, 3 types of ARI API will be introduced:
Daily ARI (/ari/daily/details) - get daily ARI of one hotel to one distributor.
LOS ARI (/ari/los/details) - Get LOS ARI of one hotel to one distributor.
CDS (/ari/changes) - Change discover by one hotel to one distributor.
TABLE OF CONTENTS
Daily ARI
This is an API for DerbySoft to call the Supplier's system to get the daily ARI of one hotel by date range.
POST /ari/daily/details HTTP/1.1 URL: {{endpoint}}/ari/daily/details Authorization: 53ac07777cdffac2d53000002d698728ce964432d7167596bc005c5fc Accept-Encoding: gzip Content-Encoding: gzip Content-Type: application/json;charset=utf-8
Request Example
{ "header": { "sourceId": "HHBIJSOPLS", "distributorId": "GTA", "version": "v4", "token": "18393849028490234" }, "hotelId": "100001", "dateRange": { "startDate": "2018-01-01", "endDate": "2018-01-04" } }
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 |
hotelId | string | Yes | / | 100001 |
dateRange | object | / | / | |
@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 |
Response Example
Common Rate Success Response (HTTP Status 200)
{ "header": { "sourceId": "HHBIJSOPLS", "distributorId": "GTA", "version": "v4", "token": "18393849028490234" }, "hotelId": "100001", "dateRange": { "startDate": "2018-01-01", "endDate": "2018-01-04" }, "currency": "USD", "dailyAris": [ { "roomId": "10000101", "rateId": "123456", "mealPlans": [ "BB", "BB", "BB", "BB" ], "inventories": [ 9, 0, 9, 9 ], "rates": { "type": "CommonRate", "amountAfterTax": [ 623.23, 623.23, 623.23, 623.23 ] }, "availStatuses": { "close": [ false, false, false, false ], "minStayArrival": [ 0, 2, 0, 0 ], "maxStayArrival": [ 0, 2, 0, 0 ], "minStayThrough": [ 0, 2, 0, 0 ], "maxStayThrough": [ 0, 2, 0, 0 ], "minAdvanceDay": [ 0, 2, 0, 0 ], "maxAdvanceDay": [ 365, 365, 365, 365 ], "cta": [ false, false, false, true ], "ctd": [ false, false, false, true ], "fplos": [ "1111111", "1001111", "1000001", "0000000" ] }, "rateChangeIndicators": [ true, false, true, false ], "extensions": { "key": "value" } } ] }
- Occupancy Rate Success Response (HTTP Status 200)
{ "header": { "sourceId": "HHBIJSOPLS", "distributorId": "GTA", "version": "v4", "token": "18393849028490234" }, "hotelId": "100001", "dateRange": { "startDate": "2018-01-01", "endDate": "2018-01-04" }, "currency": "USD", "dailyAris": [ { "roomId": "10000101", "rateId": "123456", "mealPlans": [ "BB", "BB", "BB", "BB" ], "inventories": [ 9, 0, 9, 9 ], "rates": { "type": "OccupancyRate", "rates": [ { "adultCount": 2, "childCount": 1, "amountBeforeTax": [ 502.19, 502.19, 502.19, 502.19 ], "amountAfterTax": [ 623.23, 623.23, 623.23, 623.23 ] } ] }, "availStatuses": { "close": [ false, false, false, false ], "minStayArrival": [ 0, 2, 0, 0 ], "maxStayArrival": [ 0, 2, 0, 0 ], "minStayThrough": [ 0, 2, 0, 0 ], "maxStayThrough": [ 0, 2, 0, 0 ], "minAdvanceDay": [ 0, 2, 0, 0 ], "maxAdvanceDay": [ 365, 365, 365, 365 ], "cta": [ false, false, false, true ], "ctd": [ false, false, false, true ], "fplos": [ "1111111", "1001111", "1000001", "0000000" ] }, "rateChangeIndicators": [ true, false, true, false ], "extensions": { "key": "value" } } ] }
- Occupancy Rate with Child Price Success Response (HTTP Status 200)
{ "header": { "sourceId": "HHBIJSOPLS", "distributorId": "GTA", "version": "v4", "token": "18393849028490234" }, "hotelId": "100001", "dateRange": { "startDate": "2018-01-01", "endDate": "2018-01-04" }, "currency": "USD", "dailyAris": [ { "roomId": "10000101", "rateId": "123456", "mealPlans": [ "BB", "BB", "BB", "BB" ], "inventories": [ 9, 0, 9, 9 ], "rates": { "extraChildRates": [ { "amountAfterTax": [ 50.00, 50.00, 50.00, 50.00 ], "amountBeforeTax": [ 40.00, 40.00, 40.00, 40.00 ], "maxAge": "2", "minAge": "0" }, { "amountAfterTax": [ 60.00, 60.00, 60.00, 60.00 ], "amountBeforeTax": [ 50.00, 50.00, 50.00, 50.00 ], "maxAge": "8", "minAge": "3" }, { "amountAfterTax": [ 70.00, 70.00, 70.00, 70.00 ], "amountBeforeTax": [ 60.00, 60.00, 60.00, 60.00 ], "maxAge": "17", "minAge": "9" } ], "type": "OccupancyRate", "rates": [ { "adultCount": 2, "childCount": 1, "amountBeforeTax": [ 502.19, 502.19, 502.19, 502.19 ], "amountAfterTax": [ 623.23, 623.23, 623.23, 623.23 ] } ] }, "availStatuses": { "close": [ false, false, false, false ], "minStayArrival": [ 0, 2, 0, 0 ], "maxStayArrival": [ 0, 2, 0, 0 ], "minStayThrough": [ 0, 2, 0, 0 ], "maxStayThrough": [ 0, 2, 0, 0 ], "minAdvanceDay": [ 0, 2, 0, 0 ], "maxAdvanceDay": [ 365, 365, 365, 365 ], "cta": [ false, false, false, true ], "ctd": [ false, false, false, true ], "fplos": [ "1111111", "1001111", "1000001", "0000000" ] }, "rateChangeIndicators": [ true, false, true, false ], "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 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 |
hotelId | string | Yes | / | 100001 |
dateRange | object | / | / | / |
@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 |
currency | string | Yes | Currency code[ISO-4217 ] | USD |
dailyAris | array | Yes | Daily rate & inventory within the date range. | / |
@roomId | string | Yes | Room id in supplier's system | 10000101 |
@rateId | string | Yes | Rate id in supplier's system | 123456 |
@mealPlans | array[string] | No | Meal plan of each date | [ "BB", "BB", "BB", "BB" ] |
@inventories | array[integer] | Yes | Room inventory of each date | [ 9, 0, 9, 9 ] |
dailyAris/rates | / | Yes | / | / |
@type | enum | Yes | Enum: [ OccupancyRate, CommonRate ] Indicates which rate model be used: OccupancyRate or CommonRate. | / |
rates / rates | array[object] | Yes | The node will not display if it’s the Common Rate Model. | / |
@adultCount | integer | No | / | / |
@childCount | integer | No | / | / |
@amountBeforeTax | array[number] | No | / | [ 502.19, 502.19, 502.19, 502.19 ] |
@amountAfterTax | array[number] | No | / | [ 623.23, 623.23, 623.23, 623.23 ] |
availStatuses | / | / | / | / |
@close | array[boolean] | Yes | Close or not for each date | [ false, false, false, false ] |
@minStayArrival | array[integer] | No | Minimal length of stay based on check-in for each date, zero means no restriction. | [ 0, 2, 0, 0 ] |
@maxStayArrival | array[integer] | No | Maximal length of stay based on check-in for each date, zero means no restriction. | [ 0, 2, 0, 0 ] |
@minStayThrough | array[integer] | No | Minimal length of stay based on a date through for each date, zero means no restriction. | [ 0, 2, 0, 0 ] |
@maxStayThrough | array[integer] | No | The maximum length of stay is based on a date for each date, zero means no restriction. | [ 0, 2, 0, 0 ] |
@minAdvanceDay | array[integer] | No | Minimal days to book in advance for each date, zero means no restriction. | [ 0, 2, 0, 0 ] |
@maxAdvanceDay | array[integer] | No | Maximum days to book in advance for each date, zero means no restriction | [ 365, 365, 365, 365 ] |
@cta | array[boolean] | No | Close to arrival for each date | [ false, false, false, true ] |
@ctd | array[boolean] | No | Close to departure for each date | [ false, false, false, true ] |
@fplos | array[string] | No | Full pattern length of stay to indicate if the stay is available. | [ "1111111", "1001111", "1000001", "0000000" ] |
rateChangeIndicators | array[boolean] | No | Rate change indicator of each date. | [ true, false, true, false ] |
extensions | object | No | A common extension object for extra attributes like account, extra setting required by a distributor, etc. | / |
LOS ARI
This is an API for DerbySoft to call the Supplier's system to get LOS ARI of one hotel by date range.
Notes: ① Full length of stay ARI for each date should be included in the response. Any missing ARI of the length of stay CANNOT be pushed out to the distributor. ② If no rate in the supplier's system, it's recommended to set both of rate and inventory to zero. ③ The meal plan is an optional field, as some distributors get this offline instead of through the API.
POST /ari/los/details HTTP/1.1 URL: {{endpoint}}/ari/los/details Authorization: 53ac07777cdffac2d53000002d698728ce964432d7167596bc005c5fc Accept-Encoding: gzip Content-Encoding: gzip Content-Type: application/json;charset=utf-8
Request Example
{ "header": { "sourceId": "HHBIJSOPLS", "distributorId": "GTA", "version": "v4", "token": "18393849028490234" }, "hotelId": "100001", "dateRange": { "startDate": "2018-01-01", "endDate": "2018-01-04" } }
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 |
hotelId | string | Yes | / | 100001 |
dateRange | object | / | / | / |
@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 |
Response Example
Common Rate Success Response (HTTP Status 200)
{ "header": { "sourceId": "HHBIJSOPLS", "distributorId": "GTA", "version": "v4", "token": "18393849028490234" }, "hotelId": "100001", "dateRange": { "startDate": "2018-01-01", "endDate": "2018-01-04" }, "currency": "USD", "losAris": [ { "roomId": "10000101", "rateId": "123456", "los": 1, "mealPlans": [ "BB", "BB", "BB", "BB" ], "inventories": [ 9, 0, 9, 9 ], "rates": { "type": "CommonRate", "amountAfterTax": [ 623.23, 623.23, 623.23, 623.23 ] }, "extensions": { "key": "value" } }, { "roomId": "10000101", "rateId": "123456", "los": 2, "mealPlans": [ "BB", "BB", "BB", "BB" ], "inventories": [ 9, 0, 9, 9 ], "rates": { "type": "CommonRate", "amountBeforeTax": [ 1004.38, 1004.38, 1004.38, 1004.38 ] }, "extensions": { "key": "value" } } ] }
- Occupancy Rate Success Response (HTTP Status 200)
{ "header": { "sourceId": "HHBIJSOPLS", "distributorId": "GTA", "version": "v4", "token": "18393849028490234" }, "hotelId": "100001", "dateRange": { "startDate": "2018-01-01", "endDate": "2018-01-04" }, "currency": "USD", "losAris": [ { "roomId": "10000101", "rateId": "123456", "los": 1, "mealPlans": [ "BB", "BB", "BB", "BB" ], "inventories": [ 9, 0, 9, 9 ], "rates": { "type": "OccupancyRate", "rates": [ { "adultCount": 2, "childCount": 1, "amountBeforeTax": [ 502.19, 502.19, 502.19, 502.19 ], "amountAfterTax": [ 623.23, 623.23, 623.23, 623.23 ] } ] }, "extensions": { "key": "value" } }, { "roomId": "10000101", "rateId": "123456", "los": 2, "mealPlans": [ "BB", "BB", "BB", "BB" ], "inventories": [ 9, 0, 9, 9 ], "rates": { "type": "OccupancyRate", "rates": [ { "adultCount": 2, "childCount": 1, "amountBeforeTax": [ 1004.38, 1004.38, 1004.38, 1004.38 ], "amountAfterTax": [ 1246.46, 1246.46, 1246.46, 1246.46 ] } ] }, "extensions": { "key": "value" } } ] }
- Occupancy Rate with Child Price Success Response (HTTP Status 200)
{ "header": { "sourceId": "HHBIJSOPLS", "distributorId": "GTA", "version": "v4", "token": "18393849028490234" }, "hotelId": "100001", "dateRange": { "startDate": "2018-01-01", "endDate": "2018-01-04" }, "currency": "USD", "losAris": [ { "roomId": "10000101", "rateId": "123456", "los": 1, "mealPlans": [ "BB", "BB", "BB", "BB" ], "inventories": [ 9, 0, 9, 9 ], "rates": { "extraChildRates": [ { "amountAfterTax": [ 50.00, 50.00, 50.00, 50.00 ], "amountBeforeTax": [ 40.00, 40.00, 40.00, 40.00 ], "maxAge": "2", "minAge": "0" }, { "amountAfterTax": [ 60.00, 60.00, 60.00, 60.00 ], "amountBeforeTax": [ 50.00, 50.00, 50.00, 50.00 ], "maxAge": "8", "minAge": "3" }, { "amountAfterTax": [ 70.00, 70.00, 70.00, 70.00 ], "amountBeforeTax": [ 60.00, 60.00, 60.00, 60.00 ], "maxAge": "17", "minAge": "9" } ], "type": "OccupancyRate", "rates": [ { "adultCount": 2, "childCount": 1, "amountBeforeTax": [ 502.19, 502.19, 502.19, 502.19 ], "amountAfterTax": [ 623.23, 623.23, 623.23, 623.23 ] } ] }, "extensions": { "key": "value" } }, { "roomId": "10000101", "rateId": "123456", "los": 2, "mealPlans": [ "BB", "BB", "BB", "BB" ], "inventories": [ 9, 0, 9, 9 ], "rates": { "extraChildRates": [ { "amountAfterTax": [ 50.00, 50.00, 50.00, 50.00 ], "amountBeforeTax": [ 40.00, 40.00, 40.00, 40.00 ], "maxAge": "2", "minAge": "0" }, { "amountAfterTax": [ 60.00, 60.00, 60.00, 60.00 ], "amountBeforeTax": [ 50.00, 50.00, 50.00, 50.00 ], "maxAge": "8", "minAge": "3" }, { "amountAfterTax": [ 70.00, 70.00, 70.00, 70.00 ], "amountBeforeTax": [ 60.00, 60.00, 60.00, 60.00 ], "maxAge": "17", "minAge": "9" } ], "type": "OccupancyRate", "rates": [ { "adultCount": 2, "childCount": 1, "amountBeforeTax": [ 1004.38, 1004.38, 1004.38, 1004.38 ], "amountAfterTax": [ 1246.46, 1246.46, 1246.46, 1246.46 ] } ] }, "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 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 |
hotelId | string | Yes | / | 100001 |
dateRange | object | / | / | / |
@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 |
currency | string | Yes | Currency code[ISO-4217] | USD |
losAris | array | Yes | Full length of stay ARI for each date should be ALL be included in the response. Any missing ARI of the length of stay CANNOT be pushed out to the distributor. If no rate in the supplier’s system, it's recommended to set both the rate and inventory to zero. The meal plan is an optional field, as some distributors get this offline instead of through the API. | / |
@roomId | string | Yes | Room id in supplier's system | 10000101 |
@rateId | string | Yes | Rate id in supplier's system | 123456 |
@los | integer | Yes | Length of stay | 1 |
@mealPlans | array[string] | No | Meal plan of each date | [ "BB", "BB", "BB", "BB" ] |
@inventories | array[integer] | Yes | Room inventory of each date | [ 9, 0, 9, 9 ] |
losAris / rates | / | Yes | / | / |
@type | enum | Yes | Enum: [ OccupancyRate, CommonRate ] Indicates which rate model be used: OccupancyRate or CommonRate. | / |
rates / rates | array[object] | Yes | The node will not display if it’s Common Rate Model. | / |
@adultCount | integer | No | / | / |
@childCount | integer | No | / | / |
@amountBeforeTax | array[number] | No | / | [ 502.19, 502.19, 502.19, 502.19 ] |
@amountAfterTax | array[number] | No | / | [ 623.23, 623.23, 623.23, 623.23 ] |
rates / extraChildRates | object | No | Extra child rate is only used with occupancy rate, max child age must be provided for available hotel product. | / |
@minAge | integer | Yes | Minimal child age is greater than or equal to zero | 0 |
@maxAge | integer | Yes | Maximum child age is less than or equal to maxChildAge | 2 |
@amountBeforeTax | array[number] | No | / | [ 40, 40 ] |
@amountAfterTax | array[number] | No | / | [ 40, 40 ] |
extensions | object | No | A common extension object for extra attributes like account, extra setting required by a distributor, etc. | / |
CDS
This is an API for DerbySoft to call the Supplier's system to get daily ARI changes by one hotel. It's an optional function, but it is recommendeded for the Supplier's system to implement.
POST /ari/changes HTTP/1.1 URL: {{endpoint}}/ari/changes Authorization: 53ac07777cdffac2d53000002d698728ce964432d7167596bc005c5fc Accept-Encoding: gzip Content-Encoding: gzip Content-Type: application/json;charset=utf-8
Request Example
{ "header": { "sourceId": "HHBIJSOPLS", "distributorId": "GTA", "version": "v4", "token": "18393849028490234" }, "timestamp": "2017-07-21T17:32:28.000Z", "dateRange": { "startDate": "2018-01-01", "endDate": "2018-01-04" }, "hotelIds": [ "100001", "100002", "100003" ] }
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 |
timestamp | string | Yes | Timestamp to request changes in UTC timezone | 2017-07-21T17:32:28.000Z |
dateRange | object | / | / | / |
@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 |
hotelIds | array[string] | Yes | Hotel IDs in supplier's system | [ "100001", "100002", "100003" ] |
Response Example
Success Response (HTTP Status 200)
{ "header": { "sourceId": "HHBIJSOPLS", "distributorId": "GTA", "version": "v4", "token": "18393849028490234" }, "timestamp": "2017-07-21T17:32:28.000Z", "dateRange": { "startDate": "2018-01-01", "endDate": "2018-01-04" }, "changes": { "100001": [ "2018-01-01", "2018-01-02" ], "100002": [ "2018-01-02" ] } }
- 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 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 |
timestamp | string | Yes | Timestamp to request changes in UTC timezone | 2017-07-21T17:32:28.000Z |
dateRange | object | / | / | / |
@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 |
changes | object | Yes | Date format: yyyy-MM-dd A changed date array by each hotel | 2018-01-01 |
Did you find it helpful? Yes No
Send feedback