curl -H "api-key: 6f1c2a9e-4b7d-4e0a-9c55-2d8f3b1a7e10" \
-H "Content-Type: application/json" \
-d '{"action":"confirmVoucher","serieNumber":"0012345678","voucherId":987654}' \
https://apitest.tunimobile.com/v1/voucher/do_action
{
"status": "success",
"code": 200,
"message": "OK",
"data": ["confirmed"]
}
Vouchers
Confirm a printed voucher
Mark a voucher as confirmed once the ticket is printed.
curl -H "api-key: 6f1c2a9e-4b7d-4e0a-9c55-2d8f3b1a7e10" \
-H "Content-Type: application/json" \
-d '{"action":"confirmVoucher","serieNumber":"0012345678","voucherId":987654}' \
https://apitest.tunimobile.com/v1/voucher/do_action
{
"status": "success",
"code": 200,
"message": "OK",
"data": ["confirmed"]
}
Call it once the printer confirms the ticket was printed. The voucher goes from
printed to confirmed.
Headers
string
required
API key of the terminal that printed the voucher.
Body
string
required
confirmVoucherstring
required
serieNumber returned by printVoucher.integer
id returned by printVoucher. Accepted, but the lookup uses serieNumber.Response
data is ["confirmed"].
Errors
| HTTP | error.details | Meaning |
|---|---|---|
400 | apiKey not found | api-key header missing |
400 | Terminal not found | Unknown API key, or the voucher was printed by another terminal |
404 | Voucher not found | No voucher in printed status with this serial number (already confirmed, or wrong number) |
curl -H "api-key: 6f1c2a9e-4b7d-4e0a-9c55-2d8f3b1a7e10" \
-H "Content-Type: application/json" \
-d '{"action":"confirmVoucher","serieNumber":"0012345678","voucherId":987654}' \
https://apitest.tunimobile.com/v1/voucher/do_action
{
"status": "success",
"code": 200,
"message": "OK",
"data": ["confirmed"]
}