Manage Inventory Warehouses
With the /v2/inventory_warehouses
endpoint, you can create and delete inventory warehouses, list inventory warehouses, and update inventory warehouse names.
Inventory Warehouse Properties
Inventory warehouses only have four properties:
Property | Type | Description |
---|---|---|
inventory_warehouse_id | string | Generated automatically when you create an inventory warehouse. This property is required to update or delete a specific warehouse location and if you want to add a new inventory location. You can also use it as a query parameter when listing SKU inventory levels. |
name | string | The name that will appear in ShipStation for this inventory warehouse. This is the only inventory warehouse property you can define when adding a new inventory warehouse or updating an existing inventory warehouse. |
created_at | string (date-time) | The date and time the inventory warehouse was created. |
updated_at | string (date-time) | The date and time the inventory warehouse was last updated. |
At this time, the inventory warehouse responses do not return the inventory_location_id
of the locations associated with the inventory warehouse.
Delete an Inventory Warehouse
Deleting an inventory warehouse is a bit of a special case because all inventory must be removed from the warehouse before the warehouse can be deleted.
You can add the remove_inventory
query parameter to the endpoint path if you wish to remove inventory in the same request to delete the warehouse.
Query Parameter | Type | Description |
---|---|---|
remove_inventory | enumerated string |
|
Example Delete Request & Response
DELETE /v2/inventory_warehouses/{inventory_warehouse_id}
- Production https://api.shipstation.com/v2/inventory_warehouses/{inventory_warehouse_id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X DELETE \
'https://api.shipstation.com/v2/inventory_warehouses/{inventory_warehouse_id}?remove_inventory=0' \
-H 'api-key: YOUR_API_KEY_HERE'