Skip to main content
The “List Coupons” API allows you to retrieve a list of all coupons available in your account. Use this endpoint to view all promotional offers and special discounts for your customers.
GET https://services.leadconnectorhq.com/payments/coupon/list

Autorización

Authorization
string
required
Bearer token generado desde el portal Leadway. Ver Autenticación.
Version
string
default:"2021-07-28"
required
Versión de la API.

Query parameters

altId
string
default:"BQdAwxa0ky1iK2sstLGJ"
required
Account Id
altType
string
default:"account"
required
Alt Type
limit
number
default:"10"
Maximum number of coupons to return
offset
number
default:"0"
Number of coupons to skip for pagination
status
string
default:"active"
Filter coupons by status
Search term to filter coupons by name or code

Respuestas

data
object[]
required
Array of coupon objects
totalCount
number
default:"20"
required
Total number of coupons matching the query criteria
traceId
string
default:"c667b18d-8f5e-44cf-a914"
required
Unique identifier for tracing this API request
{
  "data": [
    {
      "_id": "67f6c132d9485f9dacd5f123",
      "usageCount": 12,
      "limitPerCustomer": 5,
      "altId": "79t07PzK8Tvf73d12312",
      "altType": "account",
      "name": "NEWT6",
      "code": "NEWT6",
      "discountType": "percentage",
      "discountValue": 25,
      "status": "scheduled",
      "startDate": "2025-04-30T18:30:00.000Z",
      "endDate": "2025-05-30T18:30:00.000Z",
      "applyToFuturePayments": true,
      "userId": "q0m15dTLGeiGOXG123123",
      "createdAt": "2025-04-09T18:49:22.026Z",
      "updatedAt": "2025-04-09T18:49:22.026Z"
    }
  ],
  "totalCount": 20,
  "traceId": "c667b18d-8f5e-44cf-a914"
}
{}

Ejemplo

curl -X GET 'https://services.leadconnectorhq.com/payments/coupon/list' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Version: 2021-07-28'
const response = await fetch('https://services.leadconnectorhq.com/payments/coupon/list', {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
    Version: '2021-07-28',
  },
});
const data = await response.json();
import os, requests
response = requests.request(
    'GET',
    'https://services.leadconnectorhq.com/payments/coupon/list',
    headers={
        'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
        'Version': '2021-07-28',
    },
)
data = response.json()
<?php
$ch = curl_init('https://services.leadconnectorhq.com/payments/coupon/list');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
        'Version: 2021-07-28',
    ],
]);
$data = json_decode(curl_exec($ch), true);