Product Sets
The ProductSets entity defines sets or bundles of products associated with specific hardware components.
Fields
| Field | Type | Description |
|---|---|---|
id | Integer | Unique identifier (Primary Key). |
name | String | Name of the product set. |
product | Relation | The product associated with this set. |
component | Relation | The product included in this set. |
quantity | Float | The quantity of the product in the set. |
createdAt | DateTime | Metadata: Creation timestamp. |
updatedAt | DateTime | Metadata: Last update timestamp. |
Get List of Product set components
Endpoint: POST /core/data/ProductSets/select
Example Request:
json
{
"fields": {
"id": true,
"name": true,
"product": { "id": true, "name": true },
"quantity": true,
"component": { "id": true, "name": true }
},
"conditions": {
"operator": "and",
"filters": [
{
"field": "product.id",
"comparator": "=",
"value": 501
}
]
},
"orderBy": [
{
"field": "name",
"order": "asc"
}
],
"limit": 50,
"offset": 0
}Get Single Product set component row
Endpoint: POST /core/data/ProductSets/select
Example Request:
json
{
"fields": {
"id": true,
"name": true,
"quantity": true,
"product": { "id": true },
"component": { "id": true }
},
"conditions": {
"filters": [
{
"field": "id",
"comparator": "=",
"value": 1
}
]
},
"limit": 1
}Create Product set component
Endpoint: POST /core/data/ProductSets/insert
Example Request:
json
{
"fields": [
{
"name": "Standard Bundle",
"product": { "id": 501 },
"quantity": 1,
"component": { "id": 12 }
},
{
"name": "Standard Bundle",
"product": { "id": 501 },
"quantity": 1,
"component": { "id": 13 }
}
]
}Update Product set component data
Endpoint: POST /core/data/ProductSets/update/{id}
Example Request:
json
{
"fields": {
"quantity": 2,
"name": "Updated Bundle Name"
}
}Delete Product sets components
Endpoint: POST /core/data/ProductSets/remove
Example Request:
json
{
"conditions": {
"operator": "and",
"filters": [
{
"field": "id",
"comparator": "in",
"value": [1, 2]
}
]
}
}