# Update Order

## Recipient Address

For addresses with a **3-level structure** (Province/City, District, Ward/Commune — based on Vietnam’s administrative divisions **before July 1, 2025**), provide the following fields:

* **ReceiverProvinceName**: Recipient’s province/city name.
* **ReceiverDistrictName**: Recipient’s district name.
* **ReceiverWardName**: Recipient’s ward/commune name.

For addresses with a **2-level structure** (Province/City, Ward/Commune — based on Vietnam’s administrative divisions **from July 1, 2025**), provide the following fields:

* **ReceiverProvinceName**: Recipient’s province/city name.
* <mark style="color:red;">**ReceiverDistrictName**</mark><mark style="color:red;">: Leave null.</mark>
* **ReceiverWardName**: Recipient’s ward/commune name.

## CustomerAPIUpdateOrder

<mark style="color:green;">`POST`</mark> `/api/Customer/CustomerAPIUpdateOrder`

#### Request Body

<table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>OrderCode<mark style="color:red;">*</mark></td><td>string</td><td>From response of <a href="/pages/-MeyOZOmtKnELX5Q2Gp7">Create an order api</a></td></tr><tr><td>ClientHubID</td><td>interger</td><td>ClientHubID (Required when not passed CusWareHouseID)</td></tr><tr><td>CusWareHouseID</td><td>string</td><td>ShopID/WareHouseID (Required when not passed ClientHubID)</td></tr><tr><td>ContactName</td><td>string</td><td>Contact name</td></tr><tr><td>ContactPhone</td><td>string</td><td>Contact phone</td></tr><tr><td>SenderAddress</td><td>string</td><td>Sender full address</td></tr><tr><td>Note</td><td>string</td><td>Note</td></tr><tr><td>ExtraServices</td><td>array</td><td>List of VAT Services</td></tr><tr><td>InformFee</td><td>string</td><td>Declared value. Cases to note when declaring:<br>1 - Price calculation volume >= 2.5kg need to choose type = HH (goods).<br>2 - Type = HH (goods), required to enter the declared value (InformFee).<br>3 - In the form to select DVBH (insurance service), required to enter the declared value (InformFee).</td></tr><tr><td>SpecialInstructionId</td><td>string</td><td>Special note code for COD orders only:<br>1 - Show the goods.<br>0 - Do not show the goods.</td></tr><tr><td>MailerType</td><td>string</td><td>Code type of freight:<br>HH - Goods<br>TL - Document</td></tr><tr><td>ExternalCode</td><td>string</td><td>Customer order code</td></tr><tr><td>ReferenceCode</td><td>string</td><td>Customer reference code</td></tr><tr><td>CODAmount</td><td>number</td><td>The amount of COD will be collected from the recipient</td></tr><tr><td>ServiceTypeID</td><td>string</td><td>ServiceTypeID</td></tr><tr><td>Height</td><td>number</td><td>Height (cm)</td></tr><tr><td>Width</td><td>number</td><td>Width (cm)</td></tr><tr><td>Length</td><td>number</td><td>Length(cm)</td></tr><tr><td>Quantity</td><td>integer</td><td>Quantity package</td></tr><tr><td>RealWeight</td><td>number</td><td>Real Weight (kg)</td></tr><tr><td>ReceiverWardName</td><td>string</td><td>Recipient's Ward name</td></tr><tr><td>ReceiverDistrictName<mark style="color:red;">*</mark></td><td>string</td><td>Recipient's District name</td></tr><tr><td>ReceiverProvinceName<mark style="color:red;">*</mark></td><td>string</td><td>Recipient's Province name</td></tr><tr><td>ReceiverAddress</td><td>string</td><td>Recipient's full address</td></tr><tr><td>ReceiverName</td><td>string</td><td>Recipient's name</td></tr><tr><td>ReceiverPhone</td><td>string</td><td>Recipient's phone</td></tr><tr><td>ReceiveCompanyName</td><td>string</td><td>recipient company name</td></tr><tr><td>Packages</td><td>array</td><td><pre class="language-postman_json"><code class="lang-postman_json">{
    "PackageID": "", //PackageID,
    "Length": 100, // Length (cm) (Required when entering in Height, Width),
    "Width": 50, // Width (cm)(Required when entering in Height, Length),
    "Height": 80, // Height (cm) (Required when entering in Width, Length),
    "RealWeight": 25 //Real weight (kg)
}
</code></pre><p>(*)The number of Packages must be equal to Quantity property. In case Quantity = 1 thenPackages = []</p></td></tr><tr><td>COPAmt</td><td>number</td><td>COP amount (Cash on pickup)</td></tr><tr><td>RequestedDeliveryTime</td><td>datetime</td><td>Requested delivery time (only applicable to delivery service units that support scheduled delivery)</td></tr><tr><td>RequestedDeliveryType</td><td>string</td><td>Delivery appointment type:<br>"DUNGGIO": On-time<br>"TRUOCGIO": Before the specified time<br>(only applicable to delivery service units that support scheduled delivery)</td></tr></tbody></table>

{% tabs %}
{% tab title="200 " %}

```
{
    "Errors": [],
    "ErrorCode": "0",
    "OrderInfo": {
        "OrderCode": "HD000003",
        "ReferenceCode": "HD000004",
        "ExternalCode": "HD000003",
        "TotalServiceCost": 44176,
        "ExtraServices": [
            {
                "ServiceName": "Chuyển phát nhanh",
                "ServiceID": "DE",
                "Cost": 16800
            },
            {
                "ServiceName": "Hàng đông lạnh",
                "ServiceID": "HDL",
                "Cost": 15000
            },
            {
                "ServiceName": "Báo phát",
                "ServiceID": "BP",
                "Cost": 5000
            },
            {
                "ServiceName": "Phí xăng dầu",
                "ServiceID": "Fuel",
                "Cost": 3360
            },
            {
                "ServiceName": "Phí VAT",
                "ServiceID": "VAT",
                "Cost": 4016
            }
        ],
        "DeliveryType": "1"
    },
    "ErrorMessage": ""
}
```

{% endtab %}
{% endtabs %}

### Example

```json
{
   "OrderInfo":{
      "OrderCode": "HD000003",
      "ClientHubID":11583,
      "CusWareHouseID":"30984",
      "ContactName": "Trần Văn B",
      "ContactPhone": "0332318317",      
      "ReceiverPhone":"0345555777",
      "ReceiverName":"Nguyễn Thành Đạt",
      "ReceiverAddress":"12 Tân Trào, phường Tân Phú, Quận 7, Hồ Chí Minh, Việt Nam",
      "ReceiverProvinceName":"Hồ Chí Minh",
      "ReceiverDistrictName":"Quận 7",
      "ReceiverWardName":"Phường Tân Phú",   
      "RealWeight":1,
      "Length":0,
      "Width":0,
      "Height":0,
      "Quantity":1,
      "Note":"Tài liệu",
      "ServiceTypeID":"DE",
      "MailerType":"TL",
      "CODAmount":0,
      "ExternalCode":"HD000003",
      "SpecialInstructionId":1,
      "ReferenceCode": "HD000004",
      "ExtraServices":[
         {
            "ServiceID":"PTN",
            "Type":2
         },
         {
            "ServiceID":"BP",
            "Type":2
         }
      ]
   }
}
```

### Errors Code

{% hint style="danger" %}

* 1: Ward error&#x20;
* 2: District error&#x20;
* 3: Province error&#x20;
* 4: Duplicate ordercode
* 5: Server error&#x20;
* 6: Was an exception&#x20;
* 8: Update Order error&#x20;
* 9: SpecialInstruction is required&#x20;
* 10: ServiceType is required&#x20;
* 12: Account is invalid&#x20;
* 13: Order is not found&#x20;
* 15: OrderCode is required&#x20;
* 16: OrderCode is invalid
* 17: ReceiverAddress is invalid
* 18: MailerType is invalid
* 19: Quantity is invalid
* 20: Packages is invalid
* 21: Sender info incomplete
* 25: COPAmt is invalid
  {% endhint %}


---

# 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://apidoc.247express.vn/english-1.0.6/customer/update-order.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.
