Skip to main content

Other subscription-related API methods

The AppDirect Billing API supports several additional methods for managing your subscription once it has been created or changed. 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 payment instrument

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 payment instrument; 404 Not Found if the payment instrument 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?