The Booking API (BookRQ) requires multiple calls to return the same result, and bookings with the same Fliggy order number must not be created repeatedly.
Both synchronous and asynchronous booking methods are supported. For asynchronous processing, BookRQ should return a success message but not the external order number.
The Query API (QueryStatusRQ) must support querying Fliggy order numbers.
Both the Booking and Query APIs must strictly adhere to the API’s agreed-upon data format.
No results within the time limit will be treated as a failure, and an alert will be issued. Manual intervention is required to prevent room hogging.
1.Merchants should provide the following information to Fliggy:
A unified API service address for receiving Fliggy requests
Username and password for verification
The account used to register with Fliggy and the merchant’s name.
This information can be provided to relevant business colleagues or sent to the following email addresses: gushaoshuai.gss@alibaba-inc.com, xiyun.hx@alibaba-inc.com
2.Merchants distinguish business request types based on the XML parent node in the request parameters, and develop systems to receive and return corresponding data according to the documentation requirements.
3.Example code for receiving requests and returning data (in Java):
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
//Request get XML Data
BufferedReader br = new BufferedReader(new InputStreamReader(request.getInputStream(),"UTF-8"));
StringBuilder sb = new StringBuilder();
String line = null;
while ((line = br.readLine()) != null)
{
sb.append(line);
}
String postXMLData = sb.toString();
Element root = XmlUtils.loadXMLRootElementByXMLString(postXMLData, "UTF-8");
//TODO: Process RQ data and return XML results.
String result = dealData(root);
//Return processing result
response.setCharacterEncoding("UTF-8");
response.getWriter().write(result);
}