Product Custom Attributes

Add Custom Attribute

post /sites/{siteid}/customattributes

Endpoint for adding custom attributes to use for products.

PARAMETERS
siteid
integer
path
REQUIRED

Site ID. (Use eshopid of the site for this parameter)

REQUEST BODY
object
REQUIRED

Custom Attribute object.

CustomAttribute
Returns

Returns the Custom Attribute Object.

posthttps://api.mysitoo.com/v2/accounts/1500/sites/1/customattributes.json
{
"id": "material",
"title": "Material",
"type": "string",
"enums": [
"Cotton",
"Polyester"
],
"searchable": false
}
RESPONSE JSON
{
"id": "material",
"title": "Material",
"type": "string",
"enums": [
"Cotton",
"Polyester"
],
"searchable": false
}
HTTP Status Code Summary
200Returns the Custom Attribute Object.
400Invalid request. Data sent from client is invalid.
401Missing or bad authentication.
404The specified resource was not found.
409The item already exists.
429Too Many Requests.
500Internal Server Error.

Get Custom Attributes

get /sites/{siteid}/customattributes

Returns envelope with custom attributes for products. The list returned will be sorted by ID in ascending order.

PARAMETERS
siteid
integer
path
REQUIRED

Site ID. (Use eshopid of the site for this parameter)

start
integer
query

The index of the item to start from. Used for pagination.

Default: 0
num
integer
query

Number of items to return.

Default: 10
Returns

Returns a Custom Attribute Envelope Object.

gethttps://api.mysitoo.com/v2/accounts/1500/sites/1/customattributes.json
RESPONSE JSON
{
"totalcount": 8,
"items": [
{
"id": "material",
"title": "Material",
"type": "string",
"enums": [
"Cotton",
"Polyester"
],
"searchable": false
}
]
}
HTTP Status Code Summary
200Returns a Custom Attribute Envelope Object.
400Invalid request. Data sent from client is invalid.
401Missing or bad authentication.
404The specified resource was not found.
429Too Many Requests.
500Internal Server Error.

Get Custom Attribute

get /sites/{siteid}/customattributes/{attributeid}

Returns a custom attribute for products.

PARAMETERS
siteid
integer
path
REQUIRED

Site ID. (Use eshopid of the site for this parameter)

attributeid
string
path
REQUIRED

The ID of the attribute used in the API. Unique per site.

Returns

Returns the Custom Attribute Object.

gethttps://api.mysitoo.com/v2/accounts/1500/sites/1/customattributes/material.json
RESPONSE JSON
{
"id": "material",
"title": "Material",
"type": "string",
"enums": [
"Cotton",
"Polyester"
],
"searchable": false
}
HTTP Status Code Summary
200Returns the Custom Attribute Object.
400Invalid request. Data sent from client is invalid.
401Missing or bad authentication.
404The specified resource was not found.
429Too Many Requests.
500Internal Server Error.

Update Custom Attribute

put /sites/{siteid}/customattributes/{attributeid}

Update a custom attribute for products. Note that the following fields are not allowed in an update (id, type, searchable)

PARAMETERS
siteid
integer
path
REQUIRED

Site ID. (Use eshopid of the site for this parameter)

attributeid
string
path
REQUIRED

The ID of the attribute used in the API. Unique per site.

REQUEST BODY
object
REQUIRED

Custom Attribute object.

CustomAttribute
Returns

Returns the updated Custom Attribute Object.

puthttps://api.mysitoo.com/v2/accounts/1500/sites/1/customattributes/material.json
{
"enums": [
"Cotton",
"Polyester",
"Velvet"
]
}
RESPONSE JSON
{
"id": "material",
"title": "Material",
"type": "string",
"enums": [
"Cotton",
"Polyester",
"Velvet"
],
"searchable": false
}
HTTP Status Code Summary
200Returns the updated Custom Attribute Object.
400Invalid request. Data sent from client is invalid.
401Missing or bad authentication.
404The specified resource was not found.
429Too Many Requests.
500Internal Server Error.

Delete Custom Attribute

delete /sites/{siteid}/customattributes/{attributeid}

Delete a custom attribute for products. Note! Attributes can only be deleted if no product values exist

PARAMETERS
siteid
integer
path
REQUIRED

Site ID. (Use eshopid of the site for this parameter)

attributeid
string
path
REQUIRED

The ID of the attribute used in the API. Unique per site.

deletehttps://api.mysitoo.com/v2/accounts/1500/sites/1/customattributes/material.json
RESPONSE JSON
true
HTTP Status Code Summary
200Returns boolean true, the body can be ignored.
400Invalid request. Data sent from client is invalid.
401Missing or bad authentication.
404The specified resource was not found.
429Too Many Requests.
500Internal Server Error.

Objects

CustomAttribute
object

An attribute defines a custom product field.

PROPERTIES
id
string
REQUIRED

The ID of the attribute used in the API. Unique per site. Note! IDs are case sensitive.

Pattern: ^[a-zA-Z][a-zA-Z0-9_-]{0,31}$
title
string
REQUIRED

The title used for the attribute values.

Max Length: 128
Min Length: 1
type
string
REQUIRED

The type of value used for the attribute

VALUES
integer
string
enums
array
(string)

An array of valid values for attribute of type string. Set to null if any value should be allowed.

searchable
boolean

If true, then the attribute values should be searchable. Only allowed for attributes of type string

Default: false