Skip to content

Download Document

Download document belonging to a job in your workspace.

The download document endpoint allows you to retrieve the document's file content.

Endpoint

MethodUrl
GET/v1.0/documents/{document_id}/download
Note
  • The response from this endpoint is a 302 Redirect to the file contents.
  • Redirect response is only valid for 30 seconds.

Url Parameters

document_id
string

The document's id.

Sample Request

Copied
1curl -X GET 'https://api.worklayer.com/v1.0/documents/499d692d-67aa-4127-a45c-b9e27f54afad/download' \
2-H 'Authorization: Bearer {token}' \
3-L \
4-o document.txt

Response

A redirect response to where the file content is located.

Errors

  1. Forbidden: API Client does not have permission to view documents.
  2. Unauthorized: API Client does not have valid credentials.
  3. BadRequest: Either required properties are missing, or there was a malformed request.
  4. Conflict: The document is in an invalid state.
Last updated on October 21, 2022