POST
/
catalog
/
attributes
curl --request POST \
  --url https://services.commercengine.dev/api/v1/x2yh61zw4k/admin/catalog/attributes \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "attribute_type": "Text",
  "default_value": "<string>",
  "is_visible": true,
  "is_filterable": true,
  "is_required": true,
  "is_localized": true,
  "active": true
}'
{
  "message": "<string>",
  "success": true,
  "content": {
    "attribute": {
      "id": "<string>",
      "name": "<string>",
      "attribute_type": "Text",
      "default_value": "<string>",
      "is_visible": true,
      "is_filterable": true,
      "is_required": true,
      "is_localized": true,
      "active": true,
      "product_count": 123,
      "created_at": "2023-11-07T05:31:56Z",
      "modified_at": "2023-11-07T05:31:56Z"
    }
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
name
string
required
Maximum length: 128
attribute_type
enum<string>
required
Available options:
Text,
Number,
Boolean,
Date,
Single-select,
Multi-select,
Color,
Currency,
File,
Image
is_visible
boolean
required
is_filterable
boolean
required
is_required
boolean
required
is_localized
boolean
required
active
boolean
required
default_value

Response

200 - application/json
OK
message
string
success
boolean
content
object