npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

delivery-tracker

v2.8.3

Published

delivery-tracker is delivery tracking library for Node.js

Downloads

622

Readme

delivery-tracker

version download status status Standard - JavaScript Style Guide

delivery-tracker is delivery tracking library for Node.js

Courier List

| 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 | | Yello Express | @egg- | https://www.yello-express.com | | EFS | @egg- | http://efs.asia/ | | UPS | @egg- | https://www.ups.com | | TNT | @egg- | https://www.tnt.com | | CESCO | @egg- | https://www.cesco-logistics.com/ | | XPOST | @egg- | https://www.xpost.ph/ | | KERRYTHAI | @egg- | https://th.kerryexpress.com | | SICEPAT | @egg- | http://sicepat.com/ | | XIOExpress | @egg- | https://xioexpress.com/ | | eParcel | @egg- | https://eparcel.kr/ | | LBC | @egg- | https://www.lbcexpress.com/ | | J&T (PH) | @egg- | https://www.jtexpress.ph/ | | DHL | @carstenschwede | https://www.dhl.com/ | | Canada Post | @egg- | https://www.canadapost-postescanada.ca/ | | PAXEL | @egg- | https://paxel.co/ |

Installation

$ npm install delivery-tracker

Usage

var tracker = require('delivery-tracker')
var courier = tracker.courier(tracker.COURIER.KOREAPOST.CODE)

courier.trace('TRACE_NUMBER', function (err, result) {
  console.log(result)
})

Command Line

$ npm install -g delivery-tracker
$ delivery-tracker -h

Usage: index [options] <tracecode>

  Options:

    -h, --help               output usage information
    -c, --courier <courier>  Courier Namespace
    -k, --apikey <apikey>  Courier API key

$ delivery-tracker -c EMS EBXXXXXXXXXKR

Response

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

Courier Object

| Attribute | Type | Description | | --------- | ------ | ----------------------- | | code | String | Unique code of courier. | | name | String | Courier name |

Checkpoint Object

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

CODE

COURIER

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 | | YELLOEXPRESS | yelloexpress | Yello Express | | EFS | efs | EFS | | UPS | ups | UPS | | TNT | tnt | TNT | | CESCO | cesco | CESCO | | XPOST | xpost | XPOST | | KERRYTHAI | kerrythai | KERRYTHAI | | SICEPAT | sicepat | SICEPAT | | XIOEXPRESS | xioexpress | XIOExpress | | EPARCEL | eparcel | eParcel | | LBC | lbc | LBC | | JNT | jnt | J&T | | DHL | dhl | DHL | | CANADAPOST | canadapost | Canada Post | | PAXEL | paxel | Paxel |

STATUS

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. | | RETURNED | Returned | The shipment was returned. | | 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. |

ERROR

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

Sample

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

Test with mocha

$ grunt

like watch

$ grunt watch

Contributing

Bug reports and pull requests are welcome on Github at https://github.com/egg-/delivery-tracker

  1. Fork it
  2. Create your feature branch.
  3. Commit your changes.
  4. Push to the branch.
  5. Create a new Pull Request.

Release History

See the CHANGELOG.md

License

delivery-tracker is licensed under the MIT license.