coupons
List all applied coupons
This endpoint is used to list all applied coupons. You can filter by coupon status and by customer.
get/applied_coupons
Query parameters
pageinteger
Example:1
Page number.
per_pageinteger
Example:20
Number of records per page.
status'active' | 'terminated'
Example:active
The status of the coupon. Can be either active or terminated.
external_customer_idstring
Example:5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba
The customer external unique identifier (provided by your own application)
coupon_code[]string[]
The code of the coupon applied to the customer. Use it to filter applied coupons by their code.
[ "BLACK_FRIDAY_2024", "CHRISTMAS_2024" ]
Response
Applied Coupons
Example response
{
"applied_coupons": [
{
"lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"lago_coupon_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"coupon_code": "startup_deal",
"coupon_name": "Startup Deal",
"coupon_status": "active",
"coupon_deleted_at": "2022-04-29T08:59:51Z",
"lago_customer_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"external_customer_id": "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba",
"status": "active",
"amount_cents": 2000,
"amount_cents_remaining": 50,
"amount_currency": "USD",
"frequency": "recurring",
"frequency_duration": 3,
"frequency_duration_remaining": 1,
"expiration_at": "2022-04-29T08:59:51Z",
"created_at": "2022-04-29T08:59:51Z",
"terminated_at": "2022-04-29T08:59:51Z",
"credits": [
{
"lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"amount_cents": 1200,
"amount_currency": "USD",
"item": {
"lago_item_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"type": "coupon",
"code": "startup_deal",
"name": "Startup Deal"
},
"invoice": {
"lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"payment_status": "succeeded"
}
}
]
}
],
"meta": {
"current_page": 2,
"next_page": 3,
"prev_page": 1,
"total_pages": 4,
"total_count": 70
}
}