The EasyPost API provides an easy way to programatically create shipments and postage labels. This project provides an example for buying shipments using EasyPost API.
The application provides a minimal web application that can be hosted on any computer, and enables one to create a sample web application to buy shipments, create labels, and verify addresses using the EasyPost API.
- A Windows or Mac computer running Ruby Bundler
- An EasyPost account
- Check out this repo,
git clone https://github.com/EasyPost/example-ui-for-buying-shipments.git
- Move into the application's directory,
cd example-ui-for-buying-shipments
- Fill in the
.env
fileEAYSPOST_API_KEY
one of your EasyPost Api KeysFROM_ADDRESS_ID
is the id of an Address object that you are shipping from.
- Install the dependencies,
bundle install --path vendor/bundle
- Run the server,
bundle exec rackup
- The application should be up and running at http://localhost:9292/
If you aren't seeing any labels, make sure you have bought some postage on EasyPost! You can walk through the EasyPost Getting Started Guide using your test API Key.