POST api/save_order
save order
Request Information
URI Parameters
None.
Body Parameters
{order,"token":""}
order| Name | Description | Type | Additional information |
|---|---|---|---|
| country | integer |
None. |
|
| city | integer |
None. |
|
| town | integer |
None. |
|
| ziporder | string |
None. |
|
| iduser | integer |
None. |
|
| address | string |
None. |
|
| note | string |
None. |
|
| token | string |
None. |
|
| details | Collection of order_details |
None. |
Request Formats
application/json, text/json
Sample:
{
"country": 1,
"city": 2,
"town": 3,
"ziporder": "sample string 4",
"iduser": 5,
"address": "sample string 6",
"note": "sample string 7",
"token": "sample string 8",
"details": [
{
"proudect_id": 1,
"quntity": 2,
"note": "sample string 3"
},
{
"proudect_id": 1,
"quntity": 2,
"note": "sample string 3"
}
]
}
text/xml
Sample:
<order xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Zad_api">
<address>sample string 6</address>
<city>2</city>
<country>1</country>
<details>
<order_details>
<note>sample string 3</note>
<proudect_id>1</proudect_id>
<quntity>2</quntity>
</order_details>
<order_details>
<note>sample string 3</note>
<proudect_id>1</proudect_id>
<quntity>2</quntity>
</order_details>
</details>
<iduser>5</iduser>
<note>sample string 7</note>
<token>sample string 8</token>
<town>3</town>
<ziporder>sample string 4</ziporder>
</order>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
{"data" [],"rowcount": 1,"status": true,"msg_error": ""}
outdata| Name | Description | Type | Additional 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/Zad_api"> <data i:nil="true" /> <msg_error>sample string 3</msg_error> <rowcount>1</rowcount> <status>true</status> </outdata>