Variant example:
{
"sku": "sku1",
"min_code": 14234,
"quantity": 21,
"option1": "Black",
"option2": null,
"price": 10000001,
"inventory_type" : "cross_border",
"supplier" : 239091,
"image": "https://cdn.fptshop.com.vn/Uploads/Originals/2019/8/8/637008711602926121_SS-note-10-pl-den-1-1.png",
"images": [
"https://cdn.fptshop.com.vn/Uploads/Originals/2019/8/8/637008619323404785_SS-note-10-pl-den-2.png",
"https://cdn.fptshop.com.vn/Uploads/Originals/2019/8/8/637008619327294396_SS-note-10-pl-den-4.png"
]
}
Field | Type | Mandatory | Override rule(*) | Description |
---|---|---|---|---|
sku | String | Y | No | variant ‘s sku from source side |
min_code | Long | N | No | identifier from manufactory |
price | Integer | Y | No | variant ‘s sell price |
market_price | Integer | N | Replace | variant ‘s market price ( price before discount ) |
option1 | String | N | No | attribute code of the first option attribute |
option2 | String | N | No | attribute code of the first second attribute |
inventory_type(*) | String | N | No | inventory type of this variant |
quantity | Integer | Y | No | number of products available for sell |
supplier(*) | Integer | Y | No | see detail below |
name | String | N | Replace | name of this variant |
description | String | N | Replace | description of this variant |
attributes | List<Attribute> | N | Merge | list specific/addition attribute for this variant |
image | String | N | Replace | avatar url of this variant |
images | String | N | Replace | list urls of variant product gallery |
*Note:
- option1, option2 is required corresponding with the number of option attributes start from 1. The unused option value maybe null or empty or even don’t need to appear.That’s why it’s mandatory still equal “no”
- Override rule describe how transform system will treat your request if any field is conflict between variant and parent product. By default child product will inherit all of member from its parent.
- No : Field can’t not override
- Replace : Field of variant will replace the parent one.
- Merge : attributes will merged from both side.