Skip to content

List merge fields by binding

GET/office/merge-fields

Returns all available merge-field tokens for a given binding context. Use to populate a merge-field picker in the template editor so authors can insert the correct {{field_name}} placeholders without consulting documentation.

Request

Query parameters

NameTypeRequiredDescription
bindingstringYes

The binding context to fetch merge fields for (e.g. "invoice", "contract", "payslip").

Responses

200 List of merge fields available for the specified binding

Content type application/json, array of object · OfficeMergeFieldV1.

FieldTypeRequiredDescription
tokenstringNo

The merge-field placeholder string to insert into the template body (e.g. "{{invoice_number}}").

labelstringNo

Human-readable field label for display in the merge-field picker.

typestringNo

Data type of the field (e.g. "string", "number", "currency", "date", "array").

requiredbooleanNo

Whether this field must be present in the binding_data when creating a render job.

example_valuestring, nullableNo

An example value for use in template previews.

Example

[
  {
    "token": "{{invoice_number}}",
    "label": "Invoice Number",
    "type": "string",
    "required": true,
    "example_value": "INV-2026-0042"
  },
  {
    "token": "{{client_name}}",
    "label": "Client Name",
    "type": "string",
    "required": true,
    "example_value": "Acme Corp"
  },
  {
    "token": "{{total}}",
    "label": "Invoice Total",
    "type": "currency",
    "required": false,
    "example_value": "4000.00"
  }
]

422 Required query parameter "binding" is missing

Example request

curl -X GET "https://{tenant}.faciotech.net/api/v1/office/merge-fields" \
  -H "Accept: application/json"
Loading