Node Wrapper and CLI
by Jarrett Streebin
Good news! @niftylettuce over at Teelaunch wrote a fantastic node.js wrapper for the EasyPost API, plus a super cool command line interface. Check it out!
https://github.com/EasyPost/easypost-node
Not familiar with Node? That's okay, it's dead simple.
- Download Node.js: http://nodejs.org/download/
- Enter the following in your Terminal (you may need to 'sudo' this):
npm install -g easypostjs
- Sign up for an account or login to your existing account and grab your Test API key. (Best to start with test, then once you get used to everything you can use your Secret API key to buy real postage.)
- Enter the following in your Terminal with
<your-api-key>
replaced by your Test API key:easypost <your-api-key>
Boom! You're off and running with the EasyPost API. - Choose an option:
- Verify a single address
- Verify multiple addresses
- Get multiple shipment rates
- Get shipment rates
- Buy postage
- Lookup individual label purchased
- Get full list of labels purchased
- Want to use this in your app? Simply require it and utilize the API endpoints:
var easypost = require('easypostjs')('your-api-key') ## Verify an address easypost.address.verify(data, cb) function cb(err, response){ if (err) return console.log(err) console.log(response) }
Let us know if you have any feedback or questions!
Note: we're hiring like mad and we need your help building EasyPost. Drop us a line!
Get started in minutes and build the shipping infrastructure of the internet with our Official Client Libraries. We’re excited to see what you build!