Inventory Query

Fetch the inventory of hotel's product for a period of time,The returned result is an array, and the index sequence corresponds to the date

Request Method#

POST

uri: /ari/daily/inventory

Content-Type: application/json


Request parameter description#

RequestHeader#

Common Request Header[Reference]

RequestBody#

ParameterTypeRequiredMaximum lengthExample
hotelIdStringY3212 * * 567
startDateDateY-2021-10-01
endDateDateY-2021-10-02
checkinTypeStringY16DAY
productCandidatesList<ProductCandidate>N-
echoTokenStringN647550f7497b2d4dd9beea83cd2fe8cd74

ProductCandidate#

ParameterTypeRequiredMaximum lengthExampleDescription
roomTypeCodeStringY64DR1
rateCodeStringY64Base-NTRRateCode

Response parameter description#

Common Response Parameters[Reference]

content#

ParameterTypeRequiredMaximum lengthExample
hotelIdStringY3212**567
startDateDateY-2021-10-01
endDateDateY-2021-10-02
dailyInventoriesList<DailyInventory>Y-

DailyInventory#

ParameterTypeRequiredMaximum lengthExampleDescription
roomTypeCodeStringY64DR1
rateCodeStringY64Base-NTRrateCode
inventoriesList<Integer>Y-

ResponseCode#

Exception CodeException TypeDescription
1000Success
4301Start date and end date does not match the rules
4302End date is invalid
4303Start date is invalid
4304Invalid hotel Id
4305Hotel is closed
4306No match found
4307Unexpected results of querying room quantity
OtherGlobal Exception CodeGlobal Exception Code[Reference]

Message example#

Case1: Check the inventory under the hotel#

Request Example#

{
"hotelId":"12**567",
"startDate":"2021-10-06",
"endDate":"2021-10-07",
"checkinType":"DAY"
}

Response Success Example#

{
"code":1000,
"content":{
"hotelId":"12**567",
"startDate":"2021-10-06",
"endDate":"2021-10-07",
"dailyInventories":[
{
"rateCode":"Base-NTR",
"roomTypeCode":"ERX1",
"inventories":[
0,
2
]
},
{
"rateCode":"Base-PTF",
"roomTypeCode":"ERX2",
"inventories":[
0,
1
]
}
]
}
}

Response Failure Example#

{
"code":4306,
"message":"No match found"
}

Case2 Check hotel inventory#

Request Example#

{
"startDate":"2021-10-06",
"endDate":"2021-10-07",
"hotelId":"12**567",
"checkinType":"DAY",
"productCandidates":[
{
"roomTypeCode":"K1B",
"rateCode":"Base-ODC401"
}
]
}

Response Success Example#

{
"code":1000,
"content":{
"hotelId":"12**567",
"startDate":"2021-10-06",
"endDate":"2021-10-07",
"dailyInventories":[
{
"inventories":[
0,
1
],
"roomTypeCode":"K1B",
"rateCode":"Base-ODC401"
}
]
}
}

Response Failure Example#

{
"code":4306,
"message":"No match found"
}