Skip to main content
GET
/
documents
List documents
curl --request GET \
  --url https://api.terminal49.com/v2/documents \
  --header 'Authorization: <api-key>'
{
  "data": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "type": "document",
      "attributes": {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "name": "<string>",
        "document_type": "<string>",
        "document_type_manual": "<string>",
        "classification_notes": "<string>",
        "source": "upload",
        "file_name": "<string>",
        "file_content_type": "<string>",
        "file_size_bytes": 123,
        "created_at": "2023-11-07T05:31:56Z",
        "updated_at": "2023-11-07T05:31:56Z"
      },
      "relationships": {
        "account": {
          "data": {
            "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
            "type": "account"
          }
        },
        "user": {
          "data": {
            "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
            "type": "user"
          }
        },
        "email_submission": {
          "data": {
            "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
            "type": "email_submission"
          }
        },
        "last_document_representation": {
          "data": {
            "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
            "type": "document_representation"
          }
        },
        "shipments": {
          "data": [
            {
              "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
              "type": "shipment"
            }
          ]
        },
        "cargos": {
          "data": [
            {
              "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
              "type": "container"
            }
          ]
        }
      },
      "links": {
        "self": "<string>",
        "download": "<string>"
      }
    }
  ],
  "included": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "type": "account",
      "attributes": {
        "company_name": "<string>"
      }
    }
  ],
  "links": {
    "last": "<string>",
    "next": "<string>",
    "prev": "<string>",
    "first": "<string>",
    "self": "<string>"
  },
  "meta": {
    "size": 123,
    "total": 123
  }
}
Beta Feature - This endpoint is currently in beta. The API is stable, but the schema and behavior may evolve based on feedback.

Authorizations

Authorization
string
header
required

Token YOUR_API_TOKEN

The APIs require authentication to be done using header-based API Key and Secret Authentication.

API key and secret are sent va the Authorization request header.

You send your API key and secret in the following way:

Authorization: Token YOUR_API_KEY

Query Parameters

include
string

Comma-separated includes. Allowed: shipments, cargos, account, user, last_document_representation, email_submission, current_extraction (alias for last_document_representation).

sort
string

Sortable fields: document_type, added_by, created_at. Prefix with - for descending.

filter[filename]
string

Filter by filename (full-text match).

filter[reference]
string

Filter by reference token.

filter[document_types]
string

Comma-separated document types.

page[number]
integer
Required range: x >= 1
page[size]
integer
Required range: x >= 1

Response

OK

data
Document · object[]
included
(Account model · object | any | Shipment model · object | Container model · object | Document · object | Document Email Submission · object | Document Representation · object)[]
meta
meta · object