How to get signature

How to get signature

Let our query be as follows:

http://engine.hotellook.com/api/v2/search/start.json?iata=HKT&checkIn=2015-12-10&checkOut=2015-12-13&adultsCount=2&customerIP=192.168.1.1&childrenCount=1&lang=ru&currency=USD&timeout=20&waitForResult=0

Then we have the following query parameters:

  • iata=HKT;
  • checkIn=2015-12-10;
  • checkOut=2015-12-13;
  • adultsCount=2;
  • customerIP=192.168.1.1;
  • childrenCount=1;
  • lang=ru;
  • currency=USD;
  • timeout=20;
  • waitForResult=0.

Let’s sort them alphabetically:

  • adultsCount=2;
  • checkIn=2015-12-10;
  • checkOut=2015-12-13;
  • childrenCount=1;
  • currency=USD;
  • customerIP=192.168.1.1;
  • iata=HKT;
  • marker=WriteHereYourMarker;
  • lang=ru;
  • timeout=20;
  • waitForResult=0.

After that, let’s fix the values of the assorted parameters using the colons and add the partner security token and marker (they can be found in each partner’s personal account) before them:

WriteHereYourToken:WriteHereYourMarker:2:2015–12–10:2015–12–13:1:USD:192.168.1.1:HKT:ru:20:0

This string is used for signature creation. As a result, we have the following: 9961b6ecb56d45935667141b79cfbc28.

Now, in order to create a query, it is necessary to take the query parameters, add the partner’s security token and marker to them and fix using & into the search string:

http://engine.hotellook.com/api/v2/search/start.json?iata=HKT&checkIn=2015-12-10&checkOut=2015-12-13&adultsCount=2&customerIP=192.168.1.1&childrenCount=1&lang=ru&currency=USD&timeout=20&waitForResult=0&marker=16886&signature=878c8cdd72222323d925dd8e8a37c6b1

Was this article helpful?

Have more questions? Submit a request