Introduction
For shipment orders of B2C (including label testing) and home delivery can print shipping labels through calling this API or through ECPay’s merchants’ admin portal.
Notice:
When using the Printing shipping labels function, please avoid using iframe to prevent blocking issues at convenience stores that may cause the process to fail.
API URLs
- Stage:https://logistics-stage.ecpay.com.tw/helper/printTradeDocument
- Production:https://logistics.ecpay.com.tw/helper/printTradeDocument
HTTPS Transfer Protocol
- Accept:text/html
- Content Type:application/x-www-form-urlencoded
- HTTP Method:POST
Request Parameter Description
MerchantID String(10)
Required
Provided by ECPAY.
AllPayLogisticsID String(Max)
Required
- 1. Single consignment note/shipping label printing and (B2C) batch printing are all supported
- 2. To batch print (B2C) use a half-type comma to separate each order For example: 10011, 10012
- 3. Consignment notes/labels will batch print 2 – 4 orders onto 1 single piece of A4 paper.
Special Note:7-ELEVEN, Family Mart each have their own label format and may not be printed along with other convenience store labels.
PlatformID String(10)
- Provided by ECPAY, this parameter is used by Platform. General merchant should set this to null.
- When used by Platform, please use the MerchantID bound with merchant account.
PrintMode Int
1. Standard Mode (A4 Size)
2. Thermal Label Printer (A6 Size)
Special Note:
For POST logistics orders:
– If the input value is 1:
Use Standard Mode (A4 size)
– If the input value is 2:
Use Thermal Label Printer Mode (A6 size)
– If any other value is input or this parameter is not provided: It will be treated as 1, using Standard Mode (A4 size)
For non-POST logistics orders:
– Regardless of the input value, this parameter will be ignored, and Standard Mode (A4 size) will always be used.
CheckMacValue String
Required
Checksum.
- Please refer to the appendix for more information on checksum mechanism.