---
title: "Upload Document"
method: POST
path: "/UPLOAD_DOCUMENT"
tags: ["Load Building"]
---

# Upload Document

`POST /UPLOAD_DOCUMENT`

## Request

- Base URL: `https://apidocs.goaugment.com` (the document declares no server; this is the origin it was published from)
- URL: `https://apidocs.goaugment.com/UPLOAD_DOCUMENT`
- Auth: none required
- TypeScript: <https://skmtc.dev/goaugment/apis/webhooks/docs/UPLOAD_DOCUMENT/post.ts> (a function with typed inputs; its response is checked against the schema)

> v1 equivalent: `uploadDocument` (flat payload — the `data` fields below are sent at the top level, without the envelope).

Sent when a document needs to be associated with a load. `workflow` is `null`, because more than one workflow can upload documents and the originating one is not attributable on this event. `loadNumber` / `customerLoadInternalId` are the load's references.

Two delivery encodings, selected by your endpoint's configuration:

- **`application/json`** (default): the file bytes are base64-encoded in `data.content`, wrapped in the standard envelope.

- **`multipart/form-data`** (when your endpoint is configured for multipart): the raw file bytes are sent as a `content` file part, and the envelope travels as a JSON `envelope` part whose `data` omits `content`.

## Request body

- UploadDocumentEvent: Fields present on every v2 webhook event.
  - `id` string, required: Unique event identifier (ULID)
  - `workflow` 'TRACK_AND_TRACE' | 'CARRIER_SUPPORT' | 'POD_COLLECTION' | 'LOAD_BUILDING' | 'CARRIER_SELECTION' | 'SCHEDULING' | 'CUSTOMER_SUPPORT' | 'null', nullable, required: The Augment workflow that produced this event, or `null` when no single workflow can be attributed. New values may be added over time, so treat this as an open set rather than a fixed list.
  - `occurredAt` string, date-time, required: When the underlying activity occurred (ISO 8601)
  - `loadNumber` string, nullable, required: Your load reference number
  - `customerLoadInternalId` string, nullable, required: Your internal load ID, if provided during load creation
  - `eventType` 'UPLOAD_DOCUMENT', required: Event name for a document upload.
  - `data` LoadFileUploadRequest, required
    - `loadNum` string, required: The load's external number in the TMS (brokerageLoadId)
    - `internalLoadReference` string: Optional internal load identifier from the TMS (customerLoadInternalId). Only included when available.
    - `filename` string, required: Original filename including extension. Supported extensions: `.pdf`, `.jpg`, `.jpeg`, `.png`, `.heic`, `.webp`, `.tiff`, `.tif`
    - `fileType` 'INVOICE' | 'POD' | 'BOL' | 'RATE_CONFIRMATION' | 'LUMPER_RECEIPT' | 'OTHER', required: The category of the document being uploaded
    - `contentType` string, required: MIME type of the file. Supported values: `application/pdf`, `image/jpeg`, `image/png`, `image/heic`, `image/webp`, `image/tiff`
    - `content` string, required: Base64-encoded file bytes
    - `sizeBytes` integer, required: File size in bytes
    - `checksum` string, required: MD5 hex digest of the raw (pre-encoding) file bytes, used for integrity verification
    - `referenceNumbers` LoadFileUploadReferenceNumbers
      - `invoiceNumber` string: Required when fileType is INVOICE
    - `source` LoadFileUploadSource: Origin of the uploaded document (e.g. a carrier or driver)
      - `type` 'CARRIER' | 'BROKER' | 'SHIPPER' | 'CONSIGNEE' | 'DRIVER' | 'OTHER', required: The kind of entity that provided the document
      - `identifierType` 'MC_NUMBER' | 'DOT_NUMBER' | 'SCAC' | 'EMAIL' | 'NAME' | 'EXTERNAL_ID', required: How the source entity is identified
      - `identifier` string, required: The identifier value (e.g. MC number, SCAC code, email address)
      - `name` string: Optional display name for the source entity
    - `createdAt` string: ISO 8601 timestamp of when the document was collected/created

## Response `200`

Upload results, including per-file success or failure details

- BatchFileUploadResponse
  - `summary` FileUploadSummary, required
    - `total` integer, required: Total number of files submitted
    - `succeeded` integer, required: Number of files successfully uploaded
    - `failed` integer, required: Number of files that failed to upload
  - `results` FileUploadResult[], required
    - union
      - FileUploadSuccess
        - `filename` string, required
        - `success` true, required
        - `data` object, required
          - `size` integer, required: Size of the uploaded file in bytes
          - `contentType` string, required: MIME type of the uploaded file
          - `id` string: ID assigned to the document by the TMS, if available
      - FileUploadFailure
        - `filename` string, required
        - `success` false, required
        - `error` string, required: Error message describing why the upload failed

## Other responses

- `400`: Bad request

---

[API](https://skmtc.dev/goaugment/apis/webhooks.md) - [All operations](https://skmtc.dev/goaugment/apis/webhooks/llms.txt) - [OpenAPI document](https://skmtc.dev/goaugment/apis/webhooks/revisions/a074b2ada419?raw)
