Skip to main content

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

    resourceType stringrequired

    Possible values: [products, clusters, categories, customers, contacts, companies]

    The resource type to get the attribute for

    Example: products
    lookupKey stringrequired

    Possible values: [id, sourceId]

    The lookupKey to find the resource by, i.e. id or sourceId

    Example: id
    lookupValue stringrequired

    The lookupValue to find the resource by, i.e. the id or the sourceId

    Example: 1234
    attributeLookupValue stringrequired

    The lookupValue to find the attribute description by, i.e. the id or the name

    Example: 1234
    attributeLookupKey stringrequired

    Possible values: [id, sourceId]

    The lookupKey to find the attribute description by, i.e. id or name

    Example: id

Query Parameters

    source string

    The source of the lookupValue when the lookupKey is a sourceId

    Example: EXAMPLE_SOURCE

Body

array

required

The attributes to create

  • Array [

  • attributeDescriptionId uuid

    The ID of the AttributeDescription, required if attributeDescriptionName is not provided

    attributeDescriptionName string

    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

  • Array [

  • language stringrequired

    Possible values: >= 2 characters and <= 2 characters

    Language is set as 2 character country code.

    values array[]

    List of localized string values

  • ]

  • enumValues string[]

    Attribute enum values, required for ENUM type attributes

    intValue integer

    Attribute integer value, required for INTEGER type attributes

    decimalValue number

    Attribute decimal value, required for DECIMAL type attributes

    dateTimeValue date-timenullable

    Attribute datetime value, required for DATETIME type attributes

    colorValue string

    Attribute color value, required for COLOR type attributes

  • ]

Responses

A list of operations performed on the Attributes

Schema

    data

    object[]

    required

  • Array [

  • id uuid

    ID of the created or updated attribute description

    name stringrequired

    Name of the created or updated attribute description

    message string

    Success or error message

    key stringrequired

    Name of the attribute description the attribute is created for

    value object
    action stringrequired

    Possible values: [update, create, ignored, delete]

    Action performed on the attribute description

    success booleanrequired

    Whether the action was successful or not

    productId integer

    The productId of the attribute value

    categoryId integer

    The categoryId of the attribute value

    clusterId integer

    The clusterId of the attribute value

    companyId integer

    The companyId of the attribute value

    contactId integer

    The contactId of the attribute value

    customerId integer

    The companyId of the attribute value

  • ]

Loading...