Set or update low stock level
The following describes endpoints for setting or updating low stock threshold levels for products and variants in a specific location.
Note: Every product and product variant must have a unique UUID.
- Authorization setup with the correct scope, and a valid authorization token. See How inventories work.
- The location UUID for the target location. See Fetch inventory locations.
- The product/variant UUIDs for the products/variants to be updated. See Fetch products.
Saves a low stock level for exactly one product/variant in a specific location. The product and variant UUIDs are defined in the request body.
1PUT /custom-low-stock/locations/{locationUuid}
Example: This example updates the custom low stock level to 10
for product_uuid
de71da94-5cb4-11ec-bf63-0242ac130002
, and variant_uuid
e58d826a-5cb4-11ec-bf63-0242ac130002
, for location_uuid
f2e4d45e-5cb4-11ec-bf63-0242ac130002
.
Request
1PUT /custom-low-stock/locations/f2e4d45e-5cb4-11ec-bf63-0242ac130002
1{2"productUuid": "de71da94-5cb4-11ec-bf63-0242ac130002",3"variantUuid": "e58d826a-5cb4-11ec-bf63-0242ac130002",4"lowStockLevel": 105}
Response
No response body is returned, only a status code of 204 - No Content.
Note: The Zettle clients (apps and back office) use caching. Therefore, it can take some time until they sync with the backend to pick up changes made through the API.
This call updates multiple variants at the same time. This is convenient method to use if you have many updates to perform at the same time. The payload is essentially a list in the single update call. You can construct the payload in the same way you did for the single update call providing a list instead.
1POST /custom-low-stock/locations/{locationUuid}
Example: This example updates the custom low stock level to 10
and 8
respectively, for product_uuid
de71da94-5cb4-11ec-bf63-0242ac130002
and variant_uuids
e58d826a-5cb4-11ec-bf63-0242ac130002
and 9258b222-5cb9-11ec-bf63-0242ac130002
, for location_uuid
f2e4d45e-5cb4-11ec-bf63-0242ac130002
.
Request
1POST /custom-low-stock/locations/f2e4d45e-5cb4-11ec-bf63-0242ac130002
1{2"requests": [3{4"productUuid": "de71da94-5cb4-11ec-bf63-0242ac130002",5"variantUuid": "e58d826a-5cb4-11ec-bf63-0242ac130002",6"lowStockLevel": 107},8{9"productUuid": "de71da94-5cb4-11ec-bf63-0242ac130002",10"variantUuid": "9258b222-5cb9-11ec-bf63-0242ac130002",11"lowStockLevel": 812}13]14}
Response
No response body is returned only a status code of 204 - No Content.