This document is generated by Apidog. Apidog: All-in-one workspace for API design, document, debug, test, mock
This document is generated by Apidog. Apidog: All-in-one workspace for API design, document, debug, test, mock
name* (string): Product namedescription (string): Product descriptionunit_price* (number): Selling price per unittax1 (integer): Primary tax IDtax2 (integer): Secondary tax IDsupplier_id (integer): ID of the supplierbrand (string): Brand nametags (string): Comma-separated tagsbuy_price (number): Purchase price per unitproduct_code (string): Unique product identifier/codetrack_stock (integer): Stock tracking (0: disabled, 1: enabled)stock_balance (number): Initial stock quantitylow_stock_thershold (number): Low stock alert thresholdbarcode (string): Product barcodetype* (integer): Product type (1: product, 2: service)availabe_online (integer): Online availability (0: no, 1: yes)category_id (integer): Product category IDis_active (integer): Status (0: inactive, 1: active)custom_fields (object): Custom field values{
"result": "success",
"code": 201,
"data": {
"Product": {
"id": 3,
// Other product fields...
}
},
"message": "Product created successfully"
}curl --location -g --request POST '{{subdomain}}/api2/api2/products.json' \
--header 'Content-Type: text/plain' \
--data-raw '{
"Product": {
"name": "Premium Widget Pro",
"description": "Professional-grade premium widget for industrial applications",
"unit_price": 299.99,
"tax1": 1,
"tax2": 0,
"supplier_id": 1,
"brand": "WidgetCo",
"tags": "premium, professional, industrial, widget",
"buy_price": 225.00,
"product_code": "WID-003",
"track_stock": 1,
"stock_balance": 50,
"low_stock_thershold": 15,
"barcode": "1234567890789",
"type": 1,
"availabe_online": 1,
"category_id": 3,
"is_active": 1,
"custom_fields": {
"warranty_period": "3 years",
"country_of_origin": "Germany",
"certification": "ISO 9001"
}
}
}'{
"result": "success",
"code": 201,
"data": {
"Product": {
"id": 3,
"name": "Premium Widget",
"unit_price": 199.99,
"product_code": "WID-001",
"type": 1,
"created": "2023-03-23 15:30:42",
"modified": "2023-03-23 15:30:42",
"is_active": 1
}
},
"message": "Product created successfully"
}