XM

Retrieve Default Warehouse

Path:

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

Retrieves details of the default warehouse.

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

Type : query

Name : The item ID to retrieve the inventory details.

Required: true

Sample Request

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

Sample Response

Response Code: 200

Message: OK

Description: You will see this message when the inventory details are successfully retrieved for the requested item.

{
"_id": "5fecb5d75c55ee2bfb0317a3",
"itemId": 1000000033,
"createdAt": "2020-12-30T17:16:07.118Z",
"inlocations": [
{
"_id": "60bfc0e5105cfd0009a94ef2",
"location": {
"_id": "60a5849fea4dcb00082ba853",
"channel": [
12
],
"isActive": true,
"isDefault": false,
"name": "ABC MANHATTEN STORE",
"address": {
"street1": "888 Broadway",
"street2": "",
"zipCode": "10003",
"city": "New York",
"state": "NY",
"country": "USA",
"phone": []
},
"pickup": false,
"type": "60a5844452e07600089d2cb7",
"kind": "Warehouse",
"locationId": 102,
"createdAt": "2021-05-19T21:35:27.947Z",
"updatedAt": "2021-06-04T21:53:00.733Z",
"__v": 0,
"coordinates": {
"latitude": 40.738417,
"longitude": -73.98985
}
},
"inStock": 1000,
"channel": [
{
"quantityReserved": 0,
"_id": "60bfc0e5105cfd0009a94ef3",
"channelId": 12,
"allocation": {
"mou": "ABSOLUTE",
"unit": 1000
},
"id": "60bfc0e5105cfd0009a94ef3"
}
],
"inTransit": [
{
"_id": "60bfc0e5105cfd0009a94ef4",
"inTransitRef": "WO-20000",
"orderQuantity": 10000,
"quantityReserved": 0,
"orderDate": "2021-06-05T00:00:00.000Z",
"stockDate": "2021-07-05T00:00:00.000Z",
"id": "60bfc0e5105cfd0009a94ef4"
}
],
"id": "60bfc0e5105cfd0009a94ef2"
}
],
"updatedAt": "2021-06-08T19:11:33.448Z",
"sku": "SHIRT001",
"title": "Shirt"
}

Error Code: 404

Message: Not Found

Description: You will see this error when the inventory details are not found for the requested item.

{
"code": "GET_INVENTORY_FAILED",
"message": "Unable to find Inventory"
}

Error Code: 404

Message: Not Found

Description: You will see this error when the specified SKU is not found.

{
"code": "GET_INVENTORY_FAILED",
"message": "Unable to find SKU 1567256999"
}

Error Code: 403

Message: Forbidden

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

{
"message": "Forbidden"
}

Changelog

  • Last updated - July 2020