POST api/order/OnlineOrderDetail?onlineOrderId={onlineOrderId}&shouldCalculateTax={shouldCalculateTax}&relationshipGroupID={relationshipGroupID}&sourceProgrammingKey={sourceProgrammingKey}

Request Information

URI Parameters

NameDescriptionTypeAdditional information
onlineOrderId

The online order Id.

integer

Required

shouldCalculateTax

Denotes whether or not tax should be re-calculated.

boolean

Default value is True

relationshipGroupID

Specified if this item should be added as part of a relationship group

integer

None.

sourceProgrammingKey

Allows to specify if the item was added by a 3rd party

string

None.

Body Parameters

NewOnlineOrderDetailWithOverridesViewModel
NameDescriptionTypeAdditional information
Quantity

The quantity of the product to be added.

integer

Required

ProductID

The product that should be added.

string

Required

OverriddenFields

Any fields that should be overwritten (Price, etc.).

OnlineOrderDetailOverriddenFields

None.

Misc

For any customization, misc fields can be appended here.

Collection of MiscFieldViewModel

None.

ForceSeparate

If you want a separate line item for this product, mark this so they are forced to be created separately.

boolean

None.

Request Formats

application/xml, text/xml

Sample:
<NewOnlineOrderDetailWithOverridesViewModel>
  <Quantity>1</Quantity>
  <ProductID>sample string 2</ProductID>
  <OverriddenFields>
    <Price>1</Price>
    <Volume>1</Volume>
    <Volume2>1</Volume2>
    <Volume3>1</Volume3>
    <Volume4>1</Volume4>
    <OtherPrice>1</OtherPrice>
    <OtherPrice2>1</OtherPrice2>
    <OtherPrice3>1</OtherPrice3>
    <OtherPrice4>1</OtherPrice4>
    <TaxableAmount>1</TaxableAmount>
    <Tax>1</Tax>
  </OverriddenFields>
  <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>
  <ForceSeparate>True</ForceSeparate>
</NewOnlineOrderDetailWithOverridesViewModel>

application/json, text/json

Sample:
{
  "Quantity": 1,
  "ProductID": "sample string 2",
  "OverriddenFields": {
    "Price": 1.0,
    "Volume": 1.0,
    "Volume2": 1.0,
    "Volume3": 1.0,
    "Volume4": 1.0,
    "OtherPrice": 1.0,
    "OtherPrice2": 1.0,
    "OtherPrice3": 1.0,
    "OtherPrice4": 1.0,
    "TaxableAmount": 1.0,
    "Tax": 1.0
  },
  "Misc": [
    {
      "Name": "sample string 1",
      "Value": "sample string 2"
    },
    {
      "Name": "sample string 1",
      "Value": "sample string 2"
    }
  ],
  "ForceSeparate": true
}

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 'NewOnlineOrderDetailWithOverridesViewModel'.

Response Information

Resource Description

IHttpActionResult

None.

Response Formats

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

Sample:

Sample not available.