@jayabahu/purplship
v2021.6.0
Published
Multi-carriers Shipping API Node library (Canada Post, DHL, FedEx, UPS, Purolator and more)
Downloads
2
Maintainers
Readme
Purplship Node.js Library
Purplship is a Multi-carrier Shipping API that simplifies the integration of logistic carrier services.
Visit purplship.com to deploy your private cloud multi-carrier shipping API.
Documentation
See the full Node API docs.
Installation
npm i purplship
# or
yarn add purplship
Usage
The package needs to be configured with your account's API key, which is available in the Purplship Dashboard.
const Purplship = require('purplship');
const purplship = new Purplship('API_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
:
import Purplship from 'purplship';
const purplship = new Purplship('API_KEY', 'https://instance.purplship.api');
(async () => {
const carriers = await purplship.carriers.list();
console.log(carriers);
})();
Documentation for Models
- AccessToken
- Address
- AddressData
- AddressList
- AddressValidation
- CarrierList
- CarrierSettings
- Charge
- Commodity
- CommodityData
- Customs
- CustomsData
- CustomsList
- Duty
- ErrorResponse
- Message
- Operation
- OperationConfirmation
- OperationResponse
- Parcel
- ParcelData
- ParcelList
- Payment
- Pickup
- PickupCancelData
- PickupCancelRequest
- PickupData
- PickupList
- PickupRequest
- PickupResponse
- PickupUpdateData
- PickupUpdateRequest
- Rate
- RateRequest
- RateResponse
- References
- Shipment
- ShipmentCancelRequest
- ShipmentData
- ShipmentList
- ShipmentPurchaseData
- ShippingRequest
- TokenObtainPair
- TokenPair
- TokenRefresh
- TokenVerify
- TrackerList
- TrackingEvent
- TrackingResponse
- TrackingStatus
- Webhook
- WebhookData
- WebhookList
Author
Purplship Team | [email protected] | purplship.com Daniel K| [email protected] | danielk.xyz