node-shipping-canadapost
CanadaPost API for Node.JS
Last updated 2 years ago by vtllr .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install node-shipping-canadapost 
SYNC missed versions from official npm registry.

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

Current Tags

  • 1.0.0                                ...           latest (2 years ago)

1 Versions

  • 1.0.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 1
Dependencies (3)
Dev Dependencies (28)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |