REST input JSON
POST/http.inputstructured/:connectionID
REST input JSON allows for structured input and output for your documents. Upload documents using a URL or in Base64 encoded format.
Request
Path Parameters
- Go to the Conversion Service Configurator > Integration.
- Click the pencil icon next to one of the integrations.
- Under the Input section, click the pencil icon next to one of the Input configurations.
- Copy the
connectionID
from the Connection ID field.
The connectionID
defines which Connection you want to run using the Simple API. The Conversion Service comes with a preconfigured Connection that has an ID archive-pdfa2-default
. To use another custom integration:
- application/json
Body
required
Include one or more files for conversion. There are two possibilities how to include files:
-
Encoded in Base64 format. Use the
content
parameter. -
Share a URL pointing to the file. Use the
url
parameter.
Array [
Array [
]
]
Array [
]
Name of the conversion job.
data
object[]
required
URL to a file.
Base64-encoded content of the file.
Name of the input file.
options
object[]
nullable
Document options.
Name of the option.
Value of the option.
variables
object
nullable
Job variables represented as key-value pairs.
options
object[]
nullable
Job options.
Name of the option.
Value of the option.
Responses
- 200
- 202
- 400
- 404
- 415
- 422
- 500
The file was successfully submitted for conversion and the Simple API included the converted file in the API response.
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
data
object[]
required
List of converted files.
Name of the converted file.
Base64-encoded content of the resulting file.
{
"data": [
{
"fileName": "hello_world.pdf",
"content": "JVBERi0xLjcKJeLjz9MKOSAwIG9iagpbL0NhbEdyYXkgPDwKL1..."
}
]
}
The file was successfully submitted for conversion and the conversion will start.
-
The job must contain at least one data element.
-
Exception message that occurred during processing.
- application/problem+json
- Schema
- Example (from schema)
- badRequestJson
Schema
A URI reference that identifies the problem type. Note that this URI cannot be dereferenced.
A short, human-readable summary of the problem type.
The HTTP status code.
A human-readable explanation specific to this occurrence of the problem.
{
"type": "string",
"title": "string",
"status": 0,
"detail": "string"
}
Bad request
{
"type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
"status": 400,
"title": "Bad request",
"detail": "The job must contain at least one data element."
}
-
The provided
connectionID
was not found.
Unsupported media type. Returns ProblemDetails
:
-
A file format is not supported.
- application/problem+json
- application/problem+xml
- Schema
- Example (from schema)
- serverErrorJson:
Schema
A URI reference that identifies the problem type. Note that this URI cannot be dereferenced.
A short, human-readable summary of the problem type.
The HTTP status code.
A human-readable explanation specific to this occurrence of the problem.
{
"type": "string",
"title": "string",
"status": 0,
"detail": "string"
}
Unsupported format
{
"type": "http://www.pdf-tools.com/service/rest/errors/workflow/unsupportedFormat",
"title": "Unsupported file format.",
"detail": "A file format is not supported.",
"status": 415
}
- Schema
- Example (from schema)
- serverErrorXml
Schema
A URI reference that identifies the problem type. Note that this URI cannot be dereferenced.
A short, human-readable summary of the problem type.
The HTTP status code.
A human-readable explanation specific to this occurrence of the problem.
<root>
<type>string</type>
<title>string</title>
<status>0</status>
<detail>string</detail>
</root>
Unsupported format
<problem xmlns="urn:ietf:rfc:7807">
<type>http://www.pdf-tools.com/service/rest/errors/workflow/unsupportedFormat</type>
<title>Unsupported file format.</title>
<detail>A file format is not supported.</detail>
<status>415</status>
</problem>
Unprocessable file. Returns ProblemDetails
:
-
The conformance is not compatible.
-
The file is corrupt.
-
A generic error happened during processing.
-
One of the specified options is invalid.
-
The password is missing or incorrect.
-
A file contains a feature that is not supported.
- application/problem+json
- application/problem+xml
- Schema
- Example (from schema)
- serverErrorJson:
Schema
A URI reference that identifies the problem type. Note that this URI cannot be dereferenced.
A short, human-readable summary of the problem type.
The HTTP status code.
A human-readable explanation specific to this occurrence of the problem.
{
"type": "string",
"title": "string",
"status": 0,
"detail": "string"
}
Incompatible conformance
{
"type": "http://www.pdf-tools.com/service/rest/errors/workflow/conformance",
"title": "Incompatible conformance.",
"detail": "The conformance is not compatible.",
"status": 422
}
- Schema
- Example (from schema)
- serverErrorXml
Schema
A URI reference that identifies the problem type. Note that this URI cannot be dereferenced.
A short, human-readable summary of the problem type.
The HTTP status code.
A human-readable explanation specific to this occurrence of the problem.
<root>
<type>string</type>
<title>string</title>
<status>0</status>
<detail>string</detail>
</root>
Incompatible conformance
<problem xmlns="urn:ietf:rfc:7807">
<type>http://www.pdf-tools.com/service/rest/errors/workflow/conformance</type>
<title>Incompatible conformance.</title>
<detail>The conformance is not compatible</detail>
<status>422</status>
</problem>
An Internal server error. Returns ProblemDetails
:
-
The job was canceled.
-
The service is not configured correctly.
-
An internal error happened during processing.
-
A timeout occurred during processing.
-
If an unknown error occurs the message you receive is empty.
- application/problem+json
- application/problem+xml
- Schema
- Example (from schema)
- serverErrorJson:
Schema
A URI reference that identifies the problem type. Note that this URI cannot be dereferenced.
A short, human-readable summary of the problem type.
The HTTP status code.
A human-readable explanation specific to this occurrence of the problem.
{
"type": "string",
"title": "string",
"status": 0,
"detail": "string"
}
Server error
{
"type": "http://www.pdf-tools.com/service/rest/errors/workflow/internal",
"title": "Internal server error.",
"detail": "An internal error happened during processing.",
"status": 500
}
- Schema
- Example (from schema)
- serverErrorXml
Schema
A URI reference that identifies the problem type. Note that this URI cannot be dereferenced.
A short, human-readable summary of the problem type.
The HTTP status code.
A human-readable explanation specific to this occurrence of the problem.
<root>
<type>string</type>
<title>string</title>
<status>0</status>
<detail>string</detail>
</root>
Server error
<problem xmlns="urn:ietf:rfc:7807">
<type>http://www.pdf-tools.com/service/rest/errors/workflow/internal</type>
<title>Internal server error.</title>
<detail>An internal error happened during processing</detail>
<status>500</status>
</problem>