# Get a document by ID

Retrieve a single document by its unique identifier.

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

## Security:

  - `JWT` (unknown)
    http bearer JWT

## Path parameters:

  - `document_id` (string, required)
    The ID of the document to retrieve. Starts with `doc_` followed by letters and digits. An ID of any other shape is rejected with `400` and a message saying it must start with `doc_`; a well-formed ID that doesn't match a document on your account returns `404`.

## Response 200:

  - `200` (unknown)
    Document retrieved successfully

## 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)
    When the document was created, as an ISO 8601 date-time in UTC.
    Example: 2021-06-01T12:00:00Z

  - `updated_at` (string)
    When the document was last updated, as an ISO 8601 date-time in UTC.
    Example: 2021-06-01T12:00:00Z

## Response 400:

  - `400` (unknown)
    Bad request

## Response 400 fields (application/json):

  - `error` (string)
    Example: Bad Request

  - `message` (string)
    Example: Validation failed: Id must start with 'doc_' and contain only alphanumeric characters

## Response 401:

  - `401` (unknown)
    Unauthorized

## Response 401 fields (application/json):

  - `error` (string)
    Example: Unauthorized

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

## Response 404:

  - `404` (unknown)
    Document not found

## Response 404 fields (application/json):

  - `error` (string)
    Example: Not Found

  - `message` (string)
    Example: Document not found

