Categories

Add Category

post /sites/{siteid}/categories
PARAMETERS
siteid
integer
path
REQUIRED
REQUEST BODY
object
posthttps://api.mysitoo.com/v2/accounts/1500/sites/1/categories.json
{
"title": "Street Classics",
"categoryparentid": 5
}
RESPONSE JSON
68
HTTP Status Code Summary
200Returns categoryid
400Bad Request. Invalid syntax, missing required argument or invalid request.
401Unauthorized. Authorization failed.
404Resource not found. The url is invalid.
429Too Many Requests.
500Internal Server Error.

Get Categories

get /sites/{siteid}/categories
PARAMETERS
siteid
integer
path
REQUIRED
start
integer
query

The index of the item to start from

Default: 0
num
integer
query

The number of items returned

Default: 10
fields
array (string)
query

Comma separated list of fields to return. Use this to query only the fields you are using. Default is all fields in category.

Example: /sites/{siteid}/categories?fields=categoryid,title,categoryparentid,sortorder
RETURNS

Returns an envelope with items of type category.

gethttps://api.mysitoo.com/v2/accounts/1500/sites/1/categories.json?num=2
RESPONSE JSON
{
"totalcount": 40,
"items": [
{
"categoryid": 1,
"categoryparentid": null,
"visible": true,
"sortorder": 1,
"custom1": "",
"custom2": "",
"friendly": "living-room",
"seo_title": "Feel the inspiration for a new living room",
"seo_keywords": "furniture, sofas, living room",
"seo_description": "Feel the inspiration for a new living room.\nDiscover Home & Furnishing!",
"title": "Living Room",
"datecreated": 1353477229,
"datemodified": 1354108348
},
{
"categoryid": 2,
"categoryparentid": null,
"visible": true,
"sortorder": 5,
"custom1": "",
"custom2": "",
"friendly": "brand",
"seo_title": "",
"seo_keywords": "",
"seo_description": "",
"title": "Brand",
"datecreated": 1353477229,
"datemodified": 1354108461
}
]
}
HTTP Status Code Summary
200Returns an envelope with items of type category.
400Bad Request. Invalid syntax, missing required argument or invalid request.
401Unauthorized. Authorization failed.
404Resource not found. The url is invalid.
429Too Many Requests.
500Internal Server Error.

Get Category

get /sites/{siteid}/categories/{categoryid}
PARAMETERS
siteid
integer
path
REQUIRED
categoryid
integer
path
REQUIRED
RETURNS

Returns an item of type category.

gethttps://api.mysitoo.com/v2/accounts/1500/sites/1/categories/68.json
RESPONSE JSON
{
"categoryid": 68,
"categoryparentid": 5,
"visible": true,
"sortorder": 3,
"custom1": "",
"custom2": "",
"friendly": "street-classics",
"seo_title": "",
"seo_keywords": "",
"seo_description": "",
"title": "Street Classics",
"datecreated": 1550669773,
"datemodified": 1550669773
}
HTTP Status Code Summary
200Returns an item of type category.
400Bad Request. Invalid syntax, missing required argument or invalid request.
401Unauthorized. Authorization failed.
404Resource not found. The url is invalid.
429Too Many Requests.
500Internal Server Error.

Update Category

put /sites/{siteid}/categories/{categoryid}
PARAMETERS
siteid
integer
path
REQUIRED
categoryid
integer
path
REQUIRED
REQUEST BODY
object
puthttps://api.mysitoo.com/v2/accounts/1500/sites/1/categories/68.json
{
"title": "Jeans"
}
RESPONSE JSON
true
HTTP Status Code Summary
200Returns true
400Bad Request. Invalid syntax, missing required argument or invalid request.
401Unauthorized. Authorization failed.
404Resource not found. The url is invalid.
429Too Many Requests.
500Internal Server Error.

Delete Category

delete /sites/{siteid}/categories/{categoryid}

Note that any descendants of the category being deleted will also be deleted!

PARAMETERS
siteid
integer
path
REQUIRED
categoryid
integer
path
REQUIRED
deletehttps://api.mysitoo.com/v2/accounts/1500/sites/1/categories/68.json
RESPONSE JSON
true
HTTP Status Code Summary
200Returns true
400Bad Request. Invalid syntax, missing required argument or invalid request.
401Unauthorized. Authorization failed.
404Resource not found. The url is invalid.
429Too Many Requests.
500Internal Server Error.

Objects

category
object

Categories are the menu items for the webshop and can also be used as containers for products.

PROPERTIES
categoryid
integer
READ ONLY

The category ID.

categoryparentid
integer

The parent category ID or null for top level.

visible
boolean

Indicates whether the category is shown in menus or not.

sortorder
integer

Index for this category among siblings. Zero based.

custom1
string

Custom field 1.

custom2
string

Custom field 2.

friendly
string

Friendly name. Absolute url = site url + friendly.

seo_title
string

Used for the html title element. If empty the title field will be used instead.

seo_keywords
string

Meta keywords.

seo_description
string

Meta description.

title
string
REQUIRED

Title of category.

datecreated
READ ONLY

Timestamp when this category was created.

datemodified
READ ONLY

Timestamp when this category was last modified.

timestamp
integer

Number of seconds since the Unix Epoch.