Skip to main content
POST
/
documents
Upload a document
curl --request POST \
  --url https://api.terminal49.com/v2/documents \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "data": {
    "type": "document",
    "attributes": {
      "name": "<string>",
      "attached_document": "<string>"
    }
  }
}
'
{
  "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": {
    "self": "<string>"
  }
}
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

Body

application/json
data
object

Response

Created

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