Api reference
Delete a discount
Archive a discount (soft delete). The discount code can no longer be used.
Related endpoints
GET /discounts— List discountsPOST /discounts— Create a discountGET /discounts/{id}— Get discount by IDPATCH /discounts/{id}— Update a discount
Common errors
401 unauthenticated— missing, malformed, or revoked API key.404 resource_missing— the referenced resource does not exist or is not visible to your key.
Idempotency
Pass an Idempotency-Key header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see the idempotency guide.
x-api-key<token>
Your RevKeen API key (powered by Unkey). Get it from Dashboard > Settings > API Keys. Use rk_sandbox_* for test mode and rk_live_* for production.
In: header
Path Parameters
id*string
Discount ID
Format
uuidResponse Body
application/json
curl -X DELETE "https://api.revkeen.com/v2/discounts/00000000-0000-0000-0000-000000000000" \ -H "x-api-key: $REVKEEN_API_KEY"{
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"code": "SUMMER20",
"name": "Summer Sale 20% Off",
"description": "20% off for summer promotion",
"discount_type": "percentage",
"discount_value": 20,
"applies_to": "all",
"product_ids": null,
"max_redemptions": 100,
"current_redemptions": 25,
"valid_from": "2024-06-01T00:00:00Z",
"valid_until": "2024-08-31T23:59:59Z",
"recurring_type": "once",
"recurring_cycles": null,
"first_time_customer": false,
"is_active": true,
"created_at": "2024-01-14T08:00:00Z",
"updated_at": "2024-01-14T08:00:00Z"
}
}Empty
Empty