Product
Introducing Ruby Support in Socket
Socket is launching Ruby support for all users. Enhance your Rails projects with AI-powered security scans for vulnerabilities and supply chain threats. Now in Beta!
delivery-tracker
Advanced tools
delivery-tracker is delivery tracking library for Node.js
Name | Contributor | Link |
---|---|---|
Korea Post | @egg- | http://www.koreapost.go.kr/ |
Ecargo | @egg- | http://ecargo.asia/script/users/main.php |
FedEx | @egg- | https://www.fedex.com/ |
Australia Post | @egg- | https://auspost.com.au/ |
Pantos | @egg- | http://www.epantos.com/ |
Rincos | @egg- | http://www.rincos.co.kr/ |
Royal Mail | @egg- | http://www.royalmail.com/ |
USPS | @egg- | https://www.usps.com/ |
CJ Korea Express (Korea) | @egg- | http://cjkoreaexpress.co.kr/ (https://www.doortodoor.co.kr) |
POS Laju | @egg- | http://www.poslaju.com.my (http://www.poslaju.com.my) |
$ npm install delivery-tracker
var tracker = require('delivery-tracker')
var courier = tracker.courier(tracker.COURIER.KOREAPOST.CODE)
courier.trace({trace_number}, function (err, result) {
console.log(result)
})
$ npm install -g delivery-tracker
$ delivery-tracker -h
Usage: index [options] <tracecode>
Options:
-h, --help output usage information
-c, --courier <courier> Courier Namespace
$ delivery-tracker -c EMS EBXXXXXXXXXKR
Attribute | Type | Description |
---|---|---|
courier | Courier Object | courier information |
number | String | tracking number |
status | String | delivery status |
checkpoints | Array of Checkpoint Object | Array of the checkpoint information. |
Attribute | Type | Description |
---|---|---|
code | String | Unique code of courier. |
name | String | Courier name |
Attribute | Type | Description |
---|---|---|
courier | Courier Object | courier information |
location | String | Location info of the checkpoint provided by the courier. |
message | String | Checkpoint message |
time | String | The date and time of the checkpoint provided by the courier. The values can be: Empty string, YYYY-MM-DD, YYYY-MM-DDTHH:mm:ss YYYY-MM-DDTHH:mm:ss+Timezone |
tracker.COURIER.{NAMESPACE}
NAMESPACE | CODE | NAME |
---|---|---|
KOREAPOST | koreapost | Korea Post |
ECARGO | ecargo | Ecargo |
FEDEX | fedex | FedEx |
AUSPOST | auspost | Australia Post |
PANTOS | pantos | Pantos |
RINCOS | rincos | Rincos |
ROYALMAIL | royalmail | Royal Mail |
USPS | usps | USPS |
CJKOREAEXPRESS | cjkoreaexpress | CJ Korea Express |
POSLAJU | poslaju | POS Laju |
tracker.STATUS.{CODE}
Code | Value | Description |
---|---|---|
INFO_RECEIVED | InfoReceived | The carrier received a request from the shipper and wants to start shipping. |
PENDING | Pending | New pending shipment to track or a new shipment without tracking information added. |
IN_TRANSIT | InTransit | The carrier has received or received the carrier. Shipment is in progress. |
DELIVERED | Delivered | The shipment was successfully delivered. |
EXCEPTION | Exception | Custom hold, undeliverable, shipper has shipped or shipped an exception. |
FAIL_ATTEMPT | FailAttempt | The courier tried to send but failed, but usually reminds and tries again. |
tracker.STATUS.{CODE}
Code | Value | Description |
---|---|---|
UNKNOWN | -1 | Unknow error |
NOT_SUPPORT_SHIPMENT | 20 | shipment does not support. |
INVALID_NUMBER | 10 | invalid trace number. |
INVALID_NUMBER_LENGTH | 11 | invalid trace number. |
INVALID_NUMBER_HEADER | 12 | invalid trace number. |
INVALID_NUMBER_COUNTRY | 13 | invalid trace number. |
// KOREAPOST
{
"courier": {
"code": "koreapost",
"name": "Korea Post"
},
"number": "EBCOMPLETE0KR",
"status": "Delivered",
"checkpoints": [
{
"courier": {
"code": "koreapost",
"name": "Korea Post"
},
"location": "MY4332",
"message": "Delivery complete\nRecipient : K*NG()\nResult : Delivery complete",
"time": "2016-07-04T11:40:00"
},
// ...
]
}
// FEDEX
{
"courier": {
"code": "fedex",
"name": "FedEx"
},
"number": "DELIVEREDNUM",
"status": "Delivered",
"checkpoints": [
{
"courier": {
"code": "fedex",
"name": "FedEx"
},
"location": "SOUTH JORDAN, UT",
"message": "Package delivered by U.S. Postal Service to addressee",
"status": "Delivered",
"time": "2016-12-14T13:17:00-07:00"
},
// ...
]
}
// PANTOS
{
"courier": {
"code": "pantos",
"name": "Pantos"
},
"number": "DELIVEREDNUM-AUSPOST",
"status": "Delivered",
"checkpoints": [
{
"courier": {
"code": "auspost",
"name": "Australia Post"
},
"location": "Canning Vale, WA",
"message": "Delivered",
"status": "Delivered",
"time": "2017-01-03T15:24:00+08:00"
},
// ...
{
"courier": {
"code": "pantos",
"name": "Pantos"
},
"location": "KRICN",
"message": "Pick-Up (Pick-Up)",
"status": "InfoReceived",
"time": "2016-12-20T11:25"
}
]
}
Test with mocha
$ grunt
like watch
$ grunt watch
Bug reports and pull requests are welcome on Github at https://github.com/egg-/delivery-tracker
See the CHANGELOG.md
delivery-tracker is licensed under the MIT license.
1.2.0
FAQs
delivery-tracker is delivery tracking library for Node.js
The npm package delivery-tracker receives a total of 87 weekly downloads. As such, delivery-tracker popularity was classified as not popular.
We found that delivery-tracker demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket is launching Ruby support for all users. Enhance your Rails projects with AI-powered security scans for vulnerabilities and supply chain threats. Now in Beta!
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.