# List shipment documents

`GET https://api.mothership.com/beta/documents/{shipmentId}`

Sandbox: `https://sandbox.api.mothership.com/beta/documents/{shipmentId}`

Generates URLs for a shipment's documents, such as the bill of lading and proof of delivery, when they are available.

Document URLs expire at `expiresAt`. Call this endpoint again for a fresh URL rather than storing one. To hear when a document is first attached or replaced, subscribe to the document [webhook events](https://developers.mothership.com/reference/webhooks).

> [!WARNING] Bill of Lading documents
> You must use Mothership provided Bill of Lading documents for pick-up. Failure to use this exact BOL will result in direct carrier billing at non-discounted rates.

## Authorization

Send your API token as a Bearer token: `Authorization: Bearer <token>`.

## Path parameters

- `shipmentId` (string, required): ID of the shipment to list documents for.

## Responses

### 200

Document details, in an array named `data`.

- `data` (array of objects, required)
  - `type` (string, required): Type of document. One of: `billOfLading`, `certificateOfInsurance`, `deliveryReceipt`, `proofOfDelivery`.
  - `url` (string, required): URL of the document.
  - `expiresAt` (string<date-time>, required): When the document URL expires, as an ISO 8601 date-time.

## Example request

```bash
curl --request GET \
  --url 'https://sandbox.api.mothership.com/beta/documents/MS5016101' \
  --header "Authorization: Bearer $MOTHERSHIP_API_TOKEN" \
  --header 'Accept: application/json'
```

## Example response (200)

```json
{
  "data": [
    {
      "type": "billOfLading",
      "url": "https://s3-us-west-1.amazonaws.com/mothership-shipments-bill-of-lading/MS5016101.pdf",
      "expiresAt": "2026-03-19T17:00:00.000Z"
    }
  ]
}
```