canadapost-api-alt
v1.3.1
Published
A Canada Post API library, forked & updated from t3rminus/canada-post
Downloads
6
Maintainers
Readme
Canada Post API
Fairly straightforward wrapper for the Canada Post API. Forked from t3rminus/canada-post to add contract shipments and update dependencies.
Handles basic rating, creating shipments, and tracking.
Documentation
API Documentation is available here.
Credentials
To authenticate with canada post you need to create a developer account. Once you've done that they'll give you a username and password that are a string of numbers and letters:
- For users of this library, put those into the
new CanadaPostClient($USERNAME, $PASSWORD, $CUSTOMER_NUMBER);
- For development use, put those in a .env file in the root of the repo (
CPC_USERNAME
,CPC_PASSWORD
,CPC_CUSTOMER
).
If you forget to put your customer number in, you'll probably get 404 errors for some endpoints.