1b.app
Link copied -

API категорії (Category)

Add Category, method: /api/category/add/

Parameters

Example:

http://myboxurl/api/category/add/?login=LOGIN&password=PASSWORD&name=Category&code=1333&hidden=0

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 Category name Required field.  
4 code 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
5 description string Category description Optional field.  
6 parentid integer id parent category from our system Optional field. In this field you can enter the parent category code from our system. If there is no category with this code, the field will be empty.
7 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
8 hidden boolean hidden category Optional field. By default, the category is not hidden (hidden = 0)
9 parentcode string code1c categories (category id from your system) Optional field. In this field you can enter the parent category code from your system. If there is no category with this code, the field will be empty.

Delete category, method: /api/category/delete/

Parameters

Example:

http://myboxurl/api/category/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 Category ID Either category id or code is required Category code in the BOX system
4 code string Category ID Category ID from your system (from your store)

Editing Category, method: /api/category/update/

Parameters

Example:

http://myboxurl/api/category/update/?login=LOGIN&password=PASSWORD&code=1333&name=Category&hidden=1

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 Category ID Either category id or code is required Category code in the BOX system
4 code string Category ID Category ID from your system (from your store)
5 name string Category name Optional field.  
6 description string Category description Optional field.  
7 parentid string id parent category from your system Optional field. In this field you can enter the parent category code from your system. If there is no category with this code, the field will be empty.
8 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
9 hidden boolean hidden category Optional field. By default, the category is not hidden (hidden = 0)
10 parentcode string code1c categories (category id from your system) Optional field. In this field you can enter the parent category code from your system. If there is no category with this code, the field will be empty.

Get one category and get all categories method: /api/category/get/

Parameters
Parameters for receiving one order:

Example:

http://myboxurl/api/category/get/?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 Category ID Either category id or code is required If you need a specific category, then you pass in this field either the category id that our API returned to you when it was created. Or specify the external category identifier (field code when creating a category) The engine will find this one by itself.

Return field values
id - id Categories,
name - category name,
code - external category id,
image - Array of category images,
description - Category description,
parentid - id parent category,
hidden - hidden category
4 code string Category ID


Parameters for receiving all orders:

Example:

http://myboxurl/api/category/get/?login=LOGIN&password=PASSWORD

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
          Return field values
id - id Categories,
name - category name,
code - external category id,
image - Array of category images,
description - Category description,
parentid - id parent category,
hidden - hidden category

Possible responses to the request

More details
Status Message Message Description
1 ok categoryid Returns the added category id
2 fail Login is empty! Login missing
3 fail Password is empty! Missing password
4 fail Category name is empty! Missing category 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 Category with this ID already exists! A category with this id already exists
8 fail Incorrect picture! Invalid image format
9 fail You don't available category for delete! You have not selected a category to delete
10 fail Category with this ID does not exists! There is no category with this ID
11 fail Category with this Code does not exists! There is no category with this code
12 fail You don't available category for update! You have not selected a category to update
13 fail parentid = categoryid id the parent category is equal to the id of the category itself
or the id of the parent of the parent category is equal to the id of the added category (loop)
14 fail Parentid is not corectly! id parent category is invalid

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