Skip to content

Combine PDFs into a packet

POST
/combine
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.

Media typeapplication/json

PDFs to merge, in order. Forms are flattened.

object
inputs
required
Array
>= 1 items <= 100 items
Any of:
object
generationId
required
string format: uuid
/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/
filename
string
>= 1 characters <= 200 characters
output

PDF/A, PDF/UA, certification and the document language.

object
pdfa
Any of:
string
Allowed values: 2b 2u
pdfua

Tagged PDF/UA-1. HTML renders only: overlays and packets have no structure to tag.

boolean
certify

Certify with the server’s certificate (PAdES, DocMDP: form filling and signing stay allowed).

boolean
lang

The document language (BCP 47): date, number and currency formatting, translations, text direction, and the PDF language.

string
default: en /^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$/
response

pdf returns the bytes; json returns the generation and a link.

string
default: pdf
Allowed values: pdf json
async

Answer 202 with the generation id at once instead of waiting.

boolean

Rendered. response: pdf (default) returns the bytes; response: json returns the generation.

string format: binary
X-Generation-Id
string

The generation log entry.

X-Page-Count
integer

Pages in the PDF.

Still queued or running (async, or the wait ran out). Poll the generation.

Media typeapplication/json
object
generationId
required
string format: uuid
/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/
status
required
string
Allowed values: queued running success error cancelled

Example

{
"status": "queued"
}

Missing, unknown, revoked or expired key, or the key’s account is disabled.

Media typeapplication/json
object
error
required
string
code
required
string
fieldErrors
object
key
additional properties
Array<string>
generationId
string format: uuid
/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/

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.

Media typeapplication/json
object
error
required
string
code
required
string
fieldErrors
object
key
additional properties
Array<string>
generationId
string format: uuid
/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/

Example generated

{
"error": "example",
"code": "example",
"fieldErrors": {
"additionalProperty": [
"example"
]
},
"generationId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
}

Invalid request or data; fieldErrors lists each.

Media typeapplication/json
object
error
required
string
code
required
string
fieldErrors
object
key
additional properties
Array<string>
generationId
string format: uuid
/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/

Example generated

{
"error": "example",
"code": "example",
"fieldErrors": {
"additionalProperty": [
"example"
]
},
"generationId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
}

Rate limit exceeded.

Media typeapplication/json
object
error
required
string
code
required
string
fieldErrors
object
key
additional properties
Array<string>
generationId
string format: uuid
/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/

Example generated

{
"error": "example",
"code": "example",
"fieldErrors": {
"additionalProperty": [
"example"
]
},
"generationId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
}
Retry-After
integer

Seconds until the key may call again.