One English invoice template, every xgenerate API call: nested tables, computed totals, images, a payment QR code, a Swiss QR-bill, a letterhead, a conditional block. Full walkthrough in README.md; the contract is at /contract (Swagger UI).
| File | What |
|---|---|
Invoice-Form-A-CH-EN.docx | the template |
fields.extracted.json | response of POST /documents/fields — the empty contract |
request.fields.json | the filled envelope (images inlined as data URIs; invoice.paid decides the conditional block) |
sidecar.bindings.yaml | computed bindings for the multipart sidecar part |
evaluate.request.json | the same bindings for POST /bindings/evaluate |
watermark.json | optional watermark part |
expected/Invoice-Form-A-CH-EN.pdf | the generated PDF |
run.sh | all calls as curl commands |
assets/ | logo, signature and letterhead images |
In an empty directory, download all inputs and run the six calls:
example_url=https://api.xgenerate.io/v2/contract/examples/reference-invoice for file in run.sh Invoice-Form-A-CH-EN.docx request.fields.json \ sidecar.bindings.yaml evaluate.request.json watermark.json; do curl -fsS -O "$example_url/$file" || exit 1 done XGENERATE_CLIENT_ID=... XGENERATE_CLIENT_SECRET=... bash run.sh