POST api/saveorder

save order in table

Request Information

URI Parameters

None.

Body Parameters

{"order_data":""}

oreder_data
NameDescriptionTypeAdditional information
user_id

integer

None.

id_branch

integer

None.

number_table

integer

None.

number_bill

integer

None.

order

Collection of order_details

None.

Request Formats

application/json, text/json

Sample:
{
  "user_id": 1,
  "id_branch": 2,
  "number_table": 3,
  "number_bill": 4,
  "order": [
    {
      "id_material": 1,
      "name_material": "sample string 2",
      "note": "sample string 3",
      "quantity": 4,
      "id_category": 5,
      "status": 6
    },
    {
      "id_material": 1,
      "name_material": "sample string 2",
      "note": "sample string 3",
      "quantity": 4,
      "id_category": 5,
      "status": 6
    }
  ]
}

text/xml

Sample:
<oreder_data xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/restaurant_api">
  <id_branch>2</id_branch>
  <number_bill>4</number_bill>
  <number_table>3</number_table>
  <order>
    <order_details>
      <id_category>5</id_category>
      <id_material>1</id_material>
      <name_material>sample string 2</name_material>
      <note>sample string 3</note>
      <quantity>4</quantity>
      <status>6</status>
    </order_details>
    <order_details>
      <id_category>5</id_category>
      <id_material>1</id_material>
      <name_material>sample string 2</name_material>
      <note>sample string 3</note>
      <quantity>4</quantity>
      <status>6</status>
    </order_details>
  </order>
  <user_id>1</user_id>
</oreder_data>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

{"data" [],"rowcount": 1,"status": true,"msg_error": ""}

outdata
NameDescriptionTypeAdditional information
data

DataTable

None.

rowcount

if get data then return count row else return the id row affected

integer

None.

status

boolean

None.

msg_error

string

None.

Response Formats

application/json, text/json

Sample:
{
  "data": null,
  "rowcount": 1,
  "status": true,
  "msg_error": "sample string 3"
}

text/xml

Sample:
<outdata xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/restaurant_api">
  <data i:nil="true" />
  <msg_error>sample string 3</msg_error>
  <rowcount>1</rowcount>
  <status>true</status>
</outdata>