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

# 7. Upload Reverse Logistics Shipment Data – R_TransData

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

## Overview

### Purpose

* Uploads shipment data for return pickups.

## Prerequisites

* [ ] Request permission for this feature from your HCT branch. You must provide your customer code.
* [ ] 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.

## 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.
* The following characters are **not allowed** in any field: `&` `"` `>` `<` `'`
* Use **UTF-8** for text.

### Endpoint

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

* **R\_TransData\_Json**

| No. | Parameter | Type | Required | Description | Example |
| - | - | - | - | - | - |
| 1 | company | String | Y | Company account | |
| 2 | password | String | Y | Company password | |
| 3 | json | Object | Y | Reverse logistics 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. Must be unique within 90 days | 20260812000000000002 |
| 2 | ercsig | String(40) | Y | Return sender name. **Chinese only.** | 王小明 |
| 3 | ertel1 | String(20) | Y | Return 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) |
| 4 | ertel2 | String(12) | N | Return 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) |
| 5 | eraddr | String(100) | Y | Return sender address See [Delivery Address Rules – Rules](https://developer.hct.com.tw/files/logistics-share-docs/fields/en/eraddr.md). | See [Delivery Address Rules – Examples](../../logistics-share-docs/fields/en/eraddr.md) |
| 6 | ejamt | String(4) | Y | Number of packages. 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. 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 (time zone: UTC+8) Format: `yyyymmdd`. Defaults to the current date (UTC+8) if not provided. | 20260806 |
| 9 | escsno | String(11) | N | Customer code, as specified in your contract. | 11234567890 |
| 10 | 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)** | |
| 11 | etcsig | String(40) | N | Return recipient name. **Chinese only.** | 王大明 |
| 12 | ettel1 | String(15) | N | Return recipient 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) |
| 13 | etaddr | String(100) | N | Return 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) |
| 14 | emark | String(48) | N | Remarks | 易碎品 |
| 15 | eprdcl2 | String(3) | N | Product category See [Product Category – Enum Values](https://developer.hct.com.tw/files/logistics-share-docs/fields/en/eprdcl2.md). | 100 |
| 16 | edelno2 | String(10) | N | Original HCT tracking number (the `edelno` field from the TransData API) | 1585730311 |

### Response

| No. | Parameter | Type | Description |
| - | - | - | - |
| 1 | Num | String(2) | Sequence number |
| 2 | success | String(1) | Result (`Y`: created / `N`: failed) |
| 3 | edelno | String(10) | HCT tracking number |
| 4 | epino | String(30) | Order number |
| 5 | erstno | String(4) | Destination station code: the code of the branch that picks up from the return sender |
| 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 data; please check |
| 貨號重複 | Duplicate tracking number |
| 貨號錯誤 | Invalid tracking number |
| 貨號檢查碼錯誤 | Invalid tracking number check digit |
| 貨號錯誤必須是2開頭 | Invalid tracking number: must start with `2` |
| 原貨號檢查碼錯誤 | Invalid check digit in the original tracking number (`edelno2`) |
| 訂單編號錯誤 | Invalid order number |
| 客代錯誤 | Invalid customer code |
| 件數錯誤 | Invalid package count |
| 重量錯誤 | Invalid weight |
| 退貨人名稱錯誤 | Invalid return sender name |
| 退貨人電話錯誤 | Invalid return sender phone |
| 退貨人地址錯誤 | Invalid return sender address |
| 地址無法比對 | Address could not be matched |
| 收貨人名稱錯誤 | Invalid return recipient name |
| 收貨人電話錯誤 | Invalid return recipient phone |
| 收貨人地址錯誤 | Invalid return recipient address |
| 代收貨款錯誤 | Invalid COD amount |
| 總長請輸入重量60、90、120、150、151\~999 | For the total-length unit, weight must be 60, 90, 120, 150, or 151–999 |
| 總長件數只能為1件 | For the total-length unit, package count must be 1 |
| 未建收退貨權限(WEB\_COMPANY\_NEW\_R) | Return pickup permission has not been set up (`WEB_COMPANY_NEW_R`) |

## 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>
        <R_TransData_Json xmlns="http://tempuri.org/">
            <company>company</company>
            <password>password</password>
            <json>
            [
                {
                    "epino"  : "20260821000000000001",
                    "ercsig" : "王小明",
                    "ertel1" : "0912345678",
                    "ertel2" : "0223456789",
                    "eraddr" : "台北市信義區松仁路100號",
                    "ejamt"  : "1",
                    "eqamt"  : "10",
                    "esdate" : "",
                    "escsno" : "",
                    "edelno" : "",
                    "etcsig" : "王大明",
                    "ettel1" : "0912345678",
                    "etaddr" : "台北市信義區松仁路100號",
                    "emark"  : "易碎",
                    "eprdcl2": "001",
                    "edelno2"  : ""
                }
            ]
            </json>
        </R_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>
        <R_TransData_JsonResponse xmlns="http://tempuri.org/">
            <R_TransData_JsonResult>[
  {
    "Num": "1",
    "success": "Y",
    "edelno": "2250457613",
    "epino": "20260821000000000001",
    "erstno": "1881",
    "eqamt": "10",
    "ErrMsg": "成功，測試資料"
  }
]</R_TransData_JsonResult>
        </R_TransData_JsonResponse>
    </soap:Body>
</soap:Envelope>
```


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