Skip to main content

Get Single Warehouse

Retrieves the details of a single warehouse, including its address, shipping zones and stock levels.

HTTP Request​

  • URL: /wareHouse/{id}
  • Method: GET
  • Headers:
    • accessToken: Required. Your API access token.
  • Required scope: READ_WAREHOUSE or READ_WRITE_WAREHOUSE

Path Parameters​

ParameterTypeDescription
idStringThe ID of the warehouse to retrieve.

cURL Example​

curl --location '<BASE_URL>/wareHouse/6650c4b2e8a1f93d7c2b5e40' \
--header 'accessToken: <ACCESS_TOKEN>'

Response​

  • 200 OK: The warehouse was returned successfully.
  • 400 Bad Request: The access token is missing or invalid, does not have the required scope, or the warehouse ID is not valid.

Sample JSON Response​

{
"success": true,
"data": {
"id": "6650c4b2e8a1f93d7c2b5e40",
"name": "Chicago Distribution Center",
"country": {
"code": "US",
"name": "United States"
},
"active": true,
"default": true,
"address": {
"firstName": "Marcus",
"lastName": "Reyes",
"address1": "2400 S Western Ave",
"address2": "Dock 4",
"city": "Chicago",
"state": {
"code": "IL",
"name": "Illinois"
},
"country": {
"code": "US",
"name": "United States"
},
"zipcode": "60608"
},
"shippingZones": ["66d36af6d1fc2890ebc32e0b"],
"inventory": [
{
"_id": "6650c4b2e8a1f93d7c2b5e41",
"productId": "65b88ef5045a7d009e79974b",
"stock": 240,
"minStock": 25,
"variants": []
},
{
"_id": "6650c4b2e8a1f93d7c2b5e42",
"productId": "66b4a01249e6ce3d41c428fa",
"stock": 0,
"minStock": 0,
"variants": [
{
"_id": "6650c4b2e8a1f93d7c2b5e43",
"variantId": "66d5a286fcb786834cebb16a",
"stock": 500,
"minStock": 50
}
]
}
],
"metaFields": [],
"createdAt": "2024-05-24T16:47:14.302Z",
"updatedAt": "2024-10-28T09:12:45.118Z"
}
}

Response Details​

Warehouse Data​

FieldTypeDescription
idStringUnique identifier of the warehouse.
nameStringName of the warehouse.
countryObjectCountry of the warehouse, with code and name.
activeBooleanWhether the warehouse is active. Default is true.
defaultBooleanWhether this is your store's default warehouse. Default is false.
addressObjectAddress of the warehouse. See below.
shippingZonesArrayIDs of the shipping zones this warehouse serves.
inventoryArrayStock levels per product. See below.
metaFieldsArrayCustom field values. See Metafields.
createdAtStringDate and time the warehouse was created (ISO 8601).
updatedAtStringDate and time the warehouse was last updated (ISO 8601).

Address Object​

FieldTypeDescription
firstNameStringFirst name of the contact person.
lastNameStringLast name of the contact person.
phoneNumberStringPhone number of the contact person, if set.
address1StringStreet address.
address2StringAdditional address line.
cityStringCity.
stateObjectState or province, with code and name.
countryObjectCountry, with code and name.
zipcodeStringPostal code.

Inventory Object​

FieldTypeDescription
_idStringUnique identifier of the inventory entry.
productIdStringID of the product.
stockNumberUnits in stock. Default is 0.
minStockNumberLow-stock level. Default is 0.
variantsArrayStock per variant, each with variantId, stock and minStock.

Notes​

  • If no warehouse matches the ID, data is an empty object.