How do you create quotes in HubSpot API?

You can use the ID of the quote to retrieve the quote from the HubSpot API, or to update or delete the quote.

To create a quote in the HubSpot API, you can use the following steps:

  1. Make a POST request to the /crm/v3/objects/quotes endpoint.
  2. In the request body, include the following information:
    • Name: The name of the quote.
    • Deal ID: The ID of the deal that the quote is associated with.
    • Expiration Date: The date that the quote expires.
    • Terms: The terms of the quote.
    • Products and Services: The products and services that are included in the quote.
    • Pricing: The prices of the products and services that are included in the quote.
  3. Include the following headers in the request:
    • Authorization: Bearer your_access_token
    • Content-Type: application/json

Here is an example of a POST request that can be used to create a quote in the HubSpot API:

Code snippet
curl -X POST \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Quote Name",
"dealId": "1234567890",
"expirationDate": "2023-06-15",
"terms": "Terms of the quote",
"productsAndServices": [
{
"name": "Product 1",
"quantity": 1,
"price": 100
},
{
"name": "Product 2",
"quantity": 2,
"price": 200
}
]
}' \
https://api.hubspot.com/crm/v3/objects/quotes
Use code with caution. Learn more

If the request is successful, the API will return a response with the following information:

  • ID: The ID of the quote that was created.
  • Created At: The date and time that the quote was created.
  • Updated At: The date and time that the quote was last updated.

You can use the ID of the quote to retrieve the quote from the HubSpot API, or to update or delete the quote.