Storeden Developers

Attributes API

Current version: v1.1

List attributes

List all available attributes on this shop.

GET
/attributes/list.json
List attributes Request

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

[
	{
		"label": "Internal Code",
		"type": "text",
		"data": [],
		"id": "586bbfa002e58e586f154824"
	},
	{
		"label": "Warehouse Location",
		"type": "text",
		"data": [],
		"id": "586bca86ffe48e9dbcc2207f"
	},
	{
		"label": "Manufacturer",
		"type": "select",
		"data": [
		"Manufacturer 1",
		"Manufacturer 2"
		],
		"id": "586bcb33ffe48ea8bec21ff4"
	}
]
					

Add attribute

Add a new attribute to your shop attributes poll.

POST
/attributes/attribute.json
label required (string) Name of your custom product attribute
type required (string) Type of your custom product attribute. You can download a valid value list here
data[] repetable (string) Predefinited set of values. Available only on "select" type.
Add attribute Request

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

$payload = array();
$payload['label'] = 'Manufacturer';
$payload['type'] = 'select';
$payload['data'] = ['Manufacturer 1', 'Manufacturer 2', 'Manufacturer 3'];

$result = $storeden->post('/attributes/attribute.json', $payload);
					
Add attributes Response

{
	"id": "586bcb33ffe48ea8bec21ff4"
}
					

Search attribute

Search an attribute. Search by label field

GET
/attributes/search.json?label={attribute-label}
label required (string) Name of your custom product attribute
Search attribute Request

$storeden = new Storeden\Storeden($config);
$result = $storeden->get('/attributes/search.json?label=Manufacturer');
					
Search attribute Response

[
	{
		"label": "Manufacturer",
		"type": "select",
		"data": [
			"Manufacturer 1",
			"Manufacturer 2",
			"Manufacturer 3"
		],
		"id": "586bcb33ffe48ea8bec21ff4"
	}
]
					

Edit attribute list

Add a new value to predefinited element.

POST
/attributes/attribute_addValue.json
id required (StoredenId) A valid attribute ID that must exists on your store.
value required (string) Value of a new entry value to add to the list
Edit attribute list Request

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

$payload = array();
$payload['id'] = '586bcb33ffe48ea8bec21ff4';
$payload['value'] = 'Manufacturer 4';

$result = $storeden->post('/attributes/attribute_addValue.json', $payload);
					
Edit attribute list Response

[
	{
		"label": "Manufacturer",
		"type": "select",
		"data": [
			"Manufacturer 1",
			"Manufacturer 2",
			"Manufacturer 3",
			"Manufacturer 4"
		],
		"id": "586bcb33ffe48ea8bec21ff4"
	}
]
					

Delete attribute

Remove an existing attribute from your shop.

DELETE
/attributes/attribute.json
id required (StoredenId) A valid attribute ID that must exists on your store.
Delete attribute Request

$storeden = new Storeden\Storeden($config);
$result = $storeden->delete('/attributes/attribute.json', ['id' => '586bcb33ffe48ea8bec21ff4']);
					
Delete attribute Response

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

List attribute Type

Get a list of supported attributes type.

GET
/attributes/types.json
List attribute Type Request

$storeden = new Storeden\Storeden($config);
$types = $storeden->get('/attributes/types.json');
					
List attribute Type Response

[
	"text",
	"number",
	"real",
	"select"
]