POST api/inventory/KitBuilder/Validate

Validates kit selection before adding to cart

Request Information

URI Parameters

None.

Body Parameters

Kit validation request

KitValidationRequest
NameDescriptionTypeAdditional information
KitConfigurationID

integer

None.

Selections

Collection of KitSelectionItemRequest

None.

Request Formats

application/xml, text/xml

Sample:
<KitValidationRequest>
  <KitConfigurationID>1</KitConfigurationID>
  <Selections>
    <KitSelectionItemRequest>
      <StepID>1</StepID>
      <InventoryID>2</InventoryID>
      <Quantity>3</Quantity>
      <AttributeSelections>
        <PropertySelection>
          <PropertyID>1</PropertyID>
          <PropertyValueID>2</PropertyValueID>
        </PropertySelection>
        <PropertySelection>
          <PropertyID>1</PropertyID>
          <PropertyValueID>2</PropertyValueID>
        </PropertySelection>
      </AttributeSelections>
    </KitSelectionItemRequest>
    <KitSelectionItemRequest>
      <StepID>1</StepID>
      <InventoryID>2</InventoryID>
      <Quantity>3</Quantity>
      <AttributeSelections>
        <PropertySelection>
          <PropertyID>1</PropertyID>
          <PropertyValueID>2</PropertyValueID>
        </PropertySelection>
        <PropertySelection>
          <PropertyID>1</PropertyID>
          <PropertyValueID>2</PropertyValueID>
        </PropertySelection>
      </AttributeSelections>
    </KitSelectionItemRequest>
  </Selections>
</KitValidationRequest>

application/json, text/json

Sample:
{
  "KitConfigurationID": 1,
  "Selections": [
    {
      "StepID": 1,
      "InventoryID": 2,
      "Quantity": 3,
      "AttributeSelections": [
        {
          "PropertyID": 1,
          "PropertyValueID": 2
        },
        {
          "PropertyID": 1,
          "PropertyValueID": 2
        }
      ]
    },
    {
      "StepID": 1,
      "InventoryID": 2,
      "Quantity": 3,
      "AttributeSelections": [
        {
          "PropertyID": 1,
          "PropertyValueID": 2
        },
        {
          "PropertyID": 1,
          "PropertyValueID": 2
        }
      ]
    }
  ]
}

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'FormUrlEncodedFormatter' to write type 'KitValidationRequest'.

Response Information

Resource Description

Validation result

KitValidationResponse
NameDescriptionTypeAdditional information
IsValid

boolean

None.

Errors

Collection of string

None.

StepResults

Collection of KitValidationStepResponse

None.

Response Formats

application/xml, text/xml

Sample:
<KitValidationResponse>
  <IsValid>True</IsValid>
  <Errors>
    <String>sample string 1</String>
    <String>sample string 2</String>
  </Errors>
  <StepResults>
    <KitValidationStepResponse>
      <StepID>1</StepID>
      <IsValid>True</IsValid>
      <ErrorMessage>sample string 3</ErrorMessage>
    </KitValidationStepResponse>
    <KitValidationStepResponse>
      <StepID>1</StepID>
      <IsValid>True</IsValid>
      <ErrorMessage>sample string 3</ErrorMessage>
    </KitValidationStepResponse>
  </StepResults>
</KitValidationResponse>

application/json, text/json

Sample:
{
  "IsValid": true,
  "Errors": [
    "sample string 1",
    "sample string 2"
  ],
  "StepResults": [
    {
      "StepID": 1,
      "IsValid": true,
      "ErrorMessage": "sample string 3"
    },
    {
      "StepID": 1,
      "IsValid": true,
      "ErrorMessage": "sample string 3"
    }
  ]
}