Product Variants

Get Product Variants

get /sites/{siteid}/products/{productid}/productvariants
PARAMETERS
siteid
integer
path
REQUIRED
productid
integer
path
REQUIRED
Returns

Returns an item of type productvariants. This item contains all variants for the product.

gethttps://api.mysitoo.com/v2/accounts/1500/sites/1/products/21/productvariants.json
RESPONSE JSON
{
"groups": [
{
"name": "Color",
"options": [
"Red",
"Blue"
]
},
{
"name": "Pattern",
"options": [
"Striped",
"Plaid"
]
}
],
"variants": [
{
"productid": 21,
"active": true,
"activepos": true,
"title": "Blanket Red Striped",
"sku": "54051-1",
"deliverystatus": "",
"moneyprice": "59.00",
"moneypriceorg": "59.00",
"moneypricein": "8.00",
"moneyofferprice": "0.00",
"barcode": null,
"barcodealiases": [],
"friendly": "blanket-red-striped",
"attributes": [
"Red",
"Striped"
],
"pricelisthasvolume": false
},
{
"productid": 22,
"active": true,
"activepos": true,
"title": "Blanket Red Plaid",
"sku": "54051-2",
"deliverystatus": "",
"moneyprice": "69.00",
"moneypriceorg": "69.00",
"moneypricein": "12.00",
"moneyofferprice": "0.00",
"barcode": null,
"barcodealiases": [],
"friendly": "blanket-red-plaid",
"attributes": [
"Red",
"Plaid"
],
"pricelisthasvolume": false
},
{
"productid": 23,
"active": true,
"activepos": true,
"title": "Blanket Blue Plaid",
"sku": "54051-3",
"deliverystatus": "",
"moneyprice": "69.00",
"moneypriceorg": "69.00",
"moneypricein": "12.00",
"moneyofferprice": "0.00",
"barcode": null,
"barcodealiases": [],
"friendly": "blanket-blue-plaid",
"attributes": [
"Blue",
"Plaid"
],
"pricelisthasvolume": false
}
]
}
HTTP Status Code Summary
200Returns an item of type productvariants. This item contains all variants for the product.
400Bad Request. Invalid syntax, missing required argument or invalid request.
401Unauthorized. Authorization failed.
404Resource not found. The url is invalid.
429Too Many Requests.
500Internal Server Error.

Set Product Variants

put /sites/{siteid}/products/{productid}/productvariants

Note that current variants will either be replaced or deleted with the new variants.

PARAMETERS
siteid
integer
path
REQUIRED
productid
integer
path
REQUIRED
REQUEST BODY
puthttps://api.mysitoo.com/v2/accounts/1500/sites/1/products/21/productvariants.json
{
"groups": [
{
"name": "Color",
"options": [
"Red",
"Purple"
]
}
],
"variants": [
{
"productid": 21,
"active": true,
"activepos": true,
"title": "Blanket Red",
"sku": "54051-1",
"deliverystatus": "",
"moneyprice": "59.00",
"moneypriceorg": "59.00",
"moneypricein": "8.00",
"moneyofferprice": "0.00",
"barcode": "",
"friendly": "blanket-red",
"attributes": [
"Red"
]
},
{
"productid": 0,
"active": true,
"activepos": true,
"title": "Blanket Purple",
"sku": "54051-10",
"deliverystatus": "",
"moneyprice": "189.00",
"moneypriceorg": "0.00",
"moneypricein": "8.00",
"moneyofferprice": "0.00",
"barcode": "",
"friendly": "blanket-purple",
"attributes": [
"Purple"
]
}
]
}
RESPONSE JSON
true
HTTP Status Code Summary
200Returns true
400Bad Request. Invalid syntax, missing required argument or invalid request.
401Unauthorized. Authorization failed.
404Resource not found. The url is invalid.
429Too Many Requests.
500Internal Server Error.

Objects

money
string

Pattern: ^[-+]?[0-9]+\.[0-9]{2}$
Example: "123.00"

productvariant
object

Product variant data.

PROPERTIES
productid
integer
REQUIRED

The unique internal productid. It is unique over all sites in the system.

active
boolean
REQUIRED
DEPRECATED

If false, the product is not shown in in the Webshop.

activepos
boolean
REQUIRED

If false, the product is not shown in in the POS.

title
string
REQUIRED

Title of product (ie. Product Name).

sku
string
REQUIRED

Stock Keeping Unit (ie. the article number). If entered, it needs to be unique for the site.

deliverystatus
string
REQUIRED
DEPRECATED

Delivery status. If set then it overrides any Stock texts on the site. If not set (ie. empty) then the stock is displayed using the stockcount field.

moneyprice
REQUIRED

Price of the product. If this field is used for setting price on a product, the price will be set for the "Default" price list. It is recommended to use the Price Lists endpoints for setting product prices instead.

moneypriceorg
REQUIRED

Suggested Retail Price (SRP)

moneypricein
REQUIRED

Purchase price which can be used to help calculate profit on products. (Always excluding VAT)

moneyofferprice
REQUIRED
DEPRECATED

If the product is in offer mode, the offerprice will be used instead of the price. The product is in offer mode if enabled and within the offer date period. (Deprecated, use price lists instead)

barcode
string
REQUIRED

Barcode for the product.

barcodealiases
array
(string)

Barcode aliases for the product. Used if multiple barcodes exist for product.

friendly
string
REQUIRED
DEPRECATED

Friendly name. Absolute url = site url + friendly.

attributes
array
(string)
REQUIRED

Array of attributes (string). It corresponds to the groups array in productvariants. For each group in productvariants this array must have a value at the same index and with a value from the corresponding options array.

pricelisthasvolume
boolean
READ ONLY
DEPRECATED

True if product has volume pricing. (Deprecated, use price lists instead)

productvariantgroup
object

Product variant group with options.

PROPERTIES
name
string
REQUIRED

Name of product variant group.

options
array
(string)
REQUIRED

Options. Eg. ["Red", "Blue", "Pink"].

productvariants
object

Product variants collection.

PROPERTIES
groups
REQUIRED

Array of productvariantgroup.

variants
REQUIRED

Array of productvariant.