Add Brand, method: /api/brand/add/
Example:
№ | 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 | Brand name | Required field. | |
4 | code | string | id brand from your system | Optional field. | This is a unique brand identifier from your system (from your store). If a brand with this id exists, the API will throw an error |
7 | image | array | brand image array | 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 brand | Optional field. | By default, the brand is not hidden (hidden = 0) |
5 | description | string | brand description | Optional field. |
Remove Brand, method: /api/brand/delete/
Example:
№ | 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 | Brand ID | or brand id or code is required | Brand code in the BOX system |
4 | code | string | Brand ID | Brand ID from your system (from your store) |
Brand Editing, method: /api/brand/update/
Example:
№ | 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 | Brand ID | or brand id or code is required | Brand code in the BOX system |
4 | code | string | Brand ID | Brand ID from your system (from your store) | |
5 | name | string | Brand name | Required field. | |
6 | description | string | brand description | Optional field. | |
8 | image | array | brand image array | 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 brand | Optional field. | By default, the brand is not hidden (hidden = 0) |
Get one brand and get all brands, method: /api/brand/get/
Example:
№ | 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 | Brand name | name or brand id or code is required | If you need a specific brand, then you pass the brand name in this field, or the brand id that was returned to you by our API when it was created. Alternatively, enter the external brand identifier (field code when creating a brand) and the engine will find and return it by itself. Return field values id - id brand, name - Brand name, code - external brand id, image - brand image array, description - brand description, hidden - hidden brand |
4 | id | integer | Brand ID | ||
4 | code | string | Brand ID |
Example:
№ | 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 brand, name - Brand name, code - external brand id, image - brand image array, description - brand description, hidden - hidden brand |
Possible responses to the request
№ | Status | Message | Message Description |
1 | ok | brandid | Returns the added brand id |
2 | fail | Login is empty! | Login missing |
3 | fail | Password is empty! | Missing password |
4 | fail | Brand name is empty! | Missing brand name |
5 | fail | Bad user level! | Insufficient user level (requires level 2 or higher) |
6 | fail | Login or password not correct! | Login or password entered incorrectly |
7 | fail | Brand with this ID already exists! | A brand with this id already exists |
8 | fail | Incorrect picture! | Invalid image format |
9 | fail | Brand has not been added | The brand has not been added |
10 | fail | Brand is not available for delete! | Brand not found to delete |
11 | fail | Brand with this ID does not exists! | There is no brand with this ID |
12 | fail | Brand with this Code does not exists! | There is no brand with this code |
13 | fail | Brand with this name does not exists! | There is no brand with this name |
14 | fail | Brand is not available for update! | No brand found to update |