Read the plan subscription
Use a key with only read scopes. Your customer_id is in the reply to Get the calling API key.
GET
The workspace's live paid plan, read from the payment provider: plan, monthly or yearly, the next renewal, a cancellation or a plan switch scheduled for renewal, and what it charges each period. subscription is null on the free plan. Needs coding:billing:read.
CustomerApiKeyheader
AuthorizationBearer <API Key>Customer API key sent as a bearer token
customer_id?|nullRequest fulfilled, document follows
application/json- response
subscription?|nullcurl -X GET 'https://api.syndai.ai/api/v1/external/coding/purchases/subscription'Example Response
{ "subscription": { "amount": 0, "band": "string", "cancel_at_period_end": true, "currency": "string", "current_period_end": "string", "interval": "string", "pending": { "applies_at": "string", "interval": "string", "plan_code": "string" }, "plan_code": "string" }}