POST api/Order

Request Information

URI Parameters

None.

Body Parameters

OrderPost
NameDescriptionTypeAdditional information
CustomerId

integer

None.

CustomerEmail

string

None.

RequestDate

string

None.

Comment

string

None.

OrderItems

Collection of OrderItem

None.

Request Formats

application/json, text/json

Sample:
{
  "OrderItems": [
    {
      "ProductId": 1,
      "Qty": 2,
      "Qty2": 3.1
    },
    {
      "ProductId": 1,
      "Qty": 2,
      "Qty2": 3.1
    }
  ],
  "CustomerId": 1,
  "CustomerEmail": "sample string 1",
  "RequestDate": "sample string 2",
  "Comment": "sample string 3"
}

application/xml, text/xml

Sample:
<OrderPost xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/NikasB2BWebAPI.Models">
  <Comment>sample string 3</Comment>
  <CustomerEmail>sample string 1</CustomerEmail>
  <CustomerId>1</CustomerId>
  <OrderItems>
    <OrderItem>
      <ProductId>1</ProductId>
      <Qty>2</Qty>
      <Qty2>3.1</Qty2>
    </OrderItem>
    <OrderItem>
      <ProductId>1</ProductId>
      <Qty>2</Qty>
      <Qty2>3.1</Qty2>
    </OrderItem>
  </OrderItems>
  <RequestDate>sample string 2</RequestDate>
</OrderPost>

application/x-www-form-urlencoded

Sample:

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

Response Information

Resource Description

integer

Response Formats

application/json, text/json

Sample:
1

application/xml, text/xml

Sample:
<int xmlns="http://schemas.microsoft.com/2003/10/Serialization/">1</int>