List Subscription Components
Lists a subscription's applied components.
Archived Components
When requesting to list components for a given subscription, if the subscription contains archived components they will be listed in the server response.
Authorization
BasicAuth The username is a Maxio Chargify API key. The password is x.
In: header
Path Parameters
The Chargify id of the subscription.
Query Parameters
The type of filter you'd like to apply to your search. Use in query date_field=updated_at.
Value in
- "updated_at"
Controls the order in which results are returned.
Use in query direction=asc.
Value in
- "asc"
- "desc"
Filter to use for List Subscription Components operation
The end date (format YYYY-MM-DD) with which to filter the date_field. Returns components with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified.
The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns components with a timestamp at or before exact time provided in query. You can specify timezone in query - otherwise your site''s time zone will be used. If provided, this parameter will be used instead of end_date.
Allows fetching components allocation only if price point id is present. Use in query price_point_ids=not_null.
Value in
- "not_null"
Allows fetching components allocation with matching product family id based on provided ids. Use in query product_family_ids=1,2,3.
The attribute by which to sort. Use in query sort=updated_at.
Value in
- "id"
- "updated_at"
The start date (format YYYY-MM-DD) with which to filter the date_field. Returns components with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified.
The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns components with a timestamp at or after exact time provided in query. You can specify timezone in query - otherwise your site''s time zone will be used. If provided, this parameter will be used instead of start_date.
Allows including additional data in the response. Use in query include=subscription,historic_usages.
If in_use is set to true, it returns only components that are currently in use. However, if it's set to false or not provided, it returns all components connected with the subscription.
Response Body
application/json
curl -X GET "https://example.com/subscriptions/0/components.json?in_use=true"[ { "component": { "component_id": 0, "subscription_id": 0, "allocated_quantity": 0, "pricing_scheme": "per_unit", "name": "string", "kind": "quantity_based_component", "unit_name": "string", "price_point_id": 0, "price_point_handle": "string", "price_point_type": "default", "price_point_name": "string", "enabled": true, "unit_balance": 0, "id": 0, "created_at": "2022-02-22T14:07:00-05:00", "updated_at": "2022-02-22T14:07:00-05:00", "component_handle": "string", "archived_at": null } }]Read Subscription Component GET
Returns information for a specific component on a subscription.
Bulk Update Subscription Components' Price Points POST
Updates the price points on one or more of a subscription's components. The `price_point` key can take either a: 1. Price point id (integer) 2. Price point handle (string) 3. `"_default"` string, which will reset the price point to the component's current default price point.