CRM

mzaidan
Member

create Quotes with comment for buyers via API

SOLVE

Hello everyone,

I'm currently working with the HubSpot API v3 and would like to add custom characteristics or text to an offer (quote) that should then be displayed in the offer. I've already tried but I'm not sure how to proceed. Can someone show me the correct API endpoint and JSON format for this task?

Thanks in advance!

 

0 Upvotes
1 Accepted solution
james-portant
Solution
Contributor

create Quotes with comment for buyers via API

SOLVE

Hi @mzaidan,

 

To add custom characteristics or text to a quote using the HubSpot API v3, you will need to use the Quotes API. Here is a step-by-step guide to achieve this:

 

Step 1: Create a Quote

First, you need to create a quote if you haven't already done so. You can use the following endpoint to create a quote:

Endpoint:

POST /crm/v3/objects/quotes

 

Example Request:

POST https://api.hubapi.com/crm/v3/objects/quotes Authorization: Bearer YOUR_ACCESS_TOKEN Content-Type: application/json { "properties": { "hs_title": "Your Quote Title", "hs_expiration_date": "2024-06-01T00:00:00Z", "hs_comments": "Your custom comments or text here" }, "associations": [ { "to": { "id": "ASSOCIATED_OBJECT_ID" }, "types": [ { "associationCategory": "HUBSPOT_DEFINED", "associationTypeId": "ASSOCIATION_TYPE_ID" } ] } ] }

 

Replace YOUR_ACCESS_TOKEN with your actual HubSpot API access token, and fill in the relevant properties for the quote.

 

Step 2: Update a Quote

If you already have a quote and need to update it with custom characteristics or text, you can use the following endpoint:

Endpoint:

PATCH /crm/v3/objects/quotes/{quoteId}

 

Example Request:

PATCH https://api.hubapi.com/crm/v3/objects/quotes/{quoteId} Authorization: Bearer YOUR_ACCESS_TOKEN Content-Type: application/json { "properties": { "hs_comments": "Updated custom comments or text here", "custom_property_key": "Custom value" } }

 

Replace {quoteId} with the ID of the quote you want to update, and add any custom properties you need in the "properties" section.

 

Adding Custom Properties

To add custom properties to a quote, you need to define these properties in your HubSpot account before you can use them in the API. This can be done through the HubSpot UI or using the CRM Properties API.

Example Request to Create a Custom Property:

POST https://api.hubapi.com/properties/v2/quotes/properties Authorization: Bearer YOUR_ACCESS_TOKEN Content-Type: application/json { "name": "custom_property_key", "label": "Custom Property", "type": "string", "fieldType": "text", "groupName": "quote_information", "options": [], "displayOrder": 1, "hasUniqueValue": false, "hidden": false }

Replace custom_property_key with your desired property key and adjust other fields as needed.

 

Summary

  1. Create a Quote: Use POST /crm/v3/objects/quotes to create a new quote.
  2. Update a Quote: Use PATCH /crm/v3/objects/quotes/{quoteId} to update an existing quote.
  3. Add Custom Properties: Define custom properties using POST /properties/v2/quotes/properties if needed.

 

If you have any further questions or need additional assistance, please feel free to ask.

Cheers,
James - CEO @ Portant

Portant App for HubSpot: https://ecosystem.hubspot.com/marketplace/apps/sales/sales-enablement/portant-hubspot-google-docs-in...

 

View solution in original post

0 Upvotes
3 Replies 3
mzaidan
Member

create Quotes with comment for buyers via API

SOLVE

it worked, thank you

0 Upvotes
james-portant
Contributor

create Quotes with comment for buyers via API

SOLVE

You're welcome @mzaidan  🙂 

0 Upvotes
james-portant
Solution
Contributor

create Quotes with comment for buyers via API

SOLVE

Hi @mzaidan,

 

To add custom characteristics or text to a quote using the HubSpot API v3, you will need to use the Quotes API. Here is a step-by-step guide to achieve this:

 

Step 1: Create a Quote

First, you need to create a quote if you haven't already done so. You can use the following endpoint to create a quote:

Endpoint:

POST /crm/v3/objects/quotes

 

Example Request:

POST https://api.hubapi.com/crm/v3/objects/quotes Authorization: Bearer YOUR_ACCESS_TOKEN Content-Type: application/json { "properties": { "hs_title": "Your Quote Title", "hs_expiration_date": "2024-06-01T00:00:00Z", "hs_comments": "Your custom comments or text here" }, "associations": [ { "to": { "id": "ASSOCIATED_OBJECT_ID" }, "types": [ { "associationCategory": "HUBSPOT_DEFINED", "associationTypeId": "ASSOCIATION_TYPE_ID" } ] } ] }

 

Replace YOUR_ACCESS_TOKEN with your actual HubSpot API access token, and fill in the relevant properties for the quote.

 

Step 2: Update a Quote

If you already have a quote and need to update it with custom characteristics or text, you can use the following endpoint:

Endpoint:

PATCH /crm/v3/objects/quotes/{quoteId}

 

Example Request:

PATCH https://api.hubapi.com/crm/v3/objects/quotes/{quoteId} Authorization: Bearer YOUR_ACCESS_TOKEN Content-Type: application/json { "properties": { "hs_comments": "Updated custom comments or text here", "custom_property_key": "Custom value" } }

 

Replace {quoteId} with the ID of the quote you want to update, and add any custom properties you need in the "properties" section.

 

Adding Custom Properties

To add custom properties to a quote, you need to define these properties in your HubSpot account before you can use them in the API. This can be done through the HubSpot UI or using the CRM Properties API.

Example Request to Create a Custom Property:

POST https://api.hubapi.com/properties/v2/quotes/properties Authorization: Bearer YOUR_ACCESS_TOKEN Content-Type: application/json { "name": "custom_property_key", "label": "Custom Property", "type": "string", "fieldType": "text", "groupName": "quote_information", "options": [], "displayOrder": 1, "hasUniqueValue": false, "hidden": false }

Replace custom_property_key with your desired property key and adjust other fields as needed.

 

Summary

  1. Create a Quote: Use POST /crm/v3/objects/quotes to create a new quote.
  2. Update a Quote: Use PATCH /crm/v3/objects/quotes/{quoteId} to update an existing quote.
  3. Add Custom Properties: Define custom properties using POST /properties/v2/quotes/properties if needed.

 

If you have any further questions or need additional assistance, please feel free to ask.

Cheers,
James - CEO @ Portant

Portant App for HubSpot: https://ecosystem.hubspot.com/marketplace/apps/sales/sales-enablement/portant-hubspot-google-docs-in...

 

0 Upvotes