List customer contracts (v2)
For a given customer, lists all of their contracts in chronological order.
Use this endpoint to:
- Check if a customer is provisioned with any contract, and at which tier
- Check the duration and terms of a customer’s current contract
- Power a page in your end customer experience that shows the customer’s history of tiers (e.g. this customer started out on the Pro Plan, then downgraded to the Starter plan).
Usage guidelines:
Use the starting_at, covering_date, and include_archived parameters to filter the list of returned contracts. For example, to list only currently active contracts, pass covering_date equal to the current time.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Customer ID and optional filters
Include commit/credit ledgers in the response. Setting this flag may cause the response to be slower.
Include archived contracts in the response.
Include the balance of credits and commits in the response. Setting this flag may cause the response to be slower.
Optional RFC 3339 timestamp. Only include contracts that started on or after this date. This cannot be provided if covering_date filter is provided.
Optional RFC 3339 timestamp. Only include contracts active on the provided date. This cannot be provided if starting_at filter is provided.
Response
Success