Update attribute by lookup key
PATCH/attributes/:lookupKey/:lookupValue
This endpoint enables updating the definition of an attribute. The attribute is identified by it's Propeller Id or name. The attributeClass
Query Param is useful to use when the same attribute name is used for an attribute with a different class.
Request
Path Parameters
Lookup key. Use id
or name
The id
or name
of the attribute
Query Parameters
Attribute class. Optional. Used in combination with lookup key name
. Possible values are product
, category
, user
- application/json
Body
Array [
]
descriptions
object[]
Responses
- 200
- 400
- 404
Update attribute by Id - 200 / Update attribute by name and class - 200
Response Headers
Alt-Svc
string
Via
string
alt-svc
string
content-length
string
date
string
return-format
string
server
string
x-request-id
string
- application/json
- Schema
- Example (from schema)
- Update attribute by Id - 200
- Update attribute by name and class - 200
Schema
Array [
]
data
object
descriptions
object[]
{
"data": {
"descriptions": [
{
"language": "NL",
"value": "Kleur"
},
{
"language": "EN",
"value": "Color"
}
],
"group": "",
"id": 668,
"isHidden": false,
"isPublic": true,
"isSearchable": false,
"isSystem": false,
"value": ""
},
"messages": [
"Attribute updated"
],
"total": 1
}
{
"data": {
"descriptions": [
{
"language": "NL",
"value": "Kleur"
},
{
"language": "EN",
"value": "Color"
}
],
"group": "",
"id": 668,
"isHidden": false,
"isPublic": true,
"isSearchable": false,
"isSystem": false,
"value": ""
},
"messages": [
"Attribute updated"
],
"total": 1
}
{
"data": {
"descriptions": [
{
"language": "NL",
"value": "Kleur"
},
{
"language": "EN",
"value": "Color"
}
],
"group": "",
"id": 668,
"isHidden": false,
"isPublic": true,
"isSearchable": false,
"isSystem": false,
"value": ""
},
"messages": [
"Attribute updated"
],
"total": 1
}
Update attribute by name and class - 400 (invalid value)
Response Headers
Alt-Svc
string
Via
string
alt-svc
string
content-length
string
date
string
return-format
string
server
string
x-request-id
string
- application/json
- Schema
- Example (from schema)
- Update attribute by name and class - 400 (invalid value)
Schema
error
object
{
"error": {
"code": 14005,
"messages": [
"Invalid value provided. Attribute type is [enum]."
],
"moreInfo": "https://www.propel.us/docs/errors/14005",
"status": 400,
"type": "AttributeInvalidValue"
}
}
{
"error": {
"code": 14005,
"messages": [
"Invalid value provided. Attribute type is [enum]."
],
"moreInfo": "https://www.propel.us/docs/errors/14005",
"status": 400,
"type": "AttributeInvalidValue"
}
}
Update attribute by Id - 404 / Update attribute by name and class - 404
Response Headers
Alt-Svc
string
Via
string
alt-svc
string
content-length
string
date
string
return-format
string
server
string
x-request-id
string
- application/json
- Schema
- Example (from schema)
- Update attribute by Id - 404
- Update attribute by name and class - 404
Schema
error
object
{
"error": {
"code": 14001,
"messages": [
"Attribute with id [800] not found."
],
"moreInfo": "https://www.propel.us/docs/errors/14001",
"status": 404,
"type": "AttributeNotFound"
}
}
{
"error": {
"code": 14001,
"messages": [
"Attribute with id [800] not found."
],
"moreInfo": "https://www.propel.us/docs/errors/14001",
"status": 404,
"type": "AttributeNotFound"
}
}
{
"error": {
"code": 14001,
"messages": [
"Attribute with name [COLOR] and attributeClass [category] not found."
],
"moreInfo": "https://www.propel.us/docs/errors/14001",
"status": 404,
"type": "AttributeNotFound"
}
}