curl -H "api-key: 6f1c2a9e-4b7d-4e0a-9c55-2d8f3b1a7e10" \
-H "Content-Type: application/json" \
-d '{"action":"confirmReprintVoucher","serieNumber":"0012345678","voucherId":987654}' \
https://apitest.tunimobile.com/v1/voucher/do_action
{
"status": "success",
"code": 200,
"message": "OK",
"data": ["reprinte_success"]
}
Vouchers
Confirm a reprint or duplicate
Mark a voucher as confirmed after a reprint or duplicate was printed.
curl -H "api-key: 6f1c2a9e-4b7d-4e0a-9c55-2d8f3b1a7e10" \
-H "Content-Type: application/json" \
-d '{"action":"confirmReprintVoucher","serieNumber":"0012345678","voucherId":987654}' \
https://apitest.tunimobile.com/v1/voucher/do_action
{
"status": "success",
"code": 200,
"message": "OK",
"data": ["reprinte_success"]
}
Call it after a reprint or a duplicate was printed. The voucher is set to
confirmed.
Only vouchers in printed, bulk_printed or confirmed status are accepted. Any other status returns 400 voucher_not_printed.
Authentication
Either theapi-key of the terminal that printed the voucher, or a login as the owner of that terminal’s shop. See Who can call what.
string
API key of the terminal that printed the voucher. Not needed if you are logged in as the shop owner.
Body
string
required
confirmReprintVoucherinteger
required
Voucher
id.string
Serial number. Accepted, but the lookup uses
voucherId.Response
data is ["reprinte_success"].
Errors
| HTTP | error.details | Meaning |
|---|---|---|
400 | voucher_not_printed | The voucher is not in printed, bulk_printed or confirmed status (for example never printed, or completed) |
403 | access_denied | The caller is neither the terminal that printed the voucher nor logged in as the owner of its shop. Also returned for a voucher that was never printed. |
404 | Voucher not found | Unknown or missing voucherId |
curl -H "api-key: 6f1c2a9e-4b7d-4e0a-9c55-2d8f3b1a7e10" \
-H "Content-Type: application/json" \
-d '{"action":"confirmReprintVoucher","serieNumber":"0012345678","voucherId":987654}' \
https://apitest.tunimobile.com/v1/voucher/do_action
{
"status": "success",
"code": 200,
"message": "OK",
"data": ["reprinte_success"]
}