Lists usages associated with a subscription for a particular metered component. This will display the previously recorded components for a subscription.
This endpoint is not compatible with quantity-based components.
Note: The since_date and until_date attributes each default to midnight on the date specified. For example, in order to list usages for January 20th, you would need to append the following to the URL.
?since_date=2016-01-20&until_date=2016-01-21Use this endpoint to read the previously recorded components for a subscription. You can now specify either the component id (integer) or the component handle prefixed by "handle:" to specify the unique identifier for the component you are working with.
The username is a Maxio Chargify API key and the password is x. Basic authentication works only with the US and EU environments, which connect to chargify.com directly. The Maxio API Gateway environment does not accept Basic authentication.
In: header
Either the Advanced Billing subscription ID (integer) or the subscription reference (string). Important: In cases where a numeric string value matches both an existing subscription ID and an existing subscription reference, the system will prioritize the subscription ID lookup. For example, if both subscription ID 123 and subscription reference "123" exist, passing "123" will return the subscription with ID 123.
Either the Advanced Billing id for the component or the component's handle prefixed by handle:
Returns usages with an id greater than or equal to the one specified.
int64Returns usages with an id less than or equal to the one specified.
int64Returns usages with a created_at date greater than or equal to midnight (12:00 AM) on the date specified.
dateReturns usages with a created_at date less than or equal to midnight (12:00 AM) on the date specified.
dateResult 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 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query per_page=200.
value <= 20020application/json
curl -X GET -G \ --url 'https://subdomain.chargify.com/subscriptions/1/components/1/usages.json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer ACCESS_TOKEN'