# Safety stock endpoints

## The SafetyStock object

```json
{"openapi":"3.0.1","info":{"title":"fulfillmenttools","version":"VERSIONLESS"},"components":{"schemas":{"SafetyStock":{"properties":{"created":{"format":"date-time","type":"string"},"facilityRef":{"type":"string"},"id":{"type":"string"},"lastModified":{"format":"date-time","type":"string"},"tenantArticleId":{"type":"string"},"value":{"type":"number"},"version":{"type":"number"}},"required":["tenantArticleId","value","created","id","lastModified","version"],"title":"SafetyStock","type":"object","description":"SafetyStock"}}}}
```

## GET /api/safetystocks

> List safety stocks

```json
{"openapi":"3.0.1","info":{"title":"fulfillmenttools","version":"VERSIONLESS"},"tags":[{"description":"Endpoints to create, update, and read stocks.","name":"Stocks (Inventory)"}],"servers":[{"url":"https://{tenant}.api.fulfillmenttools.com","variables":{"tenant":{"default":"your-tenant-name"}}}],"security":[{"BearerToken":[]}],"components":{"securitySchemes":{"BearerToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"SafetyStocksPaginatedResult":{"properties":{"safetyStocks":{"items":{"$ref":"#/components/schemas/SafetyStock"},"type":"array"},"total":{"minimum":0,"type":"number"}},"required":["total","safetyStocks"],"title":"SafetyStocksPaginatedResult","type":"object","description":"SafetyStocksPaginatedResult"},"SafetyStock":{"properties":{"created":{"format":"date-time","type":"string"},"facilityRef":{"type":"string"},"id":{"type":"string"},"lastModified":{"format":"date-time","type":"string"},"tenantArticleId":{"type":"string"},"value":{"type":"number"},"version":{"type":"number"}},"required":["tenantArticleId","value","created","id","lastModified","version"],"title":"SafetyStock","type":"object","description":"SafetyStock"},"ApiError":{"items":{"$ref":"#/components/schemas/ErrorInner"},"type":"array","xml":{"name":"ApiError"},"title":"ApiError","description":"ApiError"},"ErrorInner":{"properties":{"description":{"type":"string"},"requestVersion":{"description":"The version provided within an invalid request.","format":"int64","type":"integer"},"summary":{"type":"string"},"version":{"format":"int64","type":"integer"}},"required":["summary"],"type":"object","title":"ErrorInner","description":"ErrorInner"}}},"paths":{"/api/safetystocks":{"get":{"deprecated":false,"description":"","operationId":"getSafetyStocks","parameters":[{"in":"query","name":"size","required":false,"schema":{"default":25,"maximum":100,"minimum":1,"type":"number"}},{"in":"query","name":"startAfterId","required":false,"schema":{"type":"string"}},{"in":"query","name":"tenantArticleId","required":false,"schema":{"type":"string"}},{"in":"query","name":"facilityRef","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SafetyStocksPaginatedResult"}}},"description":"Available Safety Stocks"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user is not allowed to operate against this API instance"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user, although recognized, is not authorized to use this"}},"summary":"List safety stocks","tags":["Stocks (Inventory)"]}}}}
```

## PUT /api/safetystocks

> Update safety stocks

```json
{"openapi":"3.0.1","info":{"title":"fulfillmenttools","version":"VERSIONLESS"},"tags":[{"description":"Endpoints to create, update, and read stocks.","name":"Stocks (Inventory)"}],"servers":[{"url":"https://{tenant}.api.fulfillmenttools.com","variables":{"tenant":{"default":"your-tenant-name"}}}],"security":[{"BearerToken":[]}],"components":{"securitySchemes":{"BearerToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"SafetyStockBulkOperations":{"properties":{"operations":{"items":{"$ref":"#/components/schemas/SafetyStockBulkOperation"},"maxItems":500,"minItems":1,"type":"array"}},"required":["operations"],"title":"SafetyStockBulkOperations","type":"object","description":"SafetyStockBulkOperations"},"SafetyStockBulkOperation":{"properties":{"facilityRef":{"type":"string"},"tenantArticleId":{"type":"string"},"value":{"type":"number"}},"required":["tenantArticleId","value"],"title":"SafetyStockBulkOperation","type":"object","description":"SafetyStockBulkOperation"},"SafetyStockBulkOperationResult":{"properties":{"error":{"$ref":"#/components/schemas/BulkOperationError"},"facilityRef":{"type":"string"},"status":{"enum":["UPDATED","CREATED","FAILED"],"type":"string"},"tenantArticleId":{"type":"string"},"value":{"type":"number"}},"required":["tenantArticleId","facilityRef","value","status"],"title":"SafetyStockBulkOperationResult","type":"object","description":"SafetyStockBulkOperationResult"},"BulkOperationError":{"properties":{"message":{"type":"string"},"type":{"enum":["NOT_FOUND","NOT_ALLOWED","VALIDATION","UNKNOWN"],"type":"string"}},"required":["type","message"],"title":"BulkOperationError","type":"object","description":"BulkOperationError"},"ApiError":{"items":{"$ref":"#/components/schemas/ErrorInner"},"type":"array","xml":{"name":"ApiError"},"title":"ApiError","description":"ApiError"},"ErrorInner":{"properties":{"description":{"type":"string"},"requestVersion":{"description":"The version provided within an invalid request.","format":"int64","type":"integer"},"summary":{"type":"string"},"version":{"format":"int64","type":"integer"}},"required":["summary"],"type":"object","title":"ErrorInner","description":"ErrorInner"}}},"paths":{"/api/safetystocks":{"put":{"deprecated":false,"description":"","operationId":"bulkUpdateSafetyStock","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SafetyStockBulkOperations"}}},"required":true},"responses":{"207":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SafetyStockBulkOperationResult"}}},"description":"Result of the bulk operations"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user is not allowed to operate against this API instance"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user, although recognized, is not authorized to use this"}},"summary":"Update safety stocks","tags":["Stocks (Inventory)"]}}}}
```

## DELETE /api/safetystocks/{safetyStockId}

> Delete safety stock

```json
{"openapi":"3.0.1","info":{"title":"fulfillmenttools","version":"VERSIONLESS"},"tags":[{"description":"Endpoints to create, update, and read stocks.","name":"Stocks (Inventory)"}],"servers":[{"url":"https://{tenant}.api.fulfillmenttools.com","variables":{"tenant":{"default":"your-tenant-name"}}}],"security":[{"BearerToken":[]}],"components":{"securitySchemes":{"BearerToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"ApiError":{"items":{"$ref":"#/components/schemas/ErrorInner"},"type":"array","xml":{"name":"ApiError"},"title":"ApiError","description":"ApiError"},"ErrorInner":{"properties":{"description":{"type":"string"},"requestVersion":{"description":"The version provided within an invalid request.","format":"int64","type":"integer"},"summary":{"type":"string"},"version":{"format":"int64","type":"integer"}},"required":["summary"],"type":"object","title":"ErrorInner","description":"ErrorInner"}}},"paths":{"/api/safetystocks/{safetyStockId}":{"delete":{"deprecated":false,"description":"","operationId":"deleteSafetyStock","parameters":[{"in":"path","name":"safetyStockId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Result of the bulk operations"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user is not allowed to operate against this API instance"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user, although recognized, is not authorized to use this"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"The requested entity was not found"}},"summary":"Delete safety stock","tags":["Stocks (Inventory)"]}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fulfillmenttools.com/documentation/by-pillar/global-inventory-hub/stock/safety-stock/safety-stock-endpoints.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
