Add New
Add a new product
HTTP Request
POST /api/v3/products
Body
Parameter | Type | Default | Require | Description |
---|---|---|---|---|
product_code | string | Product code, if not provided, a new one will be automatically added, no duplicate check is performed | ||
product_name | string | yes | Product name | |
description | string | Product description | ||
short_description | string | Short product description | ||
cover_price | float | Selling price, this is the default price of the product | ||
discount | int | Product discount. For example 5%, 10% | ||
price_wholesale | float | Wholesale price, if not available, do not provide | ||
discount_wholesale | int | Wholesale discount | ||
price_online | float | Online price | ||
discount_online | int | Online discount | ||
saleoff_price | float | Sale off price | ||
unit_id | int | Unit of measurement, please refer to the Unit API | ||
category_id | int | Product category, please refer to the Product Category API | ||
origin_id | int | Product origin | ||
manufacturer_id | int | Manufacturer | ||
custom_fields | array | Additional defined information about the product, please refer to the example for the data structure |
{
"product_code": "SP00001",
"product_name": "New product added from API",
"description": "This is a long description",
"short_description": "This is a short description",
"cover_price": "200000",
"discount": 5,
"price_wholesale": 160000,
"discount_wholesale": 10,
"price_online": 185000,
"discount_online": 0,
"saleoff_price": 180000,
"unit_id": 2,
"category_id": 4,
"origin_id": 5,
"manufacturer_id": 5,
"custom_fields": {
"brand": "From Japan",
"warranty": "10 years",
"capacity": "200"
}
}