Other subscription-related API methods
The AppDirect Billing API supports several additional methods for managing your subscription once it has been created. There is a brief description of these methods below.
List company subscriptions
Returns a list of subscriptions for the specified company.
URL endpoint: /api/billing/v1/companies/<companyId>/subscriptions
Method: GET
Parameters: <companyId> the ID assigned by the channel to identify each company
HTTP Status Code: 200 OK Return list of subscriptions matching criteria; 404 Not Found if company with that id is not present in the system.
List user subscriptions
Returns a list of subscriptions for the specified user.
URL endpoint: /api/billing/v1/companies/<companyId>/users/<userId>/subscriptions
Method: GET
Parameters: <companyId> the ID assigned by the channel to identify each company, <userId> the ID assigned by the channel to identify each user
HTTP Status Code: 200 OK Return list of subscriptions matching criteria; 404 Not Found if company, or user, with that id is not present in the system.
Read subscription
Returns the details of a single subscription
URL endpoint: /api/billing/v1/subscriptions/<subscriptionId>
Method: GET
Parameters: <subscriptionId> The unique identifier assigned to the subscription by the channel
HTTP Status Codes: 200 OK Return subscription; 404 Not Found if the subscription with that id is not present in the system.
Change subscription
Change an existing subscription
URL endpoint: /api/billing/v1/companies/<companyId>/users/<userId>/subscriptions/<subscriptionId>
Method: PUT
Parameters: <companyId> the ID assigned by the channel to identify each company, <userId> the ID assigned by the channel to identify each user, <subscriptionId> the ID assigned by the channel to identify each subscription, a valid JSON or XML object containing subscription data
HTTP Status Codes: 200 OK subscription updated, 404 Not Found if company, user, or subscription with that id is not present in the system.
Cancel subscription
Cancels a subscription
URL endpoint: /api/billing/v1/subscriptions/<subscriptionId>
Method: DELETE
Parameters: <subscriptionId> The unique identifier assigned to the subscription by the channel
HTTP Status Codes: 204 No Content subscription deleted, 404 Not Found if subscription is not present in the system
Was this page helpful?
Tell us more…
Help us improve our content. Responses are anonymous.
Thanks
We appreciate your feedback!