POST api/Orders/AddOrder

Request Information

URI Parameters

None.

Body Parameters

OrderViewModel
NameDescriptionTypeAdditional information
AddressId

globally unique identifier

None.

TimeId

globally unique identifier

None.

SendDate

date

None.

Description

string

None.

SendExpress

boolean

None.

OrderDetailList

Collection of OrderDetailViewModel

None.

Request Formats

application/json, text/json

Sample:
{
  "AddressId": "ee20a292-5c79-402b-b9bf-807519e083a8",
  "TimeId": "155aa715-04cc-44d0-8dec-345e29564b1e",
  "SendDate": "2019-06-27T15:48:24.3965925+04:30",
  "Description": "sample string 2",
  "SendExpress": true,
  "OrderDetailList": [
    {
      "ProductId": "005c3bc7-ae1d-40e5-b9c9-8b10c48b2408",
      "ProductTypeId": "11a7c9e0-d6ca-413f-89dd-d12aa9fd1da0",
      "Count": 3
    },
    {
      "ProductId": "005c3bc7-ae1d-40e5-b9c9-8b10c48b2408",
      "ProductTypeId": "11a7c9e0-d6ca-413f-89dd-d12aa9fd1da0",
      "Count": 3
    }
  ]
}

text/html

Sample:
{"AddressId":"ee20a292-5c79-402b-b9bf-807519e083a8","TimeId":"155aa715-04cc-44d0-8dec-345e29564b1e","SendDate":"2019-06-27T15:48:24.3965925+04:30","Description":"sample string 2","SendExpress":true,"OrderDetailList":[{"ProductId":"005c3bc7-ae1d-40e5-b9c9-8b10c48b2408","ProductTypeId":"11a7c9e0-d6ca-413f-89dd-d12aa9fd1da0","Count":3},{"ProductId":"005c3bc7-ae1d-40e5-b9c9-8b10c48b2408","ProductTypeId":"11a7c9e0-d6ca-413f-89dd-d12aa9fd1da0","Count":3}]}

application/xml, text/xml

Sample:
<OrderViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Fruta.ViewModels">
  <AddressId>ee20a292-5c79-402b-b9bf-807519e083a8</AddressId>
  <Description>sample string 2</Description>
  <OrderDetailList>
    <OrderDetailViewModel>
      <Count>3</Count>
      <ProductId>005c3bc7-ae1d-40e5-b9c9-8b10c48b2408</ProductId>
      <ProductTypeId>11a7c9e0-d6ca-413f-89dd-d12aa9fd1da0</ProductTypeId>
    </OrderDetailViewModel>
    <OrderDetailViewModel>
      <Count>3</Count>
      <ProductId>005c3bc7-ae1d-40e5-b9c9-8b10c48b2408</ProductId>
      <ProductTypeId>11a7c9e0-d6ca-413f-89dd-d12aa9fd1da0</ProductTypeId>
    </OrderDetailViewModel>
  </OrderDetailList>
  <SendDate>2019-06-27T15:48:24.3965925+04:30</SendDate>
  <SendExpress>true</SendExpress>
  <TimeId>155aa715-04cc-44d0-8dec-345e29564b1e</TimeId>
</OrderViewModel>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

OrderPaymentOutViewModel
NameDescriptionTypeAdditional information
OrderId

globally unique identifier

None.

OrderNumber

integer

None.

RedirectUrl

string

None.

Response Formats

application/json, text/json

Sample:
{
  "OrderId": "f71dd07b-d0e6-4e1e-ac7f-a6ee7811c826",
  "OrderNumber": 2,
  "RedirectUrl": "sample string 3"
}

text/html

Sample:
{"OrderId":"f71dd07b-d0e6-4e1e-ac7f-a6ee7811c826","OrderNumber":2,"RedirectUrl":"sample string 3"}

application/xml, text/xml

Sample:
<OrderPaymentOutViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Fruta.ViewModels">
  <OrderId>f71dd07b-d0e6-4e1e-ac7f-a6ee7811c826</OrderId>
  <OrderNumber>2</OrderNumber>
  <RedirectUrl>sample string 3</RedirectUrl>
</OrderPaymentOutViewModel>