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

# 6. Cancel Pickup Dispatch – TransDataCancel

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

## Overview

### Purpose

Cancels the pickup dispatch of uploaded shipments so the parcels do not enter the actual pickup process.

> **Note:**
>
> * This API applies only to parcels that have **not yet been picked up**.
> * Call this API before pickup. Once a parcel has been picked up, the pickup can no longer be canceled.
> * If the dispatch is successfully canceled before **15:00** on the same day, no pickup notification for that tracking number will be sent at 15:00.
> * Canceling a dispatch permanently stops dispatch for that **tracking number**. The same tracking number **cannot** be used to request pickup again after cancellation.

## Prerequisites

* [ ] Company account (`company`) and company password (`password`): request them from your HCT branch.
* [ ] The dispatch feature must be enabled for your account.

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

* Max **20 records** per request.
* Use **UTF-8** for text.

### Endpoint

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

* **TransDataCancel\_Json**

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

* **json object**

| No. | Parameter | Type | Required | Description | Example |
| - | - | - | - | - | - |
| 1 | epino | String(30) | Y | Order number | 20260812000000000002 |
| 2 | edelno | String(10) | Y | HCT tracking number (digits only) | 5123456786 |

### Response

| No. | Parameter | Type | Description |
| - | - | - | - |
| 1 | success | String(1) | Result (`Y`: canceled / `N`: cancellation failed) |
| 2 | edelno | String(10) | HCT tracking number |
| 3 | epino | String(30) | Order number |
| 4 | 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 |
| 無權限使用此功能 | No permission to use this feature |
| epino 不一致 | `epino` does not match the tracking number |
| 資料不存在或輸入資料錯誤 | Data not found, or invalid input |
| 資料錯誤請確認 | Invalid data; please check |

## 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>
        <TransDataCancel_Json xmlns="http://tempuri.org/">
            <company>company</company>
            <password>password</password>
            <json>
            [
                {
                    "epino"  : "20260820000000000002",
                    "edelno" : "1004378093"
                }
            ]
            </json>
        </TransDataCancel_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>
        <TransDataCancel_JsonResponse xmlns="http://tempuri.org/">
            <TransDataCancel_JsonResult>[
  {
    "edelno": "1004378093",
    "epino": "20260820000000000002",
    "success": "Y",
    "ErrMsg": "已成功匯入 1 筆。"
  }
]</TransDataCancel_JsonResult>
        </TransDataCancel_JsonResponse>
    </soap:Body>
</soap:Envelope>
```


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