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

# 3. Shipment Manifest

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

### Purpose

Describes the format and field rules of the shipment manifest.

### Usage

* When it is used:
  * When the driver arrives to collect shipments, and for batch shipment verification.
* Prepare **two copies** each time: one for the driver to take back, and one signed by the driver and kept by the sender for reconciliation and record-keeping.

### Field Definitions

| No. | Field Name | API Field | Description |
| - | - | - | - |
| 1 | 發送日期 | `esdate` | Ship date |
| 2 | 客代 | `escsno` | Customer code. Enter the customer code + company name. e.g., `93938482 XX寶-Sog` |
| 3 | 列印時間 | | Print time. Time the shipment manifest is printed. |
| 4 | 序 | | No. Sequence number |
| 5 | 查貨號碼 | `edelno` | Tracking number |
| 6 | 到著站 | `erstno` | Destination station |
| 7 | 收貨人 | `ercsig` | Recipient |
| 8 | 收貨人地址 | `eraddr` | Recipient address |
| 9 | 收件電話 | `ertel1` | Recipient phone |
| 10 | 件數 | `ejamt` | Package count. See [Package Weight – Package Count](https://developer.hct.com.tw/files/logistics-share-docs/fields/en/package-weight.md). |
| 11 | 傳票區分 | `eprdct` | Waybill type. See [Waybill Type – Label Text](https://developer.hct.com.tw/files/logistics-share-docs/fields/en/eprdct.md). |
| 12 | 代收貨款 | `eqmny` | COD amount |
| 13 | 報值金額 | `egamt` | Declared value |
| 14 | 訂單編號 | `epino` | Order number |
| 15 | 備註 | `emark` | Remarks |
| 16 | 重量 | `eqamt` | Weight. See [Package Weight – Weight Unit](https://developer.hct.com.tw/files/logistics-share-docs/fields/en/package-weight.md). |
| 17 | 收貨司機簽收 | | Driver signature (pickup) |
| 18 | 客戶簽收 | | Customer signature |
| 19 | 收貨日 | | Pickup date |

### Example

![Shipment manifest example](https://mintcdn.com/hct/SXrAlGoJP_aeX1pp/files/logistics-share-docs/other/image/logistics-manifest.png?fit=max\&auto=format\&n=SXrAlGoJP_aeX1pp\&q=85\&s=0f50182706add5feffe7450829be8e43)

#### Sample Code

> The printed text on the manifest is intentionally kept in Chinese for HCT drivers.

```html theme={null}
<!DOCTYPE html>
<html lang="zh-TW">
<head>
	<meta charset="UTF-8">
	<title>新竹物流託運總表</title>

	<style>
		@page {
			size: A4 landscape;
			margin: 8mm;
		}

		* {
			box-sizing: border-box;
		}

		body {
			margin: 0;
			padding: 0;
			font-family: "Microsoft JhengHei", Arial, sans-serif;
			color: #000;
		}

		.page {
			width: 277mm;
			min-height: 190mm;
			border: 1px solid #000;
			padding: 5mm;
			margin: auto;
		}

		.header {
			text-align: center;
			font-size: 18pt;
			font-weight: bold;
			margin-bottom: 4mm;
		}

		.info {
			display: flex;
			justify-content: space-between;
			font-size: 10pt;
			line-height: 18px;
		}

		.table {
			width: 100%;
			border-collapse: collapse;
			table-layout: fixed;
			font-size: 8.5pt;
			margin-top: 5mm;
		}

		.table th {
			border: 1px solid #000;
			text-align: center;
			vertical-align: middle;
			padding: 3px;
			height: 25px;
			white-space: nowrap;
		}

		.table td {
			border: 1px solid #000;
			padding: 3px;
			height: 45px;
			vertical-align: top;
			word-break: break-all;
		}

		/* Column widths */
		.table th:nth-child(1),
		.table td:nth-child(1) {
			width: 3%;
		}

		.table th:nth-child(2),
		.table td:nth-child(2) {
			width: 8%;
		}

		.table th:nth-child(3),
		.table td:nth-child(3) {
			width: 5%;
		}

		.table th:nth-child(4),
		.table td:nth-child(4) {
			width: 7%;
		}

		.table th:nth-child(5),
		.table td:nth-child(5) {
			width: 18%;
		}

		.table th:nth-child(6),
		.table td:nth-child(6) {
			width: 8%;
		}

		.table th:nth-child(7),
		.table td:nth-child(7) {
			width: 4%;
		}

		.table th:nth-child(8),
		.table td:nth-child(8) {
			width: 5%;
		}

		.table th:nth-child(9),
		.table td:nth-child(9) {
			width: 6%;
		}

		.table th:nth-child(10),
		.table td:nth-child(10) {
			width: 7%;
		}

		.table th:nth-child(11),
		.table td:nth-child(11) {
			width: 7%;
		}

		.table th:nth-child(12),
		.table td:nth-child(12) {
			width: 13%;
		}

		.table th:nth-child(13),
		.table td:nth-child(13) {
			width: 9%;
		}

		.center {
			text-align: center;
			vertical-align: middle !important;
		}

		.number {
			text-align: right;
		}

		.no-data {
			text-align: center;
			vertical-align: middle !important;
			height: 60px !important;
			font-size: 11pt;
		}

		.footer {
			margin-top: 8mm;
			display: flex;
			justify-content: flex-end;
			gap: 50mm;
			font-size: 11pt;
		}

		.sign-area {
			margin-top: 15mm;
			display: flex;
			justify-content: space-between;
			font-size: 11pt;
			white-space: nowrap;
		}

		.sign-box {
			width: auto;
		}

		.line {
			display: inline-block;
			width: 120px;
			border-bottom: 1px solid #000;
			margin-left: 5px;
			height: 18px;
		}

		/* Print */
		@media print {

			body {
				margin: 0;
				padding: 0;
			}

			.page {
				width: 100%;
				min-height: auto;
				border: none;
				margin: 0;
			}

			/* Prevent a row from being split across pages */
			.table tr {
				page-break-inside: avoid;
				break-inside: avoid;
			}

			/* Repeat the table header on every printed page */
			.table thead {
				display: table-header-group;
			}

			.footer,
			.sign-area {
				page-break-inside: avoid;
				break-inside: avoid;
			}
		}
	</style>
</head>

<body>

<div class="page">

	<!-- Title -->
	<div class="header">新竹物流託運總表</div>


	<!-- Header info -->
	<div class="info">
		<div>發送日期：
			<span id="sendDate"></span>
		</div>
		<div>印表日期：
			<span id="printDate"></span>
		</div>
	</div>

	<div class="info">
		<div>客代：
			<span id="customerCode"></span>
		</div>
	</div>

	<!-- Detail rows -->
	<table class="table">
		<thead>
			<tr>
				<th>序</th>
				<th>查貨號碼</th>
				<th>到著站</th>
				<th>收貨人名稱</th>
				<th>收貨人地址</th>
				<th>收貨人電話</th>
				<th>件數</th>
				<th>重量</th>
				<th>傳票區分</th>
				<th>代收貨款</th>
				<th>報值金額</th>
				<th>訂單編號</th>
				<th>備註</th>
			</tr>
		</thead>

		<tbody id="detailBody"></tbody>

	</table>

	<!-- Totals -->
	<div class="footer">
		<div>合計：
			<span id="totalRows">0</span>筆
		</div>

		<div>總計：
			<span id="totalQty">0</span>
			件
		</div>

	</div>


	<!-- Signatures -->
	<div class="sign-area">
		<div class="sign-box">收貨司機簽收：
			<span class="line"></span>
		</div>

		<div class="sign-box">客戶簽收：
			<span class="line"></span>
		</div>

		<div class="sign-box">收貨日：
			<span class="line"></span>
		</div>
	</div>
</div>


<script>

	// Header info
	const printInfo = {
		sendDate: "2025/05/21",
		printDate: "2025/05/21 16:35",
		customerCode: "93938482 XX寶-Sog"
	};

	// Shipment data
	const data = [
		{
			trackingNo: "0000000001",
			station: "1247",
			name: "王小明",
			address: "臺北市士林區中山北路六段193號",
			phone: "0900000000",
			qty: 1,
			weight: "1才",
			type: "代收",
			codAmount: 222,
			declaredAmount: 1000,
			orderNo: "01234567890123456789",
			remark: "我是備註(OK)"
		}
	];

	function escapeHtml(value) {

		if (value === null || value === undefined) {
			return "";
		}

		return String(value)
			.replace(/&/g, "&amp;")
			.replace(/</g, "&lt;")
			.replace(/>/g, "&gt;")
			.replace(/"/g, "&quot;")
			.replace(/'/g, "&#039;");
	}

	// Format amounts
	function formatNumber(value) {

		if (
			value === null ||
			value === undefined ||
			value === ""
		) {
			return "";
		}

		const number = Number(value);

		if (isNaN(number)) {
			return escapeHtml(value);
		}

		return number.toLocaleString("zh-TW");
	}

	// Render header info
	function renderInfo() {

		document.getElementById("sendDate").textContent =
			printInfo.sendDate;

		document.getElementById("printDate").textContent =
			printInfo.printDate;

		document.getElementById("customerCode").textContent =
			printInfo.customerCode;
	}

	// Render detail rows
	function renderTable() {

		const tbody =
			document.getElementById("detailBody");

		let html = "";

		let totalQty = 0;

		// No data
		if (data.length === 0) {
			document.getElementById("totalRows").textContent = 0;
			document.getElementById("totalQty").textContent = 0;
			return;
		}

		// Build rows
		data.forEach(function(item, index) {

			const qty =
				Number(item.qty) || 0;

			totalQty += qty;
			html += `
				<tr>

					<td class="center">
						${index + 1}
					</td>

					<td class="center">
						${escapeHtml(item.trackingNo)}
					</td>

					<td class="center">
						${escapeHtml(item.station)}
					</td>

					<td>
						${escapeHtml(item.name)}
					</td>

					<td>
						${escapeHtml(item.address)}
					</td>

					<td class="center">
						${escapeHtml(item.phone)}
					</td>

					<td class="center">
						${qty}
					</td>

					<td class="center">
						${escapeHtml(item.weight)}
					</td>

					<td class="center">
						${escapeHtml(item.type)}
					</td>

					<td class="number">
						${formatNumber(item.codAmount)}
					</td>

					<td class="number">
						${formatNumber(item.declaredAmount)}
					</td>

					<td>
						${escapeHtml(item.orderNo)}
					</td>

					<td>
						${escapeHtml(item.remark)}
					</td>

				</tr>
			`;

		});


		// Insert rows into tbody
		tbody.innerHTML = html;


		// Total rows
		document.getElementById("totalRows").textContent =
			data.length;


		// Total package count
		document.getElementById("totalQty").textContent =
			totalQty;
	}

	// Initialize
	renderInfo();

	renderTable();
</script>

</body>
</html>
```


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