List Coupons for Product Family
Lists coupons for a specific product family in a site.
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
Query Parameters
Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query page=1.
1 <= value1This parameter indicates how many records to fetch in each request. Default value is 30. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query per_page=200.
value <= 20030Filter to use for List Coupons operations
(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. Use in query currency_prices=true.
Response Body
application/json
curl -X GET "https://example.com/product_families/0/coupons.json"[ { "coupon": { "id": 999999, "name": "50% coupon", "code": "50PERCENT", "description": "50 PERCENT OFF", "amount_in_cents": null, "product_family_id": 527890, "created_at": "2016-10-21T17:02:08-04:00", "updated_at": "2016-10-21T17:06:11-04:00", "start_date": "2016-10-21T17:02:08-04:00", "end_date": null, "percentage": "50", "recurring": true, "duration_period_count": null, "duration_interval": 1, "duration_interval_unit": "day", "allow_negative_balance": true, "archived_at": null, "conversion_limit": "100", "stackable": false, "compounding_strategy": "compound", "use_site_exchange_rate": true } }, { "coupon": { "id": 123456, "name": "100% coupon", "code": "100PERCENT", "description": "100 PERCENT OFF", "amount_in_cents": null, "product_family_id": 527890, "created_at": "2016-10-21T17:02:08-04:00", "updated_at": "2016-10-21T17:06:11-04:00", "start_date": "2016-10-21T17:02:08-04:00", "end_date": null, "percentage": "50", "recurring": true, "duration_period_count": null, "duration_interval": 1, "duration_interval_unit": "day", "allow_negative_balance": true, "archived_at": null, "conversion_limit": "100", "stackable": false, "compounding_strategy": "compound", "use_site_exchange_rate": true } }, { "coupon": { "id": 888888, "name": "25% coupon", "code": "25PERCENT", "description": "25 PERCENT OFF", "amount_in_cents": null, "product_family_id": 527890, "created_at": "2016-10-21T17:02:08-04:00", "updated_at": "2016-10-21T17:06:11-04:00", "start_date": "2016-10-21T17:02:08-04:00", "end_date": null, "percentage": "25", "recurring": true, "duration_period_count": null, "duration_interval": 1, "duration_interval_unit": "day", "allow_negative_balance": true, "archived_at": null, "conversion_limit": "100", "stackable": false, "compounding_strategy": "compound", "coupon_restrictions": [ { "id": 37, "item_type": "Component", "item_id": 519, "name": "test", "handle": null } ], "use_site_exchange_rate": true } }]List Metadata for Resource Type GET
Lists metadata for a specified array of subscriptions or customers.
Create Coupon POST
Creates a coupon under the specified product family. You can create either a flat amount coupon, by specifying `amount_in_cents`, or percentage coupon by specifying `percentage`. See [Apply Coupons to Subscriptions](https://maxio.zendesk.com/hc/en-us/articles/24261259337101-Coupons-and-Subscriptions) for information on applying a coupon to a subscription in the Advanced Billing UI.