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
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
Maximum number of coupons to return
Number of coupons to skip for pagination
Search term to filter coupons by name or code
Respuestas
200 - Successful response
Array of coupon objects _id
string
default: "67f6c132d9485f9dacd5f123"
required
Unique MongoDB identifier for the coupon
usageCount
number
default: "12"
required
Number of times the coupon has been used
limitPerCustomer
number
default: "5"
required
Maximum number of times a customer can use this coupon (0 for unlimited)
altId
string
default: "79t07PzK8Tvf73d12312"
required
Account Id
altType
string
default: "account"
required
Type of entity
name
string
default: "NEWT6"
required
Display name of the coupon
code
string
default: "NEWT6"
required
Redemption code for the coupon
discountType
string
default: "percentage"
required
Type of discount (percentage or amount) Posibles valores: ‘percentage’, ‘amount’
discountValue
number
default: "25"
required
Value of the discount (percentage or fixed amount)
status
string
default: "scheduled"
required
Current status of the coupon Posibles valores: ‘scheduled’, ‘active’, ‘expired’
startDate
string
default: "2025-04-30T18:30:00.000Z"
required
Date when the coupon becomes active
endDate
string
default: "2025-05-30T18:30:00.000Z"
End date when the coupon expires
applyToFuturePayments
boolean
default: "True"
required
Indicates if the coupon applies to future recurring payments
applyToFuturePaymentsConfig
Configuration for how the coupon applies to future payments
userId
string
default: "q0m15dTLGeiGOXG123123"
User ID associated with the coupon (if applicable)
createdAt
string
default: "2025-04-09T18:49:22.026Z"
required
Creation timestamp
updatedAt
string
default: "2025-04-09T18:49:22.026Z"
required
Last update timestamp
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"
}
422 - Unprocessable Entity
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 );