Brands [API]

The brands are the brands of the product.

Description List brands
Action GET
URL <your URL here>/api/brands
Sample request parameters (empty – no data required)
Sample Successful Response
[
  {
    "id": 1,
    "name": "Test Brand",
    "description": "test brand",
    "sort": null,
    "is_active": true,
    "image_url": "/uploads/zxc989asdk/manufacturers/images/1/original_Screen_Shot_2018-04-25_at_03.34.54.png?1528986095"
  },
{
    "id": 2,
    "name": "Test Brand 2
    "description": "test brand 2",
    "sort": null,
    "is_active": true,
    "image_url": "/uploads/zxc989asdk/manufacturers/images/1/original_Screen_Shot_2018-04-25_at_03.34.54.png?1528986095"
  }]
		
Available parameters name_eq (category name) name_cont (category name wildcard match)
Description Create Brand
Action POST
URL <your URL here>/api/brands
Sample request parameters
{"brand":{"name":"Test Brand with Image","description":"Description of the brand","is_active":1,"image_file_name":"Test Brand Upload.jpg","image_content_type":"image/jpeg","image_data":"/9j/4QAYRXhpZgAASUkqAAgAAAAAAAAAAAAAAP...=="}}
		
Sample Successful Response
{
  "id": 37,
  "name": "Test Brand with Image",
  "description": "Description of the brand",
  "sort": null,
  "is_active": true,
  "image_url": "/uploads/zxc989asdk/manufacturers/images/37/original_Test_Brand_Upload.jpg?1539176438"
}
		
Required fields name
Description Update Brand
Action PATCH/PUT
URL <your URL here>/api/brands/<id of brand>
Sample request parameters
{"brand":{"name":"Test Brand with Image","description":"Description of the brand","is_active":1}}
		
Sample Successful Response
{
  "id": 37,
  "name": "Test Brand with Image",
  "description": "Description of the brand",
  "sort": null,
  "is_active": true
}
		
Description Delete Brand
Action DELETE
URL <your URL here>/api/brands/<id of brand>
Sample Successful Response
HTTP 204
		


Field descriptions for Brands

Name Type Description Required
name string Name of brand yes
description text Description of brand
no
sort integer The order the brand will be shown
no
is_active boolean Is the brand active or not
no – default: true
image_file_name string Brand image file name
no
image_content_type string Brand image type
no
image_data base64 encoded
Image data for main product image base64 encoded no

Still need help? Contact Us Contact Us