Skip to main content
The “Get Coupon Details” API enables you to retrieve comprehensive information about a specific coupon using either its unique identifier or promotional code. Use this endpoint to view coupon parameters, usage statistics, validity periods, and other promotional details.
GET https://services.leadconnectorhq.com/payments/coupon

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
id
string
default:"6241712be68f7a98102ba272"
required
Coupon id
code
string
default:"DEAL50"
required
Coupon code

Respuestas

_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
object
required
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
traceId
string
default:"c667b18d-8f5e-44cf-a914"
required
Unique identifier for tracing this API request
{
  "_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",
  "traceId": "c667b18d-8f5e-44cf-a914"
}
{}

Ejemplo

curl -X GET 'https://services.leadconnectorhq.com/payments/coupon' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Version: 2021-07-28'
const response = await fetch('https://services.leadconnectorhq.com/payments/coupon', {
  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',
    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');
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);