POST api/customer/order/CreateFromShoppingCart
从购物车下单
Request Information
URI Parameters
None.
Body Parameters
下单参数
CreateOrderFromShoppingCartModel| Name | Description | Type | Additional information |
|---|---|---|---|
| SalesNo |
卖手编号 |
string |
None. |
| CustomerAddressId |
用户的地址id |
integer |
None. |
| ShoppingCartIds |
所有的购物车id |
Collection of integer |
None. |
| PayType |
结算方式 |
CustomerPayType |
None. |
Request Formats
application/json, text/json
Sample:
{
"SalesNo": "sample string 1",
"CustomerAddressId": 2,
"ShoppingCartIds": [
1,
2
],
"PayType": 0
}
application/xml, text/xml
Sample:
<CreateOrderFromShoppingCartModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ViewModel.Api.Customer">
<CustomerAddressId>2</CustomerAddressId>
<PayType>Direct</PayType>
<SalesNo>sample string 1</SalesNo>
<ShoppingCartIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:int>1</d2p1:int>
<d2p1:int>2</d2p1:int>
</ShoppingCartIds>
</CreateOrderFromShoppingCartModel>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
订单id
ResponseOfInt32| Name | Description | Type | Additional information |
|---|---|---|---|
| data | integer |
None. |
|
| errcode |
错误码,默认为成功:SUCCESS |
string |
None. |
| errmsg |
错误信息,默认为:成功 |
string |
None. |
Response Formats
application/json, text/json
Sample:
{
"data": 1,
"errcode": "sample string 2",
"errmsg": "sample string 3"
}
application/xml, text/xml
Sample:
<ResponseOfint xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Infrastructure.WebApi"> <errcode>sample string 2</errcode> <errmsg>sample string 3</errmsg> <data>1</data> </ResponseOfint>