POST api/inventory/KitBuilder/CalculatePrice

PD-6563: Calculates kit price including server-side promotion discounts. Client sends step selections (InventoryIDs per step) — no dollar amounts. Server resolves prices from InventoryPrices using the rep/customer rank price type, applies promotion rules, and returns the discount breakdown.

Request Information

URI Parameters

None.

Body Parameters

KitPriceCalculationRequest
NameDescriptionTypeAdditional information
KitInventoryID

integer

None.

RepDID

Rep DID for rank-price-type resolution (same as Configuration endpoint).

string

None.

OrderType

Order type for rank-price-type resolution ("R" or "C").

string

None.

CartConfigurationID

integer

None.

StepSelections

One entry per step: which inventory IDs the customer selected.

Collection of KitStepSelectionRequest

None.

Request Formats

application/xml, text/xml

Sample:
<KitPriceCalculationRequest>
  <KitInventoryID>1</KitInventoryID>
  <RepDID>sample string 2</RepDID>
  <OrderType>sample string 3</OrderType>
  <CartConfigurationID>4</CartConfigurationID>
  <StepSelections>
    <KitStepSelectionRequest>
      <StepID>1</StepID>
      <InventoryIDs>
        <Int32>1</Int32>
        <Int32>2</Int32>
      </InventoryIDs>
    </KitStepSelectionRequest>
    <KitStepSelectionRequest>
      <StepID>1</StepID>
      <InventoryIDs>
        <Int32>1</Int32>
        <Int32>2</Int32>
      </InventoryIDs>
    </KitStepSelectionRequest>
  </StepSelections>
</KitPriceCalculationRequest>

application/json, text/json

Sample:
{
  "KitInventoryID": 1,
  "RepDID": "sample string 2",
  "OrderType": "sample string 3",
  "CartConfigurationID": 4,
  "StepSelections": [
    {
      "StepID": 1,
      "InventoryIDs": [
        1,
        2
      ]
    },
    {
      "StepID": 1,
      "InventoryIDs": [
        1,
        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 'KitPriceCalculationRequest'.

Response Information

Resource Description

KitPriceCalculationResponse
NameDescriptionTypeAdditional information
KitLevelDiscount

decimal number

None.

DiscountedSteps

Collection of KitDiscountedStepResponse

None.

Response Formats

application/xml, text/xml

Sample:
<KitPriceCalculationResponse>
  <KitLevelDiscount>1</KitLevelDiscount>
  <DiscountedSteps>
    <KitDiscountedStepResponse>
      <StepID>1</StepID>
      <DiscountAmount>2</DiscountAmount>
    </KitDiscountedStepResponse>
    <KitDiscountedStepResponse>
      <StepID>1</StepID>
      <DiscountAmount>2</DiscountAmount>
    </KitDiscountedStepResponse>
  </DiscountedSteps>
</KitPriceCalculationResponse>

application/json, text/json

Sample:
{
  "KitLevelDiscount": 1.0,
  "DiscountedSteps": [
    {
      "StepID": 1,
      "DiscountAmount": 2.0
    },
    {
      "StepID": 1,
      "DiscountAmount": 2.0
    }
  ]
}