API Documentation

API methods are called according to the following URLs.

Every time you’re making a request you have to include the API key (given by us) and the language, in the request’s Header.
Accepted language: English

All the methods support json output format.

Functions

Description:
Function pcategories returns the available service categories.

Function: pcategories
Parameters: None
Url: https://api-company.travelotopos.com/general/pcategories

No fields needed in function pcategories.

Description:
Function services return all services.

Function: services
Parameters: None
Url: https://api-company.travelotopos.com/services/services

No fields are needed in function services.

Description:
Function service returns a specific service.

Function: service
Parameters: service_id, service_globalAlias
Url: https://api-company.travelotopos.com/services/service

Fields for function service:

Field                           Type        Required     Example
service_id                   Integer    NO              15
service_globalAlias    String      NO              15

*Either service_id or service_globalAlias is required. If both exist, service_globalAlias take priority.

Description:
Function gallery returns the photos of the service.

Function: gallery
Parameters: service_id
Url: https://api-company.travelotopos.com/services/gallery

Fields for function gallery:

Field            Type        Required     Example
service_id    Integer    YES            15

Description:
Function events return all events.

Function: events
Parameters: service_id

Note: After patch 20170712, the role of the output parameter event_daysbefore is either Days or Hours. To evaluate correctly, the use of output parameter event_daysbeforeType should be considered.
event_daysbeforeType : 1 = event_daysbefore is calculated as Days
event_daysbeforeType : 2 = event_daysbefore is calculated as Hours
By default all events are calculated as Days, so the system retains the same functionality if this feature is not used.

Url: https://api-company.travelotopos.com/events/events

Fields for function events:

Field            Type       Required    Example
service_id    Integer    YES           15

Description:
Function batchAvailability returns a specific’s event availability for a batch of selected dates.

Function: batchAvailability
Parameters: event_id, service_id, fromDateTime, toDateTime

Url: https://api-company.travelotopos.com/events/batchAvailability

Fields for function events:

Field                  Type       Required    Example
service_id          Integer   YES            15
event_id             Integer  YES             22
fromDateTime    Date      YES            2019-11-01
toDateTime        Date      YES            2019-11-30

Description:
Function event returns a specific service.

Function: event
Parameters: event_id, service_id
Url: https://api-company.travelotopos.com/events/event

NOTE :
After patch 20170712, the role of the output parameter event_daysbefore is either Days or Hours. To evaluate correctly, use of output parameter event_daysbeforeType should be considered.
event_daysbeforeType : 1 = event_daysbefore is calculated as Days
event_daysbeforeType : 2 = event_daysbefore is calculated as Hours
By default all events are calculated as Days, so system retains same functionality if this feature is not used.


Fields for function event:

Field              Type         Required     Example
event_id         Integer     YES            27
service_id      Integer     YES            15

Description:
Function eventdetails return details of an event.

Function: eventdetails
Parameters: event_id, service_id, date
Url: https://api-company.travelotopos.com/events/eventdetails

Fields for function eventdetails:

Field               Type         Required     Example
event_id         Integer      YES            27
service_id      Integer      YES            15
date               Date          NO              2016-10-31

Description:
Function eventdetail returns details of a specific event.

Function: eventdetail
Parameters: eventdetail_id, service_id
Url: https://api-company.travelotopos.com/events/eventdetail

Fields for function eventdetail:

Field                   Type        Required     Example
eventdetail_id     Integer    YES             50
service_id           Integer    YES             15

Description:
Function event_pricegroups returns details of pricegroup.

Function: event_pricegroups
Parameters: event_id, eventdetail_id, service_id
Url: https://api-company.travelotopos.com/events/event_pricegroups

Fields for function event_pricegroups:

Field                   Type        Required     Example
event_id             Integer     YES            27
eventdetail_id    Integer     YES            50
service_id          Integer     YES            15


A note on pricing:

Some products support volume pricing, which means that their prices vary based on the amount booked. When a product supports volume pricing, the response JSON will contain a “volume_pricing” field. In such cases, the “volume_pricing” field should be used to determine pricing instead of the “price” field.

Description:
Function add_reservation returns the reservation id.

Function: add_reservation 
Parameters: None
Url: https://api-company.travelotopos.com/reservations/add_reservation 

Description:
Function add_reservationdetails returns the reservation_code.

Function: add_reservationdetails
Parameters: reservation_id, digest, service_id, event_id, eventdetail_id, encoded_pricegroup_ids, specialcode_code, contact_data
Url: https://api-company.travelotopos.com/reservations/add_reservationdetails

Fields for function add_reservationdetails:

Field                                    Type          Required     Example
reservation_id                     Integer       YES            20
digest                                  Varchar      YES            base64_encode(sha1($reservation_id.$reservation_code.$reservation_secret, true))
service_id                            Integer      YES            15
event_id                              Integer      YES             27
eventdetail_id                     Integer      YES             50
encoded_pricegroup_ids    Json         YES             Json_endoce($selected_pricegroups)
specialcode_code              Varchar     NO              2AE061D6-B1BF-91F4-2CFE-46DA6B611A88
contact_data                      Json          YES            Json_encode($contact_data)


Note:

Selected_pricegroups includes all the ids of selected pricegroups.
Contact_data includes the fields: name(surname, name), email, phone, comments. The field name and email are required.

Description:
Function updateBillingDetails is used to add or update billing or invoice information of a reservation.
Returns error or success upon completion.

Function: updateBillingDetails
Parameters: reservation_id, country_name, billing_firstname, billing_surname, billing_address, billing_city, billing_postcode, billing_state, billing_company, billing_profession, billing_vat, billing_tax

Url: https://api-company.travelotopos.com/reservations/updateBillingDetails

Fields for function updateBillingDetails:

Field                            Type         Required     Example
reservation_id             INT           YES             123
country_name             Varchar    NO               Greece
billing_firstname          Varchar    YES             John
billing_surname           Varchar    YES             Doe
billing_address            Varchar    YES             Aggelou Metaxa 15
billing_city                   Varchar    YES             Glyfada
billing_postcode          Varchar    YES             16232
billing_state                 Varchar    YES             Attiki
billing_company          Varchar    NO               Travelotopos
billing_profession        Varchar    NO               Software House
billing_vat                    Varchar    NO               123456789
billing_tax                    Varchar    NO               DOY Glyfadas

Description:
Function checkout returns checkout data.

Function: checkout
Parameters: reservation_id
Url: https://api-company.travelotopos.com/reservations/checkout

Fields for function checkout:

Field                    Type        Required     Example
reservation_id     Integer     YES            20

Description:
Function complete returns the reservation_code.

Function: complete 
Parameters: reservation_id, paymenttype_alias, channelReservationCode, channelAmount, channelExtraInfo
Url: https://api-company.travelotopos.com/reservations/complete

Fields for function checkout:

Field                                       Type         Required     Example
reservation_id                        Integer      YES            20
paymenttype_alias                Varchar      NO             PayPal
channelReservationCode     Varchar      NO             REF.123123123
channelAmount                     Decimal     NO             80.99
channelExtraInfo                   Varchar      NO             Will be staying at the Hotel Athens, please arrange pickup.

Description:
Function complete_with_local_credit returns the reservation_code.

Function: complete_with_local_credit 
Parameters: reservation_id, credit
Url: https://api-company.travelotopos.com/reservations/complete_with_local_credit 

Fields for function complete_with_local_credit :

Field                    Type       Required    Example
reservation_id     Integer    YES           20
credit                   Json       YES           Json_endoce($cedit)


Note:

Credit includes the fields: cardholder, number, cvv, expiration month, expiration year. The field expiration year needs only the last 2 numbers.

Description:
Function send_emails_on_complete.

Function: send_emails_on_complete
Parameters: reservation_id
Url: https://api-company.travelotopos.com/reservations/send_emails_on_complete

Fields for function send_emails_on_complete:

Field                    Type       Required    Example
reservation_id     Integer    YES           20

Description:
Function cancelReservation is used to cancel an existing reservation and send a cancellation email to the client.
If run twice, it is used as a force email feature to the client (resend cancellation email).

Function: cancelReservation
Parameters: reservation_code
Url: https://api-company.travelotopos.com/reservations/cancelReservation

Fields for function cancelReservation:

Field                       Type        Required     Example
reservation_code   String       YES            ‘R.12345’

Description:
Function deprecateReservation is used to deprecate an existing reservation with status pending.
It is mostly used to expire pending reservations in order to free availability faster than the expiration timer.

Function: deprecateReservation
Parameters: reservation_code
Url: https://api-company.travelotopos.com/reservations/deprecateReservation

Fields for function deprecateReservation:

Field                       Type         Required     Example
reservation_code   String       YES             ‘R.12345’