POST api/student/saveorder

Request Information

URI Parameters

None.

Body Parameters

OrderPara
NameDescriptionTypeAdditional information
Years

integer

None.

Session

integer

None.

StudentNo

string

None.

TotalAmount

decimal number

None.

lsGood

Collection of GoodPara

None.

lsRegGood

Collection of RegGoodPara

None.

Request Formats

application/json, text/json

Sample:
{
  "Years": 1,
  "Session": 2,
  "StudentNo": "sample string 3",
  "TotalAmount": 4.0,
  "lsGood": [
    {
      "ProductId": "sample string 1",
      "ProductName": "sample string 2",
      "StandardPrice": 3.0,
      "ShouldPayPrice": 4.0
    },
    {
      "ProductId": "sample string 1",
      "ProductName": "sample string 2",
      "StandardPrice": 3.0,
      "ShouldPayPrice": 4.0
    }
  ],
  "lsRegGood": [
    {
      "ProductId": "sample string 1",
      "ProductName": "sample string 2",
      "StandardPrice": 3.0,
      "ShouldPayPrice": 4.0
    },
    {
      "ProductId": "sample string 1",
      "ProductName": "sample string 2",
      "StandardPrice": 3.0,
      "ShouldPayPrice": 4.0
    }
  ]
}

application/xml, text/xml

Sample:
<OrderPara xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SecSchoolWebApi.Models">
  <Session>2</Session>
  <StudentNo>sample string 3</StudentNo>
  <TotalAmount>4</TotalAmount>
  <Years>1</Years>
  <lsGood>
    <GoodPara>
      <ProductId>sample string 1</ProductId>
      <ProductName>sample string 2</ProductName>
      <ShouldPayPrice>4</ShouldPayPrice>
      <StandardPrice>3</StandardPrice>
    </GoodPara>
    <GoodPara>
      <ProductId>sample string 1</ProductId>
      <ProductName>sample string 2</ProductName>
      <ShouldPayPrice>4</ShouldPayPrice>
      <StandardPrice>3</StandardPrice>
    </GoodPara>
  </lsGood>
  <lsRegGood>
    <RegGoodPara>
      <ProductId>sample string 1</ProductId>
      <ProductName>sample string 2</ProductName>
      <ShouldPayPrice>4</ShouldPayPrice>
      <StandardPrice>3</StandardPrice>
    </RegGoodPara>
    <RegGoodPara>
      <ProductId>sample string 1</ProductId>
      <ProductName>sample string 2</ProductName>
      <ShouldPayPrice>4</ShouldPayPrice>
      <StandardPrice>3</StandardPrice>
    </RegGoodPara>
  </lsRegGood>
</OrderPara>

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

Response Information

Resource Description

HttpResponseMessage
NameDescriptionTypeAdditional information
Version

Version

None.

Content

HttpContent

None.

StatusCode

HttpStatusCode

None.

ReasonPhrase

string

None.

Headers

Collection of Object

None.

RequestMessage

HttpRequestMessage

None.

IsSuccessStatusCode

boolean

None.