Products
The Products entity represents the catalog of items available in the system.
Fields
| Field | Type | Description |
|---|---|---|
id | Integer | Unique identifier (Primary Key). |
name | String | Product name. |
barcode | String | Product barcode. |
type | Enum | Product type (e.g., product, beverage, set, accessory). |
category | Relation | Relation to ProductCategories. |
price | Float | Selling price. |
entryPrice | Float | Purchase/Entry price. |
weight | Integer | Product weight. |
unit | Enum | Measurement unit (e.g., kg, pcs, unit). |
image | File | Product image reference. |
externalId | String | External system reference. |
countryOfOrigin | Relation | Country of origin. Relation to Countries. |
imported | Boolean | Whether the product is imported. |
excise | Boolean | Whether the product is subject to excise tax. |
uktzed | String | UKTZED code (for fiscal documents). |
milkBeverage | Boolean | Flag for milk-based beverages. |
createdAt | DateTime | Creation timestamp. |
updatedAt | DateTime | Last update timestamp. |
Get List of Products
Endpoint: POST /core/data/Products/select
Example Request:
json
{
"fields": {
"id": true,
"name": true,
"barcode": true,
"price": true,
"category": { "id": true, "name": true }
},
"conditions": {
"operator": "and",
"filters": [
{
"field": "category.id",
"comparator": "=",
"value": 10
}
]
},
"orderBy": [
{
"field": "name",
"order": "asc"
}
],
"limit": 50,
"offset": 0
}Get Single Product
Endpoint: POST /core/data/Products/select
Example Request:
json
{
"fields": {
"id": true,
"name": true,
"barcode": true,
"price": true,
"type": { "id": true, "value": true }
},
"conditions": {
"filters": [
{
"field": "id",
"comparator": "=",
"value": 501
}
]
},
"limit": 1
}Create Product
Endpoint: POST /core/data/Products/insert
Example Request:
json
{
"fields": [
{
"name": "Sparkling Water 0.5L",
"barcode": "5901234567890",
"price": 2500,
"category": { "id": 10 },
"type": { "id": 1 }
}
]
}Update Product
Endpoint: POST /core/data/Products/update/{id}
Example Request:
json
{
"fields": {
"price": 2750,
"excise": true
}
}Delete Products
Endpoint: POST /core/data/Products/remove
Example Request:
json
{
"conditions": {
"operator": "and",
"filters": [
{
"field": "id",
"comparator": "in",
"value": [501, 502]
}
]
}
}