Coupons - List
Lista cupons com filtros (nome, código, status, etc.) e paginação para campanhas e checkouts.
Lista cupons com filtros (nome, código, status, etc.) e paginação para campanhas e checkouts.
Authorization
SelectKeyAuth API key for all authenticated requests. Send your key in the selectkey header (e.g. sandbox sl_test_…, production sl_live_…).
In: header
Query Parameters
Maximum number of items to return
Number of items to skip
Sort order for results
Sort direction
Created on or after (inclusive)
Created after (exclusive)
Created before (exclusive)
Created on or before (inclusive)
Filter by coupon ID
Search by coupon name
Filter by coupon code
Filter by discount type
Filter by coupon status
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/v1/coupons?limit=20&offset=0&sort=descending&dir=descending&daterangegte=2026-01-01T00%3A00%3A00Z&daterangegt=2026-01-15T10%3A30%3A00Z&daterangelt=2026-01-15T10%3A30%3A00Z&daterangelte=2026-12-31T23%3A59%3A59Z&id=dis_abc123&name=Summer+Sale&code=SUMMER2026&type=flat&status=active"{
"offset": 0,
"limit": 20,
"total": 12,
"page": {
"offset": {
"first": 0,
"prev": null,
"next": null,
"last": 0
},
"current": 1,
"total": 1
},
"data": [
{
"id": "dis_01hqzvabc",
"name": "Black Friday 25%",
"code": "BLACKFRIDAY25",
"type": "percentage",
"value": 25,
"enabled": true,
"initDate": "2026-04-01T00:00:00.000Z",
"endDate": "2026-04-30T23:59:59.000Z",
"updatedAt": "2026-04-12T17:56:33.000Z",
"createdAt": "2026-04-12T17:56:33.000Z"
}
],
"hasMore": false
}{
"error": {
"status": "Bad Request",
"statusCode": 400,
"category": "validation",
"message": "Validation errors occurred",
"details": "One or more parameters are invalid or out of range. Please check the parameters and try again.",
"params": [
{
"payment[currency]": "currency must be one of [BRL]"
},
{
"amount": "amount is required"
}
],
"code": "invalidParameters",
"resource": "client"
}
}{
"error": {
"status": "Unauthorized",
"statusCode": 401,
"category": "authentication",
"message": "Unauthorized",
"details": "Authentication failed. The provided API key is invalid or does not have permission to operate.",
"code": "unauthorized"
}
}{
"error": {
"status": "Forbidden",
"statusCode": 403,
"category": "authorization",
"message": "Forbidden",
"details": "Access denied. This may be due to IP blocks, domain restrictions, or insufficient permissions.",
"code": "forbidden"
}
}{
"error": {
"status": "Not Found",
"statusCode": 404,
"category": "client",
"message": "Not Found",
"details": "The requested resource was not found on the server.",
"code": "notFound"
}
}{
"error": {
"status": "Unprocessable Entity",
"statusCode": 422,
"category": "validation",
"message": "Unprocessable Entity",
"details": "The request was understood, but contains invalid data that could not be processed.",
"code": "unprocessableEntity"
}
}{
"error": {
"status": "Too Many Requests",
"statusCode": 429,
"category": "rate_limit",
"message": "Too Many Requests",
"details": "The number of requests exceeded the limit allowed for the IP or user.",
"retryAfterMinutes": 60,
"code": "tooManyRequests"
}
}{
"error": {
"status": "Internal Server Error",
"statusCode": 500,
"category": "server",
"message": "Server error.",
"details": "An internal server error occurred. Please try again later.",
"code": "serverError",
"resource": "server"
}
}