Each application (such as for example, your website, mobile application, or POS-terminal) must be authorized before it can be run. A standard two-level algorithm is used for authentication. To obtain authorization data (an authorization token), it is necessary to make a GET request to SailPlay. This request is used to transmit authorization data.
Parameter required? |
Parameter name |
Parameter description |
yes |
pin_code |
PIN code of your application or the seller. You can find out about the PIN code of your application after you select a platform here |
yes |
store_department_key |
Unique key for your application. You can find out about it after you select a platform here |
yes |
store_department_id |
Unique ID of your application. You can find out about it after you select a platform here |
Parameter |
Parameter description |
status |
Response status |
token |
Unique hash that you must use to sign all subsequent API requests (i.e., you will specify the store_department_id and token in all subsequent requests) |
pin_codes |
Array of all available PIN-codes in this department |
http://sailplay.net/api/v1/login/?store_department_key=28653950&store_department_id=1&pin_code=1523
In case of success:
{
"status":"ok",
"token":"b301f9928dda6499a74755491767208f3b156867",
"pin_codes":[
"1523",
"3880",
"8837"
]
}
In case of failure:
{
"status":"error",
"message":"Data not found with provided store_department_key, store_department_id and pin_code"
}
In case if all parameters aren't passed (for ex not passed pin_code):
{
"status":"error",
"message":"Provide store_department_key, store_department_id and pin_code"
}