How to create a signature (md-5)

Sort the request parameters alphabetically:

host=beta.aviasales.ru&locale=ru&marker=PutYourMarkerHere&adults=1&children=0&infants=0&date=2015-05-25&destination=LED&origin=MOW&date=2015-06-18&destination=MOW&origin=LED&trip_class=Y&user_ip=127.0.0.1

If the element contains an array (e.g., segments) or a list of parameters (e.g., passengers), the content of this element is sorted separately.

This content is not sorted with parameters of the upper level. An example of sorting the query: 

Assemble a string containing only the values ​​of the parameters (ranking is the same as in step 1): 1): beta.aviasales.ru:ru:PutYourMarkerHere:1:0:0:2015-05-25:LED:MOW:2015-06-18:MOW:LED:Y:127.0.0.1. The values ​​are separated by a colon.

Add to the beginning of this string value of your partner token:

PutYourTokenHere:beta.aviasales.ru:ru:PutYourMarkerHere:1:0:0:2015-05-25:LED:MOW:2015-06-18:MOW:LED:Y:127.0.0.1
 

Use the resulting string to calculate the md-5 signature. The result is the signature of our request.

Was this article helpful?

Have more questions? Submit a request