XM

Retrieve Default Warehouse

Path:

GET https://{baseurl}/api-inventory/warehouse/default

Retrieves details of the default warehouse. This API is secured by x-api-key.

Headers

Content-Type : application/json

x-site-context : { "date": "2020-08-28T02:35:27.787Z", "channel": 12, "account": 5f493c9f30ec2a0007a94fc8", "stage": "sandbox" }

x-api-key : d41d8cd98f00b204e9800998ecf8427e

Parameters []

Sample Request

GET https://{baseurl}/api-inventory/warehouse/default

Sample Response

Response Code: 200

Message: OK

Description: You will see this message when the warehouse details are retrieved successfully.

{
"_id": "5f46c5e728539eb8e069178a",
"channel": [
12,
13
],
"isActive": true,
"isDefault": true,
"name": "Bellevue Warehouse Main22",
"address": {
"attention": "John Smith",
"street1": "10400 NE 4th St",
"street2": "Suite 2500",
"city": "Bellevue",
"state": "Washington",
"country": "US",
"zipCode": "98005",
"phone": [
{
"_id": "5f46d1b628539eb8e069178c",
"number": "555-555-5555",
"kind": "mobile",
"id": "5f46d1b628539eb8e069178c"
}
],
"email": "[email protected]",
"kind": "Main Docks"
},
"kind": "Warehouse",
"locationId": 109,
"createdAt": "2020-08-26T20:28:23.070Z",
"updatedAt": "2020-08-26T21:18:46.640Z",
"__v": 0,
"shortName": "TAG_ABC1234"
}

Error Code: 404

Message: Not Found

Description: You will see this error when the default warehouse details are not found.

{
"code": "NO_DEFAULT_LOCATION",
"message": "Location not found"
}

Error Code: 500

Message: Internal Server Error

Description: You will see this error when the account number is incorrect in the x-site-context (for a multi-tenent client).

Changelog

  • Last updated - June 2021