Coupons
Delete a coupon
This endpoint is used to delete a coupon.
DELETE
/
coupons
/
{code}
Authorization
Path
LAGO_URL="https://api.getlago.com"
API_KEY="__YOUR_API_KEY__"
curl --location --request DELETE "$LAGO_URL/api/v1/coupons/:code" \
--header "Authorization: Bearer $API_KEY"
{
"coupon": {
"amount_cents": 5000,
"amount_currency": "USD",
"billable_metric_codes": [],
"code": "startup_deal",
"coupon_type": "fixed_amount",
"created_at": "2022-04-29T08:59:51Z",
"description": "I am a coupon description",
"expiration": "time_limit",
"expiration_at": "2022-08-08T23:59:59Z",
"frequency": "recurring",
"frequency_duration": 6,
"lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"limited_billable_metrics": true,
"limited_plans": true,
"name": "Startup Deal",
"percentage_rate": "null",
"plan_codes": [
"startup_plan"
],
"reusable": true,
"terminated_at": "2022-08-08T23:59:59Z"
}
}
Authorizations
Authorization
string
headerrequiredBearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Path Parameters
code
string
requiredUnique code used to identify the coupon.
Response
200 - application/json
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/coupons/:code" \
--header "Authorization: Bearer $API_KEY"
{
"coupon": {
"amount_cents": 5000,
"amount_currency": "USD",
"billable_metric_codes": [],
"code": "startup_deal",
"coupon_type": "fixed_amount",
"created_at": "2022-04-29T08:59:51Z",
"description": "I am a coupon description",
"expiration": "time_limit",
"expiration_at": "2022-08-08T23:59:59Z",
"frequency": "recurring",
"frequency_duration": 6,
"lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"limited_billable_metrics": true,
"limited_plans": true,
"name": "Startup Deal",
"percentage_rate": "null",
"plan_codes": [
"startup_plan"
],
"reusable": true,
"terminated_at": "2022-08-08T23:59:59Z"
}
}