Site Tools

Hotfix release available: 2018-04-22b "Greebo". upgrade now! [50.2] (what's this?)

Avia Booking API v1.0 Manual

To use an API, you have to get an API key from the back office system ( and set a domain origin that call an API.

API Authentication

In version 1.0 API make authentication via API’s key and domain origin.

API Request Method

API can use both POST and GET method, then it can pass parameter from or JQuery.get() or Web form.

API output format

API will output a data in JSON format as shown below:

The sample output from GET_PROVINCE_LIST method, to make the JSON data readable in the browser use a Chrome extension called JSONView

Then you can reproduce an output from JSON data to be a web form or show in data table. A code can write in PHP Curl or JQuery Ajax.

Method Definition


get a province list to do a select box for source and destination. parameter: {key}&{method}


after select source or destination province, use this method to get a list of station for source | destination parameter: {key}&{method}&{provinceID}&{type} {type} = source | destination


get a list of trip schedule when we know a source | destination station and date parameter: {key}&{method}&{from}&{to}&{date} {from} | {to} = source | destination station ID {date} format in Y-m-d such as 2018-03-29


when user completed a booking data this method will be use to put a booking data back to datacenter parameter: {key}&{method}&{serviceID}&{passengerName}&{telNo}& {passportNo}&{amoutOfSeat}

{serviceID} = user selected, {passportNo} is optional {amoutOfSeat} = total number of seat that booking * this method will output a booking number to use for reference


you can get a booking data via use of booking number to produce a ticket or QR code or send to an user email parameter: {key}&{method}&{bookingNo}

Example code by PHP Curl

Code with get_province_list method:

To work with other method you can modify a code in line 19 with new method and it’s parameter.

get_station method:

get_time_table method:

put_booking method: * Note that we will use 1 passenger data for all seats in same booking. If you need passenger data separate to each seat you must put in difference booking number

get_booking method:

API registration requirement please follow the link below

start.txt · Last modified: 2018/11/28 16:04 by