# Update Shipment

## /shipments/:shipment\_id

<mark style="color:orange;">`PUT`</mark> `https://api.terminal.africa/v1/shipments/:shipment_id`

This endpoint allows you to update a draft shipment.

#### Path Parameters

| Name                                           | Type   | Description                        |
| ---------------------------------------------- | ------ | ---------------------------------- |
| shipment\_id<mark style="color:red;">\*</mark> | String | Unique reference for the shipment. |

#### Request Body

| Name              | Type   | Description                                                                                                                          |
| ----------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------ |
| address\_to       | String | Unique id of delivery address.                                                                                                       |
| address\_from     | String | Pickup address for shipment.                                                                                                         |
| address\_return   | String | Return address for shipment.                                                                                                         |
| metadata          | Object | Provides additional information for a shipment.                                                                                      |
| parcel            | String | Unique identifier of parcel to be shipped.                                                                                           |
| shipment\_purpose | String | Purpose of shipment. Options are ***commercial***, ***personal***, ***sample***, ***return-after-repair***, ***return-for-repair.*** |
| parcels           | Array  | List of parcel ids for creating a multi-parcel shipments. One of ***parcel*** or **parcels** must be provided.                       |

{% tabs %}
{% tab title="200: OK Shipment updated successfully." %}

```javascript
{
    "status": true,
    "message": "Shipment updated successfully",
    "data": {
        "_id": "6375050a6d4274c046f439df",
        "address_to": {
            "user": "USER-27450202164",
            "city": "Leeds",
            "coordinates": {
                "lat": 53.809487,
                "lng": -1.5072216,
                "place_id": "ChIJD53YWnlceUgRsmVRYbUVibA"
            },
            "country": "GB",
            "email": "nnamdiokoh43@gmail.com",
            "first_name": "Nnamdi",
            "is_residential": true,
            "last_name": "Okoh",
            "line1": "2 Seaforth Avenue",
            "line2": "",
            "phone": "+447522689641",
            "place_id": "ChIJD53YWnlceUgRsmVRYbUVibA",
            "state": "Leeds",
            "zip": "LS96BE",
            "address_id": "AD-03203451781",
            "created_at": "2022-10-09T10:13:46.176Z",
            "updated_at": "2022-10-09T10:13:46.176Z",
            "__v": 0
        },
        "address_from": {
            "user": "USER-27450202164",
            "city": "Bethesda",
            "coordinates": {
                "lat": 38.9908175,
                "lng": -77.0987004,
                "place_id": "Eiw0ODUwIFJ1Z2J5IEF2ZSAjNDAxLCBCZXRoZXNkYSwgTUQgMjA4MTQsIFVTQSIfGh0KFgoUChIJ21n-ZGHJt4kRUJYKH_5GV40SAzQwMQ"
            },
            "country": "US",
            "email": "pickup@example.com",
            "first_name": "Diva",
            "is_residential": true,
            "last_name": "Lenore",
            "line1": "4850 Rugby Avenue",
            "line2": "Apt. 401",
            "metadata": {
                "platform": "logistics"
            },
            "phone": "+12027902590",
            "place_id": "Eiw0ODUwIFJ1Z2J5IEF2ZSAjNDAxLCBCZXRoZXNkYSwgTUQgMjA4MTQsIFVTQSIfGh0KFgoUChIJ21n-ZGHJt4kRUJYKH_5GV40SAzQwMQ",
            "state": "Maryland",
            "zip": "20814",
            "address_id": "AD-07132639725",
            "created_at": "2022-09-05T23:52:28.436Z",
            "updated_at": "2022-09-05T23:52:28.436Z",
            "__v": 0
        },
        "address_return": {
            "user": "USER-27450202164",
            "city": "Victoria Island",
            "coordinates": {
                "lat": 6.4263118,
                "lng": 3.4184293,
                "place_id": "ChIJ1SArPc2KOxARwfjurnR1bXY"
            },
            "country": "NG",
            "email": "nnamdiokoh43@gmail.com",
            "first_name": "Nnamdi",
            "is_residential": true,
            "last_name": "Okoh",
            "line1": "4 Gabaro Street, Victoria Island, Lagos",
            "line2": "",
            "phone": "+2348122689641",
            "place_id": "ChIJ1SArPc2KOxARwfjurnR1bXY",
            "state": "Lagos",
            "zip": "--",
            "address_id": "AD-97595221861",
            "created_at": "2022-10-09T10:12:36.450Z",
            "updated_at": "2022-10-09T10:12:36.450Z",
            "__v": 0
        },
        "parcel": {
            "_id": "63429e4a12432be769d4b027",
            "description": "sets of electronics package items description",
            "items": [
                {
                    "description": "iphone x sets of description testing",
                    "name": "Iphone x",
                    "weight": 0.5,
                    "quantity": 2,
                    "value": 100000,
                    "currency": "NGN"
                }
            ],
            "metadata": {
                "platform": "logistics",
                "type": "third_party"
            },
            "packaging": {
                "_id": "63429e2512432be769d4b01d",
                "height": 1,
                "length": 47,
                "name": "DHL Express Large Flyer",
                "size_unit": "cm",
                "type": "soft-packaging",
                "user": "USER-27450202164",
                "weight": 0.1,
                "weight_unit": "kg",
                "width": 38,
                "packaging_id": "PA-05804394376",
                "created_at": "2022-10-09T10:10:45.673Z",
                "updated_at": "2022-10-09T10:10:45.673Z",
                "__v": 0
            },
            "total_weight": 0.5,
            "user": "USER-27450202164",
            "weight_unit": "kg",
            "parcel_id": "PC-09857312356",
            "created_at": "2022-10-09T10:11:22.631Z",
            "updated_at": "2022-10-09T10:11:22.631Z",
            "__v": 0,
            "contains_perishables": false,
            "total_value": 100000,
            "id": "63429e4a12432be769d4b027"
        },
        "pickup_date": null,
        "shipment_purpose": "personal",
        "status": "draft",
        "user": {
            "business_category": "",
            "_id": "62b62e12cd7114864f36572c",
            "admin": false,
            "carriers": {
                "domestic": [
                    "CA-07032569055",
                    "CA-18228854618",
                    "CA-31377601348",
                    "CA-71017347351",
                    "CA-85479996273",
                    "CA-49411197653",
                    "CA-19429970231",
                    "CA-81957188177"
                ],
                "international": [
                    "CA-85479996273",
                    "CA-49411197653",
                    "CA-19429970231",
                    "CA-81957188177",
                    "CA-42199963340"
                ],
                "regional": [
                    "CA-07032569055",
                    "CA-18228854618",
                    "CA-31377601348",
                    "CA-71017347351",
                    "CA-85479996273",
                    "CA-49411197653",
                    "CA-19429970231",
                    "CA-81957188177"
                ]
            },
            "company_name": "Eclectic Source",
            "country": "NG",
            "email": "team@theeclecticsource.com",
            "first_name": "Nnamdi",
            "last_name": "Okoh",
            "metadata": {
                "storeId": "CF1X33wJMCaG2s7d5OckHBoWQlj2",
                "totalShipment": 113,
                "totalShipmentAmount": 228267.76,
                "totalWalletInflow": 0,
                "octa_profile_id": "61669082052317172646fzxiobn3lisj"
            },
            "phone": "+2348122689641",
            "public_key": "pk_test_mmXALQGeB2rS6ZG54UMu1nQUThCUp7fK",
            "secret_key": "sk_test_HbftxQxW3VsovsWhtU6yDM53zn12gRfX",
            "wallet": "6342ed1cd5acb7ed14f6c4cd",
            "user_id": "USER-27450202164",
            "created_at": "2022-06-24T21:35:14.842Z",
            "updated_at": "2022-11-22T18:18:40.896Z",
            "__v": 1,
            "plan": "webflow",
            "barred_countries": [],
            "country_state": "Lagos",
            "referralCode": "REF-41078297020",
            "account_active": false,
            "wallet_enabled": true,
            "name": "Nnamdi Okoh",
            "id": "62b62e12cd7114864f36572c"
        },
        "events": [],
        "shipment_id": "SH-59981754867",
        "created_at": "2022-11-16T15:43:06.657Z",
        "updated_at": "2022-11-24T21:43:10.807Z",
        "__v": 0,
        "metadata": {
            "shipment_payload": {}
        }
    }
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: 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:

```
GET https://docs.terminal.africa/tship/shipment/update-shipment.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
