Notes for Developers for Operator Booking Agent API
Prepare Testing Environment
Before you test your integration, you need to provide us all price types that your integration supports. These price types will be selected and mapped with the price types of the suppliers / operators. We will supply you the Username and Password for you to test the integration.
The query parameter is case sensitive. For example, 'ProductList' can not set to 'product' or 'Productlist'.
End Point:
Test URL: https://api.esytravel.net/api/api/agentapi
Production URL: https://api.esytravel.com/api/api/agentapi
Authorization:
HTTP Basic Auth
Username and password are required and will be provided for each agent integrator. They are the same and shall be used in each API query.
Operator/Supplier:
Each operator/supplier has an operator ID. It is required in most of the API queries.
Documentation URL:
Swagger URL: https://api.esytravel.net/api/agentdoc/redoc.php
Sample codes URL: https://api.esytravel.net/api/agentdoc/index.html
Documentation for API Requests
Documentation for each API request type are described on this page.
At the above selection box of "API Request Type", select one choice and see its API request and response details.
You can check out the Swagger page by clicking on 'Swagger' on the top of this page. The page will show you all query parameters and response parameters.
You can see sample codes by clicking on 'Sample Codes' on the same page.
Typical Processes are as the follows:
Fetch product details:
Request Product Details - Single ( GET /api/agentapi/Product ): Returns single product details. Succeed: error_code = 710 (Request Succeed) and response_code = 200 (Request Succeed).
Request Product List with Details ( GET /api/agentapi/ProductList ): Returns all products with details. Succeed: error_code = 710 (Request Succeed) and response_code = 200 (Request Succeed).
Fetch departure schedules and availability:
Request Availability ( POST /api/agentapi/Availability ): Returns whether a trip on selected date time with selected prices and price units is available to book. Succeed: error_code = 710 (Request Succeed) and response_code = 200 (Request Succeed).
Request Timetable ( GET /api/agentapi/Timetable ): Returns all trip schedule date time within 1 to 31 days from a selected date. Succeed: error_code = 710 (Request Succeed) and response_code = 200 (Request Succeed).
Fetch prices and price schedules:
Request prices and price schedules ( GET /api/agentapi/Prices ): Returns either all available prices regardless date (if no date is specified) or all available prices on selected dates only. Succeed: error_code = 710 (Request Succeed) and response_code = 200 (Request Succeed).
New Booking
Request Hold a Booking ( POST /api/agentapi/HoldBooking ): Request to make an unconfirmed (pending) booking in order to preserve places. Succeed: error_code = 710 (Request Succeed) and response_code = 200 (Request Succeed).
Request Confirm Booking ( GET /api/agentapi/ConfirmBooking ): Request to confirm an unconfirmed (pending) booking and change it to an active booking. Succeed: error_code = 710 (Request Succeed) and response_code = 200 (Request Succeed).
Cancel Booking
Request Cancel Booking ( GET /api/agentapi/CancelBooking ): Request to cancel a confirmed or unconfirmed booking. Succeed: error_code = 710 (Request Succeed) and response_code = 200 (Request Succeed).
Edit Booking
Request Edit Booking ( POST /api/agentapi/EditBooking ): Make changes to a confirmed or unconfirmed booking. If the booking is a confirmed booking, it is subject to the Change and Cancellation Deadline condition set by the operator. Succeed: error_code = 710 (Request Succeed) and response_code = 200 (Request Succeed)..
It is recommended to check the place availability first.
Booking Status
Request Booking Status ( GET /api/agentapi/BookingStatus): Request booking status and booking details for one single booking or all bookings within selected date ranges (by scheduled trip date and or booking created date). Succeed: error_code = 710 (Request Succeed) and response_code = 200 (Request Succeed).