Get template structure

GET/api/v1/templates/{id}/structure

Describe what createDocument can fill in a template

Returns a published company template's addressable text blocks (those with a block link id), its API-enabled pricing tables (or the first table when none is API-enabled) with their visible columns, the company's document data items and how many primary recipients the template needs. Block text is plain text trimmed to about 2000 characters. An older version is answered from the template's latest published version. Unpublished, trashed, other companies' templates and templates the user's teams can't use are 404.

Permission

An OAuth access token with this scope. How to get a token

templates:read
Read document templates.

Parameters

Not sure what to enter? Here’s where to find IDs.

idpath · stringrequired
Template id, or its numeric display id.
client_idquery · stringrequired
The Client ID of your OAuth client. It’s public, and goes on every request alongside your access token. Find it in QuoteCloud under Settings → API dashboard → Manage Integrations → OAuth Clients.Length at least 1.

Responses

200Template structure.
idstringrequired
The latest published version's id.
namestringrequired
primaryRecipientCountintegerrequired
Value 1 to 10.
blocksarray of objectrequired
Text blocks createDocument's blockValues can replace.
Item fields
blockLinkIdstringrequired
labelstringrequired
The block's layer name
textstringrequired
Length at most 2000.
pricingTablesarray of objectrequired
Item fields
apiLinkIdstring or nullrequired
The apiLinkId createDocument's pricing rows name.
namestringrequired
columnsarray of objectrequired
Item fields
idstringrequired
labelstringrequired
typestringrequired
dataItemsarray of objectrequired
Values for these go in createDocument's dataItems.
Item fields
idstringrequired
labelstringrequired
typestringrequired
valuesarray of string
401Missing or invalid bearer token or client ID.
errorstringrequired
error_descriptionstring
403Insufficient scope, missing add-on, usage limit, or permission denial.

Exactly one of these:

OAuthError
errorstringrequired
error_descriptionstring
ApiErrorEnvelope
dataobjectrequired
Fields
statusstringrequired
Always error.
messagestringrequired
codestring
documentRefstring
assetGenerationIdstring
errorsarray of object
Item fields
fieldstringrequired
messagestringrequired
404Requested resource was not found in the token's company.
dataobjectrequired
Fields
statusstringrequired
Always error.
messagestringrequired
codestring
documentRefstring
assetGenerationIdstring
errorsarray of object
Item fields
fieldstringrequired
messagestringrequired
429Shared company API request quota exceeded. Wait before retrying.
Retry-Afterheader · integer
Minimum seconds to wait before retrying.Value at least 1.
dataobjectrequired
Fields
statusstringrequired
Always error.
messagestringrequired
retryAfterSecondsintegerrequired
Value at least 1.
502The template's stored content could not be read.
dataobjectrequired
Fields
statusstringrequired
Always error.
messagestringrequired
codestring
documentRefstring
assetGenerationIdstring
errorsarray of object
Item fields
fieldstringrequired
messagestringrequired

Rate limit

120 requests a minute per company, shared across REST, Zapier and MCP. On a 429, wait for Retry-After.