# List all documents

Returns a list of your documents. The documents are returned sorted by creation date, with the most recent documents appearing first.

Endpoint: GET /document
Version: 1.0.0
Security: JWT

## Query parameters:

  - `before` (string)
    [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp in UTC to filter resources created before this time. Use this to avoid `Page drift` issue. See [Pagination parameters](\./pagination#pagination-parameters) for more details.

  - `after` (string)
    [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp in UTC to filter resources created after this time. Use this to avoid `Page drift` issue. See [Pagination parameters](\./pagination#pagination-parameters) for more details.

  - `per_page` (integer)
    Number of resources per page. Should be between 1 and 100.

  - `page` (integer)
    Page number for pagination. Starts from 1. Get the next page number from the `next` field in the response.

## Response 200 fields (application/json):

  - `data` (array)

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

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

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

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

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

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

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

  - `page_meta` (object)

  - `page_meta.current` (integer)
    The current page number.
    Example: 2

  - `page_meta.previous` (integer | null)
    The previous page number.
    Example: 1

  - `page_meta.next` (integer | null)
    The next page number.
    Example: 3

  - `page_meta.per_page` (integer)
    The number of items per page.
    Example: 20

  - `page_meta.pages` (integer)
    The total number of pages.
    Example: 10

  - `page_meta.count` (integer)
    The total number of items.
    Example: 200

