订单价格计算
简要描述:
- 此接口用于在下单前进行订单价格计算,显示包含运费、策略优惠等一切可能影响价格的因素,最终订单需要实付的价格。
请求URL:
- 沙箱环境
http://api.mall.sandbox.yhsms.com.cn/Mall/Trade/TradeService.svc/GetTradeContract - 生产环境
http://api.mall.yhsms.com.cn/Mall/Trade/TradeService.svc/GetTradeContract
请求方式:
- POST
参数:
| 参数名 | 必选 | 类型 | 说明 |
|---|---|---|---|
| PlatformID | 是 | string | YHDT号 |
| UID | 是 | string | 益华云用户UID,指明该笔交易所属用户,会员UID获取方法,非会员付款,请使用游客UID,获取方法。 |
| UserAccessToken | 是 | string | 用户级接口访问Token |
| ParamObject | 是 | string | 订单JSON数据,结构参见下方说明 |
- ParamObject,订单数据结构说明
| JSON节点名 | 类型 | 必选 | 说明 |
|---|---|---|---|
| TotalMoney | decimal | 是 | 订单总价(商品总金额+运费) |
| SumPrice | decimal | 是 | 订单商品总金额 |
| TradeSource | String(32) | 是 | 订单来源(详见下方对照) |
| TradeType | String(32) | 是 | 订单类型(详见下方对照) |
| ProvinceID | String(32) | 否 | 收货人省份代码 |
| CityID | String(32) | 否 | 收货人城市代码 |
| DistrictID | String(32) | 否 | 收货人区划代码 |
| BuyerName | String(32) | 否 | 收货人姓名 |
| BuyerAddress | String(256) | 否 | 收货人详细地址 |
| BuyerPhone | String(32) | 否 | 收货人电话 |
| PostageTempletID | String(32) | 是 | 邮费模板ID |
| Remark | String(512) | 否 | 订单备注 |
| PayBonus | int | 否 | 订单需支付积分数 |
| StationID | String(32) | 是 | 订单所属站点ID |
| TradeGoods | String(MAX) | 是 | 订单商品明细(详见下方说明) |
- TradeSource,订单来源说明
| 传值 | 类型 | 说明 |
|---|---|---|
| TS_WX | String(32) | 微信服务号 |
| TS_APP | String(32) | 移动端 |
| TS_WEB | String(32) | PC端 |
| TS_SHOP_POS | String(32) | 门店零售终端 |
| TS_MOBILE_POS | String(32) | 手机收银终端 |
| TS_ERP_CARD | String(32) | ERP办卡 |
| TS_PUT_CARD | String(32) | 卡券类商品自动投放 |
| TS_BOOKQUERY | String(32) | 查询机 |
| TS_VENDING_MACHINE | String(32) | 自动售货机 |
返回示例
{
"Code": "0",
"Method": 0,
"Compressed": false,
"Encrypted": false,
"Message": {
"Trade": {
"UserConfigID": null,
"ExchangeBonus": 0,
"ExchangeCash": 0,
"GoodsList": null,
"CardList": null,
"TradeGoods": null,
"OptionalContractIDList": null,
"SalesmanMobilePhone": null,
"SerialNumber": null,
"TradeID": null,
"TradeType": "Fixed",
"OriginalMoney": 68,
"TotalMoney": 59.64,
"SumPrice": 59.64,
"ContractFeeBefore": 8.36,
"ContractFee": 0,
"OtherFee": 0,
"OptionalContractPrice": 0,
"PayBonus": 0,
"DetailCount": 0,
"Freight": 0,
"FreightRefundStatus": 0,
"CommissionRate": 0,
"CommissionMoney": 0,
"FactMoney": 0,
"Status": null,
"OuterStatus": null,
"CompleteTime": "1900-01-01T00:00:00",
"LockStatus": 0,
"LockBeginTime": "1900-01-01T00:00:00",
"LockEndTime": "1900-01-01T00:00:00",
"LockUserID": null,
"LockUserName": null,
"LockTime": "1900-01-01T00:00:00",
"Delay": 0,
"DelayTime": "1900-01-01T00:00:00",
"DelayStatus": false,
"DisableContract": false,
"SellerName": null,
"SellerAddress": null,
"SellerPhone": null,
"ProvinceID": "120000",
"CityID": "120100",
"DistrictID": "120102",
"BuyerAddress": "建设路190号",
"BuyerName": "洪森首席神经病",
"BuyerPhone": "13764167673",
"ZipCode": null,
"UserID": null,
"UID": "b40e90406ffb49d182c79e99a4e7d463",
"Payment": 0,
"PayStatus": 0,
"PayTime": "1900-01-01T00:00:00",
"AuditStatus": 0,
"AuditTime": "1900-01-01T00:00:00",
"RefundFee": 0,
"RefundStatus": 0,
"RefundTime": "1900-01-01T00:00:00",
"ReCargoStatus": 0,
"ReCargoTime": "1900-01-01T00:00:00",
"CancelRole": 0,
"CancelType": 0,
"CancelReason": null,
"CancelTime": "1900-01-01T00:00:00",
"ExpressName": null,
"ExpressUrl": null,
"ExpressNO": null,
"DeliveryUserID": null,
"DeliveryUserName": null,
"DeliveryTime": "1900-01-01T00:00:00",
"AcceptUserID": null,
"AcceptUserName": null,
"AcceptTime": "1900-01-01T00:00:00",
"EndTime": "1900-01-01T00:00:00",
"RevertedTime": "1900-01-01T00:00:00",
"TradeSource": "TS_WX",
"Remark": "",
"CreateTime": "1900-01-01T00:00:00",
"UpdateTime": "1900-01-01T00:00:00",
"OuterID": null,
"PostageTempletID": "0",
"StationID": "B67C2C23685746C5BA101236BAC83DF4",
"BonusExchangeRate": 0,
"BonusExchangeCashPercent": 0,
"BonusExchangeCashPoints": 0,
"GiveBonus": 0,
"IsPrint": 0,
"SaleUID": null,
"ReceiptID": null,
"ErpTradeID": null,
"PayChannel": null,
"ReductionFee": 0,
"InstalmentTempletID": "",
"ExecuteContractJson": "",
"ContractCardBatchJson": "",
"Data": {
"OptionalContractIDList": []
},
"PlatformID": "B67C2C23685746C5BA101236BAC83DF4",
"PostageTempletName": null,
"DeliveryFree": false,
"LastReductionAmount": 0,
"SellerCategoryReduction": null,
"IsFirstTradeContract": false,
"IsTradeGoodsPrice": false,
"ContractBase": 59.64,
"OnlinePayment": true,
"COD": false,
"TradeReported": false,
"ConfigID": null,
"LateFee": 0
},
"TradeGoodsList": [
{
"TradeID": null,
"GoodsID": "6283876348926627840",
"GoodsName": "古典家具收藏投资购买宝典",
"PayMode": "PM_CASH",
"Price": 59.64,
"OldPrice": 68,
"ContractFeeItem": 0,
"ReductionFeeItem": 0,
"OtherFeeItem": 0,
"Bonus": 0,
"GoodsNumber": 1,
"ImageUrl": {
"ThumbUrl": [
{
"Type": "Picture",
"Sort": 1,
"Url": "http://yh-bj-mall.oss-cn-beijing.aliyuncs.com/NoPicture.png"
}
],
"LogoUrl": [
{
"Type": "Picture",
"Sort": 1,
"Url": "http://yh-bj-mall.oss-cn-beijing.aliyuncs.com/NoPicture.png"
}
],
"MallUrl": [
{
"Type": "Picture",
"Sort": 1,
"Url": "http://yh-bj-mall.oss-cn-beijing.aliyuncs.com/NoPicture.png"
}
],
"MallQuery": [
{
"Type": "Picture",
"Sort": 1,
"Url": "http://yh-bj-mall.oss-cn-beijing.aliyuncs.com/NoPicture.png"
}
],
"DetailUrl": [
{
"Type": "Picture",
"Sort": 1,
"Url": "http://yh-bj-mall.oss-cn-beijing.aliyuncs.com/NoPicture.png"
}
]
},
"Remark": null,
"OuterID": null,
"CreateTime": "0001-01-01T00:00:00",
"InstalmentTempletID": "",
"SellerCategoryID": "00020002",
"ReductionAmount": 0,
"ContractFeeBeforeItem": 8.36
}
],
"UsedContractList": []
}
}返回参数说明
| 参数名 | 类型 | 说明 |
|---|---|---|
| TotalMoney | decimal | 订单总价 |
备注
- 更多返回错误代码请看首页的错误代码描述
文档更新时间: 2020-01-02 18:37 作者:张国伟