JSON API v2

Last updated: Aug 10th, 2019

Intro

Use our API to access, retrieve and manage information about hotels and their availability. Finalize a booking!

Requests

Onetourismo API consists of the following request types which are described in details in this current document

  • Availability
  • Specific Availability
  • Book
  • Cancel
  • Bookings Search
  • Confirm

Availability

1. Description

Use this endpoint in order to retreive hotels' availability in a specific location

2. Endpoint

https://api-v2.onetourismo.com/availability
                                        

3. Request Body

There are 2 different ways to search for hotel availability. You can use

  1. Location ID
  2. Hotel IDs

a. Search by location


{
  
  *"username": String,
  *"password": String, 
  *"start_date": 'YYYY-MM-DD', 
  *"end_date": 'YYYY-MM-DD',
  "nationality": String // country code 2 letters format,
  "stars": {  //use this in order to filter results by their rating
    "min": Integer(0-5),
    "max": Integer(0-5) //of course it has to be greater than stars.min
  },
  *"rooms": ArrayOf({
    *"adults": Integer(1-8), //Number of adults in this room
    *"children": Integer(0-8), //Number of children in this room
    *"childrenAges": ArrayOf(Integer(0-17)), //Age of each children
    *"quantity": Integer(1-5), // Number of same type rooms
  }),
  *"destination": String // Download our destination codes from the codes section in this current page
}
  
                                        

b. Search by Hotel IDs


{
  
  *"username": String,
  *"password": String, 
  *"start_date": 'YYYY-MM-DD', 
  *"end_date": 'YYYY-MM-DD',
  "nationality": String // country code 2 letters format,
  "stars": {  //use this in order to filter results by their rating
    "min": Integer(0-5),
    "max": Integer(0-5) //of course it has to be greater than stars.min
  },
  *"rooms": ArrayOf({
    *"adults": Integer(1-8), //Number of adults in this room
    *"children": Integer(0-8), //Number of children in this room
    *"childrenAges": ArrayOf(Integer(0-17)), //Age of each children
    *"quantity": Integer(1-5), // Number of same type rooms
  }),
  *"hotelCodes": ArrayOf(String) // Download our hotel codes from the codes section in this current page

}
  
                                        

4. Response Body


{
  "status": Enum('success','failure'), 
  "results": ArrayOf(
    {
        "id" : String // id of hotel,
        "name" : String,
        "location" : {
            "countryCode" :String // isocode
            "address" : String,
            "latitude" : Float,
            "longitude" : Float,
            "postalCode" : String
        },
        "photos" : ArrayOf(String) // urls of hotel's images,
        "description" : String,
        "rating" : {
            "value" : Number,
            "type" : Enum('stars','keys'),
            "text" : String // free text, ex: '4 stars'
        },
        "rooms" : ArrayOf({
            "onRequest" : Boolean // whether the room is on-request or not,
            "index" : Number, // in which of the request's rooms , this room corresponds. ¹
            "combinationIndex" : Integer, // Used in multiple room reservations
            "code" : String, ²
            "type" : String,
            "provider" : {
                code : String ²,
                name : String // provider friendly name as set to onetourismo's admin panel
            }, 
            "cancellationPolicies" ³ : ArrayOf({  //cancellation policies of returned rates
                "deadline" : Date ,    
                "amount": Number
            }),
            "mealPlan" : { // meal plan of this rate
                "code" : String, ²
                "price" : Number,
                "description" : String
            },
            "isRefundable" : Boolean,
            "hasCancellationPolicies" : Boolean, // false means that provider did not send cancellation policies. specific availability call is required to retreive them
            "cancellationFeeStart" : {  // If this room is refundable, that's the day cancellation fees start. 
                "deadline" : Date,    
                "amount": Number
            }
        })
    }
  )
}

                                        

1: For example if you searched for one room for two adults and one for three adults, index =0 means that this room is for two adults, and index=1 means that this room is a 3-adults one

2: These codes will be used in the next API calls in order to determine a specific room.

3: Amount field represents the fee for cancelling the reservation before the Date in the "deadline" field. If no deadline field exists , it's the "No-Show" policy.

Specific Availability

1. Description

Use this endpoint in order to retreive availability of a specific rate (hotel,room,meal)

2. Endpoint

https://api-v2.onetourismo.com/specific_availability
                                        

3. Request Body

{
  
  *"username": String,
  *"password": String, 
  *"start_date": 'YYYY-MM-DD', 
  *"end_date": 'YYYY-MM-DD',
  "nationality": String // country code 2 letters format,
  *"propertyID": String // hotel.id as retrieved from the availability call
  *"providerContractID": String // provider.code as retrieved from the availability call
  *"rooms": ArrayOf({
    "adults": Integer(1-8),
    "children": Integer(1-8), 
    "childrenAges": ArrayOf(Integer(0-17)),
    "id": String // as returned from room_availability at field room.id
    "code": String // as returned from room_availability at field room.code
    "mealPlan": String // as returned from room_availability at field room.mealPlan.code
    "quantity": String, // as returned from room_availability at field room.quantity
  }),
  *"propertyType": "HOTEL" 
}

  

1: In multi-room searches the combinationIndex of rooms inside the request body, must always be the same.

4. Response Body


{
  "status": Enum('success','failure'), 
  "criticalComments": ArrayOf(String) // Remarks for returned rates
  "results": {
    "hotel" : {
        "id" : String // id of hotel,
        "name" : String,
        "location" : {
            "countryCode" : String // isocode
            "address" : String,
            "latitude" : Float,
            "longitude" : Float,
            "postalCode" : String
        },
        "photos" : ArrayOf(String) // urls of hotel's images,
        "description" : String,
        "rating" : {
            "value" : Number,
            "type" : Enum('stars','keys'),
            "text" : String // free text, ex: '4 stars'
        },
    },
    "rooms" : ArrayOf({
        "onRequest" : Boolean, // whether the room is on-request or not
        "index" : Number, // in which of the request's rooms , this room corresponds. ¹
        "code" : String, ²
        "type" : String,
        "provider" : {
            code : String, ²
            name : String, // provider friendly name as set to onetourismo's admin panel
        }, 
        "cancellationPolicies" ³ : ArrayOf({  //cancellation policies of returned rates
            "deadline" : Date,    
            "amount": Number
         }),
        "mealPlan" : //meal plan of this rate
            {
                "code" : String, ²
                "price" : Number,
                "description" : String
            },
        "isRefundable" : Boolean,
        "hasCancellationPolicies" : Boolean, // false means that provider did not send cancellation policies. specific availability call is required to retreive them
        "cancellationFeeStart" : {  // If this room is refundable, that's the day cancellation fees start. 
            "deadline" : Date,    
            "amount": Number
        }
    )
    }),
    "cancellationPolicies" ³ : ArrayOf({  //cancellation policies of returned rates
        "deadline" : Date,    
        "amount": Number
    }),
    "criticalComments" : ArrayOf(String) // rate comments,
    "fullPrice" : Number, // final price,
    "optionBooking" : String or false, // DateString if optionBooking is available. Auto cancellation date if not confirmed till then, otherwise is set to false.
    "merchantReference" : String, ² // unique id for this "cart" 
  }
}

                                        

1: For example if you searched for one room for two adults and one for three adults, index =0 means that this room is for two adults, and index=1 means that this room is a 3-adults one

2: These codes will be used in the next API calls in order to determine a specific room.

3: Amount field represents the fee for cancelling the reservation before the Date in the "deadline" field. If no deadline field exists, it's the "No-Show" policy.

Book

1. Description

Use this endpoint in order to make a reservation

2. Endpoint

https://book-api.onetourismo.com/book
                                        

3. Request Body

{

*"username": String,
*"password": String, 
*"optionBooking": Boolean, //if true, the reservation status will be 'option'. This booking will be autimatically cancelled if you do not manually confirme it. 
*"start_date": 'YYYY-MM-DD', 
*"end_date": 'YYYY-MM-DD',
*"MerchantReference": String //as returned from specific availability call,
*"hotelID": String // hotel.id as retrieved from the availability call
*"providerContractID": String // provider.code as retrieved from the availability call
*"rooms": ArrayOf({
    *"id": String // as returned from specific_availability at field room.id,
    *"code": String // as returned from specific_availability at field room.code,
    *"mealPlan": String // as returned from specific_availability at field room.mealPlan.code,
    *"quantity": String, // as returned from specific_availability at field room.quantity
    *"specificAdults": ArrayOf({   //the adults that will stay in every room  
        *"first_name": String,
        *"last_name": String,
        *"index": Number ¹,
        *"title": Enum("Mr","Ms","Mrs")
    }),
    *"specificChildren": ArrayOf({  //the children that will stay in every room 
        *"first_name": String,
        *"last_name": String,
        *"age": Number,
        *"index": Number ¹,
        *"title": Enum("Mr","Ms","Mrs")
    })

}),
*"remarks": {
    "clientRemarks": String // any comment/remark for the reservation, the remarks must be in english
},
"*leadCustomer": {
    "address": String,
    "city": String,
    "country": {
      "code": String //isocode
      "name": Stirng 
    },
    "email": String,
    "*firstName": String, // min 1 character, max 25 characters
    "*lastName": String, // min 1 character, max 25 characters
    "postalCode": String,
    "telephone": String
},
  
  *"propertyType": "HOTEL" 
}
  
        

1: If there are more than one same type rooms (with same amount of adults , and children of same ages) , this field determines in which one of them the guest will stay. Indexes start from 1

2: All information in the booking request must be the same as used in the specific availability request (number of rooms, number of paxes, children ages etc). In order to make a change in the above information, it's mandatory to make a new specific availability request.

4. Response Body



{
  "status": Enum('success','failure'), 
  "results": {        
  {
        "provider":
        {
            "name": String,
            "code": String
        },
        "supplier":
        {
            "name": String "code": String
        },
        "rooms": [
        {
            "type": String,
            "price": Number,
            "meal": String,
            "guests":
            {
                "adults": ArrayOf(
                {
                    "firstName": String,
                    "lastName": String
                }),
                "children": ArrayOf(
                {
                    "firstName": String,
                    "lastName": String,
                    "age": Number
                })
            }
        }],
        "leadCustomer":
        {
            "address": String,
            "city": String,
            "country":
            {
                "code": String //isocode
                "name": String
            },
            "email": String,
            "firstName": String,
            "lastName": String,
            "postalCode": String,
            "telephone": String
        },

        "checkIn": Date "checkOut": Date,
        "price": Number,
        "netPrice": Number,
        "hotel":
        {
            "id": String,
            "name": String,
            "description": String,
            "location":
            {
                "latitude": Number,
                "longitude": Number,
                "countryCode": String,
                "address": String,
                "postalCode": String
            },
            "rating":
            {
                "value": Number // the star/keys rating (0 = unrated hotels)
                "type": Enum("stars", "keys"),
                "text": String // etc "4 stars","3 keys" , "Villa"(value=0) 
            },
            "services":
            {
                category_key: ArrayOf(String)
            },
            "photos": ArrayOf(String)

        },
        "cancellationPolicies"³: ArrayOf(
        { //cancellation policies of booked rate
            "deadline": Date,
            "amount": Number
        }),
        "remarks":
        {
            "clientRemarks": String 
            "providerRemarks": ArrayOf(String),
        },
        "id": String // reservation's unique id
    }
}

                                        

1: For example if you searched for one room for two adults and one for three adults, index =0 means that this room is for two adults, and index=1 means that this room is a 3-adults one

2: These codes will be used in the next API calls in order to determine a specific room.

3: Amount field represents the fee for cancelling the reservation before the Date in the "deadline" field. If no deadline field exists , it's the "No-Show" policy.

Cancel

1. Description

Use this endpoint in order to cancel a reservation

2. Endpoint

https://api-v2.onetourismo.com/cancel
                                        

3. Request Body

{

*"username": String,
*"password": String, 
*"id" : "String"

}
  
        

4. Response Body



{
  "status": Enum('success','failure')
}

                                        

Hotel Info

1. Description

Use this endpoint in order to retreive detailed info of a hotel

2. Endpoint

https://api-v2.onetourismo.com/info/:HOTEL_ID
                                        

3. Request Body

{

*"username": String,
*"password": String, 
}
  
        

4. Response Body



{
  "status": Enum('success','failure'), 
  "results": {
    "id" : String,
    "name": String,
    "description" : String,
    "location" : {
        "latitude" : Number,
        "longitude" : Number,
        "countryCode" : String,
        "address" : String,
        "postalCode" : String
    },
    "rating" :{
        "value" : Number // the star/keys rating (0 = unrated hotels)
        "type" : Enum("stars","keys"),
        "text" : String // etc "4 stars","3 keys" , "Villa"(value=0) 
    },
    "services" : {
        category_key : ArrayOf(String)
    },
    "photos" : ArrayOf(String)

  }
}

                                        

Hotel Info

1. Description

Use this endpoint in order to retreive detailed info of a hotel

2. Endpoint

https://api-v2.onetourismo.com/info/:HOTEL_ID
                                        

3. Request Body

{

*"username": String,
*"password": String, 
}
  
        

4. Response Body



{
  "status": Enum('success','failure'), 
  "results": {
    "id" : String,
    "name": String,
    "description" : String,
    "location" : {
    	"latitude" : Number,
    	"longitude" : Number,
    	"countryCode" : String,
    	"address" : String,
    	"postalCode" : String
	},
    "rating" :{
        "value" : Number // the star/keys rating (0 = unrated hotels)
        "type" : Enum("stars","keys"),
        "text" : String // etc "4 stars","3 keys" , "Villa"(value=0) 
    },
    "services" : {
    	category_key : ArrayOf(String)
	},
    "photos" : ArrayOf(String)

  }
}

                                        

Static Data

In order to receive static data for hotels / activities you will need to use the following endpoints :

GET HOTELS
GET | BASIC_AUTH | https://api-v2.onetourismo.com/static/my_properties
Possible URL parameters :
Parameter Values Description
include_static true / false If true, static data of hotel will be returned. Otherwise, the response will contain only an array with Hotel IDs
batches integer Use this parameter in order to get the hotels returned in batches (you may get a timeout if you request for a huge amount of hotels without using this param). Fill the size of each batch
token string When using batches parameter (let's say 50), on your first request you will get 50 hotels, a field named "count" with the amount of all your connected hotels as value, and a field named token. In order to get the next batch you should use the token parameter on your next request (and so on). Each request will return a new token param in order to get the next page of results


GET HOTEL INFORMATION
POST | https://api-v2.onetourismo.com/info/:HOTEL_ID
Request Body :
{ "username": String, "password": String }

GET DESTINATIONS
GET | BASIC_AUTH | https://api-v2.onetourismo.com/static/destinations


GET ACTIVITIES
GET | BASIC_AUTH | https://api-v2.onetourismo.com/static/my_activities

GET ACTIVITY INFORMATION
POST | https://api-v2.onetourismo.com/activity/info/:ACTIVITY_ID
Request Body :
{ "username": String, "password": String }


Meal Plans

The meal plans provided by our api are the following

Code Description
all_inclusive All Inclusive
ultra_all_inclusive Ultra All Inclusive
bed_breakfast Bed and Breakfast
full_board Full Board
half_board_modified_american Half Board
room_only Room Only - No meal plan

Booking Status

The booking status a reservation could get

Code Description
OPTION The reservation is option and will be cancelled automatically if not confirmed
ON_REQUEST The reservation is on-request and you should check the status periodically
REJECTED The eservation is rejected
CONFIRMED The reservation is confirmed
CANCELED The reservation is cancelled
CANCELLATION_PENDING The reservation is not cancelled and you should contact your supplier

Certification Process

In order to receive the live credentials you will need to make some test reservations.

Please send us an email as soon as you complete the required reservations.

Single room reservations

  • 1 room, with 2 adults
  • 1 room, with 2 adults and 2 children 6yo and 4yo

Multi-room reservations

  • 2 rooms (same type), with 2 adults for each room
  • 2 rooms (different type), the first with 2 adults and the other with 2 adults and 1 child

Intro

Use our API to access, retrieve and manage information about activities and their availability. Finalize a booking!

Requests

Onetourismo API consists of the following request types which are described in details in this current document

  • Availability
  • Specific Availability
  • Final Price
  • Book

Availability

1. Description

Use this endpoint in order to retreive activities' availability in a specific location

2. Endpoint

https://api-v2.onetourismo.com/activity/availability
                                        

3. Request Body


{
    *"username": String,
    *"password": String, 
    *"start_date": 'YYYY-MM-DD', 
    *"end_date": 'YYYY-MM-DD',
    *"destination": String, // Download our destination codes from the codes section in this current page
    *"adults" : Number,
    *"childrenAges":[]
}
                                        

4. Response Body

{
    "status": Enum('success','failure'), 
    "results": ArrayOf({
        "provider" : {
            "id" : Number,
            "name" : String,
            "type" : String
        },
        "policy":{
            "value" : Number,
            "type" : String
        }.
        "onRequest": Boolean,
        "extras" : ArrayOf({
            "name" : String,
            "id" : String,
            "description" : String,
            "required" : Boolean,
            "price" : Number
        }),
        "id" : String // id of activity,
        "code" : String,
        "duration" : String,
        "durationMinutes": Number,
        "perAdult" : Number,
        "type" : String,
        "mealIncluded" : Boolean,
        "name" : String,
        "photo" : String,
        "photos" : ArrayOf(String),
        "description" : String,
        "price" : Number,
        "providerContractID" : Number,
        "otagDestinationCode" : String, //should be same as destination passed
        "importance" : Number
    })
}
                                                

Specific Availability

1. Description

Use this endpoint in order to retreive information about a specific activity

2. Endpoint

https://api-v2.onetourismo.com/activity/specific_availability
                                            

3. Request Body

{
    *"username": String,
    *"password": String, 
    *"start_date": 'YYYY-MM-DD', 
    *"end_date": 'YYYY-MM-DD',
    *"propertyID": String // activity id as retrieved from the availability call
    *"providerContractID": String // provider.code as retrieved from the availability call
    *"adults": 2,
    *"childrenAges": [],
}
      
                                            

4. Response Body

{
    "status": Enum('success','failure'),
    "merchantReference" : String, 
    "activity": {
        "id" : String // id of activity,
        "name" : String,
        "onRequest": Boolean,
        "price" : Number,
        "modalities":  ArrayOf({
            "days": 4,
            "prices": [],
            "questions": [],
            "availableDates": ArrayOf({
                "data" : String, //format YYYY-MM-DD
                "cancelationPolicty" : {
                    "deadline" : Date,
                    "amount" : Number
                },
                "modality" : String, //modality id
                "id" : String,
                "code": String,
                "price": Number,
                "optionDate": Date
            }),
            "criticalComments": String,
            "name" : String,
            "time" : String,
            "id" : String,
            "pickupPoints": ArrayOf({
                    "id": String,
                    "name": String,
                    "time": String, // HH:MM
                    "latitude": String,
                    "longitude": String,
                    "price": Number
            }),
            "description": String
        })
        "pickUpPoints": {
            "startingHours" : ArrayOf({
                "time" : String,
                "pickUpPoints" : ArrayOf({
                    "id" : String,
                    "name" : String,
                    "time" : String,
                    "latitude" : String,
                    "longitude" : String,
                    "price" : Number
                })
            })
        },
        "extras" : ArrayOf({
            "name" : String,
            "id" : String,
            "description" : String,
            "required" : Boolean,
            "price" : Number
        })
    },
    "optionBooking" : Boolean
}
                                            

Final Price

1. Description

Use this endpoint in order to get the final prices for a specific activity

2. Endpoint

https://api-v2.onetourismo.com/activity/final_price
                                                

3. Request Body

    {
        "username": String,
        "password": String,
        "adults": Number,
        "childrenAges": ArrayOf(Number),
        "activity": {
            "id": String,
            "date": String, //YYYY-MM-DD
            "selectedModality": String, //modality id --found from specific_availability inside available dates array "modality" field
            "selectedPickup": String, // id of pickup found from specific_availability
            "extras": ArrayOf(String) // id of extras found from specific_availability
        },
        "merchantReference": String, // must be the same as the one retrieved from specific availability
        "providerContractID": Number
}
                                                

4. Response Body


{
    "status": Enum('success','failure'),
    "optionDate" : Date, 
    "price" : Number,
    "cancellationPolicies" : ArrayOf({
        "deadline" : Date,
        "amount" : Number
    })
}
                                                

Book

1. Description

Use this endpoint in order to make the final booking!!!

2. Endpoint

https://api-v2.onetourismo.com/activity/book
                                                    

3. Request Body

        {
            "username": String,
            "password": String,
            "adults": ArrayOf({
                "firstName" : String,
                "lastName" : String,
                "title" : String // Mr or Mrs
            }),
            "children" : ArrayOf({
                "firstName" : String,
                "lastName" : String,
                "title" : String
            }),
            "activity": {
                "id": String,
                "date": String,
                "selectedModality": String,
                "extras": ArrayOf(String),
                "selectedPickup": {
                     "id": String,
                    "name": Name,
                    "time": String,
                    "latitude": String,
                    "longitude": String,
                    "price": Number
                }
            },
            "MerchantReference": String, // must be the same as the one retrieved from specific availability
            "providerContractID": Number,
            "leadCustomer": {
                "firstName": String,
                "lastName": String,
                "address": String,
                "city": String,
                "postalCode": String,
                "country": {
                    "code": String, // country code 3 or 2 letter format
                    "name": String
                }
            }
    }
                                                    

4. Response Body

{
    "status": Enum('success','failure'),
    "optionDate" : Date, 
    "results":  {
        "provider": {
            "name": String,
            "code": String, //provider code
        },
        "supplier": {
            "name": String
            "code": String
        },
        "status": String, // Status of booking
        "participants": {
            "adults": ArrayOf({
                    "firstName": String,
                    "lastName": String,
                    "title": String
        }),
            "children": ArrayOf({
                "firstName" : Stirng,
                "lastName" : String,
                "title" : String
            }),
        },
        "leadCustomer": {
            "address": String,
            "city": String,
            "country": {
                "code": String,
                "name": String
            },
            "firstName": String,
            "lastName": String,
            "postalCode": String
        },
        "date": Date,
        "price": Number,
        "netPrice": Number,
        "activity" : {
            "extras" : ArrayOf({
                "name": String,
                "description": String,
                "price": Number
            })
            "name" : String,
            "photos" : ArrayOf({
                "url" : String
            }),
            "description" : String,
            "pickup" : {
                "id": String,
                "name": String,
                "time": String,
                "latitude": String,
                "longitude": String,
                "price": Number
            }
        },
        "cancelationPolicies": ArrayOf({
            "deadline": Date,
            "amount": Number
        })
    ],
    "id": String, // same as merchantReference
    },
}