Stock Replenishments
The StockReplenishments entity represents the process of refilling product stock in a device or kiosk.
Fields
| Field | Type | Description |
|---|---|---|
id | Integer | Unique identifier (Primary Key). |
number | String | Replenishment document number. |
date | DateTime | Date and time of the operation. |
type | Enum | Type of replenishment operation (itemReplenishment, accessoryReplenishment, testReplenishment). |
conveniq | Relation | The device where the replenishment took place. |
user | Relation | The user (staff) who performed the operation. |
frontalPhotos | File[] | Collection of photos taken during replenishment. |
createdAt | DateTime | Metadata: Creation timestamp. |
updatedAt | DateTime | Metadata: Last update timestamp. |
Get List of Replenishments
Fetch a list of stock replenishment operations.
Endpoint: POST /core/data/StockReplenishments/select
Example Request:
json
{
"fields": {
"id": true,
"number": true,
"date": true,
"type": { "id": true, "value": true },
"conveniq": { "id": true, "name": true }
},
"conditions": {
"operator": "and",
"filters": [
{
"field": "date",
"comparator": ">",
"value": "2025-01-01T00:00:00Z"
}
]
},
"orderBy": [
{
"field": "date",
"order": "desc"
}
],
"limit": 50,
"offset": 0
}Get Single Replenishment
Retrieve details for a specific replenishment by ID.
Endpoint: POST /core/data/StockReplenishments/select
Example Request:
json
{
"fields": {
"id": true,
"number": true,
"date": true,
"user": { "id": true, "name": true },
"frontalPhotos": { "id": true, "fileName": true }
},
"conditions": {
"filters": [
{
"field": "id",
"comparator": "=",
"value": 3001
}
]
},
"limit": 1
}Replenishment Products (Table Part)
The StockReplenishmentsProducts entity stores individual items added during a replenishment.
Table Part Fields
| Field | Type | Description |
|---|---|---|
id | Integer | Unique identifier. |
owner | Relation | Link to the parent StockReplenishments document. |
product | Relation | Link to the Products entity. |
quantity | Float | Quantity added to the stock. |
price | Float | Unit price at the time of replenishment. |
createdAt | DateTime | Metadata: Creation timestamp. |
updatedAt | DateTime | Metadata: Last update timestamp. |
Get Products for a Replenishment
To fetch all products for a specific replenishment, filter by the owner.id field.
Endpoint: POST /core/data/StockReplenishmentsProducts/select
Example Request:
json
{
"fields": {
"id": true,
"product": { "id": true, "name": true },
"quantity": true,
"price": true
},
"conditions": {
"operator": "and",
"filters": [
{
"field": "owner.id",
"comparator": "=",
"value": 3001
}
]
},
"limit": 500
}