curl --request GET \
--url https://api.example.com/organizations/{organizationId}/vouchers/{voucherId}/usages \
--header 'Authorization: <authorization>'{
"data": [
{
"voucherUsageId": "019525fe-7e6c-7fe9-e1ad-9b1c3d5f7a9d",
"voucherId": "019525fd-e4b8-7cb0-b8d4-0e2f4a6c8d0a",
"organizationId": "019525fd-4c38-7e30-a5c1-b6e3f4d8a9c2",
"discountAmount": 2500,
"externalRef": "di_stripe_abc",
"createdAt": "2026-03-01T00:00:00.000Z",
"updatedAt": "2026-03-01T00:00:00.000Z"
}
],
"meta": {
"page": 1,
"limit": 10,
"totalItems": 1,
"totalPages": 1
}
}
Obter todos os registros de uso de um voucher especifico com paginacao baseada em paginas.
curl --request GET \
--url https://api.example.com/organizations/{organizationId}/vouchers/{voucherId}/usages \
--header 'Authorization: <authorization>'{
"data": [
{
"voucherUsageId": "019525fe-7e6c-7fe9-e1ad-9b1c3d5f7a9d",
"voucherId": "019525fd-e4b8-7cb0-b8d4-0e2f4a6c8d0a",
"organizationId": "019525fd-4c38-7e30-a5c1-b6e3f4d8a9c2",
"discountAmount": 2500,
"externalRef": "di_stripe_abc",
"createdAt": "2026-03-01T00:00:00.000Z",
"updatedAt": "2026-03-01T00:00:00.000Z"
}
],
"meta": {
"page": 1,
"limit": 10,
"totalItems": 1,
"totalPages": 1
}
}
curl "https://api.awsales.io/studio/organizations/ORG_ID/vouchers/VOUCHER_ID/usages?page=1&limit=20" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
voucher:read.{
"data": [
{
"voucherUsageId": "019525fe-7e6c-7fe9-e1ad-9b1c3d5f7a9d",
"voucherId": "019525fd-e4b8-7cb0-b8d4-0e2f4a6c8d0a",
"organizationId": "019525fd-4c38-7e30-a5c1-b6e3f4d8a9c2",
"discountAmount": 2500,
"externalRef": "di_stripe_abc",
"createdAt": "2026-03-01T00:00:00.000Z",
"updatedAt": "2026-03-01T00:00:00.000Z"
}
],
"meta": {
"page": 1,
"limit": 10,
"totalItems": 1,
"totalPages": 1
}
}
| Status | Codigo | Descricao |
|---|---|---|
400 | validation_error | Entrada invalida ou campos obrigatorios ausentes |
401 | unauthorized | Autenticacao ausente ou invalida |
403 | forbidden | Permissoes insuficientes |
404 | organization.not_found | Organizacao nao encontrada |
500 | internal_server_error | Ocorreu um erro inesperado |