Skip to main content

Create attribute

POST 

/attributes

Before setting an attribute value for a specific resource, the attribute definition needs to be created. This endpoint is used to create a single attribute definition.

If an attribute is successfully created, the response will include the attribute id.

Fields

NameRequired
nameyes
classyes
isPublicno
Default value is true
isSearchableno
Default value is false
isSystemno
Default value is false
isHiddenno
Default value is false
typeyes
typeParamonly when type value is enum or enumlist
descriptionsno
valueonly when type is integer, decimal, date or datetime
unitsno
groupno

Request

Body

    class string

    descriptions

    object[]

  • Array [

  • language string
    value string
  • ]

  • group string
    isHidden boolean
    isPublic boolean
    isSearchable boolean
    isSystem boolean
    name string
    type string
    typeParam string
    value string

Responses

Create product enum attribute - 201 / Create product text attribute - 201

Response Headers

  • Alt-Svc

    string

  • Via

    string

  • alt-svc

    string

  • content-length

    string

  • date

    string

  • return-format

    string

  • server

    string

  • x-request-id

    string

Schema

    data

    object

    class string

    descriptions

    object[]

  • Array [

  • language string
    value string
  • ]

  • group string
    id number
    isHidden boolean
    isPublic boolean
    isSearchable boolean
    isSystem boolean
    name string
    type string
    typeParam string

    value

    object

    anyOf

    string

    messages string[]
    total number
Loading...