REST API Escapemania Dokumentace
- Login
POST https://escapemania.cz/api/v1/auth/login/
Content-Type: application/json
{
"email": "",
"password": ""
}
2. Get voucher information
GET https://escapemania.cz/api/v1/vouchers/voucher-code/
Authorization: Token [key_obtained_in_login]
Content-Type: application/json
{
"unique_code": “XXXXX-11111"
}
VOUCHER_STATUS_UNUSED = 1 … neuplatněný
VOUCHER_STATUS_USED = 2 ... uplatněný
VOUCHER_STATUS_PAID = 3 … zaplacený
VOUCHER_STATUS_INVOICED = 4 … fakturovaný
- Change voucher status to VOUCHER_STATUS_USED
PATCH https://escapemania.cz/api/v1/vouchers/voucher-code/
Authorization: Token [key_obtained_in_login]
Content-Type: application/json
{
"unique_code": "9G2NE47E",
"voucher_status": 2
}