Validate a payload against a template
validate_dataDry-run a data payload against a template's JSON Schema and get back exactly the errors a render would raise — field path, expected type, what was received and a value that would be accepted. Costs nothing and renders nothing. Use it before a batch, or whenever you are assembling a payload from somewhere you do not control. warnings lists fields the template would not use, each with a did_you_mean where there is a near match, and, where the template's schema declares lang, what data.lang would do.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | The payload you intend to render. Checked against the template's JSON Schema; fields it does not use come back in `warnings`, not as errors. `lang` and `labels` at the root are honoured only if the template's schema declares them (check get_template); otherwise they are ordinary unknown fields. | |
| template | Yes | Template to use: `invoice` for the latest version, or `invoice@3` to pin version 3. Pin the version in anything you ship — a new version changes the output and the cache key. Call list_templates to see what this account has. |