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

Get option for configurable product

Path parameters

  • sku string Required
  • id integer Required

Responses

  • 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]
      Hide values attributes Show values attributes object

      Interface OptionValueInterface

      • 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
    Hide response attributes Show response attributes object
    • id integer
    • attribute_id string
    • label string
    • position integer
    • is_use_default boolean
    • values array[object]
      Hide values attributes Show values attributes object

      Interface OptionValueInterface

      • 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 Bad Request

    Hide response attributes Show response attributes object
    • message string Required

      Error message

    • errors array[object]

      Errors list

      Hide errors attributes Show errors attributes object

      Error details

      • message string

        Error message

      • parameters array[object]

        Error parameters list

        Hide parameters attributes Show parameters attributes object

        Error parameters item

        • 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 list

      Hide parameters attributes Show parameters attributes object

      Error parameters item

      • resources string

        ACL resource

      • fieldName string

        Missing or invalid field name

      • fieldValue string

        Incorrect field value

    • trace string

      Stack trace

    Hide response attributes Show response attributes object
    • message string Required

      Error message

    • errors array[object]

      Errors list

      Hide errors attributes Show errors attributes object

      Error details

      • message string

        Error message

      • parameters array[object]

        Error parameters list

        Hide parameters attributes Show parameters attributes object

        Error parameters item

        • 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 list

      Hide parameters attributes Show parameters attributes object

      Error parameters item

      • resources string

        ACL resource

      • fieldName string

        Missing or invalid field name

      • fieldValue string

        Incorrect field value

    • trace string

      Stack trace

  • Unexpected error

    Hide response attributes Show response attributes object
    • message string Required

      Error message

    • errors array[object]

      Errors list

      Hide errors attributes Show errors attributes object

      Error details

      • message string

        Error message

      • parameters array[object]

        Error parameters list

        Hide parameters attributes Show parameters attributes object

        Error parameters item

        • 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 list

      Hide parameters attributes Show parameters attributes object

      Error parameters item

      • resources string

        ACL resource

      • fieldName string

        Missing or invalid field name

      • fieldValue string

        Incorrect field value

    • trace string

      Stack trace

    Hide response attributes Show response attributes object
    • message string Required

      Error message

    • errors array[object]

      Errors list

      Hide errors attributes Show errors attributes object

      Error details

      • message string

        Error message

      • parameters array[object]

        Error parameters list

        Hide parameters attributes Show parameters attributes object

        Error parameters item

        • 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 list

      Hide parameters attributes Show parameters attributes object

      Error parameters item

      • 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 (200)
<?xml version="1.0" encoding="UTF-8"?>
<root>
  <id type="integer">42</id>
  <attribute-id>string</attribute-id>
  <label>string</label>
  <position type="integer">42</position>
  <is-use-default type="boolean">true</is-use-default>
  <values type="array">
    <value>
      <value-index>string</value-index>
      <extension-attributes>
      </extension-attributes>
    </value>
  </values>
  <extension-attributes>
  </extension-attributes>
  <product-id type="integer">42</product-id>
</root>
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 (400)
<?xml version="1.0" encoding="UTF-8"?>
<root>
  <message>string</message>
  <errors type="array">
    <error>
      <message>string</message>
      <parameters type="array">
        <parameter>
          <resources>string</resources>
          <fieldName>string</fieldName>
          <fieldValue>string</fieldValue>
        </parameter>
      </parameters>
    </error>
  </errors>
  <code type="integer">42</code>
  <parameters type="array">
    <parameter>
      <resources>string</resources>
      <fieldName>string</fieldName>
      <fieldValue>string</fieldValue>
    </parameter>
  </parameters>
  <trace>string</trace>
</root>
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"
}
Response examples (default)
<?xml version="1.0" encoding="UTF-8"?>
<root>
  <message>string</message>
  <errors type="array">
    <error>
      <message>string</message>
      <parameters type="array">
        <parameter>
          <resources>string</resources>
          <fieldName>string</fieldName>
          <fieldValue>string</fieldValue>
        </parameter>
      </parameters>
    </error>
  </errors>
  <code type="integer">42</code>
  <parameters type="array">
    <parameter>
      <resources>string</resources>
      <fieldName>string</fieldName>
      <fieldValue>string</fieldValue>
    </parameter>
  </parameters>
  <trace>string</trace>
</root>