Gets tracking information for a Australia Post connote and return normalized json response.
const auspost_tracker = ;;
A valid result will return a response like
connote: 'R7G0000000'statusCode: 200courier: 'Australia Post'status: 'Delivered'pickedUp: truepickedupAt:date: 'Sep 18, 2017'time: '9:09am'delivered: truedeliveredAt:date: 'Sep 25, 2017'time: '9:22am'signature: nulltrackingLink: ''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: nulldate: 'Sep 18, 2017'time: '9:09am'action: 'Shipping information received by Australia Post'location: null
An error result will look like:
connote: "BLAHBLAH"statusCode: 500message: 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
npm install courier_tracking_auspost or yarn add courier_tracking_auspost