Skip to content

Latest commit

 

History

History
66 lines (48 loc) · 3.13 KB

File metadata and controls

66 lines (48 loc) · 3.13 KB

Delete low stock level

There are multiple ways to delete custom low stock configurations. 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.

If all values of a low stock configuration for a variant are set to their default through an update, the service will also delete the saved configuration. The default values are an unset lowStockLevel and a lowStockAlert set to false. For more information on how to update the configuration, see Set low stock level.

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.

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.

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.

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

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

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

Request body

{
  "requests": [
    {
      "productUuid": "0b65a504-511a-11ec-bf63-0242ac130002",
      "variantUuid": "05abacda-511a-11ec-bf63-0242ac130002"
    },
    {
      "productUuid": "20ea6342-511a-11ec-bf63-0242ac130002",
      "variantUuid": "279f71fa-511a-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.

Related tasks