Attribute
Interface
Every product can have allocated multiple attributes.
The Api Method allows you:
to get the Attribute list to use with API 'Products'.
create new Attributes
Columns that can be used as filters:
Organization
Name
Active
AttributeSet
Actions can be done:
list
create
update
API Methods:
List:
URL: https://api.socratecloud.com/webapi/rest/product/attribute/list/{version}?startRow={0}&endRow={100}&accessToken={access_token}
Method: GET
Available filter parameters:
Organization
Name
Active
AttributeSet
Return: JSON object with next format:
{
"data": [
{
"Organization": "Demo SRL",
"Created": "2014-01-07 09:46:40",
"CreatedBy": "SuperUser",
"Updated": "2014-01-07 09:46:40",
"UpdatedBy": "SuperUser",
"Active": true,
"Name": "Height",
"Description": null,
"Type": "Number",
"IsSelfService": true,
"values": {}
},
{
"Organization": "*",
"Created": "2014-01-07 12:18:41",
"CreatedBy": "SuperUser",
"Updated": "2014-01-07 12:18:41",
"UpdatedBy": "SuperUser",
"Active": true,
"Name": "Color",
"Description": null,
"Type": "List",
"IsSelfService": true,
"values": {
"White": "White",
"Black": "Black"
}
}
],
"totalRows": 1
}
Create:
URL: https://api.socratecloud.com/webapi/rest/product/attribute/create/{version}?accessToken={access_token}
Method: POST
Return: attribute name for success or error message (start with "ERROR: ")
Data format:
{
"Organization": "Demo SRL",
"Active": true,
"Name": "Color",
"Description": null,
"Type": "List",
"IsSelfService": true,
"values": {
"White": "White",
"Black": "Black"
}
}
Update:
URL: https://api.socratecloud.com/webapi/rest/product/attribute/update/{version}?accessToken={access_token}&Name={attribute_name}
Method: POST
Return: attribute name for success or error message (start with "ERROR: ")
Data format:
{
"Organization": "Demo SRL",
"Active": true,
"Name": "Color",
"Description": null,
"Type": "List",
"IsSelfService": true,
"values": {
"White": "White",
"Black": "Black"
}
}