curl --request GET \
--url https://api.example.com/organizations/{organizationId}/coupons \
--header 'Authorization: <authorization>'{
"data": [
{
"couponUsageId": "019525fe-6d58-7ed8-d0fc-8a0b2c4e6f8c",
"couponId": "019525fd-d3a4-7baf-a7c3-9d1e3f5b7c9f",
"organizationId": "019525fd-4c38-7e30-a5c1-b6e3f4d8a9c2",
"appliedBy": "019525fd-56a8-7db4-8c3e-2a1b4d6f8e0c",
"discountAmount": 500,
"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 cupom da organizacao com paginacao baseada em paginas.
curl --request GET \
--url https://api.example.com/organizations/{organizationId}/coupons \
--header 'Authorization: <authorization>'{
"data": [
{
"couponUsageId": "019525fe-6d58-7ed8-d0fc-8a0b2c4e6f8c",
"couponId": "019525fd-d3a4-7baf-a7c3-9d1e3f5b7c9f",
"organizationId": "019525fd-4c38-7e30-a5c1-b6e3f4d8a9c2",
"appliedBy": "019525fd-56a8-7db4-8c3e-2a1b4d6f8e0c",
"discountAmount": 500,
"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/coupons?page=1&limit=20" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
coupon:read.{
"data": [
{
"couponUsageId": "019525fe-6d58-7ed8-d0fc-8a0b2c4e6f8c",
"couponId": "019525fd-d3a4-7baf-a7c3-9d1e3f5b7c9f",
"organizationId": "019525fd-4c38-7e30-a5c1-b6e3f4d8a9c2",
"appliedBy": "019525fd-56a8-7db4-8c3e-2a1b4d6f8e0c",
"discountAmount": 500,
"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 |