> ## Documentation Index
> Fetch the complete documentation index at: https://developer.hct.com.tw/llms.txt
> Use this file to discover all available pages before exploring further.

# 2. Update Shipment Weight – UpdData

> **Version**: v1.0.0 \
>
> **Status**: Final \
>
> **Last Updated**: 2026-11-24

## Overview

### Purpose

Updates only the weight of shipment data that has already been uploaded.

> **Note:**
>
> * This API only updates the shipment weight and does **not** return a new label. If you need a new label, update the shipment via **TransData** instead.

## Prerequisites

* [ ] Company account (`company`) and company password (`password`): request them from your HCT branch.

## Authentication

This API currently provides no separate authentication mechanism. Call it directly according to this API specification.

## API Overview

* For the SOAP Envelope, HTTP request headers, and namespace definitions, see **[SOAP Specification](https://developer.hct.com.tw/files/logistics-share-docs/protocol-specifications/en/soap-specification.md)**.

### Environments

| Environment | URL |
| - | - |
| Test | [https://hctrt.hct.com.tw/edi\_webservice2\_test/service1.asmx](https://hctrt.hct.com.tw/edi_webservice2_test/service1.asmx) |
| Production | [https://hctrt.hct.com.tw/edi\_webservice2/service1.asmx](https://hctrt.hct.com.tw/edi_webservice2/service1.asmx) |

| Item | Value | Notes |
| - | - | - |
| Response timeout | 60 s | Maximum time to wait for the server to process and return data. |

### Data Format

* Do not send more than **20 records** per request.
* Use **UTF-8** for text.

### Endpoint

| Method | Endpoint | SOAP Action | Authentication | Notes |
| - | - | - | - | - |
| POST | `/service1.asmx` | UpdData\_Json | None | Supports JSON format |

## API Specification

### Request

| No. | Parameter | Type | Required | Description | Example |
| - | - | - | - | - | - |
| 1 | Body | SOAP Body | Y | SOAP request body | `<soap12:Body> </soap12:Body>` |
| 2 | UpdData\_Json | Object | Y | SOAPAction: `UpdData_Json` Request object | `<UpdData_Json  xmlns="http://tempuri.org/"></UpdData_Json >` |

* **UpdData\_Json**

| No. | Parameter | Type | Required | Description | Example |
| - | - | - | - | - | - |
| 1 | company | String | Y | Company account | |
| 2 | password | String | Y | Company password | |
| 3 | json | Object | Y | Data to update | |

* **json object**

| No. | Parameter | Type | Required | Description | Example |
| - | - | - | - | - | - |
| 1 | epino | String(30) | Y | Order number | 20260812000000000002 |
| 2 | edelno | String(10) | Y | HCT tracking number | 1234567891 |
| 3 | eqamt | String(5) | Y | Weight. Integer only. See [Package Weight](https://developer.hct.com.tw/files/logistics-share-docs/fields/en/package-weight.md). | 5 |

### Response

| No. | Parameter | Type | Description |
| - | - | - | - |
| 1 | Num | String(2) | Sequence number |
| 2 | success | String(1) | Result (`R`: updated / `N`: failed) |
| 3 | edelno | String(10) | HCT tracking number |
| 4 | erstno | String(4) | Destination station |
| 5 | epino | String(30) | Order number |
| 6 | eqamt | String(5) | Weight |
| 7 | ErrMsg | String(200) | Error message |

#### HTTP Status Codes

| Status Code | Description |
| - | - |
| 200 | Success |

#### Business Error Messages

> The following values are returned in `ErrMsg` as-is (in Chinese).

| ErrMsg Value | Description |
| - | - |
| 公司名稱或密碼錯誤 | Invalid company account or password |
| 重量錯誤 | Invalid weight |
| 資料處理中，無法更新重量 | Data is being processed; the weight cannot be updated |
| 查無貨號和訂單編號 | Tracking number and order number not found |

## SDK & Sample Code

### Example

#### Request

```bash theme={null}
curl --location 'https://hctrt.hct.com.tw/edi_webservice2_test/service1.asmx' \
--header 'Content-Type: application/soap+xml; charset=utf-8' \
--data '<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
    <soap12:Body>
        <UpdData_Json xmlns="http://tempuri.org/">
            <company>company</company>
            <password>password</password>
            <json>
            [
                {
                    "epino"  : "20260820000000000002",
                    "edelno" : "1004378093",
                    "eqamt"  : "5"
                }
            ]
            </json>
        </UpdData_Json>
    </soap12:Body>
</soap12:Envelope>'
```

#### Response

```xml theme={null}
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <soap:Body>
        <UpdData_JsonResponse xmlns="http://tempuri.org/">
            <UpdData_JsonResult>[
  {
    "Num": "1",
    "edelno": "1004378093",
    "epino": "20260820000000000002",
    "erstno": "131 ",
    "eqamt": "5",
    "success": "R",
    "ErrMsg": ""
  }
]</UpdData_JsonResult>
        </UpdData_JsonResponse>
    </soap:Body>
</soap:Envelope>
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.