Placeholders
Two constructs are supported inside an uploaded .docx template:
{{ Type.Field }}— single-value replace. Exactly one space on each side, no dotted paths beyondType.Field.{% for Type in AnyWord %} … {% endfor %}— loops. Can nest, and work row-wise inside Word tables.
A placeholder with no matching entry in the request is left verbatim in the output — the most common reason a generated document doesn't look right.
Generating a document
POST /api/generate, header X-API-Key: <your key>.
{
"config": { "id": "...", "type": "...", "actions": [...], "children": [...] },
"payload": "<base64-encoded .docx template>",
"salesforce_org_id": "optional"
}
Response:
{
"status": "ok",
"message": "...",
"payload": "<base64-encoded rendered .docx>"
}
Errors
| Status | Meaning |
|---|---|
| 400 | Malformed request, or an org mismatch on a scoped key. |
| 401 | Missing or invalid API key. |
| 500 | Server-side rendering failure. |
Keys & usage limits
Each API key can be scoped to a single Salesforce org and carries a monthly call limit. Request access to get a key for your organisation.