apitemplate.io compatible create-pdf
POST/compat/apitemplate/create-pdf
Accepts apitemplate.io's request and returns its response shape, so a client moves by changing
the base URL and the key (X-API-Key works as before). The body is the template's data, and
the published version of the template renders with its stored settings; the render is a
normal PDF render, metered and listed like one. A render that has no answer after 60 seconds,
or finds no free render slot within 30 seconds, is waited for up to two more minutes, so the
call always ends with the document or an error. Needs render:create. Migration only; no new
features.
Errors of the render, the scope, the plan and the quota come back in apitemplate.io's shape,
{ "status": "error", "message": …, "code": … } as application/json, with the HTTP status
of the underlying problem. A missing or invalid key, a browser origin the key does not allow,
the rate limit, a missing template_id and an unexpected error answer like the native API, as
problem details. apitemplate.io's other parameters (expiration, output_html,
output_format, filename, direct_download, cloud_storage, meta, async,
webhook_url, …) are accepted and ignored: the call waits for the document and sends no
webhook, and the link lives as long as a render's.
Request
Responses
- 200
- 302
- 429
- 504
- default
The document.
export_type=file: the document's link, the download_url the JSON answer would carry. No body.
Response Headers
The document's signed link.
rate_limited: the workspace's bucket of the plan's requests per second is empty (Free test keys also have 30 a minute). The problem names the bucket's limit and its window_seconds. Retry after Retry-After seconds.
Response Headers
Seconds until a request is let through again.
Size of the workspace's request bucket: the plan's requests per second. Free test keys are also held to 30 requests a minute, and the headers then describe whichever bucket is closer to empty.
Requests left in the bucket.
Seconds until the bucket is full again.
render_timeout in apitemplate.io's shape: the render was still running two minutes after it went to the background. transaction_ref names it; fetch it with GET /renders/{id} rather than sending the request again, which would render the document a second time.
An error of the apitemplate.io shim. What the render, the scope, the plan and the quota refuse comes back in apitemplate.io's shape (application/json), with the HTTP status of the underlying problem and a Retry-After where it has one (503). A missing or invalid key, a browser origin the key does not allow, a missing template_id, body or url, an unknown output_image_type and an unexpected error answer as problem details.