Bulk resource attribute values by resource lookup key
POST/:resourceType/:lookupKey/:lookupValue/attributes
The bulk resource attribute endpoint sets/ deletes resource attributes for a single resource identified by the lookup key. The attribute is identified via the payload by providing either id
or name
. If both are provided, id
will be used to identify the attribute. Below is a summary of all the possible fields in the payload.
Fields
Name | Required |
---|---|
id | yes, if name not provided |
name | yes, if id not specified |
class | yes, if id not specified |
type | yes |
value | no, if omitted the attribute value will be deleted for the resource (set to default) |
A successful response contains data about each attribute changes: whether the attribute was created/ updated for that resource, in which case the action
in the response will be put
, or delete
if the value of the attribute for the particular resource is being deleted. After it is deleted, the attribute value for the specific resource will inherit the value from the parent resource(s).
In case of an issue, the data will contain a message explaining the reason, for ex. when an attribute is not found, or the value provided does not match the attribute type, etc.
Request
Path Parameters
Resource type. Possible values are products
, categories
, users
, usergroups
Lookup key. Use different lookup keys depending on the resource type
The value of the key (an id, sourceId, sku, etc.)
Query Parameters
Optional. Used in combination with lookup key sourceId
- application/json
Body
array
Array [
]
Responses
- 200
- 400
- 404
Bulk product attribute values by product id - 200 / Bulk product attribute values by product source id - 200 / Bulk user attribute values by user id and attribute name - 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)
- Bulk product attribute values by product id - 200
- Bulk product attribute values by product source id - 200
- Bulk user attribute values by user id and attribute name - 200
Schema
Array [
- MOD1
- MOD2
Array [
]
]
data
object[]
value
object
anyOf
number
{
"data": [
{
"action": "put",
"id": 661,
"key": "WEIGHT",
"lookupKey": "name",
"message": "Attribute value put.",
"success": true,
"value": 15
},
{
"action": "put",
"id": 671,
"key": "MATERIAAL_FRAME",
"lookupKey": "name",
"message": "Attribute value put.",
"success": true,
"value": [
{
"language": "NL",
"value": "Leer"
},
{
"language": "EN",
"value": "Leather"
}
]
},
{
"action": "put",
"error": "Attribute with name [HEIGHT] not found.",
"key": "HEIGHT",
"lookupKey": "name",
"success": false
},
{
"action": "delete",
"id": 668,
"key": "COLOR",
"lookupKey": "name",
"message": "Attribute value deleted (set to default).",
"success": true
}
],
"messages": [
"Completed"
],
"total": 4
}
{
"data": [
{
"action": "put",
"id": 661,
"key": "WEIGHT",
"lookupKey": "name",
"message": "Attribute value put.",
"success": true,
"value": 15
},
{
"action": "put",
"id": 671,
"key": "MATERIAAL_FRAME",
"lookupKey": "name",
"message": "Attribute value put.",
"success": true,
"value": [
{
"language": "NL",
"value": "Leer"
},
{
"language": "EN",
"value": "Leather"
}
]
},
{
"action": "put",
"error": "Attribute with name [HEIGHT] not found.",
"key": "HEIGHT",
"lookupKey": "name",
"success": false
},
{
"action": "delete",
"id": 668,
"key": "COLOR",
"lookupKey": "name",
"message": "Attribute value deleted (set to default).",
"success": true
}
],
"messages": [
"Completed"
],
"total": 4
}
{
"data": [
{
"action": "put",
"id": 661,
"key": "WEIGHT",
"lookupKey": "name",
"message": "Attribute value put.",
"success": true,
"value": 15
},
{
"action": "put",
"id": 671,
"key": "MATERIAAL_FRAME",
"lookupKey": "name",
"message": "Attribute value put.",
"success": true,
"value": [
{
"language": "NL",
"value": "Leer"
},
{
"language": "EN",
"value": "Leather"
}
]
},
{
"action": "put",
"error": "Attribute with name [HEIGHT] not found.",
"key": "HEIGHT",
"lookupKey": "name",
"success": false
},
{
"action": "delete",
"id": 668,
"key": "COLOR",
"lookupKey": "name",
"message": "Attribute value deleted (set to default).",
"success": true
}
],
"messages": [
"Completed"
],
"total": 4
}
{
"data": [
{
"action": "put",
"id": 48,
"key": "SHOW_REKENING",
"lookupKey": "name",
"message": "Attribute value put.",
"success": true,
"value": "Y"
}
],
"messages": [
"Completed"
],
"total": 1
}
Bulk product attribute values by product id - 400 (schema validation error)
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)
- Bulk product attribute values by product id - 400 (schema validation error)
Schema
error
object
{
"error": {
"code": 10007,
"messages": [
"#/0/type: decimal is not a valid enum value",
"#/0/type: decimal is not a valid enum value",
"#/0/value: expected type: String, found: JSONArray",
"#/0/type: decimal is not a valid enum value",
"#/0/value: expected type: Integer, found: JSONArray",
"#/0/value: expected type: Number, found: JSONArray",
"#/0/type: decimal is not a valid enum value",
"#/0/value: expected type: String, found: JSONArray",
"#/0/type: decimal is not a valid enum value",
"#/0/value: expected type: String, found: JSONArray"
],
"moreInfo": "https://www.propel.us/docs/errors/10007",
"status": 400,
"type": "SchemaValidationException"
}
}
{
"error": {
"code": 10007,
"messages": [
"#/0/type: decimal is not a valid enum value",
"#/0/type: decimal is not a valid enum value",
"#/0/value: expected type: String, found: JSONArray",
"#/0/type: decimal is not a valid enum value",
"#/0/value: expected type: Integer, found: JSONArray",
"#/0/value: expected type: Number, found: JSONArray",
"#/0/type: decimal is not a valid enum value",
"#/0/value: expected type: String, found: JSONArray",
"#/0/type: decimal is not a valid enum value",
"#/0/value: expected type: String, found: JSONArray"
],
"moreInfo": "https://www.propel.us/docs/errors/10007",
"status": 400,
"type": "SchemaValidationException"
}
}
Bulk product attribute values by product id - 404 / Bulk product attribute values by product source id - 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)
- Bulk product attribute values by product id - 404
- Bulk product attribute values by product source id - 404
Schema
error
object
{
"error": {
"code": 10009,
"messages": [
"Parent resource [Product] with id [372212] not found."
],
"moreInfo": "https://www.propel.us/docs/errors/10009",
"status": 404,
"type": "ParentProductNotFound"
}
}
{
"error": {
"code": 10009,
"messages": [
"Parent resource [Product] with id [372212] not found."
],
"moreInfo": "https://www.propel.us/docs/errors/10009",
"status": 404,
"type": "ParentProductNotFound"
}
}
{
"error": {
"code": 10009,
"messages": [
"Parent resource [Product] with sourceId [076548] not found."
],
"moreInfo": "https://www.propel.us/docs/errors/10009",
"status": 404,
"type": "ParentProductNotFound"
}
}