REST API v2.8

Products

This interface is used for adding, updating and deleting basic products. For product variants, images, files and stock, please refer to the "Product Variants", "Product Images & Files" and "Warehouses" interfaces.

Get Products

Get collection of product. Note! Only request fields that you need since some fields are calculated and can result in unnecessary lengthy operations.

Endpoint

GET sites/{siteid}/products

Parameters

pricelistid

Pricelistid. Set the pricelistid to specify a pricelist other than the default when getting the price field. See pricelist.

sku

Filter on SKU (ie. the article number).

includeinactive

Include products that are not active in POS or Webshop.Default: false

datelastmodified

Include products that have been modified after the timestamp provided.

start

The index of the item to start from.Default: 0

num

The number of items returned.Default: 10

fields

Comma separated list of fields to return. Use this to query only the fields you are using.
Default fields:
productidskudatemodifiedactiveactiveposvatidmanufactureridstockcountenablestockallowbackorderbarcodemoneypricemoneyfinalprice

HTTP Response Status

200

OK. Returns data (see below).

400

Bad Request. Invalid syntax, missing required argument or invalid request.

401

Unauthorized. Authorization failed.

404

Resource not found. The url is invalid.

429

Too Many Requests.

500

Internal Server Error.

Returns

Returns an envelope with items of type product.

Example

Request

GET https://api.mysitoo.com/v2/accounts/1500/sites/1/products.json?start=2&num=5&fields=productid,sku,title,moneyprice

Response

{ "totalcount": 15, "items": [ { "productid": 12, "sku": "10038-1", "moneyprice": "10392.00", "title": "Sofa Grand III" }, { "productid": 13, "sku": "10038-5", "moneyprice": "10392.00", "title": "Kitchen Table" }, { "productid": 14, "sku": "10038-2", "moneyprice": "10392.00", "title": "Sofa Cosy" }, { "productid": 15, "sku": "83537-0", "moneyprice": "7592.00", "title": "Sofa Stressless" }, { "productid": 16, "sku": "83428-0", "moneyprice": "6392.00", "title": "Sofa Modern" } ] }

Batch Add Products

This functions allows multiple items to be sent at once, like in the example below. For each item sent in an array a response is returned.

Endpoint

POST sites/{siteid}/products

Request body

See product for fields. Arrays are allowed.
Required fields:
sku

HTTP Response Status

200

OK. Returns data (see below).

400

Bad Request. Invalid syntax, missing required argument or invalid request.

401

Unauthorized. Authorization failed.

404

Resource not found. The url is invalid.

429

Too Many Requests.

500

Internal Server Error.

Returns

Returns productid if successful or a batch envelope if multiple products were added.

Example

Request

POST https://api.mysitoo.com/v2/accounts/1500/sites/1/products.json [ { "sku": "Q100", "title": "Box", "moneyprice": "99.00" }, { "sku": "Q101", "title": "Box Deluxe", "moneyprice": "129.00" } ]

Response

[ { "statuscode": 200, "return": 25 }, { "statuscode": 200, "return": 26 } ]

Batch Update Products

Send an array of object. Note that the productid must be added as a field for each item.

Endpoint

PUT sites/{siteid}/products

Request body

See product for fields. Arrays are allowed.
Required fields:
productid

HTTP Response Status

200

OK. Returns data (see below).

400

Bad Request. Invalid syntax, missing required argument or invalid request.

401

Unauthorized. Authorization failed.

404

Resource not found. The url is invalid.

429

Too Many Requests.

500

Internal Server Error.

Returns

Returns true if successful or a batch envelope if multiple products were updated.

Example

Request

PUT https://api.mysitoo.com/v2/accounts/1500/sites/1/products.json [ { "productid": 12, "moneyprice": "990.00" }, { "productid": 13, "moneyprice": "1290.00" } ]

Response

[ { "statuscode": 200, "return": true }, { "statuscode": 200, "return": true } ]

Batch Delete Products

See product for fields.
Required fields:
productid

Endpoint

DELETE sites/{siteid}/products

HTTP Response Status

200

OK. Returns data (see below).

400

Bad Request. Invalid syntax, missing required argument or invalid request.

401

Unauthorized. Authorization failed.

404

Resource not found. The url is invalid.

429

Too Many Requests.

500

Internal Server Error.

Returns

Returns true if successful or a batch envelope if multiple products were deleted.

Example

Request

DELETE https://api.mysitoo.com/v2/accounts/1500/sites/1/products.json [ { "productid": 18 }, { "productid": 19 } ]

Response

[ { "statuscode": 200, "return": true }, { "statuscode": 200, "return": true } ]

Get Product

Endpoint

GET sites/{siteid}/products/{productid}

Parameters

pricelistid

Price list id. Set the pricelistid to specify a pricelist other than the default when getting the price field.Default: 1

HTTP Response Status

200

OK. Returns data (see below).

400

Bad Request. Invalid syntax, missing required argument or invalid request.

401

Unauthorized. Authorization failed.

404

Resource not found. The url is invalid.

429

Too Many Requests.

500

Internal Server Error.

Returns

Returns an item of type product.

Example

Request

GET https://api.mysitoo.com/v2/accounts/1500/sites/1/products/21.json

Response

{ "productid": 21, "sku": "54051-1", "skumanufacturer": "", "descriptionshort": "", "description": "", "descriptionhtml": "", "deliverystatus": "", "moneyprice": "59.00", "moneypriceorg": "59.00", "moneypricein": "8.00", "unitlabel": "", "allowdecimals": false, "deliveryinfo": "", "externalinputtitle": "", "offerisenabled": false, "moneyofferprice": "0.00", "offertitle": "", "offerdatestart": null, "offerdateend": null, "active": true, "activepos": true, "vatid": 2, "deliveryclassid": 1, "defaultcategoryid": 49, "manufacturerid": null, "manufacturerurl": "", "custom1": "", "custom2": "", "custom3": "", "custom4": "", "custom5": "", "stockcountenable": true, "stockallowbackorder": true, "variantparentid": 21, "barcode": null, "offerisactive": false, "moneyfinalprice": "59.00", "vatvalue": 25, "productgrouptype": 10, "pricelisthasvolume": false, "variant": [ { "name": "Color", "value": "Red" }, { "name": "Pattern", "value": "Striped" } ], "friendly": "blanket-red-striped", "seo_title": "Blanket", "seo_keywords": "", "seo_description": "", "title": "Blanket Red Striped", "datecreated": 1373026247, "datemodified": 1373026433 }

Update Product

Endpoint

PUT sites/{siteid}/products/{productid}

Request body

See product for fields.

Parameters

pricelistid

Price list id. Set the pricelistid to specify a pricelist other than the default when getting the price field.Default: 1

HTTP Response Status

200

OK. Returns data (see below).

400

Bad Request. Invalid syntax, missing required argument or invalid request.

401

Unauthorized. Authorization failed.

404

Resource not found. The url is invalid.

429

Too Many Requests.

500

Internal Server Error.

Returns

Returns true if successful.

Example

Request

PUT https://api.mysitoo.com/v2/accounts/1500/sites/1/products/21.json { "title": "Blanket Red Striped" }

Response

true

Delete Product

Endpoint

DELETE sites/{siteid}/products/{productid}

HTTP Response Status

200

OK. Returns data (see below).

400

Bad Request. Invalid syntax, missing required argument or invalid request.

401

Unauthorized. Authorization failed.

404

Resource not found. The url is invalid.

429

Too Many Requests.

500

Internal Server Error.

Returns

Returns true if successful.

Example

Request

DELETE https://api.mysitoo.com/v2/accounts/1500/sites/1/products/24.json

Response

true