Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

courier_tracking_auspost

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

courier_tracking_auspost

Courier tracking from provided connote for Australia Post

  • 0.0.9
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

courier_tracking_auspost

Gets tracking information for a Australia Post connote and return normalized json response.

Build Status

Usage
const auspost_tracker = require('courier_tracking_auspost');

auspost_tracker("API_KEY", "CONNOTE", (err, r) => {
  if (err) {
    console.log(err);
  } else {
    console.log(r);
  }
});

A valid result will return a response like

{
    connote: 'R7G0000000',
    statusCode: 200,
    courier: 'Australia Post',
    status: 'Delivered',
    pickedUp: true,
    pickedupAt: {
        date: 'Sep 18, 2017',
        time: '9:09am'
    },
    delivered: true,
    deliveredAt: {
        date: 'Sep 25, 2017',
        time: '9:22am'
    },
    signature: null,
    trackingLink: 'https://auspost.com.au/parcels-mail/track.html#/track?id=R7G0000000',
    activity: [{
            date: 'Sep 25, 2017',
            time: '9:22am',
            action: 'Delivered',
            location: 'Ballina, NSW'
        },
        {
            date: 'Sep 25, 2017',
            time: '6:48am',
            action: 'With Australia Post for delivery today',
            location: 'Ballina, NSW'
        },
        {
            date: 'Sep 25, 2017',
            time: '6:48am',
            action: 'Processed through Australia Post facility',
            location: 'Ballina, NSW'
        },
        {
            date: 'Sep 22, 2017',
            time: '11:58am',
            action: 'Processed through Australia Post facility',
            location: 'Chullora, NSW'
        },
        {
            date: 'Sep 18, 2017',
            time: '12:46pm',
            action: 'Shipping information approved by Australia Post',
            location: null
        },
        {
            date: 'Sep 18, 2017',
            time: '9:09am',
            action: 'Shipping information received by Australia Post',
            location: null
        }
    ]
}

An error result will look like:

{
  connote: "BLAHBLAH",
  statusCode: 500,
  message: { error: "Invalid Australia Post connote" }
}
Command Line testing

There is a command line script livetest.js that can be run to get responses in the terminal.

Usage for this is: node livetest.js apikey connote

Installation
npm install courier_tracking_auspost

or

yarn add courier_tracking_auspost
Licence

MIT

Keywords

FAQs

Package last updated on 16 Jun 2019

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc