How to get a signature for hotels search API
The query in the hotels search API shall be as follows:
With the following query parameters:
- iata=HKT;
- checkIn=2020-12-10;
- checkOut=2020-12-13;
- adultsCount=2;
- customerIP=77.111.247.75;
- childAge1 = 10;
- childrenCount=1;
- lang=ru;
- currency=USD;
- waitForResult=0.
Let’s sort them alphabetically:
- adultsCount=2;
- checkIn=2020-12-10;
- checkOut=2020-12-13;
- childAge1=10;
- childrenCount=1;
- currency=USD;
- customerIP=77.111.247.75;
- iata=HKT;
- lang=ru;
- waitForResult=0.
Next, fix the values of the assorted parameters using colons and add the affiliate security token and marker (they can be found in each affiliate’s personal dashboard) before them:
WriteHereYourToken:WriteHereYourMarker:2:2020-12-10:2020-12-13:10:1:USD:77.111.247.75:HKT:ru:0
This string is used for signature creation. As a result, we have the following: 9961b6ecb56d45935667141b79cfbc28.
Attention! Signature is case-sensitive.
To create a query, take the query parameters, add the affiliate’s security token and marker, and fix using & into the search string: