Socket
Book a DemoInstallSign in
Socket

node-shipping-canadapost

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-shipping-canadapost

CanadaPost API for Node.JS

1.0.0
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

Node Shipping CanadaPost

Install

npm i node-shipping-canadapost

Usage

Init

import CanadaPostAPI from 'node-shipping-canadapost';

const cp = new CanadaPostAPI({
  environment: 'sandbox', // or production
  platform: 'platform ID',
  contract: 'contract number', // or null
  customer: 'customer number',
  user: 'user'
  password: 'password'
});

Get artifacts

cp.artifacts({
  url: 'https://XX/ers/artifact/0456cd17e32a0039/3584/0'
}, cb)

Get token

cp.token({ }, cb)

Get info

cp.info({
  token: '94a3dc50a581cc41b1f6d6'
}, cb)

Get customers

cp.customers({ }, cb)

Get manifest

cp.manifest({
  url: 'https://XX/rs/1234567/1234567/manifest/123456789012345678'
}, cb)

Get options

cp.options({
  code: 'https://XX/rs/1234567/1234567/manifest/123456789012345678'
}, cb)

Pickups

See params here

// Check pickup availability
cp.pickupAvailability(params, cb)

// Create
cp.cancelPickup(params, cb)

// Create pickup
cp.pickup(params, cb)

Rates

See params here

// Create
cp.rates(params, cb)

Discover services

  cp.services({
    country: 'US',
    origin: '32703',
    destination: '32703',
    contract: '' // or null
  }, cb)

Shipments

See params here

cp.create(params, cb)

Official CanadaPost documentation

FAQs

Package last updated on 15 Aug 2017

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.