> 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-items.md).

# Update Document Request Items

Update line items on a draft document request (HS codes, values, regulatory profiles).

`/regulatory-documents/request/:request_id`

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

Re-matches `available_documents` after item changes. Clears HS-code validation errors when fixed.

**Draft:** add new items (omit `item_id`) or update existing items (include `item_id`).

**After purchase (failed-doc recovery):** only existing items may be updated. `item_id` is required on every item.

#### 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                           |
| --------------------------------------- | ----- | ------------------------------------- |
| items<mark style="color:red;">\*</mark> | Array | One or more item objects (see below). |

**Item object**

| Name                                           | Type             | Description                                                                  |
| ---------------------------------------------- | ---------------- | ---------------------------------------------------------------------------- |
| item\_id                                       | String           | Required to update an existing item. Omit to append a new item (draft only). |
| description<mark style="color:red;">\*</mark>  | String           | Item description.                                                            |
| hs\_code<mark style="color:red;">\*</mark>     | String           | Harmonized System code. e.g. `0901.21`.                                      |
| value<mark style="color:red;">\*</mark>        | Number           | Item value.                                                                  |
| currency<mark style="color:red;">\*</mark>     | String           | Item value currency. 3-letter code. e.g. `USD`.                              |
| quantity<mark style="color:red;">\*</mark>     | Number           | Quantity.                                                                    |
| weight<mark style="color:red;">\*</mark>       | Number           | Weight per unit.                                                             |
| weight\_unit<mark style="color:red;">\*</mark> | String           | Weight unit. e.g. `kg`.                                                      |
| manufacturer\_country                          | String           | ISO country code. e.g. `NG`.                                                 |
| manufacturers\_profile                         | Object or String | Manufacturer address snapshot or address id.                                 |
| regulatory\_profiles                           | Object           | Map of document slug → profile fields. See Update Item Regulatory Profile.   |

#### Sample body: fix missing HS code

```json
{
    "items": [
        {
            "item_id": "DRI-ITEM002",
            "description": "Gift box",
            "hs_code": "4819.20",
            "value": 25,
            "currency": "USD",
            "quantity": 1,
            "weight": 0.5,
            "weight_unit": "kg",
            "manufacturer_country": "NG"
        }
    ]
}
```

#### Sample body : add new item (draft only)

```json
{
    "items": [
        {
            "description": "Organic honey",
            "hs_code": "0409.00",
            "value": 15,
            "currency": "USD",
            "quantity": 2,
            "weight": 1,
            "weight_unit": "kg",
            "manufacturer_country": "NG"
        }
    ]
}
```

Returns the full document request object (same shape as Get Document Request).

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

```json
{
    "status": true,
    "message": "Document request updated successfully",
    "data": {
        "request_id": "DRQ-ABC1234567",
        "status": "draft",
        "validation": {
            "ok": true,
            "items_missing_hs_codes": []
        },
        "error": "",
        "available_documents": []
    }
}
```

{% endtab %}
{% endtabs %}


---

# 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-items.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.
