Inventory Schema

Create Attribute Values

Use this API to create attribute values for an attribute.

🗒 Things to Know

  • This API only supports the creation of attribute options for the attributes with single/multi select response type and non user/location/date attribute type.
post/api/inventory/v2/schemas/attributes/{attributeId}/values/bulk/

Request

  • Base URL
    https://hostname
  • URL
    https://hostname/api/inventory/v2/schemas/attributes/{attributeId}/values/bulk/
  • Auth
    OAuth 2
    Client credentials
    Token URL: https://{hostname}/api/access/v1/oauth/token scopes: INVENTORY, INVENTORY_WRITE

Path parameters

attributeIdstring uuid required

ID of an attribute. The value is obtained using Get Inventory Schema API.

Request body

valuestring required

Value of the attribute option

hintstring

Hint text for the attribute value

defaultValuestring

Default value for the attribute

colorCodestring

Color code for visual representation

selectionValuestring

Selection value for numerical attributes

selectionValueAsDoublenumber double

Example request

[
  {
    "value": "Option 1",
    "hint": "Select this option if...",
    "colorCode": "#FF5733"
  }
]

Response

OK

idstring

Unique identifier of the attribute value

valuestring

Value of the attribute option

valueKeystring

Key used for value translation

hintstring

Hint text for the attribute value

hintKeystring

Key used for hint translation

status'enabled' | 'disabled'

Status of the attribute value

seededboolean

Flag indicating if the attribute value is seeded (system-provided)

sequenceinteger

Sequence number for ordering

colorCodestring

Color code for visual representation

selectionValuestring

Selection value for numerical attributes

Example response

[
  {
    "id": "91e37a36-ca61-499b-b3c3-7d556aef5cde",
    "value": "Option 1",
    "valueKey": "VendorsOption1",
    "hint": "Select this option if...",
    "hintKey": "VendorsOption1Hint",
    "status": "enabled",
    "seeded": true,
    "sequence": 1,
    "colorCode": "#FF5733"
  }
]

Changes

No recorded changes to this operation across all 1 revision of this API.