Coupons

Archive Coupon

DELETE
/product_families/{product_family_id}/coupons/{coupon_id}.json

Archives a coupon, making it unavailable for future use while remaining active on existing subscriptions. Archiving makes that Coupon unavailable for future use, but allows it to remain attached and functional on existing Subscriptions that are using it. The archived_at date and time will be assigned.

Authorization

BasicAuth
AuthorizationBasic <token>

The username is a Maxio Chargify API key. The password is x.

In: header

Path Parameters

product_family_id*integer

The Advanced Billing id of the product family to which the coupon belongs

coupon_id*integer

The Advanced Billing id of the coupon

Response Body

application/json

curl -X DELETE "https://example.com/product_families/0/coupons/0.json"
{  "coupon": {    "id": 67,    "name": "Foo Bar",    "code": "YEPPER99934",    "description": "my cool coupon",    "amount_in_cents": 10000,    "product_family_id": 4,    "created_at": "2017-11-08T10:01:15-05:00",    "updated_at": "2017-11-08T10:01:15-05:00",    "start_date": "2017-11-08T10:01:15-05:00",    "end_date": null,    "percentage": null,    "recurring": false,    "duration_period_count": null,    "duration_interval": null,    "duration_interval_unit": null,    "allow_negative_balance": false,    "archived_at": "2016-12-02T13:09:33-05:00",    "conversion_limit": null,    "stackable": true,    "compounding_strategy": "compound"  }}