Skip to main content

Variant

Variant provides access to product variants. Variants are connected to products and represent the colour and size variations of the product. There will always be at least one variant for a product.

Variant Properties

PropertyExampleDescription
id"0A5EED..."Unique id of the variant
fk_product"B83B86..."Foreign key to the related product
code"ACC001018__A"The variant code
barcode"5052011221399"The variant barcode
colour"Black"Variant colour
size"ONE"Variant size.
rrp20The recommended retail price
vatabletrueIndicates that the product is vatable
sequence1Creation date of the order
detail{}Object containing any custom variant properties
variant_product{related entity}The related product detail

Variant Methods

GET/api/variant

Returns all variant records for the current scope with all published fields.

Post/api/variant

Allows for the posting of variants for products. This should generally only be used to add additional variants to an existing product. Posting a variant without a valid fk_product property will result in an error.

Example

Example of a returned variant entity
{
"response": {
"page": 1,
"pageCount": 1,
"recordsSent": 1,
"recordsFound": 1,
"variant": [
{
"id": "0A5EEDAF16F8D54486AB2AD7474B3994",
"fk_product": "B83B860F329AED4AAB35DFC2C8FD6264",
"code": "ACC001018__A",
"barcode": "5052011221399",
"colour": "Black",
"sequence": 1,
"size": "ONE",
"detail": null,
"vatable": false,
"rrp": 20,
"variant_product": {
"id": "B83B860F329AED4AAB35DFC2C8FD6264",
"fk_brand": "252DF4B7194C8E4599CB0430920AFB5D",
"code": "ACC001",
"title": "MINI SHOULDER BAG",
"category": "ACC BAGS",
"description": "",
"productBrand": "BRAND ACCESSORIES",
"season": "SS17",
"origin": "CHINA",
"composition": "",
"careInstructions": "",
"createdDate": "",
"status": "",
"detail": null,
"commodityCode": "",
"product_brand": {
"__KEY": "252DF4B7194C8E4599CB0430920AFB5D"
}
}
}
]
}
}