Travelotopos Ltd is the most innovative software solution provider in tourism.
Our goal is to transform small businesses, that provide tourist services, in modern, digital companies which can stand out and compete with large companies in the industry. This can be achieved with a personalized approach.

API

travelotopos / API

DOCUMENTATION OF API

API methods are called according to the following format: https://api-company.travelotopos.com/{category}/{method_endpoint}

Demo: https://api-company.travelotopos.com/demo/run
Attention: Random reservations inserted.

At header you have to include the apikey (given from us) and the language.
Accept Language: English

All the methods support json output format.

Functions

Service Categories

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

Services

Description:
Function services returns all services.

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

No fields needed in function services.

Service

Description:
Function service returns a specific service.

Function:
services
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.

Gallery

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

Events

Description:
Function events returns 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, 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.

 

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

 

Fields for function events:

Field                 Type         Required     Example
service_id      Integer          YES               15

Event

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

Eventdetails

Description:
Function eventdetails returns 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

Eventdetail

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

Event Pricegroups

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

Add Reservation

Description:
Function add_reservation returns the reservation id.

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

Add Reservationdetails

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.

Checkout

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

Complete

Description:
Function complete returns the reservation_code.

Function:
complete 
Parameters:
reservation_id, paymenttype_alias
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

Complete With Local Credit

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.

Send Emails On Complete

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

Cancel Reservation

Description:
Function cancelReservation is used to cancel an existing reservation and send cancellation email to 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’

Deprecate Reservation (force expiration)

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 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’