Introduction
Welcome to the AxisRooms CM OTA API! You can use our API to integrate your channel with CM. So that you will receive inventory & price updates.
Authentication
To authorize, use this API key:
{"key":"key123"}
AxisRooms CM uses API key to allow access to the API.
OTA API expects the API key to be included in all API requests that looks like the following:
{"key":"key123"}
OTA API
Get ProductInfo
Request JSON:
{
"auth": {
"key": "key123"
},
"propertyId": "hotelId"
}
Response JSON:
{
"message": "message for success/failure",
"status": "success/failure",
"data": [
{
"name": "room_name1",
"id": "room1"
},
{
"name": "room_name2",
"id": "room2"
}
]
}
This API call will be used to fetch room information from the OTA(Client).Client needs to accept the request and respond with the mentioned JSON response. Client needs to provide the end-point for this.
HTTP Request
POST http://clientUrl/productInfo
Query Parameters for Request
Parameter | Description |
---|---|
auth | Contains the authorization elements. |
key | API key provided by AxisRooms. |
propertyId | Hotel ID at Client's system |
Query Parameters for Response
Parameter | Description |
---|---|
message | Description for failure. Empty or pass any information if in case of success. |
status | Status of the API call. Expected values are success/failure. |
data | Contains Rooms information. |
name | Room name in Client's system. |
id | Room ID in Client's system. |
Get RateplanInfo
Request JSON:
{
"auth": {
"key": "key123"
},
"propertyId": "hotelId",
"roomId": "roomId"
}
Response JSON:
{
"message": "message for success/failure",
"status": "success/failure",
"data": [
{
"rateplanId": "15",
"ratePlanName": "CP",
"occupancy": [
"SINGLE",
"DOUBLE",
"TRIPLE",
"QUAD",
"PENTA",
"HEXA",
"HEPTA",
"OCTA",
"NONA",
"DECA",
"EXTRABED",
"EXTRAADULT",
"EXTRACHILD",
"EXTRAADULT2",
"EXTRACHILD2",
"EXTRAADULT3",
"EXTRACHILD3",
"EXTRAINFANT"
],
"validity": {
"startDate": "2014-06-02",
"endDate": "2014-06-08"
},
"commissionPerc": "10.0",
"taxPerc": "5.0",
"currency": "USD"
},
{
"rateplanId": "16",
"ratePlanName": "EP",
"occupancy": [
"SINGLE",
"DOUBLE",
"TRIPLE",
"QUAD",
"PENTA",
"HEXA",
"HEPTA",
"OCTA",
"NONA",
"DECA",
"EXTRABED",
"EXTRAADULT",
"EXTRACHILD",
"EXTRAADULT2",
"EXTRACHILD2",
"EXTRAADULT3",
"EXTRACHILD3",
"EXTRAINFANT"
],
"validity": {
"startDate": "2014-06-06",
"endDate": "2014-06-12"
},
"commissionPerc": "10.0",
"taxPerc": "5.0",
"currency": "USD"
}
]
}
This API will be used to fetch rateplans from the OTA so that the same can be mapped on the CM side. Client needs to accept the request and respond with the mentioned JSON response. Client needs to provide the end-point for this.
HTTP Request
POST http://clientUrl/ratePlanInfo
Query Parameters for Request
Parameter | Description |
---|---|
auth | Contains the authorization elements. |
key | API key provided by AxisRooms. |
propertyId | Hotel ID at Client's system |
roomId | Room ID at Client's system |
Query Parameters for Response
Parameter | Description |
---|---|
message | Description for failure. Empty or pass any information if in case of success. |
status | Status of the API call. Expected values are success/failure. |
data | Contains RatePlan's information. |
rateplanId | RatePlan id in Client's system. |
ratePlanName | RatePlan name in Client's system. |
occupancy | Supported Occupancies at Client's system. |
validity | Contains date range applies for the cuurent rateplan(This block is optional if there is no validity) |
startDate | Start date of the RatePlan validity, supports YYYY-MM-DD. |
endDate | End date of the RatePlan validity, supports YYYY-MM-DD. |
commissionPerc | Commission percentage in Client's system. This field is optional. |
taxPerc | Tax percentage in Client's system. This field is optional. |
currency | Currency in Client's system. This field is optional. |
Update Inventory
Request JSON:
{
"auth": {
"key": "key123"
},
"data": {
"propertyId": "hotelId",
"roomId": "roomId",
"inventory": [
{
"startDate": "2014-06-02",
"endDate": "2014-06-03",
"free": 1
},
{
"startDate": "2014-06-04",
"endDate": "2014-06-08",
"free": 3
}
]
}
}
Response JSON:
{
"message": "message for success/failure",
"status": "success/failure"
}
This API will be used to update the inventory into Client's system. Client needs to accept the request and respond with the mentioned JSON response. Client needs to provide the end-point for this.
HTTP Request
POST http://clientUrl/inventoryUpdate
Query Parameters for Request
Parameter | Description |
---|---|
auth | Contains the authorization elements. |
key | API key provided by AxisRooms. |
data | Contains inventory details with property information. |
propertyId | Hotel ID in Client's system. |
roomId | Room ID in Client's system. |
inventory | Contains inventory information with certain date range. |
startDate | Start date of the inventory update, supports YYYY-MM-DD. |
endDate | End date of the inventory update, supports YYYY-MM-DD. |
Query Parameters for Response
Parameter | Description |
---|---|
message | Description for failure. Empty or pass any information if in case of success. |
status | Status of the API call. Expected values are success/failure. |
Update Rate
Request JSON:
{
"auth": {
"key": "key123"
},
"data": {
"propertyId": "hotelId",
"roomId": "roomId",
"rateplanId": "rateplanId",
"rate": [
{
"startDate": "2014-06-02",
"endDate": "2014-06-03",
"SINGLE": 5300, //mandatory
"DOUBLE": 5700 //mandatory
...
},
{
"startDate": "2014-06-04",
"endDate": "2014-06-06",
"SINGLE": 5100, //mandatory
"DOUBLE": 5600 //mandatory
...
}
]
}
}
Response JSON:
{
"message": "message for success/failure",
"status": "success/failure"
}
This API will be used to update the Rates into Client's system. Client needs to accept the request and respond with the mentioned JSON response. Client needs to provide the end-point for this.
HTTP Request
POST http://clientUrl/rateUpdate
Query Parameters for Request
Parameter | Description |
---|---|
auth | Contains the authorization elements. |
key | API key provided by AxisRooms. |
data | Contains rate details with property information. |
propertyId | Hotel ID in Client's system. |
roomId | Room ID in Client's system. |
rateplanId | RatePlan ID in Client's system. |
rate | Contains rates information with certain date range. |
startDate | Start date of the rate update, supports YYYY-MM-DD. |
endDate | End date of the rate update, supports YYYY-MM-DD. |
Single | rate for Single ocuupancy. |
Double | rate for Double ocuupancy. |
Query Parameters for Response
Parameter | Description |
---|---|
message | Description for failure. Empty or pass any information if in case of success. |
status | Status of the API call. Expected values are success/failure. |
Update Restrictions
Request JSON:
{
"auth": {
"key": "key123"
},
"data": [
{
"roomDetails": [
{
"ratePlanDetails": [
{
"ratePlanId": "123456",
"restrictions": {
"periods": [
{
"endDate": "2018-02-05",
"startDate": "2018-02-05"
}
],
"type": "Status/COA/COD/MLos",
"value": "Open/Close/2"
}
}
],
"roomId": "20000121"
}
]
"propertyId": "WQTgOhGLxuIV"
}
]
}
Response JSON:
{
"message": "message for success/failure",
"status": "success/failure"
}
This API will be used to update the Restrictions into Client's system. Client needs to accept the request and respond with the mentioned JSON response. Client needs to provide the end-point for this.
HTTP Request
POST http://clientUrl/restrictionUpdate
Query Parameters for Request
Parameter | Description |
---|---|
auth | Contains the authorization elements. |
key | API key provided by AxisRooms. |
data | Contains the property information. |
propertyId | Hotel ID in Client's system. |
roomDetails | Contains the Room information . |
roomId | Room ID in Client's system. |
ratePlanDetails | Contains the Rateplan information. |
ratePlanId | RatePlan ID in Client's system. |
restrictions | Contains restrictions information. |
periods | Contains the date range(s) which restrictions will apply. |
startDate | Start date of the rate update, supports YYYY-MM-DD. |
endDate | End date of the rate update, supports YYYY-MM-DD. |
type | Restriction type |
value | Restriction value |
Status | This restriction can be used to open/close the rateplan. Open/Close values will be used for this. |
COA | This restriction can be used to Closed On Arrival. Open/Close values will be used for this. |
COD | This restriction can be used to Closed On Departure. Open/Close values will be used for this. |
MLos | This restriction can be used to set Minimum Length of Stay. Integer number value will be used for this. |
Query Parameters for Response
Parameter | Description |
---|---|
message | Description for failure. Empty or pass any information if in case of success. |
status | Status of the API call. Expected values are success/failure. |
Push Booking API
Request JSON:
{
"accessKey": "key123",
"bookingStatus": "confirmed/modified/cancelled",
"bookedTime": "2016-08-02 16:39:20",
"cancelledTime": "2016-08-02 16:39:20",
"modifiedTime": "2016-08-02 16:39:20",
"confirmationNo": "24314283",
"hotelId": "64",
"supplierAmount": "9870.0",
"taxes": "870.0",
"commission": "780.0",
"totalAmount": "10384.0",
"checkInDate": "2016-08-10",
"checkOutDate": "2016-08-12",
"totalAdults": 2,
"totalChildren": 1,
"bookedBy": "test user",
"customerEmail": "ram@xxx.com",
"phoneNo": "9986543212",
"paymentStatus": 0,
"roomStays": [
{
"rateId": "12XXX",
"rateName": "CP/AP/MAP/EP",
"roomId": "1",
"noOfUnits": "1",
"amount": "25960.0",
"guestDetails": {
"guestName": "Krishna kumar",
"adults": 2,
"children": 2
}
},
{
"rateId": "13XXXX",
"rateName": "CP/AP/MAP/EP",
"roomId": "1",
"noOfUnits": "1",
"totalAmount": "25960.0",
"guestDetails": {
"guestName": "Satya prakash",
"adults": 2,
"children": 1
}
},
]
}
Response JSON:
{
"message": "message for success/failure",
"status": "success/failure"
}
This API will be implemented by the CM and OTA will push bookings to the endpoint shared by the AxisRooms.
HTTP Request
POST /api/clientPushBookingNotif
Query Parameters for Request
Parameter | Description |
---|---|
accessKey | API key provided by AxisRooms. |
bookingStatus | status of the booking. Accepts confirmed/modified/cancelled. |
bookedTime | Time of booking generation. |
cancelledTime | Time of cancellation. This is optional if in case status is confirmed/modified. |
modifiedTime | Time of modification. This is optional if in case status is confirmed/cancelled. |
confirmationNo | Booking ID in Client's syatem. |
hotelId | Hotel ID in Client's system. |
supplierAmount | Supplier Amount for this booking. |
taxes | Tax amount for this booking. |
commission | Commission amount for this booking. |
totalAmount | Total amount for this booking. |
checkInDate | Check-In date of the booking. |
checkOutDate | Check-Out of the booking. |
totalAdults | Total Adult count for this booking. |
totalChildren | Total Children count for this booking. |
bookedBy | Booker name. This is optional if booking made by guest only. |
customerEmail | Guest email. |
phoneNo | Guest phone number. |
paymentStatus | Payment mode of the booking transaction. Supported values are 0,1 & 2. 0 -> Prepaid, 1 -> Pay At Hotel, 2 -> Partial Payment |
roomStays | Contains Room details of the booking. |
rateId | RatePlan Id for this booking. |
rateName | RatePlan name for this booking. |
noOfUnits | Number of units for the current room. |
amount | amount for the current room. |
guestDetails | Contains Guest details. |
guestName | Guest Name. |
guestName | Guest Name. |
adults | Number of Adults in the current room. |
children | Number of Childrens in the current room. |
Query Parameters for Response
Parameter | Description |
---|---|
message | Description for failure. Empty or pass any information if in case of success. |
status | Status of the API call. Expected values are success/failure. |
Errors
AxisRooms OTA API uses the following error codes:
Error Code | Meaning |
---|---|
400 | Bad Request. |
401 | Unauthorized. Incorrect API key. |
403 | Forbidden Error. |
404 | URL Not Found. |
500 | Internal Server Error, try again later. |
503 | Service Unavailable. |