APIs & Integrations

fcocco
メンバー

Problem in contact/company association after creating quote

I've created a quote via API.

I've associated it with a template, with a deal, with line items.

 

I realised that as soon as I create the association with the deal, it also creates some kind of link with the deal company and the deal contact.
I don't understand one thing: the company and the contact appear in the tab where you define the recipient of the quote, but they are not selected. How do I make them pre-selected via the API?

 

Thank you

0 いいね!
2件の返信
Jaycee_Lewis
コミュニティーマネージャー
コミュニティーマネージャー

Problem in contact/company association after creating quote

Hey, @fcocco 👋 Thank you for reaching out! One question — have you tried setting the Contact and Company when you create the quote via the API? You'll do it in the same part of the request body where you set the Template and Deal associations. 

To get the associationTypeId, make a GET request to /crm/v4/associations/{fromObjectType}/{toObjectType}/labels

For example:

  • /crm/v4/associations/Quote/Contact/labels

will return 

{
    "results": [
        {
            "category": "HUBSPOT_DEFINED",
            "typeId": 69,
            "label": null
        }
    ]
}

 

 

If you want a full example, I am sure one of our community members, or me, can craft on up in Postman and share it here.

 

Best,

Jaycee

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

0 いいね!
fcocco
メンバー

Problem in contact/company association after creating quote

Thank you for this reply.

No, I didn't think you could. I currently create the quote, read the ID from JSON in the response, and then use it in subsequent POST calls to make the associations.

Can it all be done in one call?

 

With my method (3 POST calls), the associations with company and contacts are created. But the 2 entities are not selected (I can see this by opening the newly created quote in the browser: the associations are there, but I would like them to be selected too)

0 いいね!