Skip to main content

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

FieldTypeRequiredDescriptionExample
idstringYesProduct identifier.PRD-01
company_idstringYesIdentifier of the company the product belongs to. The company must already exist.HTL-001
namestringYesProduct name.Club Sandwich
descriptionstringOptionalOptional product description.Grilled chicken club sandwich
category_idstringOptionalIdentifier linking the product to a category.CAT-02
cost_pricenumberOptionalCost price of the product.25000
pricenumberOptionalProduct price.65000
codestringOptionalProduct code.FB-001
typestringOptionalProduct type.FOOD
is_variantbooleanOptionalBoolean-ish value indicating whether the product is a variant.false
cost_pctnumberOptionalCost percentage associated with the product.
is_inventorybooleanOptionalBoolean-ish value indicating whether the product is tracked as inventory.true
parent_idstringOptionalParent product identifier, when applicable.f6d05bc4-98c3-440a-...
product_packagearray of objectOptionalArray of package objects product package (see below).[...]

Product Package Fields

FieldTypeRequiredDescriptionExample
idstringYesProduct package entry identifier.PKG-01
product_row_idstringOptionalProduct row identifier associated with the package.37beba96-f490-4544-...
product_package_idstringOptionalProduct package identifier.93a5a98f-0c4a-4775-...
qtynumberOptionalQuantity associated with the package entry.1
typestringOptionalPackage type.MAIN
price_sellnumberOptionalSelling 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
}
}