POST api/order/Order/OrderDetail?orderID={orderID}&shouldCalculateTax={shouldCalculateTax}

Allows for the creation of a new order detail for the given order. Optionally allows overriding tax, volume and price information.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
orderID

The identifier of order to create the new product line.

integer

Required

shouldCalculateTax

When this flag is set to false the taxes won’t be recomputed as product of the addition of a new product. Optional. Default is true.

boolean

Default value is True

Body Parameters

OrderDetailWithOverridesViewModel
NameDescriptionTypeAdditional information
Quantity

The quantity of the order detail. Set quantity to zero will remove the product line from the order.

integer

None.

ProductID

The product identifier of the order detail.

string

None.

PriceTaxFields

Contains the price and tax fields to be overridden for the given order line. When this field is not instantiated it will use as default the values from the inventory configuration. If inventory item is a group item, the overridden values will be applied only to the parent item order detail and sub items will be zero out.

OrderDetailOverridenPriceTaxFields

None.

VolumeFields

Contains the volume fields to be overridden for the given order line. When this field is not instantiated it will use as default the values from the inventory configuration. If inventory item is a group item, the overridden values will be applied only to the parent item order detail and sub items will be zero out.

OrderDetailOverridenVolumeFields

None.

OtherPriceFields

Contains the other price fields to be overridden for the given order line. When this field is not instantiated it will use as default the values from the inventory configuration. If inventory item is a group item, the overridden values will be applied only to the parent item order detail and sub items will be zero out.

OrderDetailOverridenOtherPriceFields

None.

Misc

For any customizations, this holds the extra fields associated to customizations.

Collection of MiscFieldViewModel

None.

Request Formats

application/xml, text/xml

Sample:
<OrderDetailWithOverridesViewModel>
  <Quantity>1</Quantity>
  <ProductID>sample string 2</ProductID>
  <PriceTaxFields>
    <Price>1</Price>
    <TaxableAmount>2</TaxableAmount>
    <Tax>1</Tax>
  </PriceTaxFields>
  <VolumeFields>
    <Volume>1</Volume>
    <Volume2>2</Volume2>
    <Volume3>3</Volume3>
    <Volume4>4</Volume4>
  </VolumeFields>
  <OtherPriceFields>
    <OtherPrice>1</OtherPrice>
    <OtherPrice2>2</OtherPrice2>
    <OtherPrice3>3</OtherPrice3>
    <OtherPrice4>4</OtherPrice4>
  </OtherPriceFields>
  <Misc>
    <MiscFieldViewModel>
      <Name>sample string 1</Name>
      <Value>sample string 2</Value>
    </MiscFieldViewModel>
    <MiscFieldViewModel>
      <Name>sample string 1</Name>
      <Value>sample string 2</Value>
    </MiscFieldViewModel>
  </Misc>
</OrderDetailWithOverridesViewModel>

application/json, text/json

Sample:
{
  "Quantity": 1,
  "ProductID": "sample string 2",
  "PriceTaxFields": {
    "Price": 1.0,
    "TaxableAmount": 2.0,
    "Tax": 1.0
  },
  "VolumeFields": {
    "Volume": 1.0,
    "Volume2": 2.0,
    "Volume3": 3.0,
    "Volume4": 4.0
  },
  "OtherPriceFields": {
    "OtherPrice": 1.0,
    "OtherPrice2": 2.0,
    "OtherPrice3": 3.0,
    "OtherPrice4": 4.0
  },
  "Misc": [
    {
      "Name": "sample string 1",
      "Value": "sample string 2"
    },
    {
      "Name": "sample string 1",
      "Value": "sample string 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 'OrderDetailWithOverridesViewModel'.

Response Information

Resource Description

ApiResultOfOrderDetailViewModel
NameDescriptionTypeAdditional information
Result

OrderDetailViewModel

None.

IsSuccessful

boolean

None.

MessageTranslationKey

string

None.

Message

string

None.

Messages

Collection of ApiResultMessage

None.

Response Formats

application/xml, text/xml, application/json, text/json

Sample:

Sample not available.