Combine PDFs into a packet
const url = 'https://necodoc.example.com/api/v1/combine';const options = { method: 'POST', headers: {'x-api-key': '<x-api-key>', 'Content-Type': 'application/json'}, body: '{"inputs":[{"generationId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}],"filename":"example","output":{"pdfa":null,"pdfua":false,"certify":false,"lang":"en"},"response":"pdf","async":false}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://necodoc.example.com/api/v1/combine \ --header 'Content-Type: application/json' \ --header 'x-api-key: <x-api-key>' \ --data '{ "inputs": [ { "generationId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" } ], "filename": "example", "output": { "pdfa": null, "pdfua": false, "certify": false, "lang": "en" }, "response": "pdf", "async": false }'Merges your generations and uploaded PDFs, in order, into one PDF. Each input’s form is flattened. Logged with source combine.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”PDFs to merge, in order. Forms are flattened.
object
PDF/A, PDF/UA, certification and the document language.
object
Tagged PDF/UA-1. HTML renders only: overlays and packets have no structure to tag.
Certify with the server’s certificate (PAdES, DocMDP: form filling and signing stay allowed).
The document language (BCP 47): date, number and currency formatting, translations, text direction, and the PDF language.
pdf returns the bytes; json returns the generation and a link.
Answer 202 with the generation id at once instead of waiting.
Responses
Section titled “Responses”Rendered. response: pdf (default) returns the bytes; response: json returns the generation.
object
Signed; works without a key for 1 hour.
/api/v1/generations/{id}/pdf, with a key.
Example
{ "status": "success"}Headers
Section titled “Headers”The generation log entry.
Pages in the PDF.
Still queued or running (async, or the wait ran out). Poll the generation.
object
Example
{ "status": "queued"}Missing, unknown, revoked or expired key, or the key’s account is disabled.
object
object
Example generated
{ "error": "example", "code": "example", "fieldErrors": { "additionalProperty": [ "example" ] }, "generationId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}The key lacks the scope, role, template or source address this call needs.
object
object
Example generated
{ "error": "example", "code": "example", "fieldErrors": { "additionalProperty": [ "example" ] }, "generationId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}Invalid request or data; fieldErrors lists each.
object
object
Example generated
{ "error": "example", "code": "example", "fieldErrors": { "additionalProperty": [ "example" ] }, "generationId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}Rate limit exceeded.
object
object
Example generated
{ "error": "example", "code": "example", "fieldErrors": { "additionalProperty": [ "example" ] }, "generationId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}Headers
Section titled “Headers”Seconds until the key may call again.