npm

Share private packages across your team with npm Orgs, now with simplified billing via the aws marketplace!Learn more »

node-shipping-canadapost

1.0.0 • Public • Published

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)

Links

Official CanadaPost documentation

Keywords

none

install

npm i node-shipping-canadapost

Downloadsweekly downloads

1

version

1.0.0

license

ISC

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability