Bulk Attributes
POST/v2/attributes/:resourceType/:lookupKey/:lookupValue/attributes
Creates, updates and/or deletes attributes for a resource by lookupKey and lookupValue. Attribute present in the payload without a value, which are present in the database, will be deleted from the database. Attributes with a value present in the payload will be either created or updated in the database.
Request
Path Parameters
Possible values: [products
, clusters
, categories
, customers
, contacts
, companies
]
The resource type to get the attribute for
Possible values: [id
, sourceId
]
The lookupKey to find the resource by, i.e. id or sourceId
The lookupValue to find the resource by, i.e. the id or the sourceId
The lookupValue to find the attribute description by, i.e. the id or the name
Possible values: [id
, sourceId
]
The lookupKey to find the attribute description by, i.e. id or name
Query Parameters
The source of the lookupValue when the lookupKey is a sourceId
- application/json
Body
array
required
The attributes to create
Array [
Array [
]
]
The ID of the AttributeDescription, required if attributeDescriptionName is not provided
The Name of the AttributeDescription, required if attributeDescriptionId is not provided
value
object
textValues
object[]
Attribute value descriptions per language, required for TEXT type attributes
Possible values: >= 2 characters
and <= 2 characters
Language is set as 2 character country code.
List of localized string values
Attribute enum values, required for ENUM type attributes
Attribute integer value, required for INTEGER type attributes
Attribute decimal value, required for DECIMAL type attributes
Attribute datetime value, required for DATETIME type attributes
Attribute color value, required for COLOR type attributes
Responses
- 200
- 401
A list of operations performed on the Attributes
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
data
object[]
required
ID of the created or updated attribute description
Name of the created or updated attribute description
Success or error message
Name of the attribute description the attribute is created for
Possible values: [update
, create
, ignored
, delete
]
Action performed on the attribute description
Whether the action was successful or not
The productId of the attribute value
The categoryId of the attribute value
The clusterId of the attribute value
The companyId of the attribute value
The contactId of the attribute value
The companyId of the attribute value
{
"data": [
{
"id": "8bcacf9d-36a2-48d5-b713-eedb4eb8c28b",
"name": "ATTRIBUTE_NAME",
"message": "Attribute description created successfully",
"key": "ATTRIBUTE_NAME",
"value": {},
"action": "create",
"success": true,
"productId": 4242,
"categoryId": 1234,
"clusterId": 1234,
"companyId": 1234,
"contactId": 1234,
"customerId": 1234
}
]
}
Unauthorized
- application/json
- Schema
- invalid_client_id
- invalid_client_cred
Schema
any
{
"ErrorCode": "invalid_client",
"Error": "ClientId is Invalid"
}
{
"ErrorCode": "invalid_client",
"Error": "Client credentials are invalid"
}