Find Subscription Group
Finds the subscription group associated with a subscription.
If the subscription is not in a group, this endpoint returns an error.
Authorization
BasicAuth The username is a Maxio Chargify API key. The password is x.
In: header
Query Parameters
The Advanced Billing id of the subscription associated with the subscription group
Response Body
application/json
curl -X GET "https://example.com/subscription_groups/lookup.json?subscription_id=string"{ "uid": "grp_939ktzq8v4477", "scheme": 1, "customer_id": 400, "payment_profile_id": 567, "subscription_ids": [ 101, 102, 103 ], "primary_subscription_id": 101, "next_assessment_at": "2020-08-01T14:00:00-05:00", "state": "active", "cancel_at_end_of_period": false, "customer": { "first_name": "Mark", "last_name": "Smith", "organization": "Acme Inc.", "email": "smith@example.com", "reference": "4c92223b-bc16-4d0d-87ff-b177a89a2655" }, "account_balances": { "prepayments": { "balance_in_cents": 0 }, "service_credits": { "balance_in_cents": 0 }, "open_invoices": { "balance_in_cents": 4400 }, "pending_discounts": { "balance_in_cents": 0 } }}Update Subscription Group Members PUT
Updates subscription group members. `"member_ids"` should contain an array of both subscription IDs to set as group members and subscription IDs already present in the groups. Not including them will result in removing them from the subscription group. To clean up members, just leave the array empty.
Add Subscription to Group POST
Adds an existing subscription to a subscription group. For sites making use of the [Relationship Billing](https://maxio.zendesk.com/hc/en-us/articles/24252287829645-Advanced-Billing-Invoices-Overview) and [Customer Hierarchy](https://maxio.zendesk.com/hc/en-us/articles/24252185211533-Customer-Hierarchies-WhoPays#customer-hierarchies) features, it is possible to add existing subscriptions to subscription groups. Passing `group` parameters with a `target` containing a `type` and optional `id` is all that's needed. When the `target` parameter specifies a `"customer"` or `"subscription"` that is already part of a hierarchy, the subscription will become a member of the customer's subscription group. If the target customer or subscription is not part of a subscription group, a new group will be created and the subscription will become part of the group with the specified target customer set as the responsible payer for the group's subscriptions. **Note:** In order to add an existing subscription to a subscription group, it must belong to either the same customer record as the target, or be within the same customer hierarchy. Rather than specifying a customer, the `target` parameter could instead simply have a value of * `"self"` which indicates the subscription will be paid for not by some other customer, but by the subscribing customer, * `"parent"` which indicates the subscription will be paid for by the subscribing customer's parent within a customer hierarchy, or * `"eldest"` which indicates the subscription will be paid for by the root-level customer in the subscribing customer's hierarchy. To create a new subscription into a subscription group, reference the following: [Create Subscription in a Subscription Group](https://developers.chargify.com/docs/api-docs/d571659cf0f24-create-subscription#subscription-in-a-subscription-group)