There's a new version of the HubSpot API

As of November 30, 2022, HubSpot API Keys are being deprecated and are no longer supported. Continued use of HubSpot API Keys is a security risk to your account and data. Your API Keys could be deactivated at any time after Nov. 30th, and we recommend that you migrate to Private Apps as soon as possible so you do not lose business-critical functionality.

Get Associated Deals

Last updated June 17, 2020

GET /deals/v1/deal/associated/:objectType/:objectId/paged

Note: This endpoint is deprecated. Use the CRM Associations API to manage deal associations.

Method Details

HTTP Methods:

GET

Response Format:

json

Requires Authentication?

Yes

Rate Limited?

Yes

Headers

User-Agent

Products:

CRM

Get all of the deals associated with a contact or company.  Returns a paginated set of deals.

In addition to the list of deals, each request will also return two values, offset and hasMore. If hasMore is true, you'll need to make another request, using the offset to get the next page of deal records.

Required Parameters How to use Description
OAuth Access Token or API Key Authorization: Bearer {token} header
or hapikey={key} query parameter.
Used to authenticate the request. Please see this page for more details about authentication.
 objectType Used in the request URL (see above) Either CONTACT or COMPANY, depending on the associated object you want to fetch deals for.
objectId Used in the request URL (see above) The ID of the associated object you want to fetch contacts for. This will be the vid for a contact, or companyId for a company.

Optional Parameters How to use Description
Limit limit=
Used in the request URL
The number of records to return. Has a maximum value of 100.
Offset offset=
Used in the request URL
Used to page through the results. If there are more records in your portal than the limit= parameter, you will need to use the offset returned in the first request to get the next set of results.
Properties properties=x&properties=y
Used in the request URL, may be included multiple times to get multiple properties.
Used to include specific deal properties in the results.  By default, the results will only include the company ID, and will not include the values for any properties for your companies.  Including this parameter will include the data for the specified property in the results.  You can include this parameter multiple times to request multiple properties.
Note: Deals that do not have a value set for a property will not include that property, even when you specify the property. A deal without a value for the dealname property would not show the dealname property in the results, even with &properties=dealname in the URL.
Properties with History propertiesWithHistory=
Used in the request URL, may be included multiple times.
Works similarly to properties=, but this parameter will include the history for the specified property, instead of just including the current value. Use this parameter when you need the full history of changes to a property's value.
Associations includeAssociations=true
Used in the request URL
Include the IDs of the associated contacts and companies in the results. This will also automatically include the num_associated_contacts property.