Get your warehouses
Some Shipping API operations involve providing details about one of the warehouses (shipping locations) associated with your Metapack shipper account, which can include stores, distribution centres, and logistics channels. For example, creating a consignment requires entering address details for the sender
and creating a manifest requires entering a shippingLocationCode
.
Get warehouses request
You need the following to make a get warehouses request.
Data | Description |
---|---|
Warehouses | You cannot retrieve warehouses data if warehouses are not configured for your Metapack shipper account. |
Use the Get your warehouses operation to return the warehouses associated with your Metapack shipper account.
Example request
GET /shipping/v1/shippingLocations HTTP/1.1
Host: api.metapack.com
API-Key: Basic Base64-encoded <username>:<password>
Content-Type: application/json
Get warehouses response
200
(OK)
The name and code of each warehouse for your account are returned.
Example response
[
{
"code": "DEFAULT",
"name": "default"
}
]