Basic Steps
These are the basic steps to create a shipment and get your labels with Bikeflights API.
- Login User This will provide you with a JWT token that you'll need to include in the authorization header of each of the next calls.
- Get Rates The Get Rates call will return options of shipping speeds. There are two pieces of information from the Get Rates call that you'll need to creaet a shipment. The first is the requestId, the second is the rateSignature that matches the rate selection you've made out of the ones provided.
- Create Order The body of this post contains the requestId, the selected rateSignature, and an optional purchaseOrder if you want to add one to your order. This call will create the order and charge the saved payment method you have on file. In sandbox there is a development payment method associated with your account so you can see the process without incurring charges. Each requestId and rateSignature can only be used once to avoid accidental multiple charges. If you need a duplicate order just submit the same Get Rates call again and use the new requestId and rateSignature. The Create Order call returns an orderId that you will use to create your label(s).
- Create Label Include your orderId on the path. This will create a label for each package in the order and return the tracking number for each.
- Get Label Include the tracking number on the path to get labels, one per request. The label is returned as a PDF file stream.
Follow the links for more details on each step.