PDF Operations

Merge files into PDF

Creates a task to merge multiple PDF and/or image files into a single PDF file.

POST
/v1/pdf-operations/merge

Authorization

x-api-key
<token>

API Key for authentication

In: header

Request Body

application/jsonOptional
inputrequired
array<string>

The list of ids of the files to be merged

name
string

The name of the file

Minimum length: 1Maximum length: 30

Response Body

The response of an merge task

TypeScript Definitions

Use the response body type in TypeScript.

responserequired
Merge Response

The response of an merge task

curl -X POST "https://api.scan-documents.com/v1/pdf-operations/merge" \
  -H "x-api-key: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "input": [
      "file_avyrvozb9302uwhq"
    ],
    "name": "File Name"
  }'
{
  "id": "task_euyrvozb9302uwhq",
  "operation": "merge",
  "parameters": {
    "input": [
      "file_avyrvozb9302uwhq"
    ],
    "name": "File Name"
  },
  "status": "completed",
  "result": {
    "generated_files": [
      {
        "id": "file_euyrvozb9302uwhq",
        "name": "Example document",
        "type": "application/pdf",
        "properties": {
          "size": 1024,
          "page_count": 10
        },
        "task_id": "task_euyrvozb9302uwhq",
        "created_at": "2021-05-01T12:00:00Z"
      }
    ]
  },
  "created_at": "2021-05-01T12:00:00Z",
  "updated_at": "2021-05-01T12:00:00Z"
}