Authentication & workflow
This document describes how to use APIs when accessing CYBERESA Web Services.
It explains the level of security implemented in order to use the APIs. This document describes also each API, its structure for request and response, which parameters are mandatory and optional and error management.
Authentication & security
- Credentials: login and password are sent by the user through HTTPS requests.
- The caller IP must be allowed to access the API.
Call WebServiceRQ to get responses in XML format, or WebServiceJsonRQ to get responses in JSON format.
localhost) below with the endpoint URL given by your XML partner.HTTP GET
The following is a sample HTTP GET request and response. The placeholders shown need to be replaced with actual values.
Request
GET /cr.ws/Hotel.asmx/WebServiceRQ?strRQ=string
Host: localhostExample
endpoint_url/WebServiceRQ?strRQ=your_api_call_envelopeyour_website_url/cr.ws.xml/hotel.asmx/WebServiceRQ?strRQ=<HotelSearchREQ><Credential><Login>login_credential</Login><Password>password_credential</Password></Credential><SearchDetails><BookingDetails><User>user_id</User><Language>1</Language><FromDate>28/12/2021</FromDate><ToDate>29/12/2021</ToDate><IdCity>104</IdCity><Rooms><Room><Pax><Adult>2</Adult><Child>0</Child></Pax><Boarding></Boarding></Room></Rooms></BookingDetails><Filters><PriceBreakDown>False</PriceBreakDown><Sort><By>8</By></Sort></Filters></SearchDetails></HotelSearchREQ>Response
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?xml version="1.0"?>
<xml>...</xml>HTTP POST
The following is a sample HTTP POST request and response. The placeholders shown need to be replaced with actual values.
Request
POST /cr.ws/Hotel.asmx/WebServiceRQ HTTP/1.1
Host: localhost
Content-Type: application/x-www-form-urlencoded
Content-Length: length
strRQ=stringResponse
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?xml version="1.0"?>
<xml>...</xml>Workflow
Typical call sequence of a booking: search, quote, then create the booking (and acknowledge it when it is “On Request”), with optional cancellation.
