Skip to main content
GET
/
employee-documents
/
{id}
/
download
curl --request GET \
  --url "https://v1-api.ticket-plus.app/employee-documents/101/download" \
  --header "Authorization: Basic <base64(clientId:clientSecret)>" \
  --output "invoice.pdf"
import requests, base64

credentials = base64.b64encode(b"<clientId>:<clientSecret>").decode()

res = requests.get(
    "https://v1-api.ticket-plus.app/employee-documents/101/download",
    headers={"Authorization": f"Basic {credentials}"},
)
with open("invoice.pdf", "wb") as f:
    f.write(res.content)
import { writeFileSync } from "fs";

const credentials = Buffer.from("<clientId>:<clientSecret>").toString("base64");

const res = await fetch(
  "https://v1-api.ticket-plus.app/employee-documents/101/download",
  { headers: { Authorization: `Basic ${credentials}` } },
);
writeFileSync("invoice.pdf", Buffer.from(await res.arrayBuffer()));
Content-Type: application/pdf

<binary PDF data>
Streams the raw binary PDF for the requested document. Before calling this endpoint, use Get Document to confirm downloadable: true — documents where this flag is false cannot be downloaded.
curl --request GET \
  --url "https://v1-api.ticket-plus.app/employee-documents/101/download" \
  --header "Authorization: Basic <base64(clientId:clientSecret)>" \
  --output "invoice.pdf"
import requests, base64

credentials = base64.b64encode(b"<clientId>:<clientSecret>").decode()

res = requests.get(
    "https://v1-api.ticket-plus.app/employee-documents/101/download",
    headers={"Authorization": f"Basic {credentials}"},
)
with open("invoice.pdf", "wb") as f:
    f.write(res.content)
import { writeFileSync } from "fs";

const credentials = Buffer.from("<clientId>:<clientSecret>").toString("base64");

const res = await fetch(
  "https://v1-api.ticket-plus.app/employee-documents/101/download",
  { headers: { Authorization: `Basic ${credentials}` } },
);
writeFileSync("invoice.pdf", Buffer.from(await res.arrayBuffer()));
Content-Type: application/pdf

<binary PDF data>
Only documents where downloadable: true can be downloaded. Attempting to download a non-downloadable document will return an error.

Path Parameters

id
integer
required
The unique numeric ID of the document to download.

Response

200 OKapplication/pdf

(binary)
string (binary)
The raw PDF file binary. There is no JSON wrapper — the response body is the file itself. Save to disk or stream directly to the user.Response header: Content-Type: application/pdf

Authorizations

Authorization
string
header
required

HTTP Basic Auth using your API key credentials. Use the username and password issued from the Developer Portal. Encode them as Base64(username:password) and pass in the Authorization: Basic <token> header.

Path Parameters

id
integer
required

The unique numeric ID of the document to download.

Response

200 - application/pdf

Raw binary PDF file.

The file binary. Save to disk or pipe directly to the user.