> For the complete documentation index, see [llms.txt](https://docs.terminal.africa/tship/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.terminal.africa/tship/regulatory-documents/update-document-request-shipping.md).

# Update Document Request Shipping

Update carrier and tracking number on an invoice-sourced document request.

`/regulatory-documents/request/:request_id/shipping`

<mark style="color:orange;">`PUT`</mark> `https://api.terminal.africa/v1/regulatory-documents/request/:request_id/shipping`

**Invoice requests only.** Shipment-sourced requests already have carrier and tracking from the shipment.

When `carrier` is updated, `available_documents` are re-matched (carrier can affect FDA eligibility).

At least one of `carrier` or `tracking_number` is required.

#### Path Parameters

| Name                                          | Type   | Description                                 |
| --------------------------------------------- | ------ | ------------------------------------------- |
| request\_id<mark style="color:red;">\*</mark> | String | Document request id. e.g. `DRQ-ABC1234567`. |

#### Headers

| Name                                            | Type   | Description                      |
| ----------------------------------------------- | ------ | -------------------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | Set value to `Bearer SECRET_KEY` |
| Content-Type<mark style="color:red;">\*</mark>  | String | Set value to `application/json`  |

#### Request Body

| Name             | Type   | Description                                                                                               |
| ---------------- | ------ | --------------------------------------------------------------------------------------------------------- |
| carrier          | String | Carrier slug or carrier id. e.g. `dhl`, `dhl-ng`, `fedex`, `CRR-7890`. Validated against active carriers. |
| tracking\_number | String | Carrier tracking number. Pass `""` to clear.                                                              |

#### Sample body : update both

```json
{
    "carrier": "fedex",
    "tracking_number": "1Z999AA10123456784"
}
```

#### Sample body : tracking only

```json
{
    "tracking_number": "1Z999AA10123456784"
}
```

#### Sample body : carrier only

```json
{
    "carrier": "dhl-ng"
}
```

Note: `dhl` is normalized to `dhl-ng` internally for regulatory matching.

{% tabs %}
{% tab title="200: OK Document request shipping details updated successfully" %}

```json
{
    "status": true,
    "message": "Document request shipping details updated successfully",
    "data": {
        "request_id": "DRQ-ABC1234567",
        "source": "invoice",
        "status": "draft",
        "carrier_slug": "dhl-ng",
        "carrier_logo": "https://cdn.terminal.africa/carriers/dhl.png",
        "tracking_number": "1Z999AA10123456784",
        "currency": "USD",
        "available_documents": [
            {
                "type": "FDA",
                "name": "FDA Prior Notice",
                "amount": 1.67,
                "currency": "USD",
                "free": false,
                "automated": true
            }
        ]
    }
}
```

{% endtab %}
{% endtabs %}

#### Common errors

| Status | Message                                                                       |
| ------ | ----------------------------------------------------------------------------- |
| 400    | Carrier and tracking number can only be updated for invoice document requests |
| 404    | Carrier not found for carrier - {value}                                       |
| 400    | Carrier is not available                                                      |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.terminal.africa/tship/regulatory-documents/update-document-request-shipping.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
