# Get a document by ID

Retrieve a single document by its unique identifier.

Endpoint: GET /document/{document_id}
Version: 1.0.0
Security: JWT

## Path parameters:

  - `document_id` (string, required)
    ID of the document to retrieve

## Response 200 fields (application/json):

  - `id` (string)
    The unique identifier for the Document.
    Example: doc_nYUqLpuYQ0M8

  - `document_name` (string)
    The name of document
    Example: invoice

  - `file_name` (string)
    The name of the file you uploaded.
    Example: invoice_BC8tFdE.pdf

  - `preview_url` (string)
    The URL to preview the document.
    Example: https://glomopay-service-staging-documents.s3.ap-south-1.amazonaws.com/12345_invoice

  - `status` (string)
    The status of file you uploaded. Values can be uploaded, approved and rejected.
    Example: uploaded

  - `created_at` (string)
    Timestamp representing when the document was created
    Example: 2021-06-01T12:00:00Z

  - `updated_at` (string)
    Timestamp representing when the document was last updated
    Example: 2021-06-01T12:00:00Z

## Response 400 fields (application/json):

  - `error` (string)
    Example: Bad Request

  - `message` (string)
    Example: Invalid document id

## Response 401 fields (application/json):

  - `error` (string)
    Example: Unauthorized

  - `message` (string)
    Example: Invalid or missing authentication token

## Response 404 fields (application/json):

  - `error` (string)
    Example: Not Found

  - `message` (string)
    Example: Document with given id does not exist

