Coupons
Delete an applied coupon
This endpoint is used to delete a specific coupon that has been applied to a customer.
DELETE
/
customers
/
{external_customer_id}
/
applied_coupons
/
{applied_coupon_id}
Authorization
Path
LAGO_URL="https://api.getlago.com"
API_KEY="__YOUR_API_KEY__"
curl --location --request DELETE "$LAGO_URL/api/v1/customers/:external_customer_id/applied_coupons/:applied_coupon_id" \
--header "Authorization: Bearer $API_KEY"
{
"applied_coupon": {
"amount_cents": 2000,
"amount_cents_remaining": 50,
"amount_currency": "EUR",
"coupon_code": "startup_deal",
"coupon_name": "Startup Deal",
"created_at": "2022-04-29T08:59:51Z",
"expiration_at": "2022-04-29T08:59:51Z",
"external_customer_id": "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba",
"frequency": "recurring",
"frequency_duration": 3,
"frequency_duration_remaining": 1,
"lago_coupon_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"lago_customer_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"percentage_rate": "null",
"status": "active",
"terminated_at": "2022-04-29T08:59:51Z"
}
}
Authorizations
Authorization
string
headerrequiredBearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Path Parameters
external_customer_id
string
requiredThe customer external unique identifier (provided by your own application)
applied_coupon_id
string
requiredUnique identifier of the applied coupon, created by Lago.
Response
200 - application/json
applied_coupon
object
requiredWas this page helpful?
LAGO_URL="https://api.getlago.com"
API_KEY="__YOUR_API_KEY__"
curl --location --request DELETE "$LAGO_URL/api/v1/customers/:external_customer_id/applied_coupons/:applied_coupon_id" \
--header "Authorization: Bearer $API_KEY"
{
"applied_coupon": {
"amount_cents": 2000,
"amount_cents_remaining": 50,
"amount_currency": "EUR",
"coupon_code": "startup_deal",
"coupon_name": "Startup Deal",
"created_at": "2022-04-29T08:59:51Z",
"expiration_at": "2022-04-29T08:59:51Z",
"external_customer_id": "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba",
"frequency": "recurring",
"frequency_duration": 3,
"frequency_duration_remaining": 1,
"lago_coupon_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"lago_customer_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"percentage_rate": "null",
"status": "active",
"terminated_at": "2022-04-29T08:59:51Z"
}
}