Storeden Developers

Categories API

Current version: v1.1

List categories

List all your shop categories. This endpoint return a non ordered list

GET
/categories/list.json
List categories Request

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

[
    {
        "uid": 106090,
        "name": "TV LED",
        "parentUID": 0, // Legacy field, use parent instead
        "parent": 0,
        "description": "Discover a new way to watch films",
        "seo": {
            "title": "",
            "description": "",
            "keywords": ""
        },
        "mpc": "562a225c16f46a580d9b91e4"
    },
    ...
]
					

Categories count

Return how many categories are listed on your shop

GET
/categories/count.json
Categories count Request

$storeden = new Storeden\Storeden($config);
$result = $storeden->get('/categories/count.json');
					
Categories count Response

{
	"count": 240
}
					

Add new category

Add a new category to your shop. You can add a root category setting parent to 0

POST
/categories/category.json
name required (string) Category name in your shop default language
description (string) Category description, in your shop default language
parent (int) Specify a valid parent uid to create this category as a subcategory of {parent-uid} category
seo_title (string) Insert here your seo title
seo_description (string) Insert here your seo description
seo_keywords (string) Insert here your seo description
Add new category Request

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

$payload = array();
$payload['name'] = 'Monitors';
$payload['description'] = '';
$payload['parent'] = 114510;
$payload['seo_title'] = '';
$payload['seo_description'] = '';
$payload['seo_keywords'] = '';

$result = $storeden->post('/categories/category.json', $payload);
					
Add new category Response

{
    "uid": 114513
}
					

Update category

PUT
/categories/category.json
uid required (int) A valid category uid
name required (string) Specify your category name
description (string) Specify your category description in your shop default language
parent (int) Specify your category parent category uid. If set to 0 or empty this category will be a root category
mpc (StoredenID) Specify a valid Storeden Marketplace category ID
seo_title (string) Insert here your seo title
seo_description (string) Insert here your seo description
seo_keywords (string) Insert here your seo description
Update category Request

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

$payload = array();
$payload['uid'] = 114516;
$payload['name'] = 'Pc Monitors';
$payload['description'] = '';
$payload['parent'] = 114510;
$payload['mpc'] = null;
$payload['seo_title'] = '';
$payload['seo_description'] = '';
$payload['seo_keywords'] = '';

$result = $storeden->put('/categories/category.json', $payload);
					
Update category Response

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

Remove category

Remove a category from your store. If this category has one or more subcategories those will be marked as orphan categories.

DELETE
/categories/category.json
uid required (int) Unique identifier of your store category
If you can't send a body content on DELETE Api Call you can specify the required identifier as questy string.
Example: https://connect.storeden.com/v1.1/categories/category.json?uid=YOUR_ID
Remove category Request

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

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

Update Category Visibility

PUT
/categories/visibility.json
uid required (int) Unique identifier of your store category
status required (int) Specify 1 to make category visible on e-commerce or 0 to hide from storefront
Update Category Visibility Request

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

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

$result = $storeden->put('/categories/visibility.json', $payload);
					
Update Category Visibility Response

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