Retrieve information about subscriptions.
GET
request to crm/v3/objects/subscriptions
.GET
request to the above URL and specify a subscription ID. For example: crm/v3/objects/subscriptions/41112146008
.POST
request to the search endpoint and include filters in the request body. See an example of using the search endpoint below.properties
query parameter in the request URL along with comma-separated property names. For example, making a GET
request to the following URL would result in the response below:
crm/v3/objects/subscriptions?properties=hs_status,hs_last_payment_amount
GET
request to crm/v3/properties/subscriptions
. Learn more about using the properties API.
Below are some common subscription properties that you may want to query.
Property name | Label in UI | Description |
---|---|---|
hs_status | Status | The current status of the subscription. Values include:
|
hs_recurring_billing_start_date | Start date | The date that the subscription is scheduled to start. |
hs_last_payment_amount | Last payment amount | The amount that was charged during the most recent billing period. |
hs_next_payment_amount | Next payment amount | The amount that will be charged at the start of the next billing period. |
hs_next_payment_due_date | Next payment due date | The date that the next payment is due. |
POST
request that includes your filter criteria in the request body.
For example, to search for all currently active subscriptions, you would make a POST
request to crm/v3/objects/subscriptions/search
with the following request body:
filters
array specifies the search criteria, while the properties
array specifies which properties to return.
crm/v3/objects/subscriptions/{hs_object_id}/associations/{associatedObjectName}
Associated objects can include contacts, companies, deals, quotes, line items, payments, discounts, fees, and taxes. These associations are typically set by the payment link or quote associated with the initial subscription payment. To manage these associations, you can update the subscription in HubSpot.
Below is an example of how you might use this API combined with another API to get a specific set of association information.
GET
request to:
crm/v3/objects/subscription/{hs_object_id}/associations/line_items
This will return the IDs of the currently associated line items, along with meta information about the association type.
POST
request:
crm/v3/objects/line_items/batch/read