Base URL
https://{tenant}.logzi.com/api/stock_limit/
Every request returns a JSON response. On success result.code == 1, on failure result.code == 0. The stock limit stores the min/opt/max values set for a product — the basis for alerting and replenishment logic.
/api/stock_limit/get
Retrieve the stock limit of a single product.
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | int | Product identifier |
Example request
GET /api/stock_limit/get?id=5
X-API-KEY: {your_api_key}
/api/stock_limit/list
Retrieve a paginated list of stock limits with filtering options.
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
list_offset | int | Pagination offset (default: 0) | |
list_condition[product_id] | int | Filter by product identifier |
Example request
GET /api/stock_limit/list?list_offset=0
X-API-KEY: {your_api_key}
/api/stock_limit/save
Set or update the stock limits of a product. It identifies the product by product_id and updates the min/opt/max values.
POST fields — data object
| Field | Type | Required | Description |
|---|---|---|---|
product_id | int | The product's identifier | |
quantity_min | float | Minimum stock level (alert threshold) | |
quantity_opt | float | Optimal (recommended) stock level | |
quantity_max | float | Maximum stock level |
Example request
POST /api/stock_limit/save
X-API-KEY: {your_api_key}
Content-Type: application/json
{
"data": {
"product_id": 5,
"quantity_min": 10,
"quantity_opt": 50,
"quantity_max": 200
}
}
Create your account now,
pay later!