Products
Batch Add Products
post /sites/{siteid}/productsThis 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.
[ { "sku": "Q100", "title": "Box", "moneyprice": "99.00" }, { "sku": "Q101", "title": "Box Deluxe", "moneyprice": "129.00" }]
[ { "statuscode": 200, "return": 28 }, { "statuscode": 200, "return": 29 }]
HTTP Status Code Summary | |
---|---|
200 | Returns productid or a batch envelope if multiple products were added |
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. |
Get Products
get /sites/{siteid}/productsGet collection of product. Note! Only request fields that you need since some fields are calculated and can result in unnecessary lengthy operations.
Filter on SKU, use comma as separator for multiple values.
Filter on product ID, use comma as separator for multiple values.
Include products that are not active in POS or Webshop.
Include products that have been modified after the timestamp provided.
The index of the item to start from.
The number of items returned.
Comma separated list of fields to return. Use this to query only the fields you are using. See product for all fields.
{ "totalcount": 18, "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" } ]}
HTTP Status Code Summary | |
---|---|
200 | Returns an envelope with items of type product. |
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. |
Batch Update Products
put /sites/{siteid}/productsSend an array of object. Either the productid
or sku
must be provided as identifier field for each item. If both are provided, the productid
will have precedence over sku
.
[ { "productid": 12, "descriptionshort": "New Design" }, { "productid": 13, "descriptionshort": "New Design" }]
[ { "statuscode": 200, "return": true }, { "statuscode": 200, "return": true }]
HTTP Status Code Summary | |
---|---|
200 | Returns true or a batch envelope if multiple products were updated |
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. |
Batch Delete Products
delete /sites/{siteid}/productsSee product for fields.Required fields:productid
[ { "productid": 18 }, { "productid": 19 }]
[ { "statuscode": 200, "return": true }, { "statuscode": 200, "return": true }]
HTTP Status Code Summary | |
---|---|
200 | Returns true or a batch envelope if multiple products were deleted |
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. |
Get Product
get /sites/{siteid}/products/{productid}{ "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, "categories": [ 19, 49, 59 ], "manufacturerid": null, "manufacturerurl": "", "custom1": "", "custom2": "", "custom3": "", "custom4": "", "custom5": "", "stockcountenable": true, "stockallowbackorder": true, "variantparentid": 21, "barcode": null, "barcodealiases": [], "similar": [ 13 ], "related": [ 12, 14, 15, 16 ], "accessories": [], "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}
HTTP Status Code Summary | |
---|---|
200 | Returns an item of type product. |
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. |
Update Product
put /sites/{siteid}/products/{productid}{ "title": "Blanket Red Striped"}
true
HTTP Status Code Summary | |
---|---|
200 | Returns true |
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. |
Delete Product
delete /sites/{siteid}/products/{productid}true
HTTP Status Code Summary | |
---|---|
200 | Returns true |
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. |
Objects
moneystring
productobject
The main product object. Note that stock values are retrieved using the warehouse endpoints.
The unique internal product ID. It is unique over all sites in the system. The productid
is read-only and automatically generated when adding new products. It is then used as the identifier field for update/delete endpoints.
Stock Keeping Unit (ie. the article number). Should only contain [A-Za-z0-9_+-/]. The sku
is a required field for adding new products and needs to be unique within a site.
The Stock Keeping Unit (SKU) for the manufacturer.
A short description, typically used in product lists etc.
The main description of the product.
An extra description field for adding custom html such as embedded videos etc.
Delivery status.
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.
Suggested Retail Price (SRP)
Purchase price which can be used to help calculate profit on products. (Always excluding VAT)
Unit label (eg. "pcs", "kg"). Default is an empty string.
Set this if the product can be purchased with fractional quantity.
Delivery information that can be provided to the customer after the purchase.
External input title is a text that the customer can add to the product in the cart (eg. for a t-shirt it could be an optional custom text).
Turn on or off the offer mechanism. (Deprecated, use price lists instead)
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)
Title of offer (eg. "Summer Campaign"). (Deprecated, use price lists instead)
Start date of offer. If null then no start boundary is set. (Deprecated, use price lists instead)
End date of offer. The last day the offer is still active. If null then no end boundary is set. To turn off date check for offers just set offerdatestart and offerdateend to null. (Deprecated, use price lists instead)
If false, the product is not shown in in the Webshop.
If false, the product is not shown in in the POS.
The reference to which Product Group the product belongs to. The Product Group also determines VAT. See productgroup for more information.
The reference to the delivery class ID. The ID is used when calculating the shipping price.
Default category for the product. If set to a category then the value will also be added to categories. If set to null, then the previous value will be removed from categories.
Array of category ID:s that the product belongs to.
The reference to the manufacturer.
Manufacturer's url for the product.
Custom field 1.
Custom field 2.
Custom field 3.
Custom field 4.
Custom field 5.
Turns on/off stock handling for the product.
Decides if a product can be backorder listed. If not, it is not displayed when out of stock.
If null then it is a single product, otherwise it is a variant. Variantparentid refers to the owning parent's productid. The product which has a self reference (ie. the variantparentid is same as the produtid) is the main variant (ie. the owner).
Barcode for the product.
Barcode aliases for the product. Used if multiple barcodes exist for product.
Array of product ID:s for products that are similar to this one. (Only applicable to regular products and main product variants)
Array of product ID:s for products that are related to this one. (Only applicable to regular products and main product variants)
Array of product ID:s for products that are accessories to this one. (Only applicable to regular products and main product variants)
Indicates if the product is in offer mode or not.
The final price of the product. If in offer mode then the final price is offerprice else price. (Deprecated, use price lists instead)
The VAT in percentage.
The product group type.
True if product has volume pricing. (Deprecated, use price lists instead)
Array of variant items.
Map of attribute values for the product. The keys must exist as ID of attributes defined. The value type is defined by the attribute. The limit of string values is 128 characters.
Friendly name. Absolute url = site url + friendly.
Used for the html title element. If empty the title field will be used instead.
Meta keywords.
Meta description.
Title of product (ie. Product Name).
Timestamp when the product was created.
Timestamp when the product was last modified.
productgrouptypeinteger
10
Product20
Service30
Gift Card
timestampinteger
Number of seconds since the Unix Epoch.