Coupons

List Coupons

GET
/coupons.json

Lists coupons for a site.

Authorization

BasicAuth
AuthorizationBasic <token>

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

In: header

Query Parameters

page?integer

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.

Range1 <= value
Default1
per_page?integer

This 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.

Rangevalue <= 200
Default30
filter?

Filter to use for List Coupons operations

currency_prices?boolean

(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/coupons.json"
[  {    "coupon": {      "id": 0,      "name": "string",      "code": "string",      "description": "string",      "amount": 0,      "amount_in_cents": 0,      "product_family_id": 0,      "product_family_name": "string",      "start_date": "2021-05-03T16:00:21-04:00",      "end_date": "2023-05-05T16:00:21-04:00",      "percentage": "10",      "recurring": true,      "recurring_scheme": "do_not_recur",      "duration_period_count": 0,      "duration_interval": 0,      "duration_interval_unit": "string",      "duration_interval_span": "string",      "allow_negative_balance": true,      "archived_at": null,      "conversion_limit": "string",      "stackable": true,      "compounding_strategy": "compound",      "use_site_exchange_rate": true,      "created_at": "2021-05-05T16:00:21-04:00",      "updated_at": "2021-05-05T16:00:21-04:00",      "discount_type": "amount",      "exclude_mid_period_allocations": true,      "apply_on_cancel_at_end_of_period": true,      "coupon_restrictions": [        {          "id": 0,          "item_type": "Component",          "item_id": 0,          "name": "string",          "handle": "string"        }      ]    }  }]