Fetch low stock level

There are two operations available for retrieving low stock threshold levels for products and variants in a specific location. One gives the entire set of levels for a given location. The other returns levels only for a given product in a specific location. Both of them accepts and returns ETags to allow for more performant operation when the data has not changed since the last invocation.

Prerequisites

Fetch low stock level

Retrieves the custom low stock levels that have been set on any product/variant for a given location UUID.

1
GET /custom-low-stock/locations/{locationUuid}

Example: Retrieve all the previously set custom low stock levels for a given location UUID efc7ea52-51c1-11ec-bf63-0242ac130002.

Request

1
GET /custom-low-stock/locations/efc7ea52-51c1-11ec-bf63-0242ac130002

Response

1
{
2
"organizationUuid": "4b8784a6-51c2-11ec-bf63-0242ac130002",
3
"locationUuid": "efc7ea52-51c1-11ec-bf63-0242ac130002",
4
"customLowStockLevelsForProducts": [
5
{
6
"productUuid": "6f25a2bc-51c2-11ec-bf63-0242ac130002",
7
"customLowStockLevelForVariants": [
8
{
9
"variantUuid": "8a9181c4-51c2-11ec-bf63-0242ac130002",
10
"customLowStockLevel": 5.0
11
},
12
{
13
"variantUuid": "a466e436-51c2-11ec-bf63-0242ac130002",
14
"customLowStockLevel": 7.0
15
}
16
]
17
},
18
{
19
"productUuid": "bf0ae350-51c2-11ec-bf63-0242ac130002",
20
"customLowStockLevelForVariants": [
21
{
22
"variantUuid": "cdd1dcb8-51c2-11ec-bf63-0242ac130002",
23
"customLowStockLevel": 3.0
24
},
25
{
26
"variantUuid": "d42d9f70-51c2-11ec-bf63-0242ac130002",
27
"customLowStockLevel": 8.0
28
}
29
]
30
}
31
]
32
}

Fetch low stock level for a product

Retrieves the custom low stock level for exactly one product in a specific location. You pass in the location and product UUIDs for which you want to fetch custom low stock levels.

1
GET /custom-low-stock/locations/{locationUuid}/products/{productUuid}

Example: Retrieve all the previously set custom low stock levels for a given location UUID efc7ea52-51c1-11ec-bf63-0242ac130002, and product 6f25a2bc-51c2-11ec-bf63-0242ac130002.

Request

1
GET /custom-low-stock/locations/efc7ea52-51c1-11ec-bf63-0242ac130002/products/6f25a2bc-51c2-11ec-bf63-0242ac130002

Response

1
{
2
"productUuid": "6f25a2bc-51c2-11ec-bf63-0242ac130002",
3
"customLowStockLevelForVariants": [
4
{
5
"variantUuid": "8a9181c4-51c2-11ec-bf63-0242ac130002",
6
"customLowStockLevel": 5.0
7
},
8
{
9
"variantUuid": "a466e436-51c2-11ec-bf63-0242ac130002",
10
"customLowStockLevel": 7.0
11
}
12
]
13
}