Read Coupon
Returns a coupon by its system-assigned ID. You must identify the Coupon in this call by the ID parameter assigned to it.
If instead you would like to find a Coupon using a Coupon code, use the Find Coupon endpoint.
If the coupon is set to use_site_exchange_rate: true, it returns pricing based on the current exchange rate. If the flag is set to false, it returns all of the defined prices for each currency.
Authorization
BasicAuth The username is a Maxio Chargify API key. The password is x.
In: header
Path Parameters
The Advanced Billing id of the product family to which the coupon belongs
The Advanced Billing id of the coupon
Query Parameters
(Optional) If you have defined multiple currencies at the site level, you can pass ?currency_prices=true to include an array of currency price data in the response.
Response Body
application/json
curl -X GET "https://example.com/product_families/0/coupons/0.json"{ "coupon": { "id": 67, "name": "Foo Bar", "code": "YEPPER99934", "description": "my cool coupon", "amount_in_cents": null, "product_family_id": 4, "product_family_name": "Billing Plans", "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": "33.3333", "duration_period_count": null, "duration_interval": null, "duration_interval_unit": null, "allow_negative_balance": false, "archived_at": null, "conversion_limit": null, "stackable": true, "compounding_strategy": "compound" }}Find Coupon GET
Searches for a coupon by code. If you have more than one product family and if the coupon you are trying to find does not belong to the default product family in your site, you need to specify (either in the URL or as a query string param) the `product_family_id`.
Archive Coupon DELETE
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.