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.

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.

Was this page helpful?