Delete low stock level

There are two ways to delete custom low stock levels available. One through an explicit DELETE call to a single variant. Another is through a POST call to delete multiple variants custom low stock levels at the same time.

Prerequisites

  • The organization UUID for the merchant organization. This is part of the authorization token, see How inventories work.
  • The location UUID you want to use. See Fetch inventory locations.
  • The product UUID(s) and variant UUID(s) for the product(s) and variant(s) you want delete stock levels for. See Fetch products.

Delete low stock level for a single variant

This request deletes the low stock level for one specific variant, in a specific location. You pass in the variant UUID for which you want to delete custom low stock level.

1
DELETE /custom-low-stock/locations/{locationUuid}/products/{productUuid}/variants/{variantUuid}

Example: Delete a single custom low stock level for a variant ac37748a-5115-11ec-bf63-0242ac130002 of a product a53b5b1a-5115-11ec-bf63-0242ac130002, in a location with UUID 9a495c2a-5115-11ec-bf63-0242ac130002.

1
DELETE /custom-low-stock/locations/9a495c2a-5115-11ec-bf63-0242ac130002/products/a53b5b1a-5115-11ec-bf63-0242ac130002/variants/ac37748a-5115-11ec-bf63-0242ac130002

Response

A successful request returns Status code 202 - No Content. Any status code in higher ranges 4XX and 5XX all indicates failure, and corrective measures must be taken.

Delete multiple low stock levels in one request

Deletes low stock levels for a set of products/variants in a specific location. The product/variant UUID pairs for the location UUID for which to delete the low stock levels, are passed in the request body.

1
POST /custom-low-stock/locations/{locationUuid}/delete

Example: Delete two custom low stock levels in one request.

1
POST /custom-low-stock/locations/9a495c2a-5115-11ec-bf63-0242ac130002/delete

Request body

1
{
2
"requests": [
3
{
4
"productUuid": "0b65a504-511a-11ec-bf63-0242ac130002",
5
"variantUuid": "05abacda-511a-11ec-bf63-0242ac130002"
6
},
7
{
8
"productUuid": "20ea6342-511a-11ec-bf63-0242ac130002",
9
"variantUuid": "279f71fa-511a-11ec-bf63-0242ac130002"
10
}
11
]
12
}

Response

A successful request returns Status code 202 - No Content. Any status code in higher ranges 4XX and 5XX all indicates failure, and corrective measures must be taken.