Multi-carriers Shipping API Node library (Canada Post, DHL, FedEx, UPS, Purolator and more)
npm install purplshipPurplship is a Multi-carrier Shipping API that simplifies the integration of logistic carrier services.
Visit next.purplship.com to deploy your private cloud multi-carrier shipping API.
See the full Node API docs.
``bash`
npm i purplshipor
yarn add purplship
The package needs to be configured with your account's API key, which is available in the Purplship Dashboard.
`javascript
const purplship = require('purplship')('key_...', 'https://instance.purplship.api');
purplship.carriers.list({})
.then(carriers => console.log(carriers))
.catch(error => console.error(error));
`
Or using ES modules and async/await:
`javascript
import Purplship from 'purplship';
const purplship = Purplship('key_...', 'https://instance.purplship.api');
(async () => {
const carriers = await purplship.carriers.list({});
console.log(carriers);
})();
``
Team purplship | hello@purplship.com | purplship.com
Daniel K | danielk.developer@gmail.com | danielk.xyz