Skip to content

Download a document file

GET
/v1/documents/{id}/download
curl --request GET \
--url 'http://api.probatix.localhost/v1/documents/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/download?XDEBUG_SESSION=PHPSTORM' \
--header 'X-API-TOKEN: <X-API-TOKEN>' \
--header 'accept-language: de'

Returns the document as a binary file download. The response body is raw binary data, not JSON. Content negotiation is not used for this endpoint, and the Accept header is ignored. Use the response Content-Type and Content-Disposition headers to determine the actual file type and filename.

id
required
string format: uuid

DocumentDownload identifier

accept-language
string
Allowed values: de en fr

Language for Errors and Translatable properties

Example
de
XDEBUG_SESSION
string
default: PHPSTORM

Xdebug session for debugging

Example
?XDEBUG_SESSION=PHPSTORM

Binary document download

Media typeapplication/octet-stream

Binary file contents of the requested document. Inspect the Content-Type response header for the actual media type, for example application/pdf.

string format: binary

Unauthorized

A representation of common errors.

object
@context
One of:
string
@id
required
string
@type
required
string
title

A short, human-readable summary of the problem.

string | null
detail

A human-readable explanation specific to this occurrence of the problem.

string | null
status
integer | null
default: 400
instance

A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.

string | null
type

A URI reference that identifies the problem type

string
description
string | null
Example
{
"@context": {
"hydra": "http://www.w3.org/ns/hydra/core#"
},
"status": 400
}

Forbidden

A representation of common errors.

object
@context
One of:
string
@id
required
string
@type
required
string
title

A short, human-readable summary of the problem.

string | null
detail

A human-readable explanation specific to this occurrence of the problem.

string | null
status
integer | null
default: 400
instance

A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.

string | null
type

A URI reference that identifies the problem type

string
description
string | null
Example
{
"@context": {
"hydra": "http://www.w3.org/ns/hydra/core#"
},
"status": 400
}

Not found

A representation of common errors.

object
@context
One of:
string
@id
required
string
@type
required
string
title

A short, human-readable summary of the problem.

string | null
detail

A human-readable explanation specific to this occurrence of the problem.

string | null
status
integer | null
default: 400
instance

A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.

string | null
type

A URI reference that identifies the problem type

string
description
string | null
Example
{
"@context": {
"hydra": "http://www.w3.org/ns/hydra/core#"
},
"status": 400
}