Safety Stock

This page contains information about benefits, usage and context of the configurable safety stock

Introduction

Safety stock enables you to guard your offline sales against online-induced stockouts. It can be defined on facility level, and decreases the available stock levels ("available for picking" and "available on stock"). This means, if the stock level in a given facility is equal or less than the configured safety stock, the available stock is.

Quick Start

Users can configure the desired safety stock quantity for each listing. Configurations can be made in the stock overview. For more information, please refer to Stock Availabilities.

As of now, safety stock is only designed for internal planning, e.g., via the stock overview. It is not considered in order routing which means that safety stock can still be sold online when using our order routing.

API Documentation

Get all Safety Stocks

GET/api/safetystocks
Query parameters
Response

Available Safety Stocks

Body
safetyStocks*array of SafetyStock (object)
total*number
Request
const response = await fetch('/api/safetystocks', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "safetyStocks": [
    {
      "created": "2024-11-21T06:24:03.537Z",
      "facilityRef": "text",
      "id": "text",
      "lastModified": "2024-11-21T06:24:03.537Z",
      "tenantArticleId": "text",
      "value": 0,
      "version": 0
    }
  ],
  "total": 0
}

Update Safety Stocks in bulk

PUT/api/safetystocks
Body
operations*array of SafetyStockBulkOperation (object)
Response

Result of the bulk operations

Body
errorBulkOperationError (object)
facilityRef*string
status*enum
UPDATEDCREATEDFAILED
tenantArticleId*string
value*number
Request
const response = await fetch('/api/safetystocks', {
    method: 'PUT',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "operations": [
        {
          "tenantArticleId": "text",
          "value": 0
        }
      ]
    }),
});
const data = await response.json();
Response
{
  "error": {
    "message": "text",
    "type": "VALIDATION"
  },
  "facilityRef": "text",
  "status": "UPDATED",
  "tenantArticleId": "text",
  "value": 0
}

Delete a single Safety Stock

DELETE/api/safetystocks/{safetyStockId}
Path parameters
safetyStockId*string
Response

Result of the bulk operations

Request
const response = await fetch('/api/safetystocks/{safetyStockId}', {
    method: 'DELETE',
    headers: {},
});
const data = await response.json();
Response
[
  {
    "description": "Missing attributes were name, address, items",
    "requestVersion": 41,
    "summary": "One or more mandatory attributes were not provided.",
    "version": 42
  }
]

Last updated