Subscription Groups

List Subscription Groups

GET
/subscription_groups.json

Lists subscription groups for the site. The response is paginated and will return a meta key with pagination information.

Account Balance Information

Account balance information for the subscription groups is not returned by default. If this information is desired, the include[]=account_balances parameter must be provided with the request.

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 20. 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
Default20
include?array<>

A list of additional information to include in the response. The following values are supported:

  • account_balances: Account balance information for the subscription groups. Use in query: include[]=account_balances

Response Body

application/json

curl -X GET "https://example.com/subscription_groups.json"
{  "subscription_groups": [    {      "uid": "grp_952mvqcnk53wq",      "scheme": 1,      "customer_id": 88498000,      "payment_profile_id": 93063018,      "subscription_ids": [        42768907,        82370782      ],      "primary_subscription_id": 69844395,      "next_assessment_at": "2021-05-05T16:00:21-04:00",      "state": "active",      "cancel_at_end_of_period": false,      "account_balances": {        "prepayments": {          "balance_in_cents": 0        },        "service_credits": {          "balance_in_cents": 0        },        "pending_discounts": {          "balance_in_cents": 0        }      }    }  ],  "meta": {    "current_page": 1,    "total_count": 1  }}