Get option for configurable product

GET /V1/configurable-products/{sku}/options/{id}

Get option for configurable product

Path parameters

  • sku string Required
  • id integer Required

Responses

  • 200

    200 Success.

    Hide response attributes Show response attributes object
    • id integer
    • attribute_id string
    • label string
    • position integer
    • is_use_default boolean
    • values array[object]

      Interface OptionValueInterface

      Interface OptionValueInterface

      Hide values attributes Show values attributes object
      • value_index string Required
      • extension_attributes object

        ExtensionInterface class for @see \Magento\ConfigurableProduct\Api\Data\OptionValueInterface

    • extension_attributes object

      ExtensionInterface class for @see \Magento\ConfigurableProduct\Api\Data\OptionInterface

    • product_id integer
  • 400

    400 Bad Request

    Hide response attributes Show response attributes object
    • message string Required

      Error message

    • errors array[object]

      Error details

      Error details

      Hide errors attributes Show errors attributes object
      • message string

        Error message

      • parameters array[object]

        Error parameters item

        Error parameters item

        Hide parameters attributes Show parameters attributes object
        • resources string

          ACL resource

        • fieldName string

          Missing or invalid field name

        • fieldValue string

          Incorrect field value

    • code integer

      Error code

    • parameters array[object]

      Error parameters item

      Error parameters item

      Hide parameters attributes Show parameters attributes object
      • resources string

        ACL resource

      • fieldName string

        Missing or invalid field name

      • fieldValue string

        Incorrect field value

    • trace string

      Stack trace

  • default

    Unexpected error

    Hide response attributes Show response attributes object
    • message string Required

      Error message

    • errors array[object]

      Error details

      Error details

      Hide errors attributes Show errors attributes object
      • message string

        Error message

      • parameters array[object]

        Error parameters item

        Error parameters item

        Hide parameters attributes Show parameters attributes object
        • resources string

          ACL resource

        • fieldName string

          Missing or invalid field name

        • fieldValue string

          Incorrect field value

    • code integer

      Error code

    • parameters array[object]

      Error parameters item

      Error parameters item

      Hide parameters attributes Show parameters attributes object
      • resources string

        ACL resource

      • fieldName string

        Missing or invalid field name

      • fieldValue string

        Incorrect field value

    • trace string

      Stack trace

GET /V1/configurable-products/{sku}/options/{id}
curl \
 --request GET 'https://magento2.winkelstraat.mac/rest/all/V1/configurable-products/{sku}/options/{id}'
Response examples (200)
{
  "id": 42,
  "attribute_id": "string",
  "label": "string",
  "position": 42,
  "is_use_default": true,
  "values": [
    {
      "value_index": "string",
      "extension_attributes": {}
    }
  ],
  "extension_attributes": {},
  "product_id": 42
}
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"
}