{"templateId":"markdown","versions":[{"version":"shipstation-v2","label":"ShipStation V2 API","link":"/apis/shipstation-v2/docs/labels/create-from-rate","default":true,"active":false,"folderId":"58c9a61d"},{"version":"shipengine","label":"ShipStation API (formerly ShipEngine)","link":"/apis/shipengine/docs/labels/create-from-rate","default":false,"active":true,"folderId":"58c9a61d"},{"version":"shipstation-v1","label":"ShipStation V1 API","link":"/apis/shipstation-v1/docs/labels/create-from-rate","default":false,"active":false,"folderId":"58c9a61d"}],"sharedDataIds":{"sidebar":"sidebar-apis/@shipengine/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Create a Label from a Rate","keywords":"shipping, labels, shipstation, documentation, api","siteUrl":"https://docs.shipstation.com","lang":"en-US","llmstxt":{"hide":false,"title":"ShipStation API LLM Docs","description":"Find links and references to all markdown documentation for use with LLMs","excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"create-a-label-from-a-rate","__idx":0},"children":["Create a Label from a Rate"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If you have a rate ID, either from previously ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/apis/shipengine/docs/rates/rates"},"children":["calculating shipping rates"]}," or ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/apis/shipengine/docs/shipping/create-a-shipment"},"children":["creating a shipment"]}," with rate options, you can use the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["rate_id"]}," to create a label."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When you use a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["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 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["rate_id"]},". Update the cURL command below to use a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["rate_id"]}," you gathered from a previous response."]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["💡 Alternative Approach"]},": If you don't need to display rates to users or review them before purchasing, consider using ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/apis/shipengine/docs/labels/create-a-label#automated-carrier-selection-with-rate-shopper"},"children":["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."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"requirements","__idx":1},"children":["Requirements"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["This tutorial assumes you know how to ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/apis/shipengine/docs/rates/get-shipment-rates"},"children":["get shipment rates"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["You will need to use the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["rate_response[i].rate_id"]}," from the get shipment rates request."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"example-request--response","__idx":2},"children":["Example Request & Response"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["POST v1/labels/rates/:rate_id"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Similar to the example in ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/apis/shipengine/docs/labels/create-a-label"},"children":["Create a Shipping Label"]},", this example will request a label using the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["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.)"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"POST /v1/labels/rates/se-2128728 HTTP/1.1\nHost: api.shipengine.com\nAPI-Key: __YOUR_API_KEY_HERE__\nContent-Type: application/json\n\n{\n  \"label_format\":\"pdf\",\n  \"label_layout\": \"4x6\"\n}\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Response"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"label_id\": \"se-test-2128728\",\n  \"status\": \"completed\",\n  \"shipment_id\": \"se-2128728\",\n  \"ship_date\": \"2019-07-25T05:00:00.000Z\",\n  \"created_at\": \"2019-07-25T18:43:15.038Z\",\n  \"shipment_cost\": {\n    \"currency\": \"usd\",\n    \"amount\": 0.0\n  },\n  \"insurance_cost\": {\n    \"currency\": \"usd\",\n    \"amount\": 0.0\n  },\n  \"tracking_number\": \"9999999999999\",\n  \"is_return_label\": false,\n  \"is_international\": false,\n  \"batch_id\": \"\",\n  \"carrier_id\": \"se-0\",\n  \"service_code\": \"usps_priority_mail\",\n  \"package_code\": \"package\",\n  \"voided\": false,\n  \"voided_at\": null,\n  \"label_format\": \"pdf\",\n  \"label_layout\": \"4x6\",\n  \"trackable\": false,\n  \"carrier_code\": \"stamps_com\",\n  \"tracking_status\": \"unknown\",\n  \"label_download\": {\n    \"pdf\": \"https://api.shipengine.com/v1/downloads/6/Q2OLdnGaqk-UzkN6pFH0lg/testlabel-202923521.pdf\",\n    \"png\": \"https://api.shipengine.com/v1/downloads/6/Q2OLdnGaqk-UzkN6pFH0lg/testlabel-202923521.png\",\n    \"zpl\": \"https://api.shipengine.com/v1/downloads/6/Q2OLdnGaqk-UzkN6pFH0lg/testlabel-202923521.zpl\",\n    \"href\": \"https://api.shipengine.com/v1/downloads/6/Q2OLdnGaqk-UzkN6pFH0lg/testlabel-202923521.pdf\"\n  },\n  \"form_download\": null,\n  \"insurance_claim\": null\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["And that's it! The label is available for download using any of the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["label_download"]}," URLs provided in the response."]}]},"headings":[{"value":"Create a Label from a Rate","id":"create-a-label-from-a-rate","depth":1},{"value":"Requirements","id":"requirements","depth":2},{"value":"Example Request & Response","id":"example-request--response","depth":2}],"frontmatter":{"seo":{"title":"Create a Label from a Rate"}},"lastModified":"2026-04-08T10:47:45.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/apis/shipengine/docs/labels/create-from-rate","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}