Storeden Developers

Brands API

Current version: v1.1

List brands

GET
/brands/list.json
List brands Request

$storeden = new Storeden\Storeden($config);
$brands_list = $storeden->get('/brands/list.json');
					
List brands Response

[
	{
		"uid": 102978,
		"name": "APPLE",
		"slug": "apple-inc",
		"description": "Best offerts about iPhone, iPad, MacBook and iPod"
	},
	...
]
					

Get brand entity

GET
/brands/brand.json
uid required (uid) Unique brand uid identifier
Get brand entity Request

$storeden = new Storeden\Storeden($config);
$brand_data = $storeden->get('/brands/brand.json?uid=102978');
					
Get brand entity Response

{
	"uid": 102978,
	"name": "APPLE",
	"slug": "apple-inc",
	"description": "Best offerts about iPhone, iPad, MacBook and iPod",
	"seo": {
        "title": "",
        "description": "",
        "keywords": "",
        "robots": ""
    },
    "disabled": false,
    "default_sort": "inherit"
}
					

Add a new brand

POST
/brands/brand.json
name required (string) New brand name
If brand already exists, this call will return the brand UID
description (string) Brand description
disabled (int) Set value to 1 to disable brand
seo_title (string) Seo title, used into Head > Title tag
seo_description (string) Seo title, used into Head > Meta description tag
seo_keywords (string) Seo title, used into Head > Meta keywords tag
Add a new brand Request

$storeden = new Storeden\Storeden($config);

$payload = array();
$payload['name'] = 'APPLE';
$payload['description'] = 'Best offerts about iPhone, iPad, MacBook and iPod';
$payload['disabled'] = 0;
$payload['seo_title'] = '';
$payload['seo_description'] = '';
$payload['seo_keywords'] = '';

$result = $storeden->post('/brands/brand.json', $payload);
					
Add a new brand Response

{
	"uid": 114510
}
					

Update brand data

PUT
/brands/brand.json
uid required (int) Unique brand identifier
name required (string) Brand name
description (string) Brand description. HTML usage is restricted
disabled (int) Set this field to 1 disable the brand visibilit on Shop page.
seo_title (string) Seo title, used into Head > Title tag
seo_description (string) Seo title, used into Head > Meta description tag
seo_keywords (string) Seo title, used into Head > Meta keywords tag
Update brand data Request

$storeden = new Storeden\Storeden($config);

$payload = array();
$payload['name'] = 'APPLE';
$payload['description'] = 'Best offerts about iPhone, iPad, MacBook and iPod';
$payload['disabled'] = 0;
$payload['seo_title'] = '';
$payload['seo_description'] = '';
$payload['seo_keywords'] = '';

$result = $storeden->put('/brands/brand.json', $payload);
					
Update brand data Response

{
	"ok": 1,
	"err": null,
	"updatedExisting": true
}
					

Remove brand

DELETE
/brands/brand.json
uid required (int) Unique brand identifier
Remove brand Request

$storeden = new Storeden\Storeden($config);
$result = $storeden->delete('/brands/brand.json', ['uid' => 114510]);
					
Remove brand Response

{
	"ok": 1,
	"err": null,
}
					

Update brand visibility

PUT
/brands/visibility.json
uid required (int) Unique brand identifier
status required (int) Specify 1 to make brand visible on e-commerce or 0 to hide from storefront
Update brand visibility Request

$storeden = new Storeden\Storeden($config);

$payload = array();
$payload['uid'] = 114510;
$payload['status'] = 1;

$result = $storeden->put('/brands/visibility.json', $payload);
					
Update brand visibility Response

{
	"ok": 1,
	"nModified": 1,
	"n": 1,
	"err": null,
	"errmsg": null,
	"updatedExisting": true
}