POST api/Orders/CalculatePrice

Request Information

URI Parameters

None.

Body Parameters

CalculatePriceViewModel
NameDescriptionTypeAdditional information
OrderDetailList

Collection of OrderDetailViewModel

None.

SendExpress

boolean

None.

Request Formats

application/json, text/json

Sample:
{
  "OrderDetailList": [
    {
      "ProductId": "bd28715b-0d25-47a1-9767-499f0e0073d6",
      "ProductTypeId": "1bacd612-b28a-4a1a-9f45-b47cae74ccae",
      "Count": 3
    },
    {
      "ProductId": "bd28715b-0d25-47a1-9767-499f0e0073d6",
      "ProductTypeId": "1bacd612-b28a-4a1a-9f45-b47cae74ccae",
      "Count": 3
    }
  ],
  "SendExpress": true
}

text/html

Sample:
{"OrderDetailList":[{"ProductId":"bd28715b-0d25-47a1-9767-499f0e0073d6","ProductTypeId":"1bacd612-b28a-4a1a-9f45-b47cae74ccae","Count":3},{"ProductId":"bd28715b-0d25-47a1-9767-499f0e0073d6","ProductTypeId":"1bacd612-b28a-4a1a-9f45-b47cae74ccae","Count":3}],"SendExpress":true}

application/xml, text/xml

Sample:
<CalculatePriceViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Fruta.ViewModels">
  <OrderDetailList>
    <OrderDetailViewModel>
      <Count>3</Count>
      <ProductId>bd28715b-0d25-47a1-9767-499f0e0073d6</ProductId>
      <ProductTypeId>1bacd612-b28a-4a1a-9f45-b47cae74ccae</ProductTypeId>
    </OrderDetailViewModel>
    <OrderDetailViewModel>
      <Count>3</Count>
      <ProductId>bd28715b-0d25-47a1-9767-499f0e0073d6</ProductId>
      <ProductTypeId>1bacd612-b28a-4a1a-9f45-b47cae74ccae</ProductTypeId>
    </OrderDetailViewModel>
  </OrderDetailList>
  <SendExpress>true</SendExpress>
</CalculatePriceViewModel>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

CalculatePriceOutputViewModel
NameDescriptionTypeAdditional information
Payable

decimal number

None.

ShippingCost

decimal number

None.

Tax

decimal number

None.

Discount

decimal number

None.

Response Formats

application/json, text/json

Sample:
{
  "Payable": 1.0,
  "ShippingCost": 2.0,
  "Tax": 3.0,
  "Discount": 4.0
}

text/html

Sample:
{"Payable":1.0,"ShippingCost":2.0,"Tax":3.0,"Discount":4.0}

application/xml, text/xml

Sample:
<CalculatePriceOutputViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Fruta.ViewModels">
  <Discount>4</Discount>
  <Payable>1</Payable>
  <ShippingCost>2</ShippingCost>
  <Tax>3</Tax>
</CalculatePriceOutputViewModel>