- Collect shipping rates offered by the carriers configured in your Shippo account
- Use a selected rate (this code looks for the lowest rate) to request a label
- Download the label for use in shipping your package
Before you run this code, you will need to have performed the below steps:
- Install a recent version of Java (this sample was written using JDK11)
- Create a Shippo Account
- Generate a Shippo API Token. Since this is a sample app, it is recommended that you generate a test token rather than a production (i.e., paid) token.
- Create an app.properties file at app/src/main/resources/app.properties with an
apiKey
property with your token as its value:
apiKey=shippo_test_0123456789abcdef0123456789abcdef01234567
- Run the sample!
gradle run