Built for a specific use case of fulfilling shipments of pre-ordered zines. This script (WILL) take a CSV of orders, purchases shipping using easypost.com at the lowest rate (Media Mail in my case) and generates a PDF of 4x6 pre-paid shipping labels for printing.
- Create an account at easypost.com and get an API key (recommend test to start).
- Create a .env file in the project root directory with
EASYPOST_API_KEY=YOURAPIRKEY
on the first line. - Rename config-example.js to config.js and update the address details with the sender's address.
- Create a ./labels directory.
- Run
yarn
- Run index.js