Create a draft
Open Templates in the workspace and choose a starter, such as Invoice, Quote, Certificate or Shipping label. Edit the layout alongside the sample data and preview. Save updates the draft. Publish creates an immutable numbered version that generation requests can use. For the API equivalent,GET /v1/library returns starter definitions. Submit a complete definition as the JSON body of POST /v1/templates. Save later edits with PUT /v1/templates/{id} and publish with POST /v1/templates/{id}/publish. The create and save operations receive the definition itself. The create response includes the new template ID.
Map fields and repeat rows
The Invoice starter reads the recipient from{{recipient.name}}, the total from {{total}} and table rows from items. Its three column mappings are field1, field2 and field3, relative to each item.
invoice-data.json
Generate from a published version
Save the data above asinvoice-data.json. Set TEMPLATE_ID to the published Invoice template and submit version 1:
Terminal
version to use the current publication. Omit data to use that version’s sample. The job stores a snapshot when accepted. Subsequent draft changes or publications cannot change that job.
Coordinate concurrent edits
Read the template’supdated value. Send it in the If-Unmodified-Since-Version header on save or publish. A stale value returns 409. Reload the draft and review the competing edits before trying again. GET /v1/templates/{id}/versions lists the published definitions.