1b.app
Link copied -

API products (Product)

Add product, method: /api/product/add/

Parameters

Example:

http://myboxurl/api/product/add/?login=LOGIN&password=PASSWORD&name=Product&image[0]=/PATH/TO/PICTURE1.JPG&image[1]=/PATH/TO/PICTURE2.JPG&filter[0][filterid]=1&filter[0][filtervalue]=1&customfield_key1=customvalue1&customfield_key2=2016-01-01

Field Type Description Required or not Comment
1 login string Login in BOX system Required field.  
2 password string Password in md5 format Required field. Contact tech support and we will give you a hash for the API
3 name string product name Required field.  
4 description string Product Description Optional field.  
5 name+language_code string Product name (in other languages) Optional field. The key must be specified with a two-character code of another language,
which is included in the multilingual module,
eg nameua, nameen
6 description+language_code string Product Description (in other languages) Optional field. The key must be specified with a two-character code of another language,
which is included in the multilingual module,
eg descriptionua, descriptionen
7 price decimal product price Optional field.  
8 pricebase decimal Item base price Optional field.  
9 currencyname string Currency name Optional field.  
10 categorycode string id categories from your system Optional field. This is a unique category identifier from your system (from your store). If a category with this id exists, the API will throw an error
11 categoryid integrer id Categories Optional field. Category code in the BOX system.
12 brandname string Brand name Optional field. If there is no such brand, the engine will create it on its own
13 articul string Product SKU Optional field.  
14 unit string Units Optional field.  
15 avail boolean Product Availability Optional field. By default, this product is out of stock (avail = 0)
16 hidden boolean Hidden Product Optional field. By default, this product is not hidden (hidden = 0)
17 code1c string Product Code Optional field. Product ID from your system (from your store)
18 model string Model Optional field.  
19 seriesname string Product range (series, collection) Optional field.  
20 imagegrouped boolean Use image and card as main in the lineup Optional field.  
21 image array Array of category images Optional field. Images should be sent as an array with the full path to them. The system works with the following image formats: jpg, png
22 filter array (filterid, filtervalue, filteractual, filteruse, filteroption) Array of filters for the product Optional field.
filterid - id filter for product from BOX
filtervalue - filter value
filteractual - display the value of this characteristic in the product characteristics table. By default, not available (filteractual = 0)
filteruse - Access this filter when filtering. By default, not available (filteruse = 0)
filteroption - option to order this item. By default, no (filteroption = 0)
23 prices array (priceid, pricename, pricevalue) Array of additional prices for the product Optional field.
priceid - id prices for product from BOX
pricename - price name
pricevalue - price value
24 divisibility float Item droppability Optional field. This is where you can specify the product split
25 priceold decimal Item old price Optional field.  
26 discount integer Discount, % Optional field.  
27 taxvalue float VAT amount Optional field.  
28 barcode string Barcode Optional field.  
29 supplierName string Vendor name Optional field. Or the vendor name or id must be in the request if you want to update the vendor information
30 supplierid interger id vendor Optional field. Or the vendor name or id must be in the request if you want to update the vendor information
31 suppliercode string Product supplier code (SKU) Optional field.  
32 suppliercode1c string Product supplier code (SKU) Optional field.  
33 supplierprice float Vendor price Optional field.  
34 suppliercurrency string Vendor Currency Optional field. (UAH or RUB or USD or EUR.... etc)
35 supplieravail boolean Supplier Availability Optional field. 1 - in stock, 0 out of stock
36 supplieravailtext string Vendor availability text Optional field. Here you can specify how many of this product the supplier has, or the availability text
37 supplieractive boolean Postavshchika activity Optional field. 1 - the position of the supplier is active, 0 - the position is not active. By default, position is active
38 supplierrrc float Vendor price (ррц) Optional field.
39 supplierrrccurrency string Vendor Currency (ррц) Optional field. (UAH or RUB or USD or EUR.... etc)
40 suppliercurrent boolean Current supplier of this product Optional field. 1 - sets the vendor as the current vendor of the product
41 categories string Additional Product Categories Optional field. productcategoryid1 - "Category 1"
productcategoryid2 - "Category 2"
productcategoryid3 - "Category 3"
productcategoryid4 - "Category 4"
productcategoryid5 - "Category 5"
productcategoryid6 - "Category 6"
42 customfield_key mixed Additional Product Fields Optional field. The parameter should be passed: customfield_*additional_field_key_*

Remove product, method: /api/product/delete/

Parameters

Example:

http://myboxurl/api/product/delete/?login=LOGIN&password=PASSWORD&id=666

Field Type Description Required or not Comment
1 login string Login in BOX system Required field.  
2 password string Password in md5 format Required field. Contact tech support and we will give you a hash for the API
3 id integer Product ID Either id or code or product SKU is required Product code in the BOX system
4 code string Product ID Product ID from your system (from your store)
5 articul string Product SKU Product SKU from your system (from your store)

Editing a product, method: /api/product/update/

Parameters
Field Type Description Required or not Comment
1 login string Login in BOX system Required field.  
2 password string Password in md5 format Required field. Contact tech support and we will give you a hash for the API
3 id integer Product ID Either id or code or product SKU is required Product code in the BOX system
4 code string Product ID Product ID from your system (from your store)
5 articul string Product SKU Product SKU from your system (from your store)
6 name string product name Required field.  
7 description string Product Description Optional field.  
9 name+language_code string Product name (in other languages) Optional field. The key must be specified with a two-character code of another language,
which is included in the multilingual module,
eg nameua, nameen
10 description+language_code string Product Description (in other languages) Optional field. The key must be specified with a two-character code of another language,
which is included in the multilingual module,
eg descriptionua, descriptionen
11 price decimal product price Optional field.  
12 pricebase decimal Item base price Optional field.  
13 currencyname string Currency name Optional field.  
14 categorycode string id categories from your system Optional field. This is a unique category identifier from your system (from your store). If a category with this id exists, the API will throw an error
15 categoryid integrer id Categories Optional field. Category code in the BOX system.
16 brandname string Brand name Optional field. If there is no such brand, the engine will create it on its own
17 unit string Units Optional field.  
18 avail boolean Product Availability Optional field. By default, this product is out of stock (avail = 0)
19 hidden boolean Hidden Product Optional field. By default, this product is not hidden (hidden = 0)
20 model string Product range Optional field.  
21 image array Array of category images Optional field. Images should be sent as an array with the full path to them. The system works with the following image formats: gif, jpeg, png, pjpeg
22 filter array (filterid, filtercode1c, filtervalue, filteractual, filteruse, filteroption) Array of filters for the product Optional field.
filterid - id filter for product from BOX
filtercode1c - External filter id for goods from BOX, if this parameter is present, the filter will be searched for by it, not by filterid
filtervalue - filter value
filteractual - display the value of this characteristic in the product characteristics table. By default, not available (filteractual = 0)
filteruse - Access this filter when filtering. By default, not available (filteruse = 0)
filteroption - option to order this item. By default, no (filteroption = 0)
23 prices array (priceid, pricename, pricevalue) Array of additional prices for the product Optional field.
priceid - id prices for product from BOX
pricename - price name
pricevalue - price value
24 taxvalue float VAT amount Optional field.  
25 barcode string Barcode Optional field.  
26 storaged integer Amount of available product Optional field.  
27 supplierName string Vendor name Optional field. Or the vendor name or id must be in the request if you want to update the vendor information
28 supplierid interger id vendor Optional field. Or the vendor name or id must be in the request if you want to update the vendor information
29 suppliercode string Product supplier code (SKU) Optional field.  
30 suppliercode1c string Product supplier code (SKU) Optional field.  
31 supplierprice float Vendor price Optional field.  
32 suppliercurrency string Vendor Currency Optional field. (UAH or RUB or USD or EUR.... etc)
33 supplieravail boolean Supplier Availability Optional field. 1 - in stock, 0 out of stock
34 supplieravailtext string Vendor availability text Optional field. Here you can specify how many of this product the supplier has, or the availability text
35 supplieractive boolean Postavshchika activity Optional field. 1 - the position of the supplier is active, 0 - the position is not active. By default, position is active
36 supplierrrc float Vendor price (ррц) Optional field.
37 supplierrrccurrency string Vendor Currency (ррц) Optional field. (UAH or RUB or USD or EUR.... etc)
38 suppliercurrent boolean Current supplier of this product Optional field. 1 - sets the vendor as the current vendor of the product
39 divisibility float Item droppability Optional field. This is where you can specify the product split
40 syncpricesup boolean Synchronize price with suppliers and warehouses Optional field. 1 - the position of the supplier is active, 0 - the position is not active. By default, position is not active
41 syncavailsup boolean Synchronize availability with suppliers and warehouses Optional field. 0 - goods that are not syncronized by availability with suppliers and warehouses
1 - item that is synchronized by availability with suppliers and warehouses
42 priceold decimal Item old price Optional field.  
43 discount integer Discount, % Optional field.  
44 categories string Additional Product Categories Optional field. productcategoryid1 - "Category 1"
productcategoryid2 - "Category 2"
productcategoryid3 - "Category 3"
productcategoryid4 - "Category 4"
productcategoryid5 - "Category 5"
productcategoryid6 - "Category 6"
45 customfield_key mixed Additional Product Fields Optional field. The parameter should be passed: customfield_*additional_field_key_*

Receive one item and receive all items, method: /api/product/get/

Parameters
Parameters for receiving one item:

Example:

http://myboxurl/api/product/get/?login=LOGIN&password=PASSWORD&id=666&customfields=true

Field Type Description Required or not Comment
1 login string Login in BOX system Required field.  
2 password string Password in md5 format Required field. Contact tech support and we will give you a hash for the API
3 id integer Product ID in the BOX system Either id or code or product SKU is required Return field values
id - id product,
name - name,
description - description,
image - product image,
price - product price,
currencyid - id product currency,
categoryid - id Categories in the BOX system,
brandid - id brand in the BOX system,
articul - product SKU,
unit - units,
avail - product availability,
hidden - hidden product,
code1c - id product from your system (from your store),
pricebase - base price of the item,
supplierid - id vendor in BOX system,
model - product range,
filterArray - array of product filters,
customfieldArray - array add.product fields,
analogArray - array of product analogs,
relatedArray - array of related products,
storagedArray - Array of stock items,
additionalImagesArray - array of additional product images,
additionalFilesArray - array of additional product files,
cropimage - Resized Product Image
4 code string Item ID from your system (from your store)
5 articul string Product SKU from your system (from your store)
6 customfields boolean Pointer to pass additional fields Optional fields
7 related boolean Pointer to transfer related products
8 analogs boolean Pointer on the need to transfer analogs of products
9 storagebalances boolean Pointer to transfer product leftovers
10 imageadditional boolean Pointer to send additional product images
11 filesadditional boolean Pointer to transfer additional product files
12 width integer Pointer to specify the size (width) of product images
13 height integer Pointer to specify the size (height) of product images


Parameters for getting all goods:

Example:

http://myboxurl/api/product/get/?login=LOGIN&password=PASSWORD&part=1&customfields=true
http://myboxurl/api/product/get/?login=LOGIN&password=PASSWORD&part=2&related=true

Field Type Description Required or not Comment
1 login string Login in BOX system Required field.  
2 password string Password in md5 format Required field. Contact tech support and we will give you a hash for the API
3 name string Product name Optional field. Enter a name and the selection will include products that contain this parameter in their name
4 categorycode string Category code from external system Optional field. Please enter the category you want to get the goods from
5 categoryid string Internal Category Code Optional field. Please enter the category you want to get the goods from
6 brandname string Brand name Optional field. Please enter the name of the product brand to be filtered by
7 avail boolean Product Availability Optional field. Show only:
0 - stock in stock
1 - Out of stock items
8 hidden boolean Item is hidden Optional field. Show only:
0 - no hidden products
1 - hidden products
9 suppliered boolean Available from supplier Optional field. Show only:
0 - items out of stock from supplier
1 - the goods that the supplier has in stock
10 syncpricesup boolean Synchronize price with suppliers and warehouses Optional field. Show only:
0 - products that are not synchronized in price with suppliers and warehouses
1 - products that are synchronized by price with suppliers and warehouses
11 syncavailsup boolean Synchronize availability with suppliers and warehouses Optional field. Show only:
0 - items that are not synchronized by availability with suppliers and warehouses
1 - items that are synchronized by availability with suppliers and warehouses
12 customproduct_[key] string Additional Product Field Optional field. Get products only with the specified value of the additional product field.
Example: customproduct_idkey = 123
13 part integer Part of goods Required field.

API gives up to 1000 products in the 1st part, to get the next 1000 products transfer there 2 (part 2 is obtained) and so on.

Return field values
id - id product,
name - name,
description - description,
image - product image,
price - product price,
currencyid - id product currency,
categoryid - id Categories in the BOX system,
brandid - id brand in the BOX system,
articul - product SKU,
unit - units,
avail - product availability,
hidden - hidden product,
code1c - id product from your system (from your store),
pricebase - base price of the item,
supplierid - id vendor in BOX system,
model - product range,
filterArray - array of product filters,
customfieldArray - array add.product fields,
analogArray - array of product analogs,
relatedArray - array of related products,
storagedArray - Array of stock items,
additionalImagesArray - array of additional product images,
additionalFilesArray - array of additional product files,
cropimage - Resized Product Image

14 customfields boolean Pointer to pass additional fields Optional fields
15 related boolean Pointer to transfer related products
16 analogs boolean Pointer on the need to transfer analogs of products
17 storagebalances boolean Pointer to transfer product leftovers
18 imageadditional boolean Pointer to send additional product images
19 filesadditional boolean Pointer to transfer additional product files
20 width integer Pointer to specify the size (width) of product images
21 height integer Pointer to specify the size (height) of product images

Possible responses to the request

More details
Status Message Message Description
1 ok productid Returns the id of the added / changed product
2 fail Login is empty! Login missing
3 fail Password is empty! Missing password
4 fail Product name is empty! No product name
5 fail Bad user level! Low user level to perform this action (requires level 2 or higher)
6 fail Login or password not correct! Login or password entered incorrectly
7 fail Product with this Code1c exist! There is no product with this code
8 fail Product with this Articul exist! There is no product with this article
9 fail ID of category is not corectly! id product categories are not valid
10 fail 'Code of category is not corectly!' Product category code is invalid
11 fail You don't available product for delete! You have not selected a product to remove
12 fail Product with this ID does not exists! There is no product with this id
13 fail Product with this Code does not exists! There is no product with this code
14 fail Product with this Articul does not exists! This article does not exist
15 fail Product with this Id does not found! No product found with this id
16 fail Product with this Articul does not found! No product found with this article
17 fail Product with this Code does not found! No product found with this code
18 fail Product name is empty! Missing product name
19 fail You don't available product for update! You have not selected a product to upgrade
20 fail Product not found by id/code1c/articul Product not found by id / code / article
21 fail dublicate articul A product with this article already exists
22 fail dublicate code1c A product with this code already exists

Errors may also occur:

502 Bad Gateway - If this error occurs it is necessary:
1. Check if you have internet access (go to any other site).
2. If there are no problems with access — cookies can be deleted.
If the above doesn't work — server side problem. Please contact your site system administrator.

503 (Service Temporarily Unavailable) - this error may occur as a result of too many server requests. If you see this error, you should wait a couple of minutes and try again.

504 Gateway Timeout - cmost likely the reason is the increased load on the site, in which Apache is not has time to send HTTP responses and new requests are queued. You can add resources to the server, in particular RAM, and increase the number of httpd (Apache) processes.
Another possible reason for error 504 is that the executable script does not fit within the allotted limit time. This happens when the request is too heavy. Try to split your request into a few more small.

Error 505 HTTP Version not supported means the website is not Supports the version of the HTTP protocol that the browser uses to request a web page