Table of Contents

Download

This endpoint is used to directly download a document based on the unique identifier.

Definition

Route: /documents/{document_id}/download
Method: GET
OperationId: DownloadDocument

Permissions

The user must be a member of one of the following groups to download a document:

  • client:admin
  • documents:manager
  • documents:viewer

Request

Headers

Name Description Notes
accept The expected format of the response application/octet-stream
osg-client-id The unique identifier assigned to your organization
client_customer_id The unique identifier assigned to your client
correlation_id The unique identifier for correlation

Parameters

Name Type Description
document_id string The unique identifier of the document
Tip

When retrieving a document that was generated using SendCommunication the DocumentId is the same as the CommunicationId.


Responses

Headers

Key Value Type Description
content-disposition attachment; filename={filename} FileStream
content-type {mimeType} string

Success

Status Description Body
200 The request was successful. FileStream

Failures

Status Description Body
400 The request was invalid. None
401 The request was not authorized. None
403 The request was not allowed. None
404 The document was not found. None
500 An unexpected error occurred. None