0% found this document useful (0 votes)
173 views42 pages

OYO Open API Documentation

Api documentation

Uploaded by

Amber Bisht
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
173 views42 pages

OYO Open API Documentation

Api documentation

Uploaded by

Amber Bisht
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

OYO Open API Documentation

This documentation contains the OYO’s Open API contracts and its suggested usage for partners. OYO
Open API product suite contains all the necessary APIs to support partner connectivity and operations

Version Date Description Author Published

Kundan Kumar
1.0 Oct 27th, 2022 Initial Draft Yes
Ravi Dutt

OYO Open API Documentation ...................................................................................................................... 1


1. Hotel Onboarding APIs ...................................................................................................................... 2
a. List of Property API ........................................................................................................................ 2
b. Property Data API........................................................................................................................... 5
c. Property Room Data API .............................................................................................................. 14
2. Availability Rates Inventory (ARI) API .............................................................................................. 21
a. Property ARI Data ........................................................................................................................ 21
3. Booking API ...................................................................................................................................... 26
a. Create Booking ............................................................................................................................. 26
b. Get Booking Detail ....................................................................................................................... 32
c. Cancel Booking ............................................................................................................................. 35
4. Notification System.......................................................................................................................... 38
a. Sample Request Payload: ............................................................................................................. 40
b. Sample Response Payload ........................................................................................................... 41
5. Errors................................................................................................................................................ 42
6. Warnings .......................................................................................................................................... 42

Postman Documentation Link : [Link]

Base Url :- [Link]

Required headers :-

1. Content-Type : application/json

This document is for internal usage, not to be distributed publicly OYO Hotels & Homes
2. x-access-token : access token to authorize api (this will be provided to partner after Onboarding
of partner in oyo system)
3. x-oyo-entity : reseller account code (required for reseller account)

1. Hotel Onboarding APIs

OYO Partner Hotel Onboarding APIs gives complete access of the OYO inventory across all the
geographies to its registered partners

a. List of Property API

ListofProperty API gives the paginated list of all hotels with basic onboarding attributes.

Name Type Mandatory Sample Value Description


data Object Yes Data
properties List Yes Property Data List
propertyCode String yes 12342 OYO Property ID

This document is for internal usage, not to be distributed publicly OYO Hotels & Homes
OYO 7353 Hotel
propertyName String yes Property name
Alto inn
+911126783396,
+919990567373,
phone String yes +919718575252, Property phone
+919990567373,
+919718575252
[Link]
url String yes .in/maps?q=28.5 Maps address
50567,77.131225
Near Red Light
Bus Stop,
address Number yes Property Address
Mahipalpur
Extension, Delhi
longitude String yes 77.131225 Longitude
latitude String yes 28.550567 Latitude
The code corresponding to
pinCode Number yes 110037 the province where the
Property is located
City where the Property is
city String yes Delhi Transit
located
State where the Property is
state String yes Delhi
located
The code corresponding to
countryId String yes 1 the Country where the
Property is located
Country where the Property is
located
countryName String yes India
Country_id (unique
identifier)
category String yes OYO Rooms Townhouse, Silverkey etc

complimentaryBreakf String Yes Yes Yes/No


ast
Guest review rating on OYO
oyoRating Number No 4.1
App
Hotel specific tags – such as
hotelTags List No
Vaccinaid
name String No oba_pp
description String No Power Play
warnings List No
message String No Message
errors List No
Partner has no
message String No whitelisted Message
countries

This document is for internal usage, not to be distributed publicly OYO Hotels & Homes
Sample Request:
curl --location --request GET
'[Link] \
--header 'x-access-token: ***token***' \
--data-raw ''

Sample Response :

{
"data": {
"properties": [
{
"propertyCode": "74",
"propertyName": "Capital O 325 Hotel Silver Star",
"phone": "+919711114562,+911242384539",
"url": "[Link]
"address": "Near Medanta Hospital, Medicity, Gurgaon",
"longitude": "77.046507",
"latitude": "28.437",
"pinCode": 122018,
"city": "Gurgaon",
"state": "Haryana",
"countryId": "1",
"countryName": "India",
"category": "Capital O",
"hotelTags": [],
"complimentaryBreakfast": "No",
"oyoRating": "4.2"
},
{
"propertyCode": "75",
"propertyName": "OYO 8759 Hotel Adore Palace",
"phone":
"+919664646716,+917021159341,+917021159341,+918693067375,+918693067375",
"url": "[Link]
"address": "Sakinaka Jharimari Link Road, Mumbai",
"longitude": "72.883687",
"latitude": "19.097043",
"pinCode": 400072,
"city": "Mumbai",
"state": "Maharashtra",
"countryId": "1",
"countryName": "India",
"category": "OYO Rooms",
"hotelTags": [
{
"tag": "oba_pp"

This document is for internal usage, not to be distributed publicly OYO Hotels & Homes
}
],

"complimentaryBreakfast": "No",
"oyoRating": "5.0"
},
{
"propertyCode": "77",
"propertyName": "Capital O 326 Red Horse Hospitality",
"phone": "+911244777777,+918076783502",
"url": "[Link]
"address": "Near Sikanderpur Metro Station, Gurgaon",
"longitude": "77.09037",
"latitude": "28.484699",
"pinCode": 122002,
"city": "Gurgaon",
"state": "Haryana",
"countryId": "1",
"countryName": "India",
"category": "Capital O",
"hotelTags": [],
"complimentaryBreakfast": "No",
"oyoRating": "4.0"
}
],
"totalElements": 21870
},
"warnings": [],
"errors" : []
}

b. Property Data API

PropertyDataAPI returns the Hotel information such as Hotel Structure, Identification, address etc.

Name Type Mandatory Sample Value Description


data Object Yes Data
properties List Yes Property Data List
propertyCode String yes 12342 OYO Property ID
OYO 7353 Hotel
propertyName String yes Property name
Alto inn
+911126783396,
phone String yes +919990567373, Property phone
+919718575252,

This document is for internal usage, not to be distributed publicly OYO Hotels & Homes
+919990567373,
+919718575252
[Link]
[Link]/maps?q=28.
url String yes Maps address
550567,77.1312
25
Near Red Light
Bus Stop,
address Number no Property Address
Mahipalpur
Extension, Delhi
longitude String yes 77.131225 Longitude
latitude String yes 28.550567 Latitude
The code corresponding to
pinCode Number yes 110037 the province where the
Property is located
City where the Property is
city String yes Delhi Transit
located
State where the Property is
state String yes Delhi
located
The code corresponding to
countryId String yes 1 the Country where the
Property is located
Country where the Property is
located
countryName String yes India
Country_id (unique
identifier)
category String yes OYO Rooms Townhouse etc

complimentaryBreakfa String No Yes Yes/No


st
oyoRating Number No 4.1 Guest review rating
roomCategories List Yes [1, 2] Room Categories
amenities List No
amenityId Number No 1
amenityType String No Hotel Hotel/Room
amenityName String No Parking Facility
amenityCategory String No Hotel facilities
images List No
[Link]
[Link]
m/uploads/hotel
imageUrl String No
_image/12319/b
eebf3632c87b61
[Link]

This document is for internal usage, not to be distributed publicly OYO Hotels & Homes
imageCategory String No Facade
imagePriority String No 1
hotelTags List No Hotel Specific tags
name String No oba_pp
description String No
policy List No
restrictions List No
name String No one_liner
displayName String No One liner
With a hint of
traditional
architecture, the
notes String No place offers
rooms with an
earthy toned
decor.
warnings List No
Data for some
message String No properties could Message
not be fetched
errors List No
Cannot fetch
message String No hotel Message
information

curl --location --request POST


'[Link] =12319'
\
--header 'x-access-token: ***token***' \
--data-raw ''

Sample Response :

{
"data": {
"properties": [
{
"roomCategories": [

This document is for internal usage, not to be distributed publicly OYO Hotels & Homes
"284308",
"284295",
"284606",
"284607"
],
"description": "<div><strong>About 5 by OYO - Metropolitan
Jaipur</strong></div>\r\n<div>&nbsp;</div>\r\n<div>We bring you<strong>&nbsp;</strong>5 By
OYO Metropolitan, OYO&rsquo;s first 5-Star property located in C-Scheme, Jaipur. The hotel
is centrally located and is only 2 km away from the Jaipur Railway Station and 10 km away
from the Jaipur International Airport.&nbsp;</div>\r\n<div>&nbsp;</div>\r\n<div>The
hotel&rsquo;s 90 rooms and suites are immaculately designed with a host of amenities such as
a tea/coffee maker, flat-screen TV with satellite channels, high-speed Wi-Fi connectivity,
among others. All Club, Superior &amp; Suite rooms have a bathtub along with a shower
cubicle.</div>\r\n<div>&nbsp;</div>\r\n<div><strong>Restaurants and special
amenities</strong></div>\r\n<div>&nbsp;</div>\r\n<div>For those looking to feast on
authentic Rajasthani dishes or relish Indian, Continental &amp; Chinese cuisine, they can
dine at our restaurant 5th Alley and bar Liquid House. Our guests can also enjoy authentic
Rajasthani, Continental or Chinese cuisines at our restaurant, 5th Alley or enjoy a
refreshing drink at the bar, Liquid House. Our Chef&rsquo;s Signature preparations would
make your stay with us truly memorable.</div>\r\n<div>&nbsp;</div>\r\n<div>Kickstart your
day with a workout at our fully-equipped fitness centre. Or take a dip in the pool and visit
our spa for a relaxing massage, which is guaranteed to restore your natural
glow.</div>\r\n<div>&nbsp;</div>\r\n<div>The hotel also has a business centre and 2 banquet
halls, ideal for occasions ranging from formal meetings to elaborate weddings. The ballroom,
spacious enough for 150 guests, is perfect to host conferences and private
events.</div>\r\n<div>&nbsp;</div>\r\n<div><strong>Nearby
attractions</strong></div>\r\n<div>&nbsp;</div>\r\n<div>5 By OYO is under 15 minutes drive
from Jaipur&rsquo;s major tourist attractions spots like Hawa Mahal, Jantar Mantar, City
Palace. Being part of the mall gives easy accessibility to recreational activities and any
retail therapy one desires in a shopping arcade.</div>",
"amenities": [
{
"amenityId": 164,
"amenityType": "Hotel",
"amenityName": "Reception",
"amenityCategory": "Hotel facilities"
},
{
"amenityId": 10097,
"amenityType": "Hotel",
"amenityName": "Concierge",
"amenityCategory": "Hotel facilities"
},
{
"amenityId": 3,
"amenityType": "Hotel",
"amenityName": "Free Wifi",
"amenityCategory": "Hotel facilities"
},
{
"amenityId": 76,
"amenityType": "Hotel",
"amenityName": "TV",

This document is for internal usage, not to be distributed publicly OYO Hotels & Homes
"amenityCategory": "Hotel facilities"
},
{
"amenityId": 13,
"amenityType": "Hotel",
"amenityName": "AC",
"amenityCategory": "Hotel facilities"
},
{
"amenityId": 80,
"amenityType": "Hotel",
"amenityName": "In-house Restaurant",
"amenityCategory": "Hotel facilities"
},
{
"amenityId": 17,
"amenityType": "Hotel",
"amenityName": "Elevator",
"amenityCategory": "Hotel facilities"
},
{
"amenityId": 19,
"amenityType": "Hotel",
"amenityName": "Swimming Pool",
"amenityCategory": "Hotel facilities"
},
{
"amenityId": 21,
"amenityType": "Hotel",
"amenityName": "Conference Room",
"amenityCategory": "Hotel facilities"
},
{
"amenityId": 86,
"amenityType": "Hotel",
"amenityName": "CCTV Cameras",
"amenityCategory": "Hotel facilities"
},
{
"amenityId": 75,
"amenityType": "Hotel",
"amenityName": "Banquet Hall",
"amenityCategory": "Hotel facilities"
},
{
"amenityId": 26,
"amenityType": "Hotel",
"amenityName": "Bar",
"amenityCategory": "Hotel facilities"
}
],
"images": [
{

This document is for internal usage, not to be distributed publicly OYO Hotels & Homes
"imageUrl":
"[Link]
"imageCategory": "Pool",
"imagePriority": 1
},
{
"imageUrl":
"[Link]
"imageCategory": "Facade",
"imagePriority": 2
},
{
"imageUrl":
"[Link]
"imageCategory": "Others",
"imagePriority": 3
},
{
"imageUrl":
"[Link]
"imageCategory": "Facade",
"imagePriority": 4
},
{
"imageUrl":
"[Link]
"imageCategory": "Reception",
"imagePriority": 5
},
{
"imageUrl":
"[Link]
"imageCategory": "Reception",
"imagePriority": 6
},
{
"imageUrl":
"[Link]
"imageCategory": "Reception",
"imagePriority": 7
},
{
"imageUrl":
"[Link]
"imageCategory": "Lobby",
"imagePriority": 8
},
{
"imageUrl":
"[Link]
"imageCategory": "Lobby",
"imagePriority": 9
},

This document is for internal usage, not to be distributed publicly OYO Hotels & Homes
{
"imageUrl":
"[Link]
"imageCategory": "Lobby",
"imagePriority": 10
},
{
"imageUrl":
"[Link]
"imageCategory": "Lobby",
"imagePriority": 11
},
{
"imageUrl":
"[Link]
"imageCategory": "Restaurant",
"imagePriority": 12
},
{
"imageUrl":
"[Link]
"imageCategory": "Restaurant",
"imagePriority": 13
},
{
"imageUrl":
"[Link]
"imageCategory": "Restaurant",
"imagePriority": 14
},
{
"imageUrl":
"[Link]
"imageCategory": "Restaurant",
"imagePriority": 15
},
{
"imageUrl":
"[Link]
"imageCategory": "Restaurant",
"imagePriority": 16
},
{
"imageUrl":
"[Link]
"imageCategory": "Restaurant",
"imagePriority": 17
},
{
"imageUrl":
"[Link]
"imageCategory": "Restaurant",
"imagePriority": 18

This document is for internal usage, not to be distributed publicly OYO Hotels & Homes
},
{
"imageUrl":
"[Link]
"imageCategory": "Restaurant",
"imagePriority": 19
},
{
"imageUrl":
"[Link]
"imageCategory": "Bar",
"imagePriority": 20
},
{
"imageUrl":
"[Link]
"imageCategory": "Bar",
"imagePriority": 21
},
{
"imageUrl":
"[Link]
"imageCategory": "Bar",
"imagePriority": 22
},
{
"imageUrl":
"[Link]
"imageCategory": "Bar",
"imagePriority": 23
},
{
"imageUrl":
"[Link]
"imageCategory": "Gym Spa",
"imagePriority": 24
},
{
"imageUrl":
"[Link]
"imageCategory": "Gym Spa",
"imagePriority": 25
},
{
"imageUrl":
"[Link]
"imageCategory": "Gym Spa",
"imagePriority": 26
},
{
"imageUrl":
"[Link]
"imageCategory": "Parking",

This document is for internal usage, not to be distributed publicly OYO Hotels & Homes
"imagePriority": 27
},
{
"imageUrl":
"[Link]
"imageCategory": "Others",
"imagePriority": 28
},
{
"imageUrl":
"[Link]
"imageCategory": "Others",
"imagePriority": 29
},
{
"imageUrl":
"[Link]
"imageCategory": "Others",
"imagePriority": 30
},
{
"imageUrl":
"[Link]
"imageCategory": "Others",
"imagePriority": 31
}
],
"restrictions": [
{
"name": "specific_restrictions",
"displayName": "specific_restrictions",
"notes": [
"Outside food is not allowed at the Property.",
"Visitors will not be allowed inside the room.",
"This property accepts UPI payments, bank transfer,
credit/debit cards and cash",
"It is mandatory for guests to present valid photo ID at the
time of check-in. According to government regulations, a valid Photo ID has to be carried by
every person above the age of 18 staying at the hotel. The guest will be requested to carry
their Driving License, Voter?s ID, or Passport for valid address proof at the time of check-
in for Indian Residents and Passport with valid visa for Foreigners & Non- Indian Residents.
Without valid ID the guest will not be allowed to check in. Please Note- PAN Cards will not
be accepted as a valid ID card.",
"The primary age of the guest must be at least 18 years old to
be able to check into this hotel",
"Multiple bookings from different sources for the same purpose
will not be entertained and Hotel reserves the rights to cancellation of the same. (More
than 06 rooms)",
"Pets are not allowed.",
"Cancellation or amendment of a booking made under any offer
will be non-refundable. ",
"Guests grant their consent to process their data for
enhancement of service experience.",

This document is for internal usage, not to be distributed publicly OYO Hotels & Homes
"The hotel reserves the right of admission. Accommodation can
be denied to guests posing as a 'couple' if suitable proof of identification is not
presented at check-in. ",
"Mandatory New Year Eve Gala Dinner on 31st Dec @ INR 4000 AI
per person per meal and Children between 08 to 12 years @ INR 2000 AI per child per meal.",
"The standard check-in time is 14:00 Hrs and the standard
check-out time is 12:00 Noon. Early check-in or late check-out is strictly subjected to
availability and may be chargeable by the hotel. ",
"Mandatory Christmas Eve Gala Dinner on 24th Dec @ INR 3500 AI
per person per meal and Children between 08 to 12 years @ INR 1750 AI per child per meal.",
"Personal preferences of Smoking or Non-Smoking Rooms, Queen or
Twin Beds, Interconnecting Rooms, View, Floor etc. may be communicated to us prior to
arrival enabling us to fulfil your requests. However,the same shall be subject to
availability but not guaranteed.",
"Couples are welcome",
"Guests can check in using any local or outstation ID proof
(PAN card not accepted)."
]
}
],
"propertyCode": "79251",
"propertyName": "5 BY OYO - METROPOLITAN",
"phone": "9001796667",
"url": "[Link]
"address": "",
"longitude": "75.79348261906033",
"latitude": "26.902914655662066",
"pinCode": 302001,
"city": "Jaipur",
"state": "Rajasthan",
"countryId": "1",
"countryName": "India",
"category": "5 by OYO",
"hotelTags": [
{
"tag": "oba_pp"
}
],
"complimentaryBreakfast": "No",
"oyoRating": "4.5"
}
]
},
"warnings": [],
"errors": []
}

c. Property Room Data API

This document is for internal usage, not to be distributed publicly OYO Hotels & Homes
PropertyRoomData API returns the rooms specific information of the hotel ID requested by the partner

Name Type Mandatory Sample Value Description


data Object Yes Data
roomDataList List Yes Room Data List
propertyCode String yes 79251 Property ID
roomCategoryId String yes 284295 Room Category
Deluxe with City
roomCategoryName String yes Room Category Name
View
roomOccupancy String yes 3 Occupancy
Lake view,
roomView String no View
Garden View
roomSize Number no 350 Size
roomSizeUnit String no sqft Unit
bedInfo List No Bed info

bedType String No single_bed Bed Type

bedCount String No 1 Bed Count


extraMattress String No Yes Yes/No
amenities List No
amenityId Number No 1
amenityType String No Room Hotel/Room
amenityName String No Seating Area
amenityCategory String No Room facilities
images List No
[Link]
[Link]
m/uploads/hotel
imageUrl String No
_image/12319/b
eebf3632c87b61
[Link]
imageCategory String No Facade
imagePriority String No 1
warnings List No
Room 1 not
message String No found on hotel Message
12360
errors List No
message String No Message

This document is for internal usage, not to be distributed publicly OYO Hotels & Homes
curl --location --request POST
'[Link] \
--header 'x-access-token:***token***' \
--header 'Content-Type: application/json' \
--data-raw '{
"roomParamList" : [{
"hotelId" : "79251",
"roomIds" : ["284607", "284295", "4"]
}]
}'

Sample Response :

{
"data": {
"roomDataList": [
{
"propertyCode": "79251",
"roomCategoryId": "284295",
"roomCategoryName": "Deluxe with City View",
"roomOccupancy": 3,
"roomSize": 300,
"roomSizeUnit": "sqft",
"bedInfo": [
{
"bedType": "single_bed",
"bedCount": 0
},
{
"bedType": "king_bed",
"bedCount": 1
},
{
"bedType": "queen_bed",
"bedCount": 0
},
{
"bedType": "full_size",
"bedCount": 0
}
],
"extraMattress": "No",
"amenities": [
{
"amenityId": 23,
"amenityType": "Room",

This document is for internal usage, not to be distributed publicly OYO Hotels & Homes
"amenityName": "AC",
"amenityCategory": "Room facilities"
},
{
"amenityId": 29,
"amenityType": "Room",
"amenityName": "Seating Area",
"amenityCategory": "Room facilities"
},
{
"amenityId": 90,
"amenityType": "Room",
"amenityName": "Window",
"amenityCategory": "Room facilities"
},
{
"amenityId": 28,
"amenityType": "Room",
"amenityName": "Mini Fridge",
"amenityCategory": "Room facilities"
},
{
"amenityId": 24,
"amenityType": "Room",
"amenityName": "TV",
"amenityCategory": "Room facilities"
},
{
"amenityId": 34,
"amenityType": "Room",
"amenityName": "Hair Dryer",
"amenityCategory": "Room facilities"
},
{
"amenityId": 32,
"amenityType": "Room",
"amenityName": "Coffee/Tea Maker",
"amenityCategory": "Room facilities"
}
],
"images": []
},
{
"propertyCode": "79251",
"roomCategoryId": "284607",
"roomCategoryName": "Club",
"roomOccupancy": 3,
"roomSize": 350,
"roomSizeUnit": "sqft",
"bedInfo": [
{
"bedType": "single_bed",
"bedCount": 0

This document is for internal usage, not to be distributed publicly OYO Hotels & Homes
},
{
"bedType": "king_bed",
"bedCount": 1
},
{
"bedType": "queen_bed",
"bedCount": 0
},
{
"bedType": "full_size",
"bedCount": 0
}
],
"extraMattress": "Yes",
"amenities": [
{
"amenityId": 10128,
"amenityType": "Room",
"amenityName": "Smoking Room",
"amenityCategory": "Room facilities"
},
{
"amenityId": 10126,
"amenityType": "Room",
"amenityName": "Safe",
"amenityCategory": "Room facilities"
},
{
"amenityId": 10124,
"amenityType": "Room",
"amenityName": "Mini Bar",
"amenityCategory": "Room facilities"
},
{
"amenityId": 30,
"amenityType": "Room",
"amenityName": "Geyser",
"amenityCategory": "Room facilities"
},
{
"amenityId": 28,
"amenityType": "Room",
"amenityName": "Mini Fridge",
"amenityCategory": "Room facilities"
},
{
"amenityId": 24,
"amenityType": "Room",
"amenityName": "TV",
"amenityCategory": "Room facilities"
},
{

This document is for internal usage, not to be distributed publicly OYO Hotels & Homes
"amenityId": 34,
"amenityType": "Room",
"amenityName": "Hair Dryer",
"amenityCategory": "Room facilities"
},
{
"amenityId": 32,
"amenityType": "Room",
"amenityName": "Coffee/Tea Maker",
"amenityCategory": "Room facilities"
},
{
"amenityId": 48,
"amenityType": "Room",
"amenityName": "Iron",
"amenityCategory": "Room facilities"
},
{
"amenityId": 7,
"amenityType": "Room",
"amenityName": "Bath Tub",
"amenityCategory": "Room facilities"
},
{
"amenityId": 76,
"amenityType": "Room",
"amenityName": "Modern Wardrobe",
"amenityCategory": "Room facilities"
},
{
"amenityId": 10131,
"amenityType": "Room",
"amenityName": "Bedside Table / Desk",
"amenityCategory": "Room facilities"
},
{
"amenityId": 23,
"amenityType": "Room",
"amenityName": "AC",
"amenityCategory": "Room facilities"
},
{
"amenityId": 10121,
"amenityType": "Room",
"amenityName": "Extra Mattress Possible",
"amenityCategory": "Room facilities"
},
{
"amenityId": 90,
"amenityType": "Room",
"amenityName": "Window",
"amenityCategory": "Room facilities"
},

This document is for internal usage, not to be distributed publicly OYO Hotels & Homes
{
"amenityId": 29,
"amenityType": "Room",
"amenityName": "Seating Area",
"amenityCategory": "Room facilities"
}
],
"images": [
{
"imageUrl":
"[Link]
"imageCategory": "Room",
"imagePriority": 1
},
{
"imageUrl":
"[Link]
"imageCategory": "Room",
"imagePriority": 2
},
{
"imageUrl":
"[Link]
"imageCategory": "Room",
"imagePriority": 3
},
{
"imageUrl":
"[Link]
"imageCategory": "Room",
"imagePriority": 4
},
{
"imageUrl":
"[Link]
"imageCategory": "Washroom",
"imagePriority": 5
}
]
}
]
},
"warnings": [
{
"message": "Room 4 not found for property 79251"
}
],
"errors": []
}

This document is for internal usage, not to be distributed publicly OYO Hotels & Homes
2. Availability Rates Inventory (ARI) API

Suggested Usage : This API will be used to get the Availability, room_price and meal_price of the given
property ID and room category id, in the given date range. After getting the content Data through Hotel
Onboarding APIs, Call this ARI API to get the room availability and price data. We are supporting X* RPM
per partner. Multithreading can be used to make parallel call to achieve this RPM.

This is a pull-based ARI sync module, where partner can sync the ARI for the entire portfolio at once to
avoid any missed ARI events or partner can also hit these endpoints to sync ARI for an individual hotel

X* RPM : To be specified in later versions [ Will be around 200-400 RPM. Will be confirmed in upcoming
versions]

a. Property ARI Data

Request body

Name Type Mandatory Sample Value Description


Property id for which ARI data
property_id Integer yes 12342
required
Room category id list

room_category_ids List<Integer> no [1,2] If not provided all room


category id data will be
returned
Rate plan list

List Of Possible value :- EP, CP


rate_plan no [“EP”, “CP”]
ENUM
If not provided both rate plan
data will be returned
Start date of the date range
Format YYYY-MM-DD
start_date Data yes 2022-09-02
Start date should not be in
the past
End date of the date range
Format YYYY-MM-DD
end_date Date yes 2022-09-05
End date must be greater
than start date

This document is for internal usage, not to be distributed publicly OYO Hotels & Homes
Max difference b/w end date
and start date should not be
greater than 90 days.

Response body

Name Type Mandatory Sample Value Description


data Object Yes Data
property_code Integer yes 12342 Property ID
Currency code in which price is
currency String yes "INR"
calculated
Meal price for each day given in
date range and for each
available meal type

If not any meal available for


datewise_meal_price List yes
some date then that date will
not be present in the list. So it
can be empty if meal not
available for any date in the
given date range
Date
date String yes "2022-09-03"
Format - YYYY-MM-DD
"breakfast": {
Occupancy wise meal price of
"1":
the date.
150.0,
At Least one type will be
"2":
{meal_type} Object yes present.
300.0,
"3":
Possible value :- breakfast,
450.0
lunch, dinner
}
{occupancy} Double yes 150.0 Meal price of the occupancy
Available room count for each
date of the given date range
room_categorywise_av Object yes
and for each valid
ailability
room_category requested
{room_category_id} List yes Room category id
Date
date String yes "2022-09-03"
Format - YYYY-MM-DD
Occupancy wise available
room_count Object yes "roomCount": {
room_count

This document is for internal usage, not to be distributed publicly OYO Hotels & Homes
"1": 21,

"2": 21,

"3": 0
}
No of room available of the
{occupancy} Integer yes 21
occupancy

room_categorywise_pri Object yes


ces
{room_category_id} Object yes Room category id.
Rate Plan .
{rate_plan} List Yes
Possible value :- EP, CP
Date
date String yes "2022-09-03"
Format - YYYY-MM-DD
Price detail of the given
sub_rate_plan_wise_pri List Yes
ratePlan
ces
Object No Occupancy wise price with tax
post_tax_price
Double yes 1206.0, Price for the occupancy
{occupancy}
Occupancy wise price without
Object No
pre_tax_price tax
Double yes 1112.5, Price for the occupancy
{occupancy}
Id of sub rate plan type.
Integer yes 1, or 0 0 :- dynamic price
sub_rate_plan_type
1 :- fixed price
warnings List No
Room %d not
message String Yes found for Message
property %d
code Integer Yes message code
errors List No
Partner has no
message String Yes whitelisted Message
countries
code Integer Yes message code

This document is for internal usage, not to be distributed publicly OYO Hotels & Homes
Sample curl request :

curl --location --request POST '[Link] \


--header 'x-access-token: ***token***' \
--header 'Content-Type: application/json' \
--data-raw '{
"property_id": 51878,
"room_category_ids": [
1
],
"rate_plan": [
"EP",
"CP"
],
"start_date": "2022-09-02",
"end_date": "2022-09-03"
}'

Sample Response :

{
"data": {
"property_code": 51878,
"currency": "INR",
"datewise_meal_price": [
{
"date": "2022-09-03",
"breakfast": {
"1": 150.0,
"2": 300.0,
"3": 450.0
}
},
{
"date": "2022-09-02",
"breakfast": {
"1": 150.0,

This document is for internal usage, not to be distributed publicly OYO Hotels & Homes
"2": 300.0,
"3": 450.0
}
}
],
"room_categorywise_prices": {
"1": {
"EP": [
{
"date": "2022-09-02",
"sub_rate_plan_wise_prices": [
{
"post_tax_price": {
"1": 1206.0,
"2": 1255.0,
"3": 1472.0
},
"pre_tax_price": {
"1": 1112.5,
"2": 1183.04,
"3": 1408.04
},
"sub_rate_plan_type": 0
}
]
}
],
"CP": [
{
"date": "2022-09-02",
"sub_rate_plan_wise_prices": [
{
"post_tax_price": {
"1": 1246.0,
"2": 1325.0,
"3": 1577.0
},
"pre_tax_price": {
"1": 1112.5,
"2": 1183.04,

This document is for internal usage, not to be distributed publicly OYO Hotels & Homes
"3": 1408.04
},
"sub_rate_plan_type": 0
}
]
}
]
}
},
"room_categorywise_availability": {
"1": [
{
"date": "2022-09-02",
"roomCount": {
"1": 21,
"2": 21,
"3": 0
}
}
]
}
},
"warnings": [],
"errors": []
}

3. Booking API

a. Create Booking
Endpoint: /bookings

Http Method : Post

Request body

Name Type Mandatory Sample Value Description


partner_booking_id String yes ABC123 Partner Internal Booking Id

This document is for internal usage, not to be distributed publicly OYO Hotels & Homes
Timestamp
(yyyy-MM- 2022-10-
booking_creation_time no 12T[Link]
Timestamp
dd'T'HH:mm:
ss)
guest_details Object yes Guest details
last_name String no Last name of guest
first_name String yes First name of guest
Phone details of
partner(pass the list of
guest_phone_info List yes phone no., atleast one
primary phone no.
Required)
country_code String yes “+91” Country calling codes
Guest telephone no to
phone_no String yes
“1234567890” notify guest
Phone type
values :-
phone_type ENUM yes primary
1. primary
2. secondary
Guest email id to notify
email String yes(if notify) abc@[Link]
guest
Language of guest to
language String no English
communicate
Should guest notify about
notify Boolean yes true booking creation or
cancelation
booking_details Object yes Hotel and rooms details
hotel_id Integer yes 12345 Oyo hotel id
DATE in
UTC
check_in_date yes 2022-09-06 Check in date of booking
(YYYY-MM-
DD)
Date in UTC
check_out_date (YYYY-MM- yes 2022-09-07 Checkout date of booking
DD)
Possible Values -
base_rate_type ENUM no Net 1. Net
2. Sell
Possible Values -
rate_plan_code ENUM yes EP 1. EP
2. CP
Details of each room to
room_details List yes
book
Integer(> 0) yes 2 Persons >= 18 years
number_of_adults

This document is for internal usage, not to be distributed publicly OYO Hotels & Homes
Integer(>=
no 0
number_of_children 0)

Integer(>=
number_of_pets no 0
0)
Room category id of the
Integer yes 1
room_category_id hotel to book
payment_details Object yes Payment details of booking
Currency of the rental
sales_currency String yes INR
contract
pre_tax_amount Double yes Tax Exclusive amount
tax_amount Double yes Tax amount
total_amount Double yes Tax Inclusive amount
Payment type.
payment_type ENUM yes Possible value :-
1. PREPAID
YES if gst invoice required
is_gst_invoice_require
ENUM yes NO if gst invoice not
d
required
gst_details Object no Gst details
company_name String yes Company name
company_address Object yes Company address
line1 String yes Line 1 of address
line2 String no Line 2 of address
city String yes City name
state/region String no State or region name
country String yes Country name
postal_code String yes Postal or zip code
gst_number String yes Gst no.

Response body

Name Type Mandatory Sample Value Description


Is request success
success Boolean yes true
or failed

data Object Yes Data

This document is for internal usage, not to be distributed publicly OYO Hotels & Homes
partner_booking_id
Partner Internal
String yes ABC1234
Booking Id

oyo_booking_id
12345
Id of booking
Long yes created in Oyo
system

booking_status
Confirm Booking
String yes Status of booking

commission_info Commission
Object yes
information

commission_amount
Commission
Double yes
amount

warnings List No

Room %d not
message String Yes found for Message
property %d

code Integer Yes message code

errors List No

Partner has no
message String Yes whitelisted Message
countries

code Integer Yes message code

Sample curl request :

This document is for internal usage, not to be distributed publicly OYO Hotels & Homes
curl --location --request POST
'[Link] \
--header 'Content-Type: application/json' \
--header 'x-access-token: **token**' \
--data-raw '{
"partner_booking_id": "ABCD1234",
"booking_creation_time": "2022-10-12T[Link]",
"guest_details": {
"last_name": "DOE",
"first_name": "JOHN",
"guest_phone_info": [
{
"country_code": "+91",
"phone_no": "1234567890",
"phone_type": "primary"
}
],
"email": "abc@[Link]",
"notify": true
},
"booking_details": {
"hotel_id": "16170",
"check_in_date": "2022-11-19",
"check_out_date": "2022-11-20",
"base_rate_type": "Sell",
"rate_plan_code": "CP",
"room_details": [
{
"room_category_id": "284261",
"number_of_adults": "1",
"number_of_children": "2"
}
]
},
"payment_details": {
"sales_currency": "INR",
"pre_tax_amount": "100",
"tax_amount": "20",
"total_amount": "120",
"payment_type": "PREPAID"
},
"is_gst_invoice_required": "NO",
"gst_details": {
"company_name": "OYO_TEST",
"company_address": {
"line1": "space plaza",
"line2": "",
"city": "Gurgaon",
"state/region": "Haryana",
"country": "India",
"postal_code": "110038"
},
"gst_number": "22AAAAA0000A1Z5"

This document is for internal usage, not to be distributed publicly OYO Hotels & Homes
}
}'

This document is for internal usage, not to be distributed publicly OYO Hotels & Homes
Sample Response :

{
"data": {
"partner_booking_id": "ASD123",
"booking_status": "Confirm Booking",
"oyo_booking_id": "239068421"
},
"success": true,
"warnings": [],
"errors": []
}

b. Get Booking Detail


Endpoint: /bookings /{partner_booking_id}

Http method : Get

Path Variable :-
Name Type Mandatory Sample Value Description
partner_booking_id Partner Internal
String yes ABC12342
Booking Id

Response body

Name Type Mandatory Sample Value Description


Is request success
success Boolean yes true
or failed

data Object Yes Data

This document is for internal usage, not to be distributed publicly OYO Hotels & Homes
partner_booking_id
Partner Internal
String yes ABC1234
Booking Id

oyo_booking_id
12345
Id of booking
Long no created in Oyo
system

booking_status
Confirm Booking
String yes Status of booking

invoice_no Booking invoice


String no
no

checkin
String
(YYYY- Check in date of
yes 2022-09-06
MM- booking
DD)
String
(YYYY- Check out date of
checkout yes 2022-09-08
MM- booking
DD)
guest_count Integer yes 2 Total guest count
No of room to
room_count Integer yes 1
book
hotel_id Integer yes 12345 Oyo hotel id
Currency of the
currency_code String yes INR
rental contract
Tax Inclusive
final_amount Double no 112.0
amount
price_details Object no
room_price Double no 100.0 Room price
tax_breakup List No
tax_price Double yes 12.0 Tax amount
commission_info Commission
Object no
information
commission_amount Commission
Double yes
amount

This document is for internal usage, not to be distributed publicly OYO Hotels & Homes
Last error occur
error Object no for the booking(if
any)
code Integer yes Error code
type String no type
message String yes Error message

warnings List No

Room %d not
message String Yes found for Message
property %d

code Integer Yes message code

errors List No

Partner has no
message String Yes whitelisted Message
countries

code Integer Yes message code

Sample curl request :

curl --location --request GET


'[Link] \
--header 'Content-Type: application/json' \
--header 'x-access-token: **token**'

Sample Response :

This document is for internal usage, not to be distributed publicly OYO Hotels & Homes
{
"data": {
"partner_booking_id": "ASD123",
"oyo_booking_id": 239068421,
"invoice_no": "IOAB5244",
"checkin": "2022-11-02",
"checkout": "2022-11-03",
"booking_status": "Cancelled Booking",
"guest_count": 3,
"room_count": 2,
"hotel_id": "16170",
"currency_code": "INR",
"final_amount": 120.0,
"price_details": {
"room_price": 120.0
}
},
"success": true,
"warnings": [],
"errors": []
}

c. Cancel Booking
Endpoint: /bookings /update

Http method : PATCH

Request Body:-

Name Type Mandatory Sample Value Description


Id of booking
oyo_booking_id Long yes 123456 created in Oyo
system
Partner Internal
Booking Id
partner_booking_id String no ABCD1234
(Either of
oyo_booking_id

This document is for internal usage, not to be distributed publicly OYO Hotels & Homes
Or
partner_booking_id
Is required)
Reason for
cancellation_reason Integer No 1
cancellation
Final Booking
booking_status ENUM yes Cancelled Booking
status

Response body

Name Type Mandatory Sample Value Description


Is request success
success Boolean yes true
or failed

data Object Yes Data

oyo_booking_id
12345
Id of booking
Long yes created in Oyo
system

booking_status
CANCELLED
String yes Status of booking

warnings List No

Room %d not
message String Yes found for Message
property %d

code Integer Yes message code

errors List No

Partner has no
message String Yes whitelisted Message
countries

This document is for internal usage, not to be distributed publicly OYO Hotels & Homes
code Integer Yes message code

Sample curl request :

curl --location --request PATCH


'[Link] \
--header 'Content-Type: application/json' \
--header 'x-access-token: **token**' \
--data-raw '{
"booking_status": "Cancelled Booking",
"cancellation_reason": 7,
"partner_booking_id": "ABCD1234"
}'

Sample Response :

{
"data": {
"oyoBookingId": 239068421,
"status": "CANCELLED"
},
"success": true,
"warnings": [],
"errors": []
}

This document is for internal usage, not to be distributed publicly OYO Hotels & Homes
Possible Value of Booking Status :-

IN_PROGRESS,
CONFIRMED,
CREATE_FAILED,
CANCELLED,

CANCEL_FAILED;
FAILED;

4. Notification System

This system is responsible for sending real-time price and inventory changes to partners. OYO will send
room availability and price data when the price or inventory will be changed for any room.

A Partner who wants to enable notification service needs to build a system that must process these real-
time change events and update the calendar accordingly.

Partner needs to provide the following while on-boarding for enabling the notification system for them.

1. Endpoint-URL: which will be used by OYO for sending real-time price and inventory change
events.
2. Authorization-token: OYO will use this authorization token while sending notification events to
partners.

RPM for Notification System: TBD

Note – B2B contracted prices will not be pushed to partners in real time via notification system but
instead partner is requested to pull contracted prices using ARI APIs (Pull)

Request Payload:

This request will be sent by OYO which will include price or inventory data or both.

Name Type Mandatory Sample Value Description


Data (Maximum length
data List Yes of data will be 100)
property_code Integer yes 12342 Property ID

This document is for internal usage, not to be distributed publicly OYO Hotels & Homes
currency "INR" Currency code in which
String yes price is calculated
Available room count for
each date of the given
room_categorywise_availabi date range and for each
lity valid room_category
Object no requested
{room_category_id} List yes Room category id
Date
"2022-09-03" Format - YYYY-MM-
date String yes DD
“roomCount:
{
"1":
21,
"2":
21,

"3": 0
room_count } Occupancy wise
Object yes available room_count
21 No of room available of
{occupancy} Integer yes the occupancy

room_categorywise_prices
Object no
{room_category_id} Object yes Room category id.
Rate Plan .

{rate_plan} List Yes Possible value :- EP, CP


Date
date "2022-09-03" Format - YYYY-MM-
String yes DD

sub_rate_plan_wise_prices Price detail of the given


List Yes ratePlan

post_tax_price Occupancy wise price


Object No with tax
1206.0,
{occupancy} Double yes Price for the occupancy
pre_tax_price Occupancy wise price
Object No without tax

This document is for internal usage, not to be distributed publicly OYO Hotels & Homes
yes 1112.5,
{occupancy} Double Price for the occupancy
Id of sub rate plan type.
sub_rate_plan_type 0 :- dynamic price
Integer yes 1, or 0 1 :- fixed price

Response Payload

Name Type Mandatory Sample Value Description


code Integer yes 200 Status code for the
processing of the
request.
It must be 200 in case of
success.
message Text yes Notification Message for the
event is too old processing of request.
Please mention error
message here.

a. Sample Request Payload:


{
"data": [{
"property_code": 51878,
"currency": "INR",
"room_categorywise_prices": {
"1": {
"EP": [
{
"date": "2022-09-02",
"sub_rate_plan_wise_prices": [
{
"post_tax_price": {
"1": 1206.0,
"2": 1255.0,
"3": 1472.0
},
"pre_tax_price": {
"1": 1112.5,
"2": 1183.04,
"3": 1408.04
},
"sub_rate_plan_type": 0
}

This document is for internal usage, not to be distributed publicly OYO Hotels & Homes
]
}
],
"CP": [
{
"date": "2022-09-02",
"sub_rate_plan_wise_prices": [
{
"post_tax_price": {
"1": 1246.0,
"2": 1325.0,
"3": 1577.0
},
"pre_tax_price": {
"1": 1112.5,
"2": 1183.04,
"3": 1408.04
},
"sub_rate_plan_type": 0
}
]
}
]
}
},
"room_categorywise_availability": {
"1": [
{
"date": "2022-09-02",
"roomCount": {
"1": 21,
"2": 21,
"3": 0
}
}
]
}
}]
}

b. Sample Response Payload:

{
"code": 200,
"message": "success"
}

This document is for internal usage, not to be distributed publicly OYO Hotels & Homes
5. Errors

Message Code
Something went wrong. 30001
Partner id is null 30010
Invalid data in request reason %s 30027
Unable to fetch data 30028
UNAUTHORIZED. Id: %s does not exist in record. 30029
Request Body is not present 30030
Client with id %s doesn't exist in record 30031
Partner has no whitelisted country 30032
Property Id %s doesn't belong to any whitelisted country 30033
Property Id %s not found 30034
BookingId %s not found 30035
Given number of guest can't fit to
30036
requested rooms.
Unable to create order request 30037
Unable to create booking 30038
Unable to save booking 30039
Room Category Id %s not found 30040
Unable to cancel booking 30041
Booking already exists with id %s 30042
status of Booking %s is not confirmed 30043
Unable to process request 30044

6. Warnings

Message Code
Room category id %s not found for property %s 31001
Unable to fetch meal price data 31002
Unable to fetch restriction data 31003
Invalid contact no 31004
Invalid email 31005
Invalid Gst Detail 31006

This document is for internal usage, not to be distributed publicly OYO Hotels & Homes

You might also like