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

courier_tracking_couriers_please

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

courier_tracking_couriers_please

Courier tracking from provided connote for Couriers Please

  • 0.0.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

courier_tracking_couriers_please

Gets tracking information for a Couriers Please connote and returns normalized json response.

Build Status

Usage
const cp_tracker = require('courier_tracking_couriers_please');

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

A valid result will return a response like

{
    connote: 'CPAHOWE000000',
    statusCode: 200,
    courier: 'Couriers Please',
    status: 'delivered',
    pickedUp: true,
    pickedupAt: {
        date: 'Sep 25, 2017',
        time: '10:50am'
    },
    delivered: true,
    deliveredAt: {
        date: 'Sep 27, 2017',
        time: '3:16pm'
    },
    signature: 'http://edi.couriersplease.com.au/api/track/signature.php?image',
    activity: [{
            date: 'Sep 27, 2017',
            time: '3:16pm',
            action: 'Goods delivered: Signed for by:ROB',
            location: 'Australia'
        },
        {
            date: 'Sep 27, 2017',
            time: '12:00pm',
            action: 'On-board for delivery',
            location: 'Australia'
        },
        {
            date: 'Sep 27, 2017',
            time: '5:41am',
            action: 'Arrive at destination depot in transit',
            location: 'Australia'
        },
        {
            date: 'Sep 25, 2017',
            time: '11:24am',
            action: 'Transfer to new depot',
            location: 'Australia'
        },
        {
            date: 'Sep 25, 2017',
            time: '10:50am',
            action: 'Picked Up',
            location: 'Australia'
        }
    ]
}

An error result will look like:

{
  connote: "BLAHBLAH",
  statusCode: 500,
  message: { error: "Invalid Couriers Please 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 account connote

Installation
npm install courier_tracking_couriers_please

or

yarn add courier_tracking_couriers_please
Licence

MIT

Keywords

FAQs

Package last updated on 05 Jul 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