Ship From a Warehouse
When you have one or more warehouse locations that you frequently ship from, it can be cumbersome to specify the ship_from
and return_to
addresses on every shipment. When you create a warehouse for each of the locations you ship from, you define the ship_from
and return_to
addresses for each location and then pass the warehouse_id
in your request instead.
For some operations, a warehouse_id
is required, as when creating batches and creating manifests.
Origin Address vs. Return Address
The create a warehouse request will include both an origin address and a return address. These two addresses serve different purposes when shipping.
- 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.
- 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.
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.
Example Request & Response
POST /v1/shipments/
The following example demonstrates how to create a shipment using a warehouse_id
instead of a ship_from
address. Other than the warehouse_id
property, the request is the same as any other create shipment workflow.
Response
Overriding the Return Address
By default, specifying a warehouse_id
will automatically set the ship_from
and return_to
addresses of the shipment. But there are some scenarios where you may want to override the return address. ShipEngine allows you to do that by specifying a return_to
address in addition to the warehouse_id
.
This feature is currently only supported for Stamps.com, Endicia, FedEx, UPS, DHL E-commerce, and FirstMile. Please let us know if you need support for additional carriers.