Compose a document from a template and data
Renders one of your saved compose templates with the data you pass, and gives you back a PDF.
template is the config id or slug from POST /v1/compose/configs. data is validated against that template's JSON Schema BEFORE anything renders, so a missing field costs you a 422 with the exact instance paths, not a broken document.
{ "template": "invoice", "data": { "customer": "Acme", "total": 1240 } }
output decides what comes back:
file(the default) stores the PDF in your corpus and returns the file object, with thetemplateHashof the exact bundle that produced it.rawstreams the PDF bytes straight back and stores nothing.
Learn more: Compose
POST
https://api.cloudraker.com/v1/composeTry it
Authorization
Request body JSON required
Returns
200
The PDF bytes (output: "raw" only — nothing was stored).
201
The composed file (output: "file", the default).
JSON