APIs & Integrations

5unil
Member

Creating/Updating Sales Quote via API

Hi I am trying to send data from another service into Hubspot and create a sales quote to store this data. Hubspot has an existing Deal that we wish to connect this sales quote to. Using this external service, we wish to add this data to the corresponding deal using the DealID, which is known.

 

Can this be done via Hubspot? Haven't come across any relevant API docs to explain. Thanks in advance.

0 Upvotes
7 Replies 7
WendyGoh
HubSpot Employee
HubSpot Employee

Creating/Updating Sales Quote via API

Hey @5unil,

 

When looking to create quote and associate it with a deal, you can refer to our v3 quote endpoint - CRM API | Quotes.

 

To create a quote:

POST /crm/v3/objects/quotes endpoint

 

To associate quote with a deal:

PUT /crm/v3/objects/quotes/{quoteId}/associations/{associatedObjectType}/{toObjectId}

 

e.g. crm/v3/objects/quotes/{{quoteId}}/associations/deal/{{dealId}}

0 Upvotes
5unil
Member

Creating/Updating Sales Quote via API

Thanks for your response. How comes this isn't visible under https://developers.hubspot.com/docs/overview

What is the difference between the link you shared and the above one?

 

I also did a google search after posting this and the results I saw said this functionality doesn't exist (e.g. https://community.hubspot.com/t5/CRM/When-Is-API-For-Quotes-Quote-End-Points-Happening/td-p/245500) - aware this is from a few months ago, but thought the post would've been updated if it's now available.

 

Surprised this functionality exists - I've already told my client it doesn't!

 

 

0 Upvotes
WendyGoh
HubSpot Employee
HubSpot Employee

Creating/Updating Sales Quote via API

Hey @5unil,

 

The endpoint that I shared with you is currently under Developer preview and you can find it under the link you shared, by expanding the 'Developer Preview' section:

 

devPreview.png

 

Thanks for pointing out the forum post! I'll update accordingly now. 

 

Going forward, I'd recommend you to subscribe to our developer changelog: HubSpot Developer Changelog to receive any upcoming changes on our HubSpot API. Additionally, here's the one on our CRM v3 functionality: CRM API v3 Developer Preview is Now Available.

 

0 Upvotes
thebakers_UG
Member

Creating/Updating Sales Quote via API

I am trying to use the API as well but I cant get it working.
 
URL: /crm/v3/objects/quotes?hapikey=MY_KEY
 
BODY and error:
 

 

{

"properties": {
"hs_createdate": "2020-08-10T21:26:11.515Z",
"hs_expiration_date": "2020-11-08T22:59:59.999Z",
"hs_lastmodifieddate": "2020-08-10T21:26:33.903Z",
"hs_status": "DRAFT",
"hs_title": "max.mustermann@test.de"
}
}

{
"status": "error",
"message": "Object type QUOTE is not supported by this endpoint, supported object types [CONTACT, DEAL, PRODUCT, LINE_ITEM, TICKET, COMPANY].",
"correlationId": "d3714ccb-5b49-49e9-b98c-af09b45cde5d",
"category": "VALIDATION_ERROR"
}

 

0 Upvotes
WendyGoh
HubSpot Employee
HubSpot Employee

Creating/Updating Sales Quote via API

Hey @thebakers_UG,

 

As documented on this documentation - CRM API | Quotes

 

"The CRM API currently only supports retrieving quotes that have been created by a HubSpot user in a HubSpot account via an API key. Creating and updating quotes through the CRM API is coming soon. Please subscribe to our changelog to make sure you receive any further updates about this issue."

0 Upvotes
thebakers_UG
Member

Creating/Updating Sales Quote via API

Hey Wendy, in previous answers you told that its possible in v3. Did you remove this feature ?

 

When looking to create quote and associate it with a deal, you can refer to our v3 quote endpoint - CRM API | Quotes.

 

To create a quote:

POST /crm/v3/objects/quotes endpoint

 

To associate quote with a deal:

PUT /crm/v3/objects/quotes/{quoteId}/associations/{associatedObjectType}/{toObjectId}

 

 

0 Upvotes
WendyGoh
HubSpot Employee
HubSpot Employee

Creating/Updating Sales Quote via API

Hey @thebakers_UG,

 

That is right.

 

We've discovered some issues with how quotes created through this API work, including issues that prevent these quotes from being viewed or used correctly in HubSpot accounts. Some features may also be missing or work incorrectly for quotes created through the API, such as the public sharing URL. We're currently working on addressing these issues.

 

Any quotes that were previously created using the API will be left as is, and any requests that you're making to create or modify quotes will continue to work as well, but please keep in mind that these quotes may not work correctly when viewed by a HubSpot user in their account until these issues are resolved. Please subscribe to our changelog to make sure you receive any further updates about this issue.

0 Upvotes