Cupons
Listar Cupons
GET
/v1/couponsBase URL Produção:
https://api.validapay.com.brBase URL Sandbox:
https://sandbox.validapay.com.brAutenticação
bearerAuthorizationstring · header · obrigatório
Envie no header:
Authorization: Bearer {{token}}Lista todos os cupons cadastrados com informações de uso e validade.
Listar cupons
Scopes: coupons/read
const url = 'https://sandbox.validapay.com.br/v1/coupons?limit=15&lastKey=&status=&search=';
const options = {
method: 'GET',
headers: {
'Authorization': 'Bearer {{token}}'
},
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));Response Examples
200200
{
"items": [
{
"couponId": "cou_xxx",
"code": "PROMO10"
}
],
"pagination": {
"total": 3,
"hasMore": false
}
}