Retrieve list of attribute options

GET /V1/products/attributes/{attributeCode}/options

Retrieve list of attribute options

Responses

  • 200 Success.

    Hide response attributes Show response attributes object

    Created from:

    • label string Required

      Option label

    • value string Required

      Option value

    • sort_order integer

      Option order

    • is_default boolean

      Default

    • store_labels array[object]

      Interface AttributeOptionLabelInterface

      Hide store_labels attributes Show store_labels attributes object

      Interface AttributeOptionLabelInterface

  • 400 Bad Request

    Hide response attributes Show response attributes object
    • message string Required

      Error message

    • errors array[object]

      Error details

      Hide errors attributes Show errors attributes object

      Error details

      • message string

        Error message

      • parameters array[object]

        Error parameters item

        Hide parameters attributes Show parameters attributes object

        Error parameters item

    • code integer

      Error code

    • parameters array[object]

      Error parameters item

      Hide parameters attributes Show parameters attributes object

      Error parameters item

    • trace string

      Stack trace

  • Unexpected error

    Hide response attributes Show response attributes object
    • message string Required

      Error message

    • errors array[object]

      Error details

      Hide errors attributes Show errors attributes object

      Error details

      • message string

        Error message

      • parameters array[object]

        Error parameters item

        Hide parameters attributes Show parameters attributes object

        Error parameters item

    • code integer

      Error code

    • parameters array[object]

      Error parameters item

      Hide parameters attributes Show parameters attributes object

      Error parameters item

    • trace string

      Stack trace

GET /V1/products/attributes/{attributeCode}/options
curl \
 -X GET https://magento2.winkelstraat.mac/rest/all/V1/products/attributes/{attributeCode}/options
Response examples (200)
[
  {
    "label": "string",
    "value": "string",
    "sort_order": 42,
    "is_default": true,
    "store_labels": [
      {
        "store_id": 42,
        "label": "string"
      }
    ]
  }
]
Response examples (400)
{
  "message": "string",
  "errors": [
    {
      "message": "string",
      "parameters": [
        {
          "resources": "string",
          "fieldName": "string",
          "fieldValue": "string"
        }
      ]
    }
  ],
  "code": 42,
  "parameters": [
    {
      "resources": "string",
      "fieldName": "string",
      "fieldValue": "string"
    }
  ],
  "trace": "string"
}
Response examples (default)
{
  "message": "string",
  "errors": [
    {
      "message": "string",
      "parameters": [
        {
          "resources": "string",
          "fieldName": "string",
          "fieldValue": "string"
        }
      ]
    }
  ],
  "code": 42,
  "parameters": [
    {
      "resources": "string",
      "fieldName": "string",
      "fieldValue": "string"
    }
  ],
  "trace": "string"
}