Hong Kong Post Mail Tracking API Specification
Hong Kong Post Mail Tracking API Specification
at EC-Ship System
for System Integration on HKPost Mail Tracking
Version: 1.0
Amendment History
Version Amendment Description Author /
Date Updated By
1.0 April 2024 Release Version CW Lai
Table of Contents
1. HKPost Mail Tracking Web Services URL ...................................................................................................... 3
2. HKPost Mail Tracking Web Services Authentication ....................................................................................... 4
3. HKPost Mail Tracking API – Track and Trace mail item delivery status ......................................................... 5
4. Appendix A – Status Code and Error Message ................................................................................................. 7
The Hongkong Post Mail Tracking API service is provided by the EC-Ship API platform, the production
URL is shown as follow:
Note1: Request limit per day: 100,000 (Please contact Hong Kong Post if special arrangement is required)
Note2: The frequency of request: 100ms, system will refuse the request if frequency of request exceed the
limit. Please group the tracking item into one request as possible.
Authentication key is required to call EC-Ship API. The credential is provided registered EC-Ship API users.
Token must be get from authentication API, and included in your request Header as specified in EC-Ship API.
Without this information, your API request will be rejected.
Example
1. User should get token as follow; the token is valid for 15 minutes.
POST /api/authenticate
Request
Response
4. HKPost Mail Tracking API – Track and Trace mail item delivery status
User should call this request to send the item numbers (also known as tracking numbers) to
Hongkong Post system. The system will return the mail items’ delivery status
POST /api/version/1/mailTracking
Request
Parameter Data Type Length Mandatory Remark
Constraint
(byte)
lang String 1 Y Language code
A' - English, Traditional Chinese and
Simplified Chinese message will be
returned
Response
Parameter Data Type Description Example
status Number Reference to Appendix A 0
errMsg String Error message
itemCount Number No. of message returned 30
An array of Delivery Result (max 30 items)
deliveryResultList
itemNo String Mail item tracking number RB000000010HK
status Number Reference to Appendix A 0
errMsg String Error message
postingDateTime String The posting date and time of the item in 27-02-2017 16:00
DD-MM-YYYY HH24:MI
dropOffPoint_e String Drop-off Point in English Queen's Road
Post Office
dropOffPoint_c String Drop-off Point in Traditional Chinese 皇后大道郵政局
dropOffPoint_s String Drop-off Point in Simplified Chinese 皇后大道邮政局
orgCnty_code String Original country code HK
Reference to Appendix B
orgCnty_e String Original in English HONG KONG
orgCnty_c String Original in Traditional Chinese 香港
orgCnty_s String Original in Simplified Chinese 香港
destCnty_code String Destination country code HK
Reference to Appendix B
destCnty_e String Destination in English HONG KONG
destCnty_c String Destination in Traditional Chinese 香港
destCnty_s String Destination in Simplified Chinese 香港
milestone_e String Milestone description in English Delivered
milestone_c String Milestone description in Traditional 已成功派遞
Chinese
milestone_s String Milestone description in Simplified Chinese 已成功派递
Event Detail (A list of event history)
itemDeliveryStatusDetailList
eventDateTime String The event date and time (In the time zone 01-03-2017 11:00
of the location) in DD-MM-YYYY
HH24:MI
eventLocation_code String The location country code HK
eventLocation_e String The location of the event in English HONG KONG
eventLocation_c String The location of the event in Traditional 香港
Chinese
eventLocation_s String The location of the event in Simplified 香港
Chinese
eventMsg_e String The message of the event in English Delivered
eventMsg_c String The message of the event in Traditional 成功派遞
Chinese
eventMsg_s String The message of the event in Simplified 成功派递
Chinese