Find a customer's subscription
GET
Finds the one active billing agreement that covers your customer id at a time, and the subscription it bills. Use it to check which subscription usage sent now (or at occurred_at) will be billed to. Secret and trusted tokens may call it; a limited token may not (403).
header
AuthorizationBearer <token>A secret, trusted or limited token. See Authentication.
customer_id*stringYour id for the customer, the agreement's customer_id.
billing_region?stringThe agreement's region. Defaults to us.
Default
"us"Value in
"us""uk""eu"occurred_at?stringAn ISO 8601 date. Defaults to now.
Format
date-timeThe agreement and subscription.
application/json- response
agreement_id?stringsubscription_id?stringcustomer_id?stringbilling_region?stringValue in
"us""uk""eu"curl -X GET 'https://api.comecero.com/api/v1/usage/subscription_context?customer_id=string'Example Response
{ "agreement_id": "agr_cust_8412", "subscription_id": "1101612345678Su7Kq2ZaB", "customer_id": "cust_8412", "billing_region": "us"}