Airhob API provides a REST based web service over HTTPS, using JSON to encode service request and response data. We use an SSL secured channel to transmit data from client to the service
apikey – Your sandbox or production API key
mode - sandbox or production
Content-Type - application/json
There are two environments available for the developers:
a) The TESTING environment for the integration and testing purposes. It's usually slower than the LIVE environment.
b) The LIVE environment is activated after successful integration in the sandbox environment and verification of Go Live steps.
This API gives you the real-time availability with best fares based on the requested search parameters.
The URL endpoint is https://dev-sandbox-api.airhob.com/sandboxapi/flights/v2/search
The HTTP verb to be used is POST.
Data is to be supplied in the body of the request as JSON encoded value.
apikey: Your sandbox or production API key
mode: sandbox or production
Content-Type: application/json
This API is used to look/price a specific flight. Using this API, you're just diving into the airline inventory and letting the airline know that you're looking at this specific flight. Nice eh?
The URL endpoint is https://dev-sandbox-api.airhob.com/sandboxapi/flights/v2/look
The HTTP verb to be used is POST.
Data is to be supplied in the body of the request as JSON encoded value.
See Look request here
To form this request, you need to take some parameters from Search API's response. This table can help you taking parameters from Search API's response.
Look API Request Parameters | Equivalent Search API Response Parameters |
---|---|
TrackId | OneWayAvailabilityResponse > TrackId |
ItinearyDetails > Segments > TrackId | OneWayAvailabilityResponse > ItinearyDetails > Items > TrackId |
ItinearyDetails > Segments > FareIds | OneWayAvailabilityResponse > ItinearyDetails > Items > FareDescription > PaxFareDetails > FareId |
ItinearyDetails > Segments > fareSellKey | OneWayAvailabilityResponse > ItinearyDetails > Items > FlightDetails > SegmentKey |
ItinearyDetails > Segments > ValidatingCarrier | OneWayAvailabilityResponse > ItinearyDetails > Items > ValidatingCarrier |
ItinearyDetails > Segments > Price | OneWayAvailabilityResponse > ItinearyDetails > Items > FareDescription > PaxFareDetails[0] > OtherInfo > GrossAmount |
ItinearyDetails > Segments > item > EquipmentType | OneWayAvailabilityResponse > ItinearyDetails > Items > FlightDetails > AirEquipType |
ItinearyDetails > Segments > item > Baggage | OneWayAvailabilityResponse > ItinearyDetails > Items > FlightDetails > Baggage |
ItinearyDetails > Segments > item > ArrivalDateTime | OneWayAvailabilityResponse > ItinearyDetails > Items > FlightDetails > ArrivalDateTime |
ItinearyDetails > Segments > item > Destination | OneWayAvailabilityResponse > ItinearyDetails > Items > FlightDetails > Destination |
ItinearyDetails > Segments > item > Origin | OneWayAvailabilityResponse > ItinearyDetails > Items > FlightDetails > Origin |
ItinearyDetails > Segments > item > Meal | OneWayAvailabilityResponse > ItinearyDetails > Items > FlightDetails > MealCode > MealCode |
ItinearyDetails > Segments > item > MarriageGroup | OneWayAvailabilityResponse > ItinearyDetails > Items > FlightDetails > MarriageGroup |
ItinearyDetails > Segments > item > ClassCode | OneWayAvailabilityResponse > ItinearyDetails > Items > FlightDetails > ClassCode |
ItinearyDetails > Segments > item > OrgTerminal | OneWayAvailabilityResponse > ItinearyDetails > Items > FlightDetails > OrgTerminal |
ItinearyDetails > Segments > item > DepartureDateTime | OneWayAvailabilityResponse > ItinearyDetails > Items > FlightDetails > DepartureDateTime |
ItinearyDetails > Segments > item > OperatingCarrierId | OneWayAvailabilityResponse > ItinearyDetails > Items > FlightDetails > CarrierCode |
ItinearyDetails > Segments > item > Duration | OneWayAvailabilityResponse > ItinearyDetails > Items > FlightDetails > Duration |
ItinearyDetails > Segments > item > AircraftType | OneWayAvailabilityResponse > ItinearyDetails > Items > FlightDetails > AirCraftType |
ItinearyDetails > Segments > item > DestTerminal | OneWayAvailabilityResponse > ItinearyDetails > Items > FlightDetails > DesTerminal |
ItinearyDetails > Segments > item > CarrierId | OneWayAvailabilityResponse > ItinearyDetails > Items > FlightDetails > CarrierCode |
ItinearyDetails > Segments > item > FlightID | OneWayAvailabilityResponse > ItinearyDetails > Items > FlightDetails > FlightID |
ItinearyDetails > Segments > item > FlightNum | OneWayAvailabilityResponse > ItinearyDetails > Items > FlightDetails > FlightNum |
ItinearyDetails > Segments > item > ApiProvider | OneWayAvailabilityResponse > ItinearyDetails > Items > ApiProvider |
ItinearyDetails > Segments > item > IsStopAirport | OneWayAvailabilityResponse > ItinearyDetails > Items > FlightDetails > IsStopAirport |
ItinearyDetails > Segments > item > MajorClassCode | OneWayAvailabilityResponse > ItinearyDetails > Items > FlightDetails > MajorClassCode |
ItinearyDetails > Segments > item > Rph | OneWayAvailabilityResponse > ItinearyDetails > Items > FlightDetails > Rph |
ItinearyDetails > Segments > item > ProviderCode | OneWayAvailabilityResponse > ItinearyDetails > Items > FlightDetails > ProviderCode |
ItinearyDetails > Segments > item > AvailabilityDisplayType | OneWayAvailabilityResponse > ItinearyDetails > Items > FlightDetails > AvailabilityDisplayType |
ItinearyDetails > Segments > item > ParticipantLevel | OneWayAvailabilityResponse > ItinearyDetails > Items > FlightDetails > ParticipantLevel |
ItinearyDetails > Segments > item > LinkAvailability | OneWayAvailabilityResponse > ItinearyDetails > Items > FlightDetails > LinkAvailability |
ItinearyDetails > Segments > item > PolledAvailabilityOption | OneWayAvailabilityResponse > ItinearyDetails > Items > FlightDetails > PolledAvailabilityOption |
ItinearyDetails > Segments > item > FareBasisCode | OneWayAvailabilityResponse > ItinearyDetails > Items > FlightDetails > FareBasisCode |
ItinearyDetails > Segments > item > BookingCode | OneWayAvailabilityResponse > ItinearyDetails > Items > FlightDetails > ClassCode |
This API is used for locking the flight price and storing the traveler information to create a PNR (Passenger Name Record).
The URL endpoint is https://dev-sandbox-api.airhob.com/sandboxapi/flights/v2/price
The HTTP verb to be used is POST.
Data is to be supplied in the body of the request as JSON encoded value.
{
"sellRequestId": "/6KfDIH/TmET9niBEWuzuQ==",
"customer": {
"PhoneNumber": "9999999999",
"CountryCode": "91",
"Email": "api@airhob.com",
"CustomerDetails": [
{
"PassengerType": "ADT",
"Title": "Mr",
"FirstName": "Bruce",
"LastName": "Wayne",
"NationalityCountry": "IN",
"DOB": {
"Day": "12",
"Month": "10",
"Year": "1990"
},
"PassportNumber": "31195856", "IssueCountry": "US", "PassportExpiryDay": "23", "PassportExpiryMonth": "09", "PassportExpiryYear": "2025"
}
]
}
}
Parameter | Type | Example Value | Required | Description |
---|---|---|---|---|
sellRequestId | string | a6/1dz3ky170II+YoeHsag== | REQUIRED | Pass value of this parameter as it is received in the response of Look API |
customer | JSONObject | REQUIRED | Contains details of customers/travellers for an itinerary | |
PhoneNumber | string | 999999999 | REQUIRED | Phone number of lead traveller |
CountryCode | string | 91 | REQUIRED | Cellular country code of lead traveller |
string | youremail@mail.com | REQUIRED | Email id of lead traveller | |
GstCity | string | New Delhi | OPTIONAL | GST city of lead traveller. |
GstCompanyAddress | string | 7, Race Course Road | OPTIONAL | GST company address of lead traveller. |
GstCompanyName | string | Airhob | OPTIONAL | GST company name of lead traveller. |
GstEmailID | string | support@airhob.com | OPTIONAL | GST email id of lead traveller. |
GstMobileNumber | string | 919069103251 | OPTIONAL | GST mobile phone number of lead traveller. |
GstNo | string | 27AABCT6166A1ZJ | OPTIONAL | GST number of lead traveller. |
GstPincode | string | 110011 | OPTIONAL | GST pincode of lead traveller. |
GstState | string | Delhi | OPTIONAL | GST state of lead traveller. |
CustomerDetails | JSONArray | REQUIRED | Contains list of all traveller's details for an itinerary. | |
CustomerDetails > PassengerType | string | ADT / CNN / CHD / INF | OPTIONAL | Type of passenger. ADT for adult passengers. CNN and CHD for child passengers. INF for infant passengers |
CustomerDetails > Title | string | Mr. / Mrs. / Ms. / Miss. / Mstr. | REQUIRED | Title of a traveller |
CustomerDetails > FirstName | string | John | REQUIRED | First name of a traveller |
CustomerDetails > LastName | string | Doe | REQUIRED | Last name of a traveller |
CustomerDetails > NationalityCountry | string | IN | REQUIRED for international journey | Nationality of a traveller |
CustomerDetails > DOB | JSONObject | REQUIRED | Traveller's date of birth | |
DOB > Day | string | 23 | REQUIRED | Day of DOB |
DOB > Month | string | 12 | REQUIRED | Month of DOB |
DOB > Year | string | 1990 | REQUIRED | Year of DOB |
CustomerDetails > PassportNumber | string | H7666777 | REQUIRED for international journey | Passport number of a traveller |
CustomerDetails > IssueCountry | string | IN | REQUIRED for international journey | Passport issuing country |
CustomerDetails > PassportExpiryMonth | string | 12 | REQUIRED for international journey | Expiry Month of passport |
CustomerDetails > PassportExpiryDay | string | 23 | REQUIRED for international journey | Expiray day of a traveller's passport |
CustomerDetails > PassportExpiryYear | string | 2022 | REQUIRED for international journey | Expiry year of a traveller's passport |
This API is used for finally issuing the ticket and creating the ticket number for each traveler.
The URL endpoint is https://dev-sandbox-api.airhob.com/sandboxapi/flights/v2/issue
The HTTP verb to be used is POST.
Data is to be supplied in the body of the request as JSON encoded value.
{"sellRequestId":"/6KfDIH/TmET9niBEWuzuQ=="}
Issue API Request Parameters | Equivalent Price API Response Parameter |
---|---|
sellRequestId | sellRequestId |
This API is used for retrieving the flight itinerary that has been booked. We would recommend to call this API after 'Issue API' to retrieve all details against the ticket.
The URL endpoint is https://dev-sandbox-api.airhob.com/sandboxapi/flights/v1.1/itinerary?tripid=86133583
The HTTP verb to be used is GET.
Data is to be supplied in the body of the request as JSON encoded value.
See Itinerary response here
Before giving live access with production URLs, we need to verify and check if the integration is working fine. We request you to please share with us the BOOKING ID of below use cases.
1. Oneway flight with ApiProvider as PT with origin and destination in the same country. e.g. BOM-GOI or BKK-HKT
2. Oneway flight with ApiProvider as DA with origin and destination in the same country. e.g. BOM-GOI or SFO-LAX
3. Oneway flight with ApiProvider as PT with origin and destination in the different countries. e.g. BOM-DXB or KUL-DMK
4. Oneway flight with ApiProvider as DA with origin and destination in the different countries. e.g. LHR-JFK or DEL-SYD
5. Roundtrip flight with ApiProvider as PT with origin and destination in the different countries. e.g. BOM-DXB or KUL-DMK
6. Roundtrip flight with ApiProvider as DA with origin and destination in the different countries. e.g. SIN-JFK or DEL-SYD
Once we verify these use cases, we’ll get back to you with the confirmation or suggestions to any issues, if there are any. Please note that the creation of these Booking IDs should be done within your product flow and not by simply calling our APIs directly (for example via Postman). If need be, we would request to make one test booking in your product too, post which the GoLive verification would be complete.
Click here to get list of popular airports around the world.
Error Code | Message |
---|---|
E_C_11 | Your API key has expired |
E_C_12 | Your IP address doesn't match |
E_C_13 | Invalid apikey sent in header |
E_C_14 | You don't have access to flights API. |
E_C_15 | You don't have access to tours API. |
E_C_16 | You don't have access to stays API. |
E_C_17 | You don't have access to activities API. |
E_C_18 | You don't have access to europass API. |
E_C_19 | You don't have access to trains API. |
E_C_20 | Something went wrong in authenticating product rights. |
E_C_21 | Your endpoint is of sandbox environment but you have passed mode as 'production'. Please pass mode as 'sandbox'. |
E_C_22 | Incorrect mode sent in header. For Sandbox environment pass 'sandbox' and for production environment pass 'production' |
E_C_23 | Your account is currently inactive. Please contact Airhob support team at api@airhob.com |
E_C_24 | You don't have enough balance in your Airhob Wallet. If you want us to add some dummy balance in your Airhob Wallet for sandbox environment, please write an email to api@airhob.com and we’ll do the rest. |
E_C_25 | Incomplete Header |
E_C_26 | Your endpoint is of production but you have passed mode as 'sandbox'. Please pass mode as 'production'. |
Error Code | Message |
---|---|
E_F_11 | You can't use this API for Indian domestic round-trip flights. Pass TripType as 'O' and hit this API twice. So you'll need to use the domestic one-way API twice, once for onward flight and once for return flight. The subsequent API's below of Look, Price and Issue will also be separately called for each onward and return flight. |
E_F_12 | 'OriginDestination' must have two elements for round-trip |
E_F_13 | 'OriginDestination' must have one element for one-way. To search a round-trip Flight, pass TripType as 'R'. |
E_F_14 | Invalid 'TripType'. Kindly pass 'O' for one-way and 'R' for round-trip. Make sure it's in Upper Case. |
E_F_15 | Invalid 'ClassType'. Possible values for ClassType are 'Economy', 'PremiumEconomy', 'Business' and 'First'. |
E_F_16 | Invalid 'Currency'. Please refer the Airhob API Documentation to see our supported currencies. |
E_F_17 | No flights found for your search criteria. Try passing different 'Destination' or 'TravelDate' or 'Origin'. |
E_F_18 | You can't use this API for non-Indian domestic round-trip flights. |
E_F_19 | Invalid 'TripType'. Kindly pass 'R' for round-trip. Make sure it's in Upper Case. |
E_F_20 | TrackId is missing. |
E_F_21 | Invalid TrackId. |
E_F_22 | Your TrackId has expired. |
E_F_23 | Bad request. |
E_F_24 | ItineraryDetails is missing. |
E_F_25 | Segments is missing. |
E_F_26 | item is missing. |
E_F_27 | FlightID is missing. |
E_F_28 | CarrierId is missing. |
E_F_29 | Origin is missing. |
E_F_30 | Destination is missing. |
E_F_31 | DepartureDateTime is missing. |
E_F_32 | ArrivalDateTime is missing. |
E_F_33 | There's not enough balance in Airhob Wallet to price this flight. If you want us to add some dummy balance in your Airhob Wallet for sandbox environment, please write an email to api@airhob.com and we’ll do the rest. |
E_F_34 | SellRequestId is missing. |
E_F_35 | Invalid SellRequestId |
E_F_36 | Your SellRequestId has expired. |
E_F_37 | Email is missing. |
E_F_38 | CountryCode is missing. |
E_F_39 | PhoneNumber is missing. |
E_F_40 | CustomerDetails is missing. |
E_F_41 | Passenger count does not match. |
E_F_42 | PassengerType is missing. |
E_F_43 | Invalid PassengerType. It should be ADT or CNN or INF |
E_F_44 | Title is missing. |
E_F_45 | FirstName is missing. |
E_F_46 | FirstName can only have alphabets. Special characters and numbers are not accepted. |
E_F_47 | LastName is missing. |
E_F_48 | LastName can only have alphabets. Special characters and numbers are not accepted. |
E_F_49 | PassportExpiryDay is missing. |
E_F_50 | PassportExpiryMonth is missing. |
E_F_51 | PassportExpiryYear is missing. |
E_F_52 | PassportNumber is missing. |
E_F_53 | IssueCountry is missing. |
E_F_54 | NationalityCountry is missing. |
E_F_55 | Invalid IssueCountry. |
E_F_56 | Invalid NationalityCountry. |
E_F_57 | Invalid DOB passed for a passenger |
E_F_58 | DOB is missing. |
E_F_59 | Day is missing in DOB. |
E_F_60 | Month is missing in DOB. |
E_F_61 | Year is missing in DOB. |
E_F_62 | Infant age should be less than 2 years. |
E_F_63 | Child age should be greater than 1 and less than 12 years. |
E_F_64 | Adult age should be greater than 11 years. |
E_F_65 | Invalid Title. For adult paasenger, title should be Mr or Ms or Mrs |
E_F_66 | Invalid Title. For child or infant paasenger, title should be Miss or Mstr |
E_F_67 | There's not enough balance in Airhob Wallet to book this flight. If you want us to add some dummy balance in your Airhob Wallet for sandbox environment, please write an email to api@airhob.com and we’ll do the rest. |
E_F_68 | Something went wrong. |
E_F_69 | Invalid api key |
E_F_70 | Currency is missing. |
E_F_71 | NoOfInfants must be less than or equal to NoOfAdults. |
E_F_72 | Summation of NoOfAdults and number of NoOfChilds must be less than 10. |
E_F_73 | NoOfAdults is missing. |
E_F_74 | TripId is missing. |
E_F_75 | Invalid TripId. |
E_F_76 | Invalid passport expiry date. |
E_F_77 | Timeout. Couldn't get any response from airline. Please try later. |
E_F_78 | FirstName must have at least two letters. |
E_F_79 | LastName must have at least two letters. |
Please make a note that these FAQs are listed as per the most updated version of all APIs.
1. How many number of passengers can be passed in Search API at minimum and maximum?
Minimum: 1 adult
Maximum: Summation of adult and child passengers should be equal or less than 9. Number of infants should be equal or less then number of adults. If this conditions are not satisfied then you will get no flights. Please have a look at https://www.airhob.com/flights to see how it works.
2. What are the possible values for ClassType?
"Economy"/"PremiumEconomy"/"Business"/"First"
3. How can I get the IATA codes for Origin and Destination?
Please have a look at important assets(can be found at this page only) where you can find popular airports around the world with their IATA code.
4. How would I know if an Itinerary has connecting flights?
There is an element in response of Search and Look API named as "Connection". It has all the information for connecting flights.
5. Can you please let me know how to get Layover information in Search API between each flight?
The layover time needs to be calculated by subtracting the departure time of upcoming flight and the arrival time of the first flight.
They will always be in the same timezone, so you don't need to worry about wrong calculations.
6. In Price API request, what are the possible titles for passenger?
For Adult Passengers: Mr / Mrs / Ms
For Child and Infant passengers: Miss / Mstr
10. An itinerary has connecting flights, then will PNR and Eticket be different for connecting flights?
No. PNR and Eticket will be same because the validating carrier(issuing carrier) for all the connecting flights will be same.
Here is booking flow of Stays API.
1. Search API.
Search API lets you search hotels. We will send you all the available hotels with the minimum price of each hotel. In search API request, you can send either City and Country or Latitude and Longitude.
If you send both we'll consider City and Country but distance will be calculated based on Latitude and Longitude.
2. Properties API
This API gives you detailed information of the hotel along with all the possible room rates.
3. Price API
This API is used to save the room inventory you're trying to book. For your booking flow, it's recommended that you collect the payment of your customer after Price API is success and before Issue API is called.
4. Issue API
This API confirms your booking and gives you a Airhob booking ID (for any communications with us) and supplier reference which is the main confirmation number for the hotel to identify the booking.
Please click here to access a sample voucher that you need to create after Issue API is successful. This voucher must be sent to your customer as they will show this while check-in. You need to make sure that your voucher includes all information as shown on the sample voucher, to avoid any confusions.
This API is used for searching hotels based on a given city or geo co-ordinates which returns basic property information along with its lowest price.
The URL of the web method is
The HTTP verb to be used is POST.
Data is to be supplied in the body of the request as JSON encoded value.
{
"City": "Manchester",
"Country": "United Kingdom",
"Latitude": "",
"Longitude": "",
"FromDate": "2018-04-23",
"ToDate": "2018-04-24",
"ClientNationality": "IN",
"Currency": "USD",
"IsAddress":"false",
"IsDescription":"false",
"IsFacility":"false",
"Occupancies": [
{
"NoOfAdults": 1,
"ChildrenAges": [
5,
7
]
},
{
"NoOfAdults": 2
}
]
}
Parameter | Type | Example Value | Required | Description |
---|---|---|---|---|
City | string | Manchester | REQUIRED | City of hotel |
Country | string | United Kingdom | REQUIRED | Country of hotel |
Latitude | string | 53.4720737 | OPTIONAL | Latitude data for geolocation of hotel |
Longitude | string | -2.3000156 | OPTIONAL | Longitude data for geolocation of hotel |
FromDate | string | 2018-04-23 | REQUIRED | Check-in date. Format must be yyyy/mm/dd. |
ToDate | string | 2018-04-24 | REQUIRED | Check-out date. Format must be yyyy/mm/dd. |
ClientNationality | string | IN | REQUIRED | Nationality of the guest. Two-letter ISO Country code. |
Currency | string | USD | REQUIRED | Preferred currency for the prices in the results. Three letter ISO Currency code. |
IsAddress | boolean | true/false | OPTIONAL |
Possible values are true or false
true will return the address for the hotels in response, which may result in delay of response due to the size of response. false will not return the address for the hotels in response. Recommended is false Default is true |
IsDescription | boolean | true/false | OPTIONAL |
Possible values are true or false
true will return the description for the hotels in response, which may result in delay of response due to the size of response. false will not return the description for the hotels in response. Recommended is false Default is true |
IsFacility | boolean | true/false | OPTIONAL |
Possible values are true or false
true will return the facilities for the hotels in response, which may result in delay of response due to the size of response. false will not return the facilities for the hotels in response. Recommended is false Default is true |
Occupancies | array of occupancy elements | REQUIRED | Contains details of occupancies. Number of elements in this array equals to number of rooms. Each element in this array represents a room. You can add a maximum 5 rooms with each room having a maximum of 4 guests. | |
NoOfAdults | string | 1 | Number of adults | |
ChildrenAges | array of children's ages | Ages of children. Number of elements in this array are equal to number of children guest. |
See response here
Parameter | Type | Example Value | Description |
---|---|---|---|
ErrorMessage | string | Holds error message, if any | |
Errors | element | Holds error information | |
ProductErrors > ErrorCode | string | E_C_13 | Unique airhob error code |
ProductErrors > Message | string | Invalid apikey sent in header | Description of error |
hotelData | array of hotel elemets | three-letter ISO currency code | |
HotelCode | string | AH_277630 | Airhob unique code for a hotel |
fullName | string | The Heart Apartments at MediaCity UK | Full name of hotel |
starCategory | integer | 4 | Star category of the hotel |
hotelAddresss | element | Contains hotel address | |
street | string | MediaCityUK Salford Quays | Street of hotel |
latitude | string | 53.4720737 | Latitude data for geolocation of hotel |
longitude | string | -2.3000156 | Longitude data for geolocation of hotel |
hotelFacilities | array of hotel facility elements | Contains falcilities provided by hotel | |
hotelFacilities title | string | dry cleaning / laundry service | Name of facility |
hotelImages | array of hotel images | Contains images of hotel | |
url | string | https://cdn.grnconnect.com/hotels/ images/eb/3f/ eb3f151dbe34f23bab229402f26f93fa0fc91017.jpg | Image URL |
minprice | integer | 365 | Minimum total price including taxes |
price | element | Contains details of price | |
key | string | 2 | Don't worry about it. This is used for internal purpose. |
price_details | element | Contains price details | |
GST | array of GST | Contains GST details | |
GST > name | string | Total | Name of charge |
GST > included | boolean | true / false | ‘true’ if the charge is already included in the price. |
GST > currency | string | USD | Three-letter ISO currency code |
GST > amount_type | string | value | Defines type of amount. 'value' represents flat fee. |
GST > amount | integer | 3 | amount of charge |
net | array of net | Net price excluding taxes | |
net > name | string | Net / CustomMarkup | Name of charge. You will receive amount for both 'net' and 'CustomMarkup'. net specifies the actual net fare of the hotel, while CustomMarkup specifies your markup amount. This will only contain a value if you've added markup percentage from the dashboard. This element will also mention "included='false'" which means the CustomMarkup is not already added in the minprice. You need to add it on your own. |
net > included | boolean | true / false | ‘true’ if the charge is already included in the price. |
net > currency | string | USD | Three-letter ISO currency code |
net > amount_type | string | value | Defines type of amount. 'value' represents flat fee. |
net > amount | string | 362 | amount of charge |
distance | array of distance | Distance between geolocation (Latitude and Longitude) passsed in request of this API and hotel geolocation. If geolocation is not passed in request of this API then by default API will grab the geolocation of City. | |
type | string | KM / MILE | Distance unit measurement |
distance | float | 5952.3 | Actual distance value |
distanceUnit | string | 0 / 1 | 0' for KM and '1' for MILE |
hotelDescription | string | Description of hotel | |
City | string | Manchester | City of hotel |
This API is used for getting detailed rates, for the requested property, along with all the information related to the property.
The URL of the web method is
The HTTP verb to be used is POST.
Data is to be supplied in the body of the request as JSON encoded value.
{
"HotelCodes": "AH_367002",
"FromDate": "2018-04-23",
"ToDate": "2018-04-24",
"Currency": "INR",
"Occupancies": [
{
"NoOfAdults": 1,
"ChildrenAges": [
5,
7
]
},
{
"NoOfAdults": 2
}
],
"ClientNationality": "IN"
}
Parameter | Type | Example Value | Required | Description |
---|---|---|---|---|
HotelCodes | string | AH_277630 | REQUIRED | Airhob unique code for a hotel. This is equivalent to 'hotelData HotelCode' in Search API response. |
FromDate | string | 12-10-17 | REQUIRED | Check-in date. Format must be yyyy/mm/dd. |
ToDate | string | 13-10-17 | REQUIRED | Check-out date. Format must be yyyy/mm/dd. |
Currency | string | INR | REQUIRED | Preferred currency for prices in response. Three letter ISO Currency code. |
Occupancies | array of occupancy elements | REQUIRED | Contains details of occupancies. Number of elements in this array equals to number of rooms. Each element in this array represents a room. | |
NoOfAdults | string | 1 | REQUIRED | Number of adults |
ChildrenAges | array of children's ages | REQUIRED | Ages of childrens. Number of elements in this array is equal to number of children guest. | |
ClientNationality | string | IN | REQUIRED | Nationality of the guest. Two-letter ISO Country code. |
See response here
Parameter | Type | Example Value | Description |
---|---|---|---|
search_id | string | ub5gauftebuhrjewtem65tbvvu$3cd479ae-01ed-4 | Unique ID that uniquely identifies a request. It will be expired after some minutes. |
Errors | element | Holds error information | |
ProductErrors > ErrorCode | string | E_C_13 | Unique airhob error code |
ProductErrors > Message | string | Invalid apikey sent in header | Description of error |
no_of_rooms | integer | 2 | Number of rooms |
no_of_nights | integer | 1 | Number of nights |
no_of_hotels | integer | 0 | Number of hotels |
no_of_children | integer | 2 | Number of childrens |
no_of_adults | integer | 3 | Number of adults |
hotel | element | Contains hotel details | |
ratetype | element | Contains different type of rates | |
bundledRates | array of bundled rates | Contains bundled rates. Bundled rate shows the prices of multiple rooms combinely. | |
supports_cancellation | boolean | true / false | true' if booking can be cancelled |
supports_amendment | boolean | true' if booking can be amended | |
rooms | array of rooms | Contains room details | |
rooms > room_type | string | Apartment, 2 Bedrooms | Type of room |
rooms > no_of_rooms | integer | 1 | Number of rooms |
rooms > no_of_children | integer | 1 | Number of childrens |
rooms > no_of_adults | integer | 2 | Number of adults |
rooms > description | string | Apartment, 2 Bedrooms | Description of room |
rooms > children_ages | array of children ages | Contains ages of children | |
room_code | string | Room code representing rooms in rate | |
rate_type | string | bookable | Possible values are ‘bookable’ , ‘refetch’ and ‘recheck’. |
rate_key | string | Unique key representing rate | |
rate_comments | string |
Object of dynamic key value
pairs. Eg: { “comments”: “Rate comments come here”, “checkin-Instruction”: “Checking details come here” } |
|
promotions_details | array of promotions (strings) | Contains promotions, if any | |
price_details | element | ||
GST | array of GST | Contains GST details | |
GST > name | string | Total | Name of charge |
GST > included | boolean | true / false | ‘true’ if the charge is already included in the price. |
GST > currency | string | USD | Three-letter ISO currency code |
GST > amount_type | string | value | Defines type of amount. 'value' represents flat fee. |
GST > amount | integer | 3 | amount of GST |
net | array of net | Net price excluding taxes | |
net > name | string | Net / CustomMarkup | Name of charge. You will receive amount for both 'net' and 'CustomMarkup'. net specifies the actual net fare of the hotel, while CustomMarkup specifies your markup amount. This will only contain a value if you've added markup percentage from the dashboard. This element will also mention "included='false'" which means the CustomMarkup is not already added in the convertedPrice. You need to add it on your own. |
Netprice > included | boolean | true / false | ‘true’ if the charge is already included in the price. |
Netprice > currency | string | USD | Three-letter ISO currency code |
Netprice > amount_type | string | value | Defines type of amount. 'value' represents flat fee. |
Netprice > amount | string | 362 | amount of net price |
convertedPrice | integer | 365 | Total price including taxes |
payment_type | array | AT_WEB | Allowed payment type. Possible Values: AT_WEB |
other_inclusions | array of other inclusions | Contains other inclusions , if available | |
non_refundable | boolean | true / false | true' if the rate is Non-refundable |
no_of_rooms | integer | 2 | Number of rooms included in this rate |
includes_wifi | boolean | true / false | true' if wi-fi is included in this rate |
includes_boarding | boolean | true / false | true' if boarding is included in this rate |
group_code | string | wsdbjylcxn4ufdya7kiw2hw74dnkrqy | Don't worry about it. This is used for internal purpose. |
currency | string | USD | Three-letter ISO currency code ofprice |
currsymbol | string | Currency symbol of price | |
cancellation_policy | element | Cancellation policy details | |
under_cancellation | boolean | true / false |
true' if the booking is
under cancellation, i.e. cancellation charges will apply should a cancellation be made later. |
details | array | List of cancellation windows and applicable charges | |
details > nights | integer | 1 | Charges in number of nights |
details > converted_from | string | 30-09-17 | Date from which the charge in this window applies |
details > converted_flat_fee | float | 0 | Charge applicable |
details > currency | string | USD | Three-letter ISO currency code |
details > percent | float | 0 | Charges in percentage |
converted_cancel_by_date | string | 30-09-17 | Last date for cancellation without charges |
amount_type | string | nights |
Defines the type of value
in details: value represents amount percent represents percentage nights represents charges in number of nights. For nights, in some cases, percentage is also returned. In those cases charges have to be calculated by taking (percentage x nights) value. |
allotment | integer | 5 | Number of rooms available for a particular room type |
cancellation_policy_code | string | uwird5tpwf3spucqu2nwigox4xmklqfm62zorvl63i | Unique ID for cancellation policy |
boarding_details | array of boarding details | Contains boarding details, if available | |
apiref | string | NRG / BH | Don't worry about it. This is used for internal purpose. |
NonbundRates | array of Non Bundled rates | Contains details of non bundled rates. Non Bundled rate shows the prices of rooms seperately. | |
rateKey | string | Internal rate key to be used for confirmation | |
rateClass | string | NOR |
Values: NOR = Normal NRF = Non-refundable SPE = Special OFE = Offer PAQ = Package NRP = Non-refundable package |
convertedNet | string | 3263 | Total price including taxes |
allotment | integer | 5 | Number of rooms available for a particular room type |
paymentType | string | AT_WEB | Allowed payment type. Possible Values: AT_WEB |
packaging | boolean | true / false | Identifies if the rate is for packaging |
boardName | string | BED AND BREAKFAST | Board name |
cancellationPolicies | array of policies elements | ||
convertedaAmount | float | Amount that will be charged after a certain date | |
convertedDate | string | Beginning date when the amount will be charged | |
rooms | integer | 1 | Number of rooms requested with the same occupancy |
adults | integer | 1 | Number of adults for the room |
children | integer | 1 | Number of children requested |
childrenAges | string | Children ages separated by commas | |
offers | array of offer elements | ||
offer | element | Contains offer details | |
offer > code | integer | Offer code | |
offer > offer | float | Offer amount | |
offer > name | string | Offer name | |
promotions | array | ||
rmcode | string | DBL.DX | Room code |
rmname | string | DOUBLE DELUXE | Room name |
apiref | string | NRG / BH | Don't worry about it. This is used for internal purpose. |
currency | string | INR | Three-letter ISO currency code |
currsymbol | string | Currency symbol of price | |
price_details | element | Contains price details | |
hotel_charges | array of hotel charges | Contains hotel charges | |
hotel_charges > name | string | Name of charge | |
hotel_charges > included | boolean | ‘true’ if the charge is already included in the price. | |
hotel_charges > currency | string | Three-letter ISO currency code | |
hotel_charges > amount_type | string | value | Defines the type of amount. 'value' represents flat fee. |
hotel_charges > amount | integer | amount of charge | |
images | string | Images of the hotel | |
hotel_code | string | 277630$H!0277630$0 | Airhob unique code for a hotel |
hotelinfo | element | ||
hotelinfo > DBId | integer | 277630 | Don't worry about it. This is used for internal purpose. |
hotelinfo > fullName | string | The Heart Apartments at MediaCity UK | Full Name of hotel. |
hotelinfo > starCategory | integer | 4 | Star category of the hotel |
hotelinfo > cityname | string | Manchester | City of hotel |
hotelinfo > country | string | United Kingdom | Country of hotel |
hotelinfo > hotelAddresss | element | Contains hotel address | |
hotelAddresss > street | string | Salford Quays | Street of hotel |
hotelAddresss > streetNumber | string | Street number of hotel | |
hotelAddresss > city | string | Manchester | City of hotel |
hotelAddresss > zipCode | string | M50 2TJ | Zip code of hotel |
hotelAddresss > country | string | GB | Country of hotel |
hotelAddresss > latitude | string | 53.4720737 | Latitude of hotel |
hotelAddresss > longitude | string | -2.3000156 | Longitude of hotel |
hotelAddresss > addresslines | array of address lines | Contains adress of hotel | |
hotelinfo > hotelContacts | array of hotel contacts | ||
hotelContacts > phone_number | string | Phone number of hotel | |
hotelinfo > hotelEmails | array of hotel emails | Contains hotel email details | |
hotelEmails > emails | string | reservations@theheartapartments.co.uk | Email ID of hotel |
hotelinfo > hotelWebs | array of hotel web | Cotains hotel web details | |
hotelWebs > web_url | string | http://www.theheartapartments.co.uk/ | Web URL of hotel |
hotelinfo > hotelDescription | array of hotel descriptions | Contains description of hotel | |
hotelDescription > description | string | Description of hotel | |
hotelFacilities | array of hotel facilities | Contains hotel facilities | |
hotelFacilities > title | string | check-in hour | Hotel facility |
hotelinfo > hotelImages | array of hotel images | ||
checkout | string | 2018-04-24 | Check-out date. Format must be yyyy/mm/dd. |
checkin | string | 2018-04-23 | Check-in date. Format must be yyyy/mm/dd. |
currCurrency | string | INR | Searched currency |
errors | array of errors | Contains errors, if any | |
error > code | integer | 0 | Error code |
error > message | string | Error message |
This API is used for pricing the hotel room.
The URL of the web method is
The HTTP verb to be used is POST.
Data is to be supplied in the body of the request as JSON encoded value.
{
"apiref":"NRG",
"groupcode":"wsdbjylcxn4ufdya7kiw2ggr4hk2psi",
"rateKey":["wsovzzj64f6cxr2qu2otcags47n7txfa7ptovtzlrbde3lvyccdsvu7uoaiczyhb65otj6hkr5kaydllwljgejenzpzsn6y"],
"search_id":"iqv3xrsveg3xa4epz2nhednrl4*rG8ccjXp$fdf8f53a-3bd0-4"
}
Price API Request Parameters | Equivalent Properties API Response Parameters |
---|---|
apiref | hotel > ratetype > bundledRates/NonbundRates > apiref |
groupcode | hotel > ratetype > bundledRates/NonbundRates > group_code |
rateKey | hotel > ratetype > bundledRates/NonbundRates > rate_key |
search_id | search_id |
See response here
Parameter | Type | Example Value | Description |
---|---|---|---|
sellRequestId | string | qSLeB1a7wbgSnjtYf8cEPA== | Sell Request ID that uniquely identifies a request. It will be expired after some minutes. |
Errors | element | Holds error information | |
ProductErrors > ErrorCode | string | E_C_13 | Unique airhob error code |
ProductErrors > Message | string | Invalid apikey sent in header | Description of error |
dbstay | element | Contains stay details | |
name | string | Le Villé Hotel | Name of hotel |
currCurrency | string | INR | Three-letter ISO currency code of price |
rooms | array of rooms | Contains room details | |
roomid | string | ueltI2MKcWGOETKuH78pCQ== | Unique ID for a room |
roomname | string | Superior Double Room, 1 King Bed, Canal View | Room name |
roomcode | string | Don't worry about this. It is used for internal purpose. | |
noroom | integer | 1 | Number of rooms |
nonRefundable | boolean | 1 | true if the rate is Non-refundable. Otherwise, cancellation policies applicable |
adultCount | integer | 2 | Number of adult guests |
childCount | integer | 1 | Number of child guests |
cancellationPolicies | array of canellation policy | Conatins cancellation policy, if any | |
checkIn | string | 2018-04-23T00:00:00 | Check-in date and time |
checkOut | string | 2018-04-24T00:00:00 | Check-out date and time |
totalprice | string | 20857 | Total fare excluding taxes |
taxprice | string | 0 | Tax price |
finalprice | string | 20857 | Total fare including taxes |
exptime | string | 2017-08-17T07:04:08 | Don't worry about this. It is used for internal purpose. |
isTimevalid | string | true / false | Don't worry about this. It is used for internal purpose. |
apiref | string | NRG / BH | Don't worry about this. It is used for internal purpose. |
address | string | 38-42 Canal Street Manchester M1 3WD Canal Street | Hotel address |
city | string | City of hotel | |
customMarkup | string | 40 | This will only contain a value if you've added markup percentage from the dashboard. This customMarkup is not already added in the finalprice. You need to add it on your own. |
This API is used for finally booking the room and storing the traveler information.
The URL of the web method is
The HTTP verb to be used is POST.
Data is to be supplied in the body of the request as JSON encoded value.
{
"sellRequestId": "wnHudXmJKp+Vhk0KA1KW/Q==",
"holder": {
"name": "John",
"surname": "Doe",
"email": "john@gmail.com",
"countryCode": "+1",
"phoneNumber": "9999999999"
},
"rooms": [
{
"roomid": "t7aSwbhG3EMoMOKH3M3DGg==",
"passengerDetails": [
{
"age": "28",
"title": "Mr.",
"name": "John",
"surname": "Doe",
"type": "AD"
},
{
"age": "5",
"title": "Mr.",
"name": "Steve",
"surname": "Baslin",
"type": "CH"
},
{
"age": "7",
"title": "Mr.",
"name": "Mike",
"surname": "Paul",
"type": "CH"
}
]
},
{
"roomid": "AMXdj3g/0mN7EK+jP2ryXg==",
"passengerDetails": [
{
"age": "28",
"title": "Mr.",
"name": "Inacio",
"surname": "Lee",
"type": "AD"
},
{
"age": "28",
"title": "Mr.",
"name": "George",
"surname": "Walker",
"type": "AD"
}
]
}
]
}
Parameter | Type | Example Value | Required | Description |
---|---|---|---|---|
sellRequestId | string | Xm86hRlEHlFvts5mUblHIw== | REQUIRED | Pass value of 'sellRequestId' from Price API response |
holder | element | REQUIRED | Contains Lead passenger information | |
holder > name | string | John | REQUIRED | First name of lead passenger |
holder > surname | string | Doe | REQUIRED | Last name of lead passenger |
holder > email | string | john@gmail.com | REQUIRED | Email address of lead passenger |
holder > countryCode | string | +1 | REQUIRED | Cellular country code of lead passenger |
holder > phoneNumber | string | 9999999999 | REQUIRED | Phone number of lead passenger |
rooms > roomid | string | lyk/TrA8aIF38u0O20oOaw== | REQUIRED | ID of a room. Pass value of 'dbstay > rooms > roomid' from Price API response. |
rooms > passengerDetails > age | integer | 35 | REQUIRED | Age of passenger |
rooms > passengerDetails > title | string | Mr. / Mrs. | REQUIRED | Title of passenger. At the end of the title there has to be a dot. For example 'Mr.' and 'Mrs.' are correct but 'Mr' and 'Mrs' are incorrect. |
rooms > passengerDetails > name | string | Steve | REQUIRED | First name of passenger |
rooms > passengerDetails > surname | string | Baslin | REQUIRED | Last name of passenger |
rooms > passengerDetails > type | string | AD / CH | REQUIRED |
AD=Adult CH=Child |
specialRequest | string | I request room heater | OPTIONAL | Optional special request to be passed along to the hotel |
{
"bookingId": "73821566",
"sellRequestId": "wnHudXmJKp+Vhk0KA1KW/Q==",
"reference": "321-5689754",
"status": "CONFIRMED",
"supplierCode": "expedia_ean",
"errors": []
}
Parameter | Type | Example Value | Description |
---|---|---|---|
bookingId | string | 70511478 | Airhob unique booking ID |
sellRequestId | string | G4SdRL2KodAW1CtKL8HBiQ== | Airhob unique ID for Price API Request |
Errors | element | Holds error information | |
ProductErrors > ErrorCode | string | E_C_13 | Unique airhob error code |
ProductErrors > Message | string | Invalid apikey sent in header | Description of error |
reference | string | wbpelwd6hghw3a4hs7kmccpbaq | Booking reference received from the supplier that is used to identify the booking by the hotel |
status | string | CONFIRMED / PENDING / FAILED | Status of booking. You will possibly receive above 3 statuses from us. In case of pending, our support will get back to you on the status of the booking within 1 hour. |
errors | array | errors, if any | |
supplierCode | string | expedia_ean | This is the supplier through which booking has been done. |
This API is used to fetch the cancellation policies for the selected rate from the previous search if cancellation policy code is returned instead of cancellation policy.
The URL of the web method is https://dev-sandbox-api.airhob.com/sandboxapi/stays/v1/cancellationpolicy
The HTTP verb to be used is POST.
Data is to be supplied in the body of the request as JSON encoded value.
{
"search_id ": "ge4dsj7f3usfz7w7ewrcehfw6u*rdW27IKt$e28dd523-1b07-4",
"cancellation_policy_code": "50ITINS",
"rate_key": "wcnqnzr6wr4szrya6gjggags4pjkpxfa6oy63t343iluz5pkchixtd7zoeiczyhb65otj6hkr5kaydllwljgejenzpzsn6y"
}
Parameter | Type | Example Value | Required | Equivalent Properties API Response Parameters |
---|---|---|---|---|
search_id | string | REQUIRED | search_id | |
cancellation_policy_code | string | REQUIRED | cancellation_policy_code | |
rate_key | string | REQUIRED | rate_key |
Before giving live access with production URL’s, we need to verify and check if the integration is working fine. We request you to please share with us the BOOKING ID and booking voucher of below use cases.
1. 2 nights stay in any property with 1 room. Occupancy is 2 adults
2. 2 nights stay in any property with 2 rooms. Occupancy is 2 adults and 1 child in room 1 and 2 adults and 2 child in room 2
3. 2 nights stay in any property with 4 rooms. Occupancies as below:
Room 1 - 2 adults and 1 child
Room 2 - 2 adults and 2 child
Room 3 - 2 adults
Room 4 - 3 adults
Once we verify these use cases, we’ll get back to you with the confirmation or suggestions to any issues, if there are any. Please note that the creation of these Booking IDs should be done within your product flow and not by simply calling our APIs directly (for example via Postman). If need be, we would request to make one test booking in your product too, post which the GoLive verification would be complete.
Click here to get list of countries and cities.
Error Code | Message |
---|---|
E_C_11 | Your API key has expired |
E_C_12 | Your IP address doesn't match |
E_C_13 | Invalid apikey sent in header |
E_C_14 | You don't have access to flights API. |
E_C_15 | You don't have access to tours API. |
E_C_16 | You don't have access to stays API. |
E_C_17 | You don't have access to activities API. |
E_C_18 | You don't have access to europass API. |
E_C_19 | You don't have access to trains API. |
E_C_20 | Something went wrong in authenticating product rights. |
E_C_21 | Your endpoint is of sandbox environment but you have passed mode as 'production'. Please pass mode as 'sandbox'. |
E_C_22 | Incorrect mode sent in header. For Sandbox environment pass 'sandbox' and for production environment pass 'production' |
E_C_23 | Your account is currently inactive. Please contact Airhob support team at api@airhob.com |
E_C_24 | You don't have enough balance in your Airhob Wallet. If you want us to add some dummy balance in your Airhob Wallet for sandbox environment, please write an email to api@airhob.com and we’ll do the rest. |
E_C_25 | Incomplete Header |
E_C_26 | Your endpoint is of production but you have passed mode as 'sandbox'. Please pass mode as 'production'. |
Error Code | Message |
---|---|
E_S_11 | No hotels found. |
E_S_12 | Something went wrong. |
E_S_13 | Bad request. |
E_S_14 | Missing FromDate. |
E_S_15 | Invalid FromDate. |
E_S_16 | Missing ToDate. |
E_S_17 | Invalid ToDate. |
E_S_18 | Missing Currency |
E_S_19 | Invalid Currency |
E_S_20 | Invalid ClientNationality |
E_S_21 | Missing Occupancies |
E_S_22 | Occupancies count should be less than six. |
E_S_23 | NoOfAdults should be greater than zero for a room. |
E_S_24 | A room can have a maximum of 4 guests. Summation of NoOfAdults and number of children must be less than 5. |
E_S_25 | Missing HotelCodes |
E_S_26 | Invalid HotelCodes |
E_S_27 | Missing FromDate. |
E_S_28 | Invalid FromDate. |
E_S_29 | Missing ToDate. |
E_S_30 | Invalid ToDate. |
E_S_31 | Missing Currency |
E_S_32 | Invalid Currency |
E_S_33 | Invalid ClientNationality |
E_S_34 | Invalid Occupancies |
E_S_35 | Occupancies count should be less than six. |
E_S_36 | NoOfAdults should be greater than zero for a room. |
E_S_37 | A room can have a maximum of 4 guests. Summation of NoOfAdults and number of children must be less than 5. |
E_S_38 | An error has occured. |
E_S_39 | search_id is missing. |
E_S_40 | Invalid search_id. |
E_S_41 | Your search_id has expired. |
E_S_42 | Search ID has expired |
E_S_43 | apiref is missing. |
E_S_44 | Invalid apiref. |
E_S_45 | rateKey is missing. |
E_S_46 | groupcode is missing. |
E_S_47 | A single rateKey is required for apiref of NRG. |
E_S_48 | rateKey count does not match the number of requested rooms. |
E_S_49 | sellRequestId is missing. |
E_S_50 | Invalid sellRequestId. |
E_S_51 | Room count doesn't match |
E_S_52 | Invalid sellRequestId. |
E_S_53 | Your sellRequestId has expired. |
E_S_54 | Insufficient holder details. |
E_S_55 | Invalid holder details. |
E_S_56 | Insufficient room details. |
E_S_57 | rooms count should be equal to or less than 5. |
E_S_58 | roomid is missing. |
E_S_59 | Invalid roomid. |
E_S_60 | passengerDetails is missing. |
E_S_61 | A room can have a maximum of 4 guests. Summation of NoOfAdults and number of children must be less than 5. |
E_S_62 | Wrong roomid passed. |
E_S_63 | Insufficient passengerDetails. |
E_S_64 | age is missing in one of the passenger's details. |
E_S_65 | type is missing in one of the passenger's details. |
E_S_66 | Invalid passenger type sent in one of the passenger's details. Possible values are 'AD' for adult and 'CH' for child. |
E_S_67 | title is missing in one of the passenger's details. |
E_S_68 | At the end of the title, there has to be a dot. For example, 'Mr.' and 'Mrs.' are correct but 'Mr' and 'Mrs' are incorrect. |
E_S_69 | name is missing in one of the passenger's details. |
E_S_70 | name can only have alphabets. Special characters and numbers are not accepted. |
E_S_71 | surname is missing in one of the passenger's details. |
E_S_72 | surname can only have alphabets. Special characters and numbers are not accepted. |
E_S_73 | Invalid Title. For child paasenger, title should be Ms. or Mstr. |
E_S_74 | Invalid Title. For adult paasenger, title should be Mr. or Ms. or Mrs. or Mstr. |
E_S_75 | Supplier error |
Here is booking flow of Activities API.
1. Search API.
Search API lets you search activities. We will send you all the available activities with the minimum price of each activity.
2. Detail API
In response of Search API, you will get many activities. Out of many activities, you can select an activity to see it's detailed information. This API will help you see activity's detailed information.
3. Price API
This API is used for pricing the activity. For your booking flow, it's recommended that you collect the payment of your customer after Price API is success and before Issue API is called.
4. Issue API
This API confirms your booking and provide you unique booking ID.
This API is used for searching activities.
The URL of the web method is
The HTTP verb to be used is POST.
Data is to be supplied in the body of the request as JSON encoded value.
{
"currency": "USD",
"fromDate": "2018-04-23",
"toDate": "2018-04-23",
"itemperPage": 10,
"pageNo": 1,
"searchFilterItems": [
{
"type": "destination",
"value": "SIN"
},
{
"type": "segment",
"value": "1"
},
{
"type": "priceFrom",
"value": "1"
},
{
"type": "priceTo",
"value": "200"
},
{
"type": "text",
"value": "night"
}
]
}
Parameter | Type | Example Value | Required | Description |
---|---|---|---|---|
currency | string | INR | REQUIRED | Preferred currency for the prices in the results.Three letter ISO Currency code. |
fromDate | string | 2017-10-20 | REQUIRED | Beginning date of the activity. Date format must be yyyy-mm-dd. |
toDate | string | 2017-10-21 | REQUIRED | End date of the activity. Date format must be yyyy-mm-dd |
itemperPage | integer | 10 | OPTIONAL | Number of items per page |
pageNo | integer | 1 | OPTIONAL | Number of page |
searchFilterItems | array of filter items | REQUIRED | ||
searchFilterItems > type | string | destination / text / priceFrom / priceTo / segment | destination' is required. Rest all other filters are optional. |
Type of search filter. Here
is a list of possible search filters. 1. destination Three letter Airhob unique destination code eg. SIN 2. text A keyword to search activities like scuba. 3. priceFrom Minimum price for activities 4. priceTo Maximum price for activities 5. segment Click here to see possible values for this filter in JSON format. |
searchFilterItems > value | string | SIN / E-U02-HOPONCUTTY / 6460 / 1260 / 203 | Airhob unique destination code |
See response here
This API is used for getting details of an activity, along with all the information related to an activity.
The URL of the web method is
The HTTP verb to be used is POST.
Data is to be supplied in the body of the request as JSON encoded value.
{
"currency": "USD",
"fromDate": "2018-04-23",
"toDate": "2018-04-23",
"activityCode": "E-SG1-SG-MSENTO"
}
{
"modalities": [
{
"code": "HB-HJEN@STANDARD||",
"name": "Tour and S.E.A Aquarium",
"duration": {
"value": 1,
"metric": "DAYS"
},
"destinationCode": null,
"amountsFrom": [
{
"paxType": "ADULT",
"ageFrom": 13,
"ageTo": 999,
"convertedAmount": 9245,
"convertedBoxOfficeAmount": 8894
},
{
"paxType": "CHILD",
"ageFrom": 3,
"ageTo": 12,
"convertedAmount": 5907,
"convertedBoxOfficeAmount": 5732
}
],
"cancellationPolicies": [
{
"dateFrom": "2017-10-18T00:00:00.000Z",
"convertedAmount": 9245
}
],
"amountUnitType": null,
"rates": null,
"supplierInformation": null,
"providerInformation": null,
"questions": null,
"comments": null
},
{
"code": "HB-HJNEN@STANDARD||",
"name": "Tour",
"duration": {
"value": 1,
"metric": "DAYS"
},
"destinationCode": null,
"amountsFrom": [
{
"paxType": "ADULT",
"ageFrom": 13,
"ageTo": 999,
"convertedAmount": 6420,
"convertedBoxOfficeAmount": 6226
},
{
"paxType": "CHILD",
"ageFrom": 3,
"ageTo": 12,
"convertedAmount": 4238,
"convertedBoxOfficeAmount": 4150
}
],
"cancellationPolicies": [
{
"dateFrom": "2017-10-18T00:00:00.000Z",
"convertedAmount": 6420
}
],
"amountUnitType": null,
"rates": null,
"supplierInformation": null,
"providerInformation": null,
"questions": null,
"comments": null
}
],
"errors": [],
"SearchReferenceId": "c9bbeb42-4407-4"
}
This API is used for pricing the activity.
The URL of the web method is
The HTTP verb to be used is POST.
Data is to be supplied in the body of the request as JSON encoded value.
{
"code": "HB-HJEN@STANDARD||",
"activityCode": "E-SG1-SG-MSENTO",
"fromDate": "2018-04-23",
"toDate": "2018-04-23",
"oldPrice": 0,
"nationality": "IN",
"SearchReferenceId": "c9bbeb42-4407-4",
"paxDetails": [
{
"age": 25,
"title": "Mr.",
"name": "John",
"surname": "Doe",
"type": "ADULT"
},
{
"age": 10,
"title": "Mr.",
"name": "Brian",
"surname": "Doe",
"type": "CHILD"
}
],
"holder": {
"name": "John",
"email": "john@gmail.com",
"surname": "Doe",
"countryCode": "+1",
"telephone": "9999999999"
}
}
{
"errors": [],
"sellRequestId": "lJRoqMYu",
"dbactivity": {
"name": "A morning at Sentosa island",
"modalities": {
"code": null,
"name": "Tour and S.E.A Aquarium",
"duration": {
"value": 1,
"metric": "DAYS"
},
"destinationCode": null
},
"paxes": [],
"cancellationPolicies": [
{
"dateFrom": "11-10-2017",
"convertedAmount": 7577
}
],
"questions": [
{
"code": "ARRIVHOTEL",
"text": "Please advise your hotel check in date",
"required": false
},
{
"code": "HOTEL",
"text": "Please advise the name of your hotel",
"required": false
},
{
"code": "PAX NAME",
"text": "PLEASE PROVIDE FULL FIRST NAME AND SURNAME OF ALL PASSENGERS TRAVELLING",
"required": false
}
],
"comments": [
{
"type": "CONTRACT_REMARKS",
"text": "VOUCHER INFORMATION\t\nActivity Type : \tExcursions with Hotel Pick up\nSupplier phone number\t6238 2672\nSupplier Language: \tEnglish \nSupplier Schedule: \tDaily\nRedeem type: \tPrinted Voucher\nRedeem point schedule: \tOn Tour Service Date\nMeeting point/ Pick-up location: \tHotel Lobby\nPick-up time: \t08:00AM \nDrop-off location: \tHotel Lobby\nDrop-off time: \t12:30PM\nOpening/ Start time: \t08:30AM\nClosing/ End time: \t12:30PM\nOpening days/period: \tDaily\nDuration: \t4 Hours\nGuide language: \tEnglish \nAlternative in case of conditions which affect the activity operation \tTour will operate on rain or shine conditions.Cable Car Rides may not operate due to bad weather. In the event of maintance, Cable car in sentosa island be replaced. Merlion may temporarily closed due to bad weather. \nDress-code: \tCasual\nID, licence, certificate, proofing documents: \tPassport is much required.\nMin. Age: \t0\nMax. Age: \t80\nVoucher validity: \t1 day\n"
}
],
"Datefrom": "2018-04-23T00:00:00",
"totalprice": 7578,
"taxprice": 0,
"finalprice": 7578,
"urls": {
"resource": "https://media.stage.activitiesbank.com/27204/ENG/B/27204_1.jpg"
},
"taxes": []
},
"IspriceChanged": true,
"OldPrice": 0,
"TotalPrice": 7578
}
This API is used for finally booking the activity.
The URL of the web method is
The HTTP verb to be used is POST.
Data is to be supplied in the body of the request as JSON encoded value.
{
"sellRequestId": "lJRoqMYu",
"answers": [
{
"answer": "2018-04-23",
"code": "ARRIVHOTEL"
},
{
"answer": "Adventure Cove Waterpark",
"code": "HOTEL"
},
{
"answer": "John Doe",
"code": "PAX NAME"
}
]
}
{
"bookingId": "55717796",
"reference": "256-2848569",
"status": "CONFIRMED",
"sellRequestId": "lJRoqMYu",
"errors": [],
"vouchers": []
}
This API is used for getting images of an activity.
The URL of the web method is
The HTTP verb to be used is POST.
Data is to be supplied in the body of the request as JSON encoded value.
{
"ActCode": "E-SG1-SG-MSENTO"
}
{
"images": [
{
"visualizationOrder": 1,
"mimeType": "image/jpeg",
"urls": [
{
"dpi": 72,
"height": 75,
"width": 100,
"resource": "http://media.stage.activitiesbank.com/27204/ENG/S/27204_1.jpg",
"sizeType": "SMALL"
},
{
"dpi": 72,
"height": 768,
"width": 1024,
"resource": "http://media.stage.activitiesbank.com/27204/ENG/XL/27204_1.jpg",
"sizeType": "XLARGE"
},
{
"dpi": 72,
"height": 768,
"width": 1024,
"resource": "http://media.stage.activitiesbank.com/27204/ENG/B/27204_1.jpg",
"sizeType": "RAW"
},
{
"dpi": 72,
"height": 768,
"width": 1024,
"resource": "http://media.stage.activitiesbank.com/27204/ENG/LPP/27204_1.jpg",
"sizeType": "RAW"
},
{
"dpi": 72,
"height": 200,
"width": 267,
"resource": "http://media.stage.activitiesbank.com/27204/ENG/L/27204_1.jpg",
"sizeType": "LARGE"
},
{
"dpi": 72,
"height": 130,
"width": 173,
"resource": "http://media.stage.activitiesbank.com/27204/ENG/M/27204_1.jpg",
"sizeType": "MEDIUM"
}
]
},
{
"visualizationOrder": 2,
"mimeType": "image/jpeg",
"urls": [
{
"dpi": 72,
"height": 75,
"width": 100,
"resource": "http://media.stage.activitiesbank.com/27204/ENG/S/27204_2.jpg",
"sizeType": "SMALL"
},
{
"dpi": 72,
"height": 768,
"width": 1024,
"resource": "http://media.stage.activitiesbank.com/27204/ENG/XL/27204_2.jpg",
"sizeType": "XLARGE"
},
{
"dpi": 72,
"height": 768,
"width": 1024,
"resource": "http://media.stage.activitiesbank.com/27204/ENG/B/27204_2.jpg",
"sizeType": "RAW"
},
{
"dpi": 72,
"height": 768,
"width": 1024,
"resource": "http://media.stage.activitiesbank.com/27204/ENG/LPP/27204_2.jpg",
"sizeType": "RAW"
},
{
"dpi": 72,
"height": 200,
"width": 267,
"resource": "http://media.stage.activitiesbank.com/27204/ENG/L/27204_2.jpg",
"sizeType": "LARGE"
},
{
"dpi": 72,
"height": 130,
"width": 173,
"resource": "http://media.stage.activitiesbank.com/27204/ENG/M/27204_2.jpg",
"sizeType": "MEDIUM"
}
]
},
{
"visualizationOrder": 3,
"mimeType": "image/jpeg",
"urls": [
{
"dpi": 72,
"height": 75,
"width": 100,
"resource": "http://media.stage.activitiesbank.com/27204/ENG/S/27204_3.jpg",
"sizeType": "SMALL"
},
{
"dpi": 72,
"height": 768,
"width": 1024,
"resource": "http://media.stage.activitiesbank.com/27204/ENG/XL/27204_3.jpg",
"sizeType": "XLARGE"
},
{
"dpi": 72,
"height": 768,
"width": 1024,
"resource": "http://media.stage.activitiesbank.com/27204/ENG/B/27204_3.jpg",
"sizeType": "RAW"
},
{
"dpi": 72,
"height": 768,
"width": 1024,
"resource": "http://media.stage.activitiesbank.com/27204/ENG/LPP/27204_3.jpg",
"sizeType": "RAW"
},
{
"dpi": 72,
"height": 200,
"width": 267,
"resource": "http://media.stage.activitiesbank.com/27204/ENG/L/27204_3.jpg",
"sizeType": "LARGE"
},
{
"dpi": 72,
"height": 130,
"width": 173,
"resource": "http://media.stage.activitiesbank.com/27204/ENG/M/27204_3.jpg",
"sizeType": "MEDIUM"
}
]
},
{
"visualizationOrder": 4,
"mimeType": "image/jpeg",
"urls": [
{
"dpi": 72,
"height": 75,
"width": 100,
"resource": "http://media.stage.activitiesbank.com/27204/ENG/S/27204_4.jpg",
"sizeType": "SMALL"
},
{
"dpi": 72,
"height": 768,
"width": 1024,
"resource": "http://media.stage.activitiesbank.com/27204/ENG/XL/27204_4.jpg",
"sizeType": "XLARGE"
},
{
"dpi": 72,
"height": 768,
"width": 1024,
"resource": "http://media.stage.activitiesbank.com/27204/ENG/B/27204_4.jpg",
"sizeType": "RAW"
},
{
"dpi": 72,
"height": 768,
"width": 1024,
"resource": "http://media.stage.activitiesbank.com/27204/ENG/LPP/27204_4.jpg",
"sizeType": "RAW"
},
{
"dpi": 72,
"height": 200,
"width": 267,
"resource": "http://media.stage.activitiesbank.com/27204/ENG/L/27204_4.jpg",
"sizeType": "LARGE"
},
{
"dpi": 72,
"height": 130,
"width": 173,
"resource": "http://media.stage.activitiesbank.com/27204/ENG/M/27204_4.jpg",
"sizeType": "MEDIUM"
}
]
},
{
"visualizationOrder": 5,
"mimeType": "image/jpeg",
"urls": [
{
"dpi": 72,
"height": 75,
"width": 100,
"resource": "http://media.stage.activitiesbank.com/27204/ENG/S/27204_5.jpg",
"sizeType": "SMALL"
},
{
"dpi": 72,
"height": 768,
"width": 1024,
"resource": "http://media.stage.activitiesbank.com/27204/ENG/XL/27204_5.jpg",
"sizeType": "XLARGE"
},
{
"dpi": 72,
"height": 768,
"width": 1024,
"resource": "http://media.stage.activitiesbank.com/27204/ENG/B/27204_5.jpg",
"sizeType": "RAW"
},
{
"dpi": 72,
"height": 768,
"width": 1024,
"resource": "http://media.stage.activitiesbank.com/27204/ENG/LPP/27204_5.jpg",
"sizeType": "RAW"
},
{
"dpi": 72,
"height": 200,
"width": 267,
"resource": "http://media.stage.activitiesbank.com/27204/ENG/L/27204_5.jpg",
"sizeType": "LARGE"
},
{
"dpi": 72,
"height": 130,
"width": 173,
"resource": "http://media.stage.activitiesbank.com/27204/ENG/M/27204_5.jpg",
"sizeType": "MEDIUM"
}
]
}
],
"ErrorMessage": null
}
Before giving live access with production URL’s, we need to verify and check if the integration is working fine. We request you to please share with us the BOOKING ID of below use cases.
1. Any activity with 2 adults and 1 child
2. Any activity with 2 adults and 1 child that includes a special voucher. That would probably be Discovery Code in Orlando.
Once we verify these use cases, we’ll get back to you with the confirmation or suggestions to any issues, if there are any. Please note that the creation of these Booking IDs should be done within your product flow and not by simply calling our APIs directly (for example via Postman). If need be, we would request to make one test booking in your product too, post which the GoLive verification would be complete.
Error Code | Message |
---|---|
E_C_11 | Your API key has expired |
E_C_12 | Your IP address doesn't match |
E_C_13 | Invalid apikey sent in header |
E_C_14 | You don't have access to flights API. |
E_C_15 | You don't have access to tours API. |
E_C_16 | You don't have access to stays API. |
E_C_17 | You don't have access to activities API. |
E_C_18 | You don't have access to europass API. |
E_C_19 | You don't have access to trains API. |
E_C_20 | Something went wrong in authenticating product rights. |
E_C_21 | Your endpoint is of sandbox environment but you have passed mode as 'production'. Please pass mode as 'sandbox'. |
E_C_22 | Incorrect mode sent in header. For Sandbox environment pass 'sandbox' and for production environment pass 'production' |
E_C_23 | Your account is currently inactive. Please contact Airhob support team at api@airhob.com |
E_C_24 | You don't have enough balance in your Airhob Wallet. If you want us to add some dummy balance in your Airhob Wallet for sandbox environment, please write an email to api@airhob.com and we’ll do the rest. |
E_C_25 | Incomplete Header |
E_C_26 | Your endpoint is of production but you have passed mode as 'sandbox'. Please pass mode as 'production'. |
Error Code | Message |
---|---|
E_A_11 | No activities found. Try searching with different destination or text or priceFrom or priceTo or segment. |
E_A_12 | currency is missing. |
E_A_13 | Invalid currency. |
E_A_14 | fromDate is missing. |
E_A_15 | fromDate is not in correct format. |
E_A_16 | toDate is missing. |
E_A_17 | toDate is not in correct format. |
E_A_18 | searchFilterItems is missing. |
E_A_19 | The value provided for filter 'type' is not allowed. The allowed filters are: 'destination, priceFrom, priceTo, segment, text'. Please review the information provided and re-send your request. |
E_A_20 | value is missing. |
E_A_21 | destination is required and rest all other filters are optional. |
E_A_22 | Invalid value for segment. |
E_A_23 | Invalid value for destination. |
E_A_24 | Internal server error |
E_A_25 | No activities found. |
E_A_26 | activityCode is missing. |
E_A_27 | Invalid activityCode. |
E_A_28 | No result found for requested activity. |
E_A_29 | Something went wrong |
E_A_30 | nationality is missing |
E_A_31 | Invalid nationality. |
E_A_32 | SearchReferenceId is missing. |
E_A_33 | Invalid SearchReferenceId. |
E_A_34 | Your SearchReferenceId has expired. |
E_A_35 | code is missing. |
E_A_36 | holder is missing. |
E_A_37 | name is missing in holder. |
E_A_38 | name can only have alphabets. Special characters and numbers are not accepted. |
E_A_39 | surname is missing in holder. |
E_A_40 | surname can only have alphabets. Special characters and numbers are not accepted. |
E_A_41 | email is missing in holder. |
E_A_42 | countryCode is missing in holder. |
E_A_43 | telephones is missing in holder. |
E_A_44 | paxDetails are missing. |
E_A_45 | Please ensure that there is atleast one 'ADULT' passenger. |
E_A_46 | Holder must be one of the ADULT passengers. |
E_A_47 | age is missing for one of the passengers. |
E_A_48 | type is missing for one of the passengers. |
E_A_49 | Invalid type for one of the passengers. Please send 'ADULT' for Adult and 'CHILD' for child. |
E_A_50 | title is missing for one of the passengers. |
E_A_51 | surname is missing for one of the passengers. |
E_A_52 | name is missing for one of the passengers |
E_A_53 | Invalid Title. For child paasenger, title should be Ms. or Mstr. |
E_A_54 | Invalid Title. For adult paasenger, title should be Mr. or Ms. or Mrs. or Mstr. |
E_A_55 | We couldn't fetch any response. |
E_A_56 | sellRequestId is missing. |
E_A_57 | Invalid sellRequestId. |
E_A_58 | Your sellRequestId has expired. |
E_A_59 | answers are missing. |
E_A_60 | One or more answers are greater than questions. |
E_A_61 | One or more answer is missing. |
We've created an API for easy format validation of the GST number. Just pass us the GST number and the API will tell if the number is in the correct format.
The URL of the web method is
The HTTP verb to be used is POST.
Data is to be supplied in the body of the request as JSON encoded value.
{"gstnumber":"27AABCT6166A1ZJ"}
true
This API gives currenct balance of your Airhob Wallet.
The URL of the web method is
The HTTP verb to be used is POST.
Data is to be supplied in the body of the request as JSON encoded value.
No request is needed.
[
{
"Currency": "INR",
"Amount": 70232
},
{
"Currency": "USD",
"Amount": 1894
}
]