JSON API v2

Last updated: Aug 10th, 2019

Hotels 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
  }),
  *"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
  }),
  *"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 the 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,
            "hasStopSales" : Boolean // whether the rate is on stop sales 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
            }, 
            "criticalComments" :  ArrayOf(String),
            "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
  }),
  *"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 the 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
        "hasStopSales" : Boolean // whether the rate is on stop sales 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 automatically cancelled if not confirmed
*"start_date": 'YYYY-MM-DD', 
*"end_date": 'YYYY-MM-DD',
*"nationality": String // country code 2 letters format,
*"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,
    *"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)

    }
}

                                        

Room Info

1. Description

Use this endpoint to retrieve detailed information about a room.

Note that the room information is optional and may not always be provided. Only the rooms with the field supportsRoomInfo: true in the availability response, support the room_info call

2. Endpoint

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

3. Request Body


{
    *"username": String,
    *"password": String, 
    "room": {
        "id": String, // room.id as received from availability response
        "code": String // room.code as received from availability response
    },
    "hotel": String, // hotel.id as received from availability response
    "providerContractID": String // provider.code as received from availability response
}

                                        

4. Response Body



{
    "status": Enum('success','failure'),
    "room": {
        "name": String,
        "description": String,
        "capacity": {
            "min": Number,
            "max": Number,
            "adults": Number
        },
        "amenities": ArrayOf(String),
        "photos": ArrayOf(Object)
    }
}

                                        

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

Activities 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 retrieve 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" : String,
            "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 the 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" : String,
        "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": [],
    "selectedAccommodation" : {
        "id": String // if accommodations were returned in the activity's availability call
    } 
}
      
                                            

4. Response Body

{
    "status": Enum('success','failure'),
    "merchantReference" : String, 
    "activity": {
        "id" : String // id of the 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 the pickup found from specific_availability
            "extras": ArrayOf(String) // id of the extras found from specific_availability
        },
        "merchantReference": String, // must be the same as the one retrieved from specific availability
        "providerContractID": String
}
                                                

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, // Mr or Mrs
                "age" : Number

            }),
            "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": String,
            "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,
                "age" : Number
            }),
        },
        "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
    },
}
                                                    

Transfers Intro

Use our API to access, retrieve and manage information about transfers 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 retrieve available transfers of a specific route

2. Endpoint

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

3. Request Body



{
    *"username": String,
    *"password": String,
    *"start_date": String, // date and time in the following format YYYY-MM-DD|HH:mm
    *"end_date": String, // date and time in the following format YYYY-MM-DD|HH:mm
    *"from_destination": String, // Download our destination codes from the codes section in this current page
    *"to_destination": String, // Download our destination codes from the codes section in this current page
    *"oneway": Boolean, // one way transfer or round trip
    *"adults": Number,
    *"childrenAges": ArrayOf(Number)
}

                                        

4. Response Body

{
    {
    "status": Enum('success','failure'),
    "propertyType": "TRANSFER",
    "results": [
        {
            "provider" : {
                "id" : String,
                "name" : String,
                "type" : String
            },
            "code": String, // id of the transfer
            "vehicle": {
                "id": String, // id of the vehicle
                "quantity": Number, // number of transfer vehicles to hire
                "type": String, // type of vehicle
            },
            "price": Number, // price of transfer 
            "departure": {
                "date": String, // date in format YYYY-MM-DD
                "time": String, // time in format HH:mm
                "location": {
                    "name": String, // location name
                    "type": String, // location type
                    "id": String // location id
                }
            },
            "arrival": {
                "location": {
                    "name": String, // location name
                    "type": String, // location type
                    "id": String // location id
                }
            },
            "oneway": Boolean,
            "photo": String, // image url
            "tripInfo": {
                "distance": String,
                "time": String,
                "max_lag": String,
                "type": String
            },
            "criticalComments": ArrayOf(Object)
        }
    ]
}
}
                                                

Specific Availability

1. Description

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

2. Endpoint

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

3. Request Body


{
    *"username": String,
    *"password": String,
    *"start_date": String, // date and time in the following format YYYY-MM-DD|HH:mm
    *"end_date": String, // date and time in the following format YYYY-MM-DD|HH:mm
    *"from_destination": String, // destination code as received in the availability response departure.location.id
    *"to_destination": String, // destination code as received in the availability response arrival.location.id
    *"oneway": Boolean, // as returned in availability response
    *"adults": Number,
    *"childrenAges": ArrayOf(Number),
    *"transferID": String, // id of the transfer as returned in availability response
    *"vehicleID": "String, // id of the vehicle as returned in availability response
    *"providerContractID": Number // provider.id as returned in availability response
}
      
                                            

4. Response Body


{
    "status": Enum('success','failure'),
    "merchantReference": String, 
    "optionBooking": Boolean, // if true, the reservation status will be 'option'. This booking will be automatically cancelled if not confirmed.
    "clientDetails": Boolean, // passenger details are required
    "transfer": {
        "provider": {
            "id": "String,
            "type": String
            "name": String
        },
        "code": String, // id of the transfer
        "vehicle": {
            "id": String, // id of the vehicle
            "quantity": Number, // number of transfer vehicles to hire
            "type": String, // type of vehicle
            "seats": String, // number of available seats
        },
        "price": Number, // price of transfer
        "extras": ArrayOf(
            {
                "title": String,
                "description": String,
                "onlyForChildren": Boolean,
                "price": Number
            }
        ),
        "departure": {
            "date": String, // date in format YYYY-MM-DD
            "time": String, // time in format HH:mm
            "location": {
                "from": {
                    "name": String, // location name
                    "type": String, // location type
                    "id": String // location id
                },
                "to": {
                    "name": String, // location name
                    "type": String, // location type
                    "id": String // location id
                }
            },
            "requiresTransferInfo": Boolean,
            "hasFlight": Boolean,
            "requiredTransferInfo": { // required information in case of airport, port or train station pick-up/drop-off location  
                "departure": {
                    "flightNumber": Boolean,
                    "vesselName": Boolean,
                    "trainCompany": Boolean,
                    "trainNumber": Boolean
                },
                "arrival": {
                    "flightNumber": Boolean,
                    "vesselName": Boolean,
                    "trainCompany": Boolean,
                    "trainNumber": Boolean
                }
            }
        },
        "oneway": Boolean, // one way transfer or round trip
        "photo": String, // image url
        "tripInfo": {
            "distance": String,
            "time": String,
            "max_lag": String,
            "type": String,
            "comment": String
        },
        "criticalComments": ArrayOf(Object),
        "requiresSpecificPickup": {
            "from": Boolean, // specific pickup is required
            "to": Boolean // specific pickup is required
        },
        "cancelationPolicies": ArrayOf({
            "deadline": Date,
            "amount": Number,
            "description": String
        })
    }
}

                                            

Final Price

1. Description

Use this endpoint in order to get the final price for a specific transfer

2. Endpoint

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

3. Request Body


{
    *"username": String,
    *"password": String,
    *"start_date": String, // date and time in the following format YYYY-MM-DD|HH:mm
    *"end_date": String, // date and time in the following format YYYY-MM-DD|HH:mm
    *"from_destination": String, // destination code as received in the availability response departure.location.id
    *"to_destination": String, // destination code as received in the availability response arrival.location.id
    *"oneway": Boolean, // as returned in availability response
    *"adults": 2,
    *"childrenAges": [],
    *"transferID": String, // id of the transfer as returned in availability response
    *"vehicleID": String, // id of the vehicle as returned in availability response
    *"extras": ArrayOf({
        "title": String, // as received from in specific_availability response
        "description": String, // as received from in specific_availability response
        "onlyForChildren": Boolean, // as received from in specific_availability response
        "price": Number // as received from in specific_availability response
    }),
    *"optionBooking": Boolean, // if true, the reservation status will be 'option'. This booking will be automatically cancelled if not confirmed
    *"providerContractID": String, // provider.id as returned in availability response
    *"merchantReference": String // as returned from specific availability call,
}
      
                                            

4. Response Body


{
    "status": Enum('success','failure'),
    "optionDate": Boolean, // shows if this will result in an option booking or not
    "finalPrice": Number,  // transfer's total price
    "cancelationPolicies": ArrayOf({ // cancelation policies
        "deadline": Date,
        "amount": Number,
        "description": String
    })
}

                                            

Book

1. Description

Use this endpoint in order to make the final booking

2. Endpoint

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

3. Request Body


{
    *"username": String,
    *"password": String,
    *"start_date": String, // date and time in the following format YYYY-MM-DD|HH:mm
    *"end_date": String, // date and time in the following format YYYY-MM-DD|HH:mm
    *"optionBooking": Boolean, // if true, the reservation status will be 'option'. This booking will be automatically cancelled if not confirmed
    *"adults": ArrayOf({
        *"firstName": String,
        *"lastName": String,
        *"title": Enum("Mr","Ms","Mrs")
    }),
    *"children": ArrayOf({  //the children that will stay in every room 
        *"firstName": String,
        *"lastName": String,
        *"title": Enum("Mr","Ms","Mrs")
    }),
    *"transfer": {
        *"from_destination": String, // destination code as received in the availability response departure.location.id
        *"to_destination": String, // destination code as received in the availability response arrival.location.id
        *"oneway": Boolean, // as returned in availability response
        *"transferID": String, // id of the transfer as returned in availability response
        *"vehicleID": String, // id of the vehicle as returned in availability response
        *"departure": {
            *"pickup": String, // your custom pick-up location (departure)
            *"dropOff": String // your custom drop-off location (departure)
        },
        *"return": {
            *"pickup": String, // your custom pick-up location (return) - this is for two way transfers
            *"dropOff": String // your custom drop-off location (return) - this is for two way transfers
        },
        *"extras": [{
            "title": String, // as received from in specific_availability response
            "description": String, // as received from in specific_availability response
            "onlyForChildren": Boolean, // as received from in specific_availability response
            "price": Number // as received from in specific_availability response
        }]
    },
    *"leadCustomer": {
        *"firstName": String,
        *"lastName": String,
        *"address": String,
        *"city": String,
        *"postalCode": String,
        *"country": {
            *"code": String, // isocode
            *"name": String
        }
    },
    *"providerContractID": String, // provider.id as returned in availability response
    *"merchantReference": String // must be the same as the one retrieved from specific availability
}
      
                                            

4. Response Body


{
    "status": "success",
    "results": {
        "provider": {
            "name": String,
            "code": String
        },
        "supplier": {
            "name": String,
            "code": String
        },
        "status": Enum('CONFIRMED', 'ON_REQUEST', 'REJECTED', 'CANCELED'),
        "leadCustomer": {
            "address": String,
            "city": String,
            "country": {
                "code": String, // isocode
                "name": String
            },
            "firstName": String,
            "lastName": String,
            "postalCode": String
        },
        "price": Number, // total booking price
        "transfer": {
            "provider": {
                "id": String,
                "name": String,
                "type": String
            },
            "price": Number, // transfer price
            "vehicle": {
                "id": String,
                "quantity": Number,
                "type": String,
                "seats": String,
            },
            "departure": {
                "date": String, // date in format YYYY-MM-DD
                "hour": String, // time in format HH:mm
                "location": {
                    "from": {
                        "name": String, // location name
                        "type": String, // location type
                        "id": String // location id
                    },
                    "to": {
                        "name": String, // location name
                        "type": String, // location type
                        "id": String // location id
                    }
                },
                "pickup": String, // specific pick-up location
                "dropOff": String, // specific drop-off location
                "vehicle": {
                    "id": String,
                    "quantity": Number,
                    "type": String,
                    "seats": String
                },
            },
            "description": String, // description title of the transfer
            "passengers": {
                "adults": ArrayOf({
                    "firstName" : String,
                    "lastName" : String,
                    "title" : Enum("Mr","Ms","Mrs"),
                    "index": Number
                }),
                "children": ArrayOf({
                    "firstName" : String,
                    "lastName" : String,
                    "title": Enum("Mr","Ms","Mrs"),
                    "age": Number,
                    "index": Number
                }),
            },
            "extras": ArrayOf({
                "title": String, // as received from in specific_availability response
                "description": String, // as received from in specific_availability response
                "onlyForChildren": Boolean, // as received from in specific_availability response
                "price": Number // as received from in specific_availability response
            }),
        },
        "cancelationPolicies": ArrayOf({
            "deadline": Date,
            "amount": Number,
            "description": String
        }),
        "remarks": {
            "clientRemarks": String,
            "providerRemarks": ArrayOf(String),
        },
        "id": String // reservation's unique id
    }
}