XM
Powered By GitBook
Retrieve Inventory of Single Item
Path:
1
GET https://{baseurl}/api-inventory/inventory/generic/{itemId}?query=itemId
Copied!
Retrieves real-time inventory of a single item, by SKU or item ID. To retrieve the inventory details for multiple items, the Retrieve Inventory for Multiple Items is recommended.

Headers

Content-Type : application/json
x-site-context : { "date": "2020-08-28T02:35:27.787Z", "channel": 12, "account": 5f493c9f30ec2a0007a94fc8", "stage": "sandbox" }
Parameters
Type : query
Name : The item ID or SKU to retrieve the inventory details.
Required: true

Sample Request

1
GET https://{baseurl}/api-inventory/inventory/generic/1000000033?query=itemId
Copied!

Sample Response

Response Code: 200
Message: OK
Description: You will see this message when the inventory details are successfully retrieved for the requested item.
1
{
2
"_id": "5fecb5d75c55ee2bfb0317a3",
3
"itemId": 1000000033,
4
"createdAt": "2020-12-30T17:16:07.118Z",
5
"inlocations": [
6
{
7
"_id": "60bfc0e5105cfd0009a94ef2",
8
"location": {
9
"_id": "60a5849fea4dcb00082ba853",
10
"channel": [
11
12
12
],
13
"isActive": true,
14
"isDefault": false,
15
"name": "ABC MANHATTEN STORE",
16
"address": {
17
"street1": "888 Broadway",
18
"street2": "",
19
"zipCode": "10003",
20
"city": "New York",
21
"state": "NY",
22
"country": "USA",
23
"phone": []
24
},
25
"pickup": false,
26
"type": "60a5844452e07600089d2cb7",
27
"kind": "Warehouse",
28
"locationId": 102,
29
"createdAt": "2021-05-19T21:35:27.947Z",
30
"updatedAt": "2021-06-04T21:53:00.733Z",
31
"__v": 0,
32
"coordinates": {
33
"latitude": 40.738417,
34
"longitude": -73.98985
35
}
36
},
37
"inStock": 1000,
38
"channel": [
39
{
40
"quantityReserved": 0,
41
"_id": "60bfc0e5105cfd0009a94ef3",
42
"channelId": 12,
43
"allocation": {
44
"mou": "ABSOLUTE",
45
"unit": 1000
46
},
47
"id": "60bfc0e5105cfd0009a94ef3"
48
}
49
],
50
"inTransit": [
51
{
52
"_id": "60bfc0e5105cfd0009a94ef4",
53
"inTransitRef": "WO-20000",
54
"orderQuantity": 10000,
55
"quantityReserved": 0,
56
"orderDate": "2021-06-05T00:00:00.000Z",
57
"stockDate": "2021-07-05T00:00:00.000Z",
58
"id": "60bfc0e5105cfd0009a94ef4"
59
}
60
],
61
"id": "60bfc0e5105cfd0009a94ef2"
62
}
63
],
64
"updatedAt": "2021-06-08T19:11:33.448Z",
65
"sku": "SHIRT001",
66
"title": "Shirt"
67
}
Copied!
Error Code: 404
Message: Not Found
Description: You will see this error when the inventory details are not found for the requested item.
1
{
2
"code": "GET_INVENTORY_FAILED",
3
"message": "Unable to find Inventory"
4
}
Copied!
Error Code: 404
Message: Not Found
Description: You will see this error when the specified SKU or Item ID is not found.
1
{
2
"code": "GET_INVENTORY_FAILED",
3
"message": "Unable to find SKU 1567256999"
4
}
Copied!
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).

Change Log

    June - 2021
    July - 2020 First updated
Last modified 2mo ago
Copy link
Contents
Change Log