renderDocuments
Requires permission documents:template:update.
Print up to 50 documents of one type with one template into one PDF. Returns a job to poll with documentRenderJob.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
mutation RenderDocuments($input: RenderDocumentsInput!) {
renderDocuments(input: $input) {
id
status
documentCount
error
url
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation RenderDocuments($input: RenderDocumentsInput!) {\n renderDocuments(input: $input) {\n id\n status\n documentCount\n error\n url\n }\n}",
"variables": {
"input": {
"docType": "string",
"ids": [
"id"
]
}
}
}
EOF
Variables:
{
"input": {
"docType": "string",
"ids": [
"id"
]
}
}
Response:
{
"data": {
"renderDocuments": {
"id": "id",
"status": "string",
"documentCount": 0,
"error": "string",
"url": "string"
}
}
}
renderDocuments(
input: RenderDocumentsInput!
): DocumentRenderJob!
Arguments
renderDocuments.input ● RenderDocumentsInput! non-null input
The document type, the documents and the template.
Type
DocumentRenderJob object
A bulk print: up to 50 documents merged into one PDF.