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

# 1. Upload / Update Shipment Data – TransData

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

## Overview

### Purpose

* Upload shipment data.
* Get a print-ready label image.
* Get the tracking number and label information.
* Update uploaded shipment data.

> **Note:**
>
> * **To update**: send the same edelno and epino. All fields except the edelno and epino can be updated.
> * If your company has multiple customer codes (e.g.,一般、冷藏、小物件), enter the customer code, package count, weight, product category, and sender information that match each shipment.
> * A single upload may contain multiple shipments, each with a different customer code.
> * Before the driver picks up, prepare a shipment manifest (two copies): see [Shipment Manifest](https://developer.hct.com.tw/files/logistics-share-docs/other/en/logistics-shipping-manifest.md).

## Prerequisites

* [ ] Company account (`company`) and company password (`password`): request them from your HCT branch.
* [ ] Customer code (`escsno`): contact your HCT branch.
* [ ] Settings for each customer code (e.g., weight unit): contact your HCT branch.
* [ ] Origin station (`esstno`): as specified in your contract; contact 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

* Without label images: max **20 records** per request.
* With label images: max **5 records** per request.
* The following characters are **not allowed** in any field: `&` `"` `>` `<` `'`
* Use **UTF-8** for text.

### Endpoint

| Method | Endpoint | SOAP Action | Authentication | Notes |
| - | - | - | - | - |
| POST | `/service1.asmx` | TransData\_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 | TransData\_Json | Object | Y | SOAPAction: `TransData_Json` Request object | `<TransData_Json  xmlns="http://tempuri.org/"></TransData_Json >` |

* **TransData\_Json**

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

* **json object**

| No. | Parameter | Type | Required | Description | Example |
| - | - | - | - | - | - |
| 1 | epino | String(30) | Y | Order number Rules: 1. Max 30 characters 2. Letters and digits only 3. If no tracking number is provided, must be unique within the same day | 20260812000000000002 |
| 2 | ercsig | String(40) | Y | Recipient name. **Chinese only.** | 王小明 |
| 3 | ertel1 | String(20) | Y | Recipient phone. See [Phone Number Rules – Rules](https://developer.hct.com.tw/files/logistics-share-docs/fields/en/ertel.md). | See [Phone Number Rules – Examples](https://developer.hct.com.tw/files/logistics-share-docs/fields/en/ertel.md) |
| 4 | ertel2 | String(20) | N | Recipient phone. See [Phone Number Rules – Rules](https://developer.hct.com.tw/files/logistics-share-docs/fields/en/ertel.md). | See [Phone Number Rules – Examples](https://developer.hct.com.tw/files/logistics-share-docs/fields/en/ertel.md) |
| 5 | eraddr | String(100) | Y | Recipient address See [Delivery Address Rules – Rules](https://developer.hct.com.tw/files/logistics-share-docs/fields/en/eraddr.md). | See [Delivery Address Rules – Examples](https://developer.hct.com.tw/files/logistics-share-docs/fields/en/eraddr.md) |
| 6 | ejamt | String(4) | Y | Number of packages for this shipment. Integer only. See [Package Weight – Package Count](https://developer.hct.com.tw/files/logistics-share-docs/fields/en/package-weight.md). | 1 |
| 7 | eqamt | String(5) | N | Weight of this shipment. Integer only. See [Package Weight – Weight Unit](https://developer.hct.com.tw/files/logistics-share-docs/fields/en/package-weight.md). | 5 |
| 8 | esdate | String(8) | N | Ship date: the date the parcel is expected to be handed over to HCT (time zone: UTC+8). Format: `yyyymmdd`. Defaults to the current date (UTC+8) if not provided. | |
| 9 | escsno | String(11) | N | Customer code to use for this shipment. | 12345678901 |
| 10 | esstno | String(4) | N | Origin station. Contact your HCT branch if unsure. | 0001 |
| 11 | edelno | String(10) | N | HCT tracking number If not provided, the system assigns one automatically. To use your own tracking numbers, request a number range from the branch that opened your account. **Format**: tracking number (9 digits) + check digit (1 digit) **Check digit**: remainder of the first 9 digits divided by 7, i.e. **MOD(9 digits, 7)** | 1234567891 |
| 12 | etcsig | String(40) | N | Sender name. **Chinese only.** | 王大明 |
| 13 | ettel1 | String(15) | N | Sender phone 1. See [Phone Number Rules – Rules](https://developer.hct.com.tw/files/logistics-share-docs/fields/en/ertel.md). | See [Phone Number Rules – Examples](https://developer.hct.com.tw/files/logistics-share-docs/fields/en/ertel.md) |
| 14 | ettel2 | String(15) | N | Sender phone 2. See [Phone Number Rules – Rules](https://developer.hct.com.tw/files/logistics-share-docs/fields/en/ertel.md). | See [Phone Number Rules – Examples](https://developer.hct.com.tw/files/logistics-share-docs/fields/en/ertel.md) |
| 15 | etaddr | String(100) | N | Sender address. **Chinese address only.** | 臺北市中正區建國里重慶南路一段122號 |
| 16 | eddate | String(8) | N | Requested delivery date (time zone: UTC+8) Format: `yyyymmdd`. If not provided, no date is requested (Mon–Thu shipments are delivered the next day; Friday shipments are delivered the following Monday; delivery is postponed over consecutive holidays). **Notes**: 1. Can be set up to **D+10** (including holidays). 2. Sunday delivery cannot be requested. 3. Monday–Thursday: the date must be later than D+1. 4. Friday: delivered the following Monday by default; to request Saturday delivery, enter **D+1**. | |
| 17 | eqmny | String(5) | N | COD amount. Defaults to `0`. | 1000 |
| 18 | eprdct | String(2) | N | Waybill type. See [Waybill Type – Description](https://developer.hct.com.tw/files/logistics-share-docs/fields/en/eprdct.md). | See [Waybill Type – Enum Values](https://developer.hct.com.tw/files/logistics-share-docs/fields/en/eprdct.md) |
| 19 | emark | String(100) | N | Remarks. If the pickup location is listed in [Remarks – Enum Values](https://developer.hct.com.tw/files/logistics-share-docs/fields/en/emark.md), include the corresponding keyword. | 易碎品(全家) |
| 20 | eprdcl2 | String(3) | N | Product category See [Product Category – Description](https://developer.hct.com.tw/files/logistics-share-docs/fields/en/eprdcl2.md). | See [Product Category – Enum Values](https://developer.hct.com.tw/files/logistics-share-docs/fields/en/eprdcl2.md) |
| 21 | egamt | String(5) | N | Declared value. If provided, a declared-value fee is charged based on this amount. | 5000 |
| 22 | erenum | String(2) | N | Number of return receipts. Requires the return-receipt feature to be enabled for the customer code. | 1 |
| 23 | HAWB | String(50) | N | House air waybill number (**required for cross-border shipments**) | HAWB123456789 |
| 24 | boxNo | String(50) | N | Customs box number (**required for cross-border shipments**) | BOX001 |
| 25 | MAWB | String(50) | N | Master air waybill number (**required for cross-border shipments**) | MAWB987654321 |
| 26 | Declare | String(50) | N | Customs declaration number (**required for cross-border shipments**) | DEC20260806001 |

### Response

| No. | Parameter | Type | Description |
| - | - | - | - |
| 1 | Num | String(2) | Sequence number |
| 2 | success | String(1) | Result (`Y`: created / `R`: updated / `N`: failed) |
| 3 | edelno | String(10) | HCT tracking number |
| 4 | epino | String(30) | Order number |
| 5 | erstno | String(3) | Destination station code |
| 6 | eqamt | String(5) | Weight |
| 7 | image | | Label image as a hexadecimal string |
| 8 | ErrMsg | String(200) | Error message |
| 9 | NewOutArea | String(20) | New collection note zone |
| 10 | eqmny | String(5) | COD amount |
| 11 | CODE1 | String(1) | Category |
| 12 | CODE2 | String(3) | Destination short code |
| 13 | CODE3 | String(1) | Satellite zone |
| 14 | CODE4 | String(3) | Note zone |
| 15 | CODE5 | String(5) | Stack zone |
| 16 | CODE7 | String(11) | QR code |
| 17 | AREAS | String(5) | Intermodal zone indicator |
| 18 | MDCODE1 | String(5) | MD destination code – satellite zone |
| 19 | MDCODE2 | String(3) | MD destination code – note zone |
| 20 | MDCODE3 | String(1) | MD destination code – stack zone |

#### 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 `edelno`: duplicate tracking number |
| 貨號錯誤 | Invalid `edelno` |
| 貨號檢查碼錯誤 | Invalid `edelno`: wrong check digit |
| 訂單編號錯誤 | Invalid `epino` |
| 客代錯誤 | Invalid `escsno` |
| 件數錯誤 | Invalid `ejamt` |
| 重量錯誤 | Invalid `eqamt` |
| 收貨人名稱錯誤 | Invalid `ercsig` |
| 收貨人電話錯誤 | Invalid `ertel1` |
| 收貨人地址錯誤 | Invalid `eraddr` |
| 出貨站錯誤 | Invalid `esstno` |
| 代收貨款錯誤 | Invalid `eqmny` |
| 報值金額錯誤 | Invalid `egamt` |
| 總長請輸入重量60、90、120、150、151\~999 | Invalid `eqamt`: for the total-length unit, weight must be 60, 90, 120, 150, or 151–999 |
| 總長件數只能為1件 | Invalid `ejamt`: for the total-length unit, package count must be 1 |
| 回單只能填入兩位數字 | Invalid `erenum`: max 2 digits |
| 外島綠島.蘭嶼.琉球.金門.連江等，沒有做低溫配送業務，只澎湖有做低溫配送業務 | Low-temperature delivery is not available to outlying islands such as Green Island, Lanyu, Xiaoliuqiu, Kinmen, and Lienchiang (Matsu). Only Penghu supports it. |
| 資料錯誤請確認 | Invalid data; please check |
| 資料處理中，無法更新資料 | Data is being processed and cannot be updated |
| 三個月內貨號重複 | Duplicate tracking number within the past 3 months |
| 訂單編號重複 | Duplicate order number |

## SDK & Sample Code

### C#: Convert the `image` Hex String to an Image

```csharp theme={null}
// Convert a hex string to a byte array
byte[] GetBytes(string HexString)
{
    int byteLength = HexString.Length / 2;
    byte[] bytes = new byte[byteLength];
    string hex;
    int j = 0;
    for (int i = 0; i < bytes.Length; i++)
    {
        hex = new String(new Char[]
        {
            HexString[j], HexString[j + 1]
        });
        bytes[i] = HexToByte(hex);
        j = j + 2;
    }
    return bytes;
}
byte HexToByte(string hex)
{
    if (hex.Length > 2 || hex.Length <= 0) throw new ArgumentException("hex must be 1 or 2 characters in length");
    byte newByte = byte.Parse(hex, System.Globalization.NumberStyles.HexNumber);
    return newByte;
}
// Convert a byte array to an image
Bitmap image(byte[] b)
{
    // Load the bytes into a MemoryStream
    MemoryStream ms = new MemoryStream(b);
    // Convert back to an image
    Bitmap bmp = (Bitmap) Bitmap.FromStream(ms);
    BitmapData bmpData = bmp.LockBits(new Rectangle(0, 0, bmp.Width, bmp.Height), ImageLockMode.ReadOnly, PixelFormat.Format1bppIndexed);
    // Convert the image to 1-bit indexed color (monochrome)
    bmp = new Bitmap(bmp.Width, bmp.Height, bmpData.Stride, PixelFormat.Format1bppInd exed, bmpData.Scan0);
    return bmp;
}
```

### 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>
        <TransData_Json xmlns="http://tempuri.org/">
            <company>company</company>
            <password>password</password>
            <json>
            [
                {
                    "epino"  : "20260812000000000002",
                    "ercsig" : "王小明",
                    "ertel1" : "0912345678",
                    "ertel2" : "0223456789",
                    "eraddr" : "台北市信義區松仁路100號",
                    "ejamt"  : "1",
                    "eqamt"  : "10",
                    "esdate" : "20260815",
                    "escsno" : "",
                    "esstno" : "",
                    "edelno" : "",
                    "etcsig" : "王大明",
                    "ettel1" : "0912345678",
                    "ettel2" : "0223456789",
                    "etaddr" : "台北市信義區松仁路100號",
                    "eddate" : "20260812",
                    "eqmny"  : "0",
                    "eprdct" : "11",
                    "emark"  : "易碎",
                    "eprdcl2": "001",
                    "egamt"  : "5000",
                    "erenum" : "",
                    "HAWB"   : "",
                    "boxNo"  : "",
                    "MAWB"   : "",
                    "Declare": ""
                }
            ]
            </json>
        </TransData_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>
        <TransData_JsonResponse xmlns="http://tempuri.org/">
            <TransData_JsonResult>[
  {
    "Num": "1",
    "success": "Y",
    "edelno": "1004374792",
    "epino": "20260812000000000002",
    "erstno": "131",
    "eqamt": "10",
    "image": "89504E470...(truncated)",
    "ErrMsg": "",
    "NewOutArea": " -131- -931-1  9311",
    "eqmny": "0",
    "CODE1": " ",
    "CODE2": "131",
    "CODE3": " ",
    "CODE4": "931",
    "CODE5": "1",
    "CODE7": "^131931931^",
    "AREAS": "*",
    "MDCODE1": " ",
    "MDCODE2": "931",
    "MDCODE3": "1"
  }
]</TransData_JsonResult>
        </TransData_JsonResponse>
    </soap:Body>
</soap:Envelope>
```


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