Product
Overview
The product module synchronizes product master data for a company.
This module depends on company. The referenced company_id must already exist.
A product can optionally reference a category through category_id and can contain an array of package objects in product_package.
Request
- Method: POST
- Path:
{{base_url}}/api/sync-master-data
Request Envelope
The Product module uses the standard Open API request envelope with product as the module and an array of product objects as data.
{
"module": "product",
"data": [
{}
],
"chunk_metadata": {}
}
Request Body Fields
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
id | string | Yes | Product identifier. | PRD-01 |
company_id | string | Yes | Identifier of the company the product belongs to. The company must already exist. | HTL-001 |
name | string | Yes | Product name. | Club Sandwich |
description | string | Optional | Optional product description. | Grilled chicken club sandwich |
category_id | string | Optional | Identifier linking the product to a category. | CAT-02 |
cost_price | number | Optional | Cost price of the product. | 25000 |
price | number | Optional | Product price. | 65000 |
code | string | Optional | Product code. | FB-001 |
type | string | Optional | Product type. | FOOD |
is_variant | boolean | Optional | Boolean-ish value indicating whether the product is a variant. | false |
cost_pct | number | Optional | Cost percentage associated with the product. | — |
is_inventory | boolean | Optional | Boolean-ish value indicating whether the product is tracked as inventory. | true |
parent_id | string | Optional | Parent product identifier, when applicable. | f6d05bc4-98c3-440a-... |
product_package | array of object | Optional | Array of package objects product package (see below). | [...] |
Product Package Fields
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
id | string | Yes | Product package entry identifier. | PKG-01 |
product_row_id | string | Optional | Product row identifier associated with the package. | 37beba96-f490-4544-... |
product_package_id | string | Optional | Product package identifier. | 93a5a98f-0c4a-4775-... |
qty | number | Optional | Quantity associated with the package entry. | 1 |
type | string | Optional | Package type. | MAIN |
price_sell | number | Optional | Selling price associated with the package entry. | 65000 |
Request Example
{
"module": "product",
"data": [
{
"id": "PRD-01",
"company_id": "HTL-001",
"name": "Club Sandwich",
"description": "Grilled chicken club sandwich",
"category_id": "CAT-02",
"cost_price": 25000,
"price": 65000,
"code": "FB-001",
"type": "FOOD",
"is_variant": false,
"is_inventory": true,
"parent_id": "f6d05bc4-98c3-440a-9177",
"product_package": [
{
"id": "PKG-01",
"product_row_id" : "37beba96-f490-4544-b8c4",
"product_package_id" : "93a5a98f-0c4a-4775-a758",
"qty": 1,
"type": "MAIN",
"price_sell": 65000
}
]
}
],
"chunk_metadata": {
"process_id": "sync-htl001-2026-08-30",
"chunk_sequence": 1,
"is_last_chunk": true,
"total_records_in_chunk": 1
}
}