{"templateId":"markdown","versions":[{"version":"shipstation-v2","label":"ShipStation V2 API","link":"/apis/shipstation-v2/docs/shipping/ship-from-a-warehouse","default":true,"active":false,"folderId":"58c9a61d"},{"version":"shipengine","label":"ShipStation API (formerly ShipEngine)","link":"/apis/shipengine/docs/shipping/ship-from-a-warehouse","default":false,"active":true,"folderId":"58c9a61d"},{"version":"shipstation-v1","label":"ShipStation V1 API","link":"/apis/shipstation-v1/docs/shipping/ship-from-a-warehouse","default":false,"active":false,"folderId":"58c9a61d"}],"sharedDataIds":{"sidebar":"sidebar-apis/@shipengine/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Ship From a Warehouse","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":"ship-from-a-warehouse","__idx":0},"children":["Ship From a Warehouse"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When you have one or more warehouse locations that you frequently ship from, it can be cumbersome to specify the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ship_from"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["return_to"]}," addresses on every shipment. When you ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/apis/shipengine/docs/reference/create-warehouse"},"children":["create a warehouse"]}," for each of the locations you ship from, you define the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ship_from"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["return_to"]}," addresses for each location and then pass the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["warehouse_id"]}," in your request instead."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For some operations, a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["warehouse_id"]}," is required, as when ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/apis/shipengine/docs/labels/bulk"},"children":["creating batches"]}," and ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/apis/shipengine/docs/shipping/manifests"},"children":["creating manifests"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"origin-address-vs-return-address","__idx":1},"children":["Origin Address vs. Return Address"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/apis/shipengine/docs/reference/create-warehouse"},"children":["create a warehouse"]}," request will include both an origin address and a return address. These two addresses serve different purposes when shipping."]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The origin address is used to calculate shipping costs. This address lets the carrier know where your packages are shipping from and allows the carrier to accurately determine rates."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The return address is the address that will be printed on your outgoing label. This address determines where any packages will be returned to in the event that the package cannot reach its destination or you generate a return label for the shipment at a later date."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["While these addresses are often the same, there are times when packages ship from one location and need to be returned to a different location. Creating and using a warehouse allows unique addresses to be specified for each of these purposes."]},{"$$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/shipments/"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The following example demonstrates how to create a shipment using a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["warehouse_id"]}," instead of a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ship_from"]}," address. Other than the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["warehouse_id"]}," property, the request is the same as any other ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/apis/shipengine/docs/shipping/create-a-shipment"},"children":["create shipment"]}," workflow."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"POST /v1/shipments HTTP/1.1\nHost: api.shipengine.com\nAPI-Key: __YOUR_API_KEY_HERE__\nContent-Type: application/json\n\n{\n  \"shipments\": [\n    {\n      \"service_code\": \"usps_priority_mail\",\n      \"ship_to\": {\n        \"name\": \"Amanda Miller\",\n        \"phone\": \"555-555-5555\",\n        \"email\": \"recipient@example.com\",\n        \"address_line1\": \"525 S Winchester Blvd\",\n        \"city_locality\": \"San Jose\",\n        \"state_province\": \"CA\",\n        \"postal_code\": \"95128\",\n        \"country_code\": \"US\",\n        \"address_residential_indicator\": \"yes\"\n      },\n      \"warehouse_id\": \"se-277331\",\n      \"packages\": [\n        {\n          \"weight\": {\n            \"value\": 1.0,\n            \"unit\": \"ounce\"\n          }\n        }\n      ]\n    }\n  ]\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  \"has_errors\": false,\n  \"shipments\": [\n    {\n      \"errors\": null,\n      \"address_validation\": {\n        \"status\": \"verified\",\n        \"original_address\": {\n          \"name\": \"Amanda Miller\",\n          \"phone\": \"555-555-5555\",\n          \"address_line1\": \"525 S Winchester Blvd\",\n          \"city_locality\": \"San Jose\",\n          \"state_province\": \"CA\",\n          \"postal_code\": \"95128\",\n          \"country_code\": \"US\",\n          \"address_residential_indicator\": \"yes\"\n        },\n        \"matched_address\": {\n          \"name\": \"AMANDA MILLER\",\n          \"phone\": \"555-555-5555\",\n          \"address_line1\": \"525 S WINCHESTER BLVD\",\n          \"city_locality\": \"SAN JOSE\",\n          \"state_province\": \"CA\",\n          \"postal_code\": \"95128\",\n          \"country_code\": \"US\",\n          \"address_residential_indicator\": \"yes\"\n        },\n        \"messages\": []\n      },\n      \"shipment_id\": \"se-202927168\",\n      \"carrier_id\": \"se-123890\",\n      \"service_code\": \"usps_priority_mail\",\n      \"external_shipment_id\": null,\n      \"ship_date\": \"2018-02-12T00:00:00Z\",\n      \"created_at\": \"2018-02-13T02:17:28.5734844Z\",\n      \"modified_at\": \"2018-02-13T02:17:28.5734844Z\",\n      \"shipment_status\": \"pending\",\n      \"ship_to\": {\n        \"name\": \"Amanda Miller\",\n        \"phone\": \"555-555-5555\",\n        \"address_line1\": \"525 S Winchester Blvd\",\n        \"city_locality\": \"San Jose\",\n        \"state_province\": \"CA\",\n        \"postal_code\": \"95128\",\n        \"country_code\": \"US\",\n        \"address_residential_indicator\": \"yes\"\n      },\n      \"ship_from\": {\n        \"company_name\": \"Example Corp.\",\n        \"name\": \"John Doe\",\n        \"phone\": \"111-111-1111\",\n        \"address_line1\": \"4009 Marathon Blvd\",\n        \"address_line2\": \"Suite 300\",\n        \"city_locality\": \"Austin\",\n        \"state_province\": \"TX\",\n        \"postal_code\": \"78756\",\n        \"country_code\": \"US\",\n        \"address_residential_indicator\": \"no\"\n      },\n      \"warehouse_id\": \"se-277331\",\n      \"return_to\": {\n        \"company_name\": \"Example Corp.\",\n        \"name\": \"John Doe\",\n        \"phone\": \"111-111-1111\",\n        \"address_line1\": \"4009 Marathon Blvd\",\n        \"address_line2\": \"Suite 300\",\n        \"city_locality\": \"Austin\",\n        \"state_province\": \"TX\",\n        \"postal_code\": \"78756\",\n        \"country_code\": \"US\",\n        \"address_residential_indicator\": \"no\"\n      },\n      \"confirmation\": \"none\",\n      \"customs\": null,\n      \"advanced_options\": {\n        \"bill_to_account\": null,\n        \"bill_to_country_code\": null,\n        \"bill_to_party\": null,\n        \"bill_to_postal_code\": null,\n        \"contains_alcohol\": false,\n        \"delivered_duty_paid\": false,\n        \"non_machinable\": false,\n        \"saturday_delivery\": false,\n        \"freight_class\": null,\n        \"custom_field1\": null,\n        \"custom_field2\": null,\n        \"custom_field3\": null\n      },\n      \"insurance_provider\": \"none\",\n      \"tags\": [],\n      \"packages\": [\n        {\n          \"package_code\": \"package\",\n          \"weight\": {\n            \"value\": 1.0,\n            \"unit\": \"ounce\"\n          },\n          \"dimensions\": {\n            \"unit\": \"inch\",\n            \"length\": 0.0,\n            \"width\": 0.0,\n            \"height\": 0.0\n          },\n          \"insured_value\": {\n            \"currency\": \"usd\",\n            \"amount\": 0.0\n          },\n          \"label_messages\": {\n            \"reference1\": null,\n            \"reference2\": null,\n            \"reference3\": null\n          }\n        }\n      ],\n      \"total_weight\": {\n        \"value\": 1.0,\n        \"unit\": \"ounce\"\n      }\n    }\n  ]\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"overriding-the-return-address","__idx":3},"children":["Overriding the Return Address"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["By default, specifying a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["warehouse_id"]}," will automatically set the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ship_from"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["return_to"]}," addresses of the shipment. But there are some scenarios where you may want to override the return address. ShipStation API allows you to do that by specifying a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["return_to"]}," address in addition to the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["warehouse_id"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This feature is currently only supported for Stamps.com, Endicia, FedEx, UPS, DHL E-commerce, and FirstMile. Please ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://help.shipengine.com/hc/en-us/requests/new"},"children":["let us know"]}," if you need support for additional carriers."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"example-request","__idx":4},"children":["Example Request"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"POST /v1/shipments HTTP/1.1\nHost: api.shipengine.com\nAPI-Key: __YOUR_API_KEY_HERE__\nContent-Type: application/json\n\n{\n  \"shipments\": [\n    {\n      \"service_code\": \"usps_priority_mail\",\n      \"ship_to\": {\n        \"name\": \"Amanda Miller\",\n        \"phone\": \"555-555-5555\",\n        \"address_line1\": \"525 S Winchester Blvd\",\n        \"city_locality\": \"San Jose\",\n        \"state_province\": \"CA\",\n        \"postal_code\": \"95128\",\n        \"country_code\": \"US\",\n        \"address_residential_indicator\": \"yes\"\n      },\n      \"return_to\": {\n        \"name\": \"Example Corp. Returns\",\n        \"phone\": \"222-222-2222\",\n        \"company_name\": \"Example Corp.\",\n        \"address_line1\": \"345 Chambers Street\",\n        \"address_line2\": \"Suite 100\",\n        \"address_line3\": null,\n        \"city_locality\": \"New York City\",\n        \"state_province\": \"NY\",\n        \"postal_code\": \"10282\",\n        \"country_code\": \"US\",\n        \"address_residential_indicator\": \"unknown\"\n      },\n      \"warehouse_id\": \"se-277331\",\n      \"packages\": [\n        {\n          \"weight\": {\n            \"value\": 1.0,\n            \"unit\": \"ounce\"\n          }\n        }\n      ]\n    }\n  ]\n}\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["IMPORTANT:"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"multiple-warehouses-with-the-same-addresses","__idx":5},"children":["Multiple Warehouses with the Same Addresses"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When you ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/apis/shipengine/docs/shipping/create-a-shipment"},"children":["create a shipment"]},", you must include either a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["warehouse_id"]}," or a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ship_from"]}," address. However, since ShipStation API supports creating multiple warehouses that have the same ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ship_from"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["return_to"]}," addresses, if you create a shipment without a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["warehouse_id"]}," we will assign the the first warehouse in the database that matches the shipment's ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ship_from"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["return_to"]}," addresses to that shipment record."]}]}]},"headings":[{"value":"Ship From a Warehouse","id":"ship-from-a-warehouse","depth":1},{"value":"Origin Address vs. Return Address","id":"origin-address-vs-return-address","depth":2},{"value":"Example Request & Response","id":"example-request--response","depth":2},{"value":"Overriding the Return Address","id":"overriding-the-return-address","depth":2},{"value":"Example Request","id":"example-request","depth":3},{"value":"Multiple Warehouses with the Same Addresses","id":"multiple-warehouses-with-the-same-addresses","depth":3}],"frontmatter":{"seo":{"title":"Ship From a Warehouse"}},"lastModified":"2026-04-08T10:47:45.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/apis/shipengine/docs/shipping/ship-from-a-warehouse","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}