Create quote via API wit a custom template

Try to create a Quote throught the API.

If I use a ‘default’ template in the payload like:

{“hs_template”:“ORIGINAL”}

it works.

But I don’t know how to use a “customized quote template”.

What property to use and what value?

I already retrieved all quote properties:

…

‘name’: ‘hs_template’,
‘options’: [{‘description’: ‘Legacy: Original quote template’,
‘display_order’: 1,
‘hidden’: False,
‘label’: ‘Template 1 - Original’,
‘value’: ‘ORIGINAL’},
{‘description’: ‘Legacy: Basic quote template’,
‘display_order’: 2,
‘hidden’: False,
‘label’: ‘Template 2 - Basic’,
‘value’: ‘BASIC’},
{‘description’: ‘Legacy: Modern quote template’,
‘display_order’: 3,
‘hidden’: False,
‘label’: ‘Template 3 - Modern’,
‘value’: ‘MODERN’}],

‘name’: ‘hs_template_type’,
‘options’: [{‘description’: ‘Uses customizable quote template’,
‘display_order’: 0,
‘hidden’: False,
‘label’: ‘CUSTOMIZABLE_QUOTE_TEMPLATE’,
‘value’: ‘CUSTOMIZABLE_QUOTE_TEMPLATE’},
{‘description’: ‘Uses proposal cms template’,
‘display_order’: 1,
‘hidden’: False,
‘label’: ‘PROPOSAL’,
‘value’: ‘PROPOSAL’},
{‘description’: ‘Uses quotes template’,
‘display_order’: 2,
‘hidden’: False,
‘label’: ‘QUOTE’,
‘value’: ‘QUOTE’}],

…

I can’t find a property/value for my custom template.

I think you are creating a quote with a customized quote template. If you are not able to use a customized quote template then please try with the association attribute for this. you have to associate the quote template with it. The syntax is given below.

curl --request POST \
 --url https://api.hubapi.com/crm/v3/objects/quotes \
 --header 'authorization: Bearer YOUR_ACCESS_TOKEN' \
 --header 'content-type: application/json' \
 --data '{
 "associations": [
 {
 "types": [
 {
 "associationCategory": "HUBSPOT_DEFINED",
 "associationTypeId": 286
 }
 ],
 "to": {
 "id": "Enter quote_template_id"
 }
 }
 ],
 "properties": {
 "additionalProp1": "string",
 "additionalProp2": "string",
 "additionalProp3": "string"
 }
}'

“I hope this will help you out. Please mark it as Solution Accepted and upvote to help another Community member.
Thanks!”

Yes, that is the way to go. Thanks.