Create a Label from a Rate
If you have a rate ID, either from previously calculating shipping rates or creating a shipment with rate options, you can use the rate_id to create a label.
When you use a rate_id to create a label you've already done the hard part! We persist all of the rate information so you just need to pass us the rate_id. Update the cURL command below to use a rate_id you gathered from a previous response.
💡 Alternative Approach: If you don't need to display rates to users or review them before purchasing, consider using Rate Shopper instead. It automatically selects and purchases a label based on your chosen strategy (cheapest, fastest, or best value) in a single API call, eliminating the two-step process.
Requirements
- This tutorial assumes you know how to get shipment rates.
- You will need to use the
rate_response[i].rate_idfrom the get shipment rates request.
Example Request & Response
POST v1/labels/rates/:rate_id
Similar to the example in Create a Shipping Label, this example will request a label using the USPS services included with your account. (USPS services are included with US-based ShipStation API accounts. For accounts based in other countries, you can switch to the sandbox to follow along with this tutorial, as Stamps.com USPS services are part of the sandbox for all accounts.)
Response
And that's it! The label is available for download using any of the label_download URLs provided in the response.