Skip to main content
GET
/
api
/
v1
/
coupons
Listar cupons
curl --request GET \
  --url https://upay-sistema-api.onrender.com/api/v1/coupons \
  --header 'X-API-Key: <api-key>'
{
  "message": "<string>",
  "coupons": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "code": "<string>",
      "discountType": "PERCENTAGE",
      "discountValue": 123,
      "description": "<string>",
      "minPurchaseCents": 123,
      "maxDiscountCents": 123,
      "usageLimit": 123,
      "perUserLimit": 123,
      "validFrom": "2023-11-07T05:31:56Z",
      "validUntil": "2023-11-07T05:31:56Z",
      "status": "<string>",
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z"
    }
  ],
  "pagination": {
    "page": 123,
    "limit": 123,
    "total": 123,
    "totalPages": 123
  }
}

Authorizations

X-API-Key
string
header
required

Chave de API obtida através do endpoint /api/credentials. Também aceita formato Bearer Token: Authorization: Bearer <api_key>

Query Parameters

page
integer
default:1

Número da página

Required range: x >= 1
limit
integer
default:20

Número de itens por página

Required range: 1 <= x <= 100
includeInactive
boolean
default:false

Incluir cupons inativos

Response

Lista de cupons

message
string
coupons
object[]
pagination
object