Look at a template: its draft, a version or a shared one, as HTML, PNG or PDF (II-D213)
With an official sample (default: the first the template accepts) or your own print data. html answers JSON with the sanitized HTML as it will be printed; png and pdf answer the file itself, printed by the same service that prints the invoices, so a model that sees images can review its work with png. Writes nothing.
POST
https://api.invox.page/v1/templates/{id}/renderAuthorization
Path parameters
Header parameters
Request body JSON required
Returns
200
html: JSON with the HTML. png, pdf: the file.
JSON
400
organization_required: This credential needs to say which organization it acts on · validation_failed: The request is not valid · malformed_request: The request body is not valid JSON
JSON
401
unauthenticated: No credential was sent · invalid_credential: The credential is not valid
JSON
403
missing_scope: The credential lacks the permission this operation requires · organization_mismatch: The X-Organization header names another organization than the key's · organization_archived: The organization is archived
JSON
404
not_found: The resource does not exist in this organization · template_not_found: The template does not exist in this organization · asset_not_found: The image does not exist in the library
JSON
422
template_syntax_error: The template has a syntax error · template_limit_exceeded: The template went over a limit while rendering · font_not_in_catalog: The template uses a font that is not in the catalog
JSON
429
rate_limited: Too many requests
JSON
500
internal_error: The service failed
JSON
503
service_unavailable: The service cannot answer right now · render_unavailable: The document could not be rendered right now
JSON