Product Custom Attributes
Add Custom Attribute
post /sites/{siteid}/customattributesEndpoint for adding custom attributes to use for products.
Site ID. (Use eshopid
of the site for this parameter)
Custom Attribute object.
{ "id": "material", "title": "Material", "type": "string", "enums": [ "Cotton", "Polyester" ], "searchable": false}
{ "id": "material", "title": "Material", "type": "string", "enums": [ "Cotton", "Polyester" ], "searchable": false}
HTTP Status Code Summary | |
---|---|
200 | Returns the Custom Attribute Object. |
400 | Invalid request. Data sent from client is invalid. |
401 | Missing or bad authentication. |
404 | The specified resource was not found. |
409 | The item already exists. |
429 | Too Many Requests. |
500 | Internal Server Error. |
Get Custom Attributes
get /sites/{siteid}/customattributesReturns envelope with custom attributes for products. The list returned will be sorted by ID in ascending order.
Site ID. (Use eshopid
of the site for this parameter)
The index of the item to start from. Used for pagination.
Number of items to return.
{ "totalcount": 8, "items": [ { "id": "material", "title": "Material", "type": "string", "enums": [ "Cotton", "Polyester" ], "searchable": false } ]}
HTTP Status Code Summary | |
---|---|
200 | Returns a Custom Attribute Envelope Object. |
400 | Invalid request. Data sent from client is invalid. |
401 | Missing or bad authentication. |
404 | The specified resource was not found. |
429 | Too Many Requests. |
500 | Internal Server Error. |
Get Custom Attribute
get /sites/{siteid}/customattributes/{attributeid}Returns a custom attribute for products.
Site ID. (Use eshopid
of the site for this parameter)
The ID of the attribute used in the API. Unique per site.
{ "id": "material", "title": "Material", "type": "string", "enums": [ "Cotton", "Polyester" ], "searchable": false}
HTTP Status Code Summary | |
---|---|
200 | Returns the Custom Attribute Object. |
400 | Invalid request. Data sent from client is invalid. |
401 | Missing or bad authentication. |
404 | The specified resource was not found. |
429 | Too Many Requests. |
500 | Internal 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
)
Site ID. (Use eshopid
of the site for this parameter)
The ID of the attribute used in the API. Unique per site.
Custom Attribute object.
{ "enums": [ "Cotton", "Polyester", "Velvet" ]}
{ "id": "material", "title": "Material", "type": "string", "enums": [ "Cotton", "Polyester", "Velvet" ], "searchable": false}
HTTP Status Code Summary | |
---|---|
200 | Returns the updated Custom Attribute Object. |
400 | Invalid request. Data sent from client is invalid. |
401 | Missing or bad authentication. |
404 | The specified resource was not found. |
429 | Too Many Requests. |
500 | Internal 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
Site ID. (Use eshopid
of the site for this parameter)
The ID of the attribute used in the API. Unique per site.
true
HTTP Status Code Summary | |
---|---|
200 | Returns boolean true, the body can be ignored. |
400 | Invalid request. Data sent from client is invalid. |
401 | Missing or bad authentication. |
404 | The specified resource was not found. |
429 | Too Many Requests. |
500 | Internal Server Error. |
Objects
CustomAttributeobject
An attribute defines a custom product field.
The ID of the attribute used in the API. Unique per site. Note! IDs are case sensitive.
The title used for the attribute values.
The type of value used for the attribute
VALUES |
---|
integer |
string |
An array of valid values for attribute of type string
. Set to null if any value should be allowed.
If true, then the attribute values should be searchable. Only allowed for attributes of type string