Authored by liqingzhong
... ... @@ -53,10 +53,12 @@
|||订单列表-退换货信息|order.degrade.list.changeRefund.enable|2
|||订单列表-yohood门票|order.degrade.list.yohood.enable|1
|order.submitShopping||下单|||
|||下单-加价购|order.degrade.submit.addPrice|1
|||下单-货到付款限制|order.degrade.submit.codLimit|1
|||下单-下单限制|order.degrade.submit.limit|1
|||下单-加价购|order.degrade.submit.addPrice.enable|1
|||下单-货到付款限制|order.degrade.submit.codLimit.enable|1
|||下单-下单限制|order.degrade.submit.limit.enable|1
|__Gateway资源位__|||
|/operations/api/v5/version/getVersion||获取APP版本升级提醒|gateway.degrade.resources.getVersion.enable|1
|/operations/api/v5/resource/home||首页资源位||
||order.getOrdersCountByUidAndStatus|首页资源位-判断是否新客|gateway.degrade.resources.isNewUserFromYHService.enable|2
\ No newline at end of file
||order.getOrdersCountByUidAndStatus|首页资源位-判断是否新客|gateway.degrade.resources.isNewUserFromYHService.enable|2
|__Gateway购物车__|||
|app.Shopping.count||获取购物车总数|gateway.degrade.shopping.count.enable|1
\ No newline at end of file
... ...
##yohomars-search 接口说明。
服务地址:
http://192.168.102.17:8087/yohomars-search
搜索接口:
http://192.168.102.17:8087/yohomars-search/search.json
联想接口:
http://192.168.102.17:8087/yohomars-search/suggest.json
指定索引参数(必传)
参数名: type
|类型|参数值|
|---|---|---|
|商圈 |bizarea|
|店铺 |store|
|线路 |line|
|主题| topic|
|评论 |comment|
###店铺:store
索引字段
|名称|存储类型|描述
|---|---|---|
|id|int|id|
|city_id|int|城市标识|
|bizId|int|商圈标识|
|recommend_time|int|推荐时间|
|order_by|int|排序|
|consumption|int|消费量|
|score|int|分数|
|assessment_num|int|评价数量|
|sort|int|分类|
|pin|string|地理位置坐标|
|latitude|int|纬度|
|longitude|int|精度|
|store_name|string|店铺名称|
|store_english_name|string|店铺名称英文|
|store_name_tc|string|店铺名称繁体|
|tags|string|标签|
|store_first|string|综合的查询字段|
|des|string|描述|
|suggest|string|用于搜索栏联想的字段|
####查询所有:
http://192.168.102.17:8087/yohomars-search/search.json?type=store
####查询:
```
格式:query=keyword
```
默认查询字段:索引中的string字段
指定查询字段:
```
格式 queryField=field1,field2
```
地理位置范围查询:
&longitude=-1&latitude=0.7&range_start=0&range_end=1000000
####过滤:
```
格式: fieldname=value
```
field:所有int类型字段
####排序:
```
格式: order=param1:param2
```
param1: 所有int类型字段:
param2:asc:增序 desc:降序
####返回字段:
默认:返回所有字段
返回指定字段:
```
格式 returnField=field1,field2
```
####返回数据结构
```
{
"code": 200,
"status": 0,
"time": 23,
"matches": {
"total": 21,
"page": 1,
"Total_page": 3,
"data": [
{
"217": {
"store_first": "餐厅 餐廳12 衡山路 衡山路 Hengshan Lu 岳阳路1号(教育会堂内)",
"latitude": 0.5447998659809271,
"consumption": 750,
"assessment_num": 0,
"sort": 99999,
"suggest": " 洋房火锅",
"store_name_tc": "洋房火鍋",
"tags": 7,
"score": 5,
"store_english_name": "",
"des": "xxx",
"pin": {
"location": [
2.1198505724539,
0.5447998659809271
]
},
"is_recommend": 0,
"bizId": 32,
"store_name": "洋房火锅",
"order_by": 999999,
"id": 217,
"city_id": 890,
"longitude": 2.1198505724539
},
"288": {
"store_first": "餐厅 餐廳12 墨田区 墨田區 Sumida 横川2-14-5 橫川2-14-5",
"latitude": 0.6231134265630897,
```
####联想:
http://192.168.102.17:8087/yohomars-search/suggest.json?type=bizarea&query=联想词
####返回数据结构
```
{
"code": 200,
"status": 0,
"time": 10,
"matches": {
"total": 5,
"page": 1,
"Total_page": 1,
"data": [
{
"217": {
"suggest": " 洋房火锅"
},
"419": {
"suggest": " 辉哥火锅 巨鹿路店"
},
"652": {
"suggest": "Mr. Meat 肉大人肉铺火锅"
},
"948": {
"suggest": " 夫妻肺片之味位火锅"
},
"950": {
"suggest": " 花开藤蔓火锅"
}
}
]
}
}
```
###商圈
索引字段
|名称|存储类型|描述
|---|---|---|
|id|int|id|
|name|string|名称|
|english_name|string|英文名称|
|name_tc|string|繁体名称|
|des|string|描述|
|city_id|int|城市标志|
|store_num|int|店铺数量|
|is_top|int|是否置顶|
|top_time|int|置顶时间|
|is_recommend|int|推荐|
|sort|int|分类|
|recommend_time|int|推荐时间|
|suggest|string|联想字段|
####查询所有:
http://192.168.102.17:8087/yohomars-search/search.json?type=bizarea
其他同店铺
###线路
索引字段
|名称|存储类型|描述
|---|---|---|
|id|int|id|
|title|string|线路名称|
|title_tc|string|线路繁体名称|
|is_top|int|是否置顶|
|top_time|int|置顶时间|
|city_id|int|城市标志|
|publish_time|int|发布时间|
|city_id|int|城市标示|
|description|string|描述|
|description_tc|string|描述繁体|
|is_recommend|int|推荐|
|recommend_time|int|推荐时间|
|sort|int|分类|
|suggest|string|联想字段|
####查询所有:
http://192.168.102.17:8087/yohomars-search/search.json?type=line
其他同店铺
###主题
索引字段
|名称|存储类型|描述
|---|---|---|
|id|int|id|
|title|string|主题名称|
|title_tc|string|主题繁体名称|
|is_top|int|是否置顶|
|top_time|int|置顶时间|
|city_id|int|城市标志|
|publish_time|int|发布时间|
|city_id|int|城市标示|
|description|string|描述|
|description_tc|string|描述繁体|
|is_recommend|int|推荐|
|recommend_time|int|推荐时间|
|sort|int|分类|
|suggest|string|联想字段|
####查询所有:
http://192.168.102.17:8087/yohomars-search/search.json?type=topic
其他同店铺
###评论
索引字段
|名称|存储类型|描述
|---|---|---|
|id|int|id|
|uid|int|用户标识|
|description|string|描述|
|user_auth|int|user_auth|
|city_id|int|城市标示|
|user_type|int|用户类型|
|store_id|int|店铺标识|
|bizId|int|商圈标识|
|publish_time|int|发布时间|
|is_top|int|置顶|
|top_time|int|置顶时间|
|is_deleted|int|删除|
####查询所有:
http://192.168.102.17:8087/yohomars-search/search.json?type=comment
其他同店铺
... ...
# 登录接口
## input
> /login?staff=xxx&password=xxxx
* 工号 (staff)
* 密码 (password)
## output
```javascript
{
code: 200,
message:'登录成功'
data:
{
menuList: {
taskList:true,//任务列表
myTask:true,//我的任务
goodsManage:true,//货品管理
inLib:true,//入库管理
outLib:true,//出库管理(残次,销售,调拨)
pandian:true,//盘点
shangjia:true,//上架
canci:true,//残次拣货
}
}
}
```
# 登出
## input
> /logout?staff=xxxx&type=1
* staff 工号
* type 1:待接受任务,2:我的任务
## output
``` javascript
{
code:200,
message:"登出成功"
}
```
# 任务列表
## input
> /getTaskList?staff=xxxx&limit=100&offset=0
* 工号(staff)
* 游标(offset)
* 分页个数(limit)
## output
```javascript
{
code:200,
message:""
data: {
list:
[
{
id:1232,//单号
type:1,//1:销售拣货,2:调拨拣货,3:巡场任务
number:12,//数量
state:0,//0:未完成,1:已认领,2:完成
time:212432435435,//unix time 时间戳
}
{
...
}
]
}
}
```
# 获取任务详情
## input
> /getTaskDetail?id=21312
* id
## output
#### 巡场消息体
```javascript
{
time:213131,
area:['A01','B02',...]
}
```
#### 拣货消息体
```javascript
{
id:123,//任务号
time:213123,//任务生成时间
startTime:231231231,//接单时间
finishTime:21321312,//完成时间
total:122,//总数
applyTotal:122,//申请数量
trueTotal:122//实际梳理
state:0,//0:未完成,1:已认领,2:完成
skuList:
[
{
image:'http://dsdsasd.jpg',//商品图片
sku:213123,//sku
color:'red',//颜色
name:'sadasd',//名称
size:'XXL',//尺码
storeStorge:12,//店铺库存
lockStorge:11,//锁定库存
getStorge:1//应捡库存
trueStorge:1//实际数量
shelf:[
{
code:'01A01',//货架号
stroge:12//库存
},
{
...
}
]
}
]
}
```
# 处理任务接口
> /procTask?id=213&type=1
## input
* id
* type (1:接受任务,2:完成任务)
## output
```javascript
{
code:200,
message:'接单成功'
}
```
# 完成上架拣货和残次拣货接口
> /upSelf?data={...}
## input
```javascript
{
type:1,//1正常上架,2:残次拣货上架,3:调拨上架
selfId:12321,
skuList:[
{
sku:12312,
number:12
reason:'dasda',
reasonType:1,//1:调拨入库残次,2:顾客造成,3,店员造成
},
{
...
}
]
}
```
## output
```javascript
{
code:200,
message:'上架成功'
}
```
# 获取货架上的商品列表
## input
> /getShelfGoods?id=1231
* id
## output
```javascript
{
data:{
list: [
{
image:'http://dsdsasd.jpg',//商品图片
sku:213123,//sku
color:'red',//颜色
name:'sadasd',//名称
size:'XXL',//尺码
storge:12,//店铺库存
},
....
]
}
}
```
# 完成巡场
> /checkMart?areaqr=A01
## input
* areaQr 区域二维码
## output
```javascript
{
code:200,
message:'A01完成巡场'
}
```
# 查询入库调拨单列表
## input
> /getIntoTransferOrderList?state=1&offset=0&limit=100
* state(1:待处理,2:完成)
* offset(游标,如:0)
* limit(分页个数,如:100)
## output
```javascript
{
code:200,
message:"",
data:
{
list:
[
{
id:1231,//入库调拨单号
number:123,//数量
intoNumber:0,//入库数量
time:1231231231,//创建时间
remark:"sadasd",备注
qrcode:"231231231"外箱条码
}
],
total:100//订单数
}
}
```
# 查询入库调拨单详情
## input
> /getIntoTransferOrderDetail?id=12312
* id(入库调拨单号)
## output
```javascript
{
code:200,
message:'',
data:
{
id:1231,//入库调拨单号
number:123,//数量
intoNumber:0,//入库数量
time:1231231231,//创建时间
remark:"sadasd",备注
qrcode:["231231231","12313","dsdsa"],//外箱条码
skuList:[
{
image:'http://dsdsasd.jpg',//商品图片
sku:213123,//sku
color:'red',//颜色
name:'sadasd',//名称
size:'XXL',//尺码
number:11,//发货件数
shelf:"01A01"
realNumber:11//实际件数
},...
]
}
}
```
# 确认入库接口
## input
> /submitTransferOrder?data=...
```javascript
{
id:1231,//调拨单ID
skuList:[
{
sku:1231,//skuid
realNumber:12//实际收到的数量
}
]
}
```
## output
```javascript
{
code:200,
message:'保存成功'
}
```
> 如果确认的库存和调拨单库存一致,服务端自动设置状态成完成
# 查询出库调拨单列表
## input
> /getOutTransferOrderList?type=1&limit=100&offset=12
* type(1:销售出库,2:调拨出库)
* offset(游标,如:0)
* limit(分页个数,如:100)
## output
```javascript
{
code:200,
message:'',
data:
{
list:[
{
id:131,//单号
time:121231,//时间
number:12,//调拨数量
type:1,//1:销售返仓,2:调拨返仓
qrcode:['dasd','sdfs'],//外箱条码
trueNumber:12,//发货数量
}
],
total:100
}
}
```
# 查询出库调拨单详情
* id(出库调拨单号)
## output
```javascript
{
code:200,
message:'',
data:
{
id:1231,//调拨单号
type:1,//1:销售返仓,2:调拨返仓
number:123,//数量
trueNumber:12,//发货数量
time:1231231231,//创建时间
qrcode:["231231231","12313","dsdsa"],//外箱条码
skuList:[
{
image:'http://dsdsasd.jpg',//商品图片
sku:213123,//sku
color:'red',//颜色
name:'sadasd',//名称
size:'XXL',//尺码
number:11,//发货件数
shelf:"01A01"
realNumber:11//实际件数
},...
]
}
}
```
# 确认出库接口
## input
> /submitTransferOrder?data=...
```javascript
{
id:1231,//调拨单ID
skuList:[
{
sku:1231,//skuid
realNumber:12//实际收到的数量
}
]
}
```
## output
```javascript
{
code:200,
message:'保存成功'
}
```
# 生成挑拨单并出库接口
## input
> createImperfectTransferOrder?code=123123&qrcode=1231,312,3123
* code(残次货架的条码)
* qrcode(外箱条码)
## output
```javascript
{
code:200,
message:'生成成功'
}
```
# 盘点单列表
## input
> /getCheckOrderList?state=1&limit=100&offset=12
* state(1:待处理,2:完成)
* offset(游标,如:0)
* limit(分页个数,如:100)
## output
```javascript
{
code:200,
message:'',
data:
{
list:[
{
id:131,//单号
time:121231,//时间
number:12,//数量
qrcode:['dasd','sdfs'],//外箱条码
trueNumber:12,//实际数量
}
],
total:100
}
}
```
# 保存盘点
## input
> /saveCheckOrder?data=...
```javascript
{
id:123123,//盘点单ID
list:[
{
shelf:"01A01",//货架ID
sku:12312,//sku
number:213//盘点数量
}
]
}
```
> 如果确认的盘点数量和货架商品数量一致,服务端自动设置状态成完成
... ...
## 1、获取用户可用的优惠券张数 ##
#### 说明
获取用户可用的优惠券张数(app.Buynow.countUsableCoupon)
#### 请求参数
| 参数名称 | 参数类型 | 可否为空 | 示例 | 默认值 | 备注 |
|:-------| -----:|-----:|-----:|-----:|----:|
|uid|int|否|3236556|0|用户id|
|product_sku|int|否|1|1|sku|
|sku_type|string|否|I 分期|“”|sku类型|
|buy_number|int|否|1|1|购买数量|
|client_type|string|否|web|iphone|终端|
### 请求示例
POST http://192.168.102.205:8080/gateway?method=app.Buynow.countUsableCoupon
### 响应
code为200即为成功,否则是失败。
响应JSON格式如下所示:
```json
{
"alg":"SALT_MD5",
"code":200,
"data":{"count":5},
"md5":"c1d725306fb09dcbf504776d276521cb",
"message":"ok"
}
```
## 2、获取用户可用和不可用优惠券列表 ##
#### 说明
获取用户优惠券列表,可用和不可用(app.Buynow.listCoupon)
#### 请求参数
| 参数名称 | 参数类型 | 可否为空 | 示例 | 默认值 | 备注 |
|:-------| -----:|-----:|-----:|-----:|----:|
|uid|int|否|3236556|0|用户id|
|product_sku|int|否|1|1|sku|
|sku_type|string|否|I 分期|“”|sku类型|
|buy_number|int|否|1|1|购买数量|
|client_type|string|否|web|iphone|终端|
### 请求示例
POST http://192.168.102.205:8080/gateway?method=app.Buynow.listCoupon
### 响应
code为200即为成功,否则是失败。
响应JSON格式如下所示:
```json
{
"alg": "SALT_MD5",
"code": 200,
"data": {
"usable_coupons":[
{
"coupon_code": "amccccc",
"coupon_name": "生日券",
"coupon_type": "3",
"coupon_validity": "2013.11.01-2017.01.31",
"coupon_value": "55"
}
],
"unusable_coupons": [
{
"coupon_code": "ambb2345",
"coupon_name": "生日券",
"coupon_type": "3",
"coupon_validity": "2013.11.01-2017.01.31",
"coupon_value": "55"
}
]
},
"md5": "c1d725306fb09dcbf504776d276521cb",
"message": "ok"
}
```
## 3、立即购买结算接口 ##
#### 说明
购物车结算(app.Buynow.payment)
#### 请求参数
| 参数名称 | 参数类型 | 可否为空 | 示例 | 默认值 | 备注 |
|:-------| -----:|-----:|-----:|-----:|----:|
|uid|int|否|3236556|0|用户id|
|product_sku|int|否|1|1|sku|
|sku_type|string|否|I|“”|I 分期|
|buy_number|int|否|1|1|购买数量|
|yoho_coin_mode|int|否|1|1|是否使用yoho币,1使用,0不使用|
|yoho_bill_term|int|是|0||30天不分期 - 1 分期:3、6、9、12;0,不使用|
|client_type|string|否|web|iphone|终端|
|is_support_apple_pay|string|否|Y|N|客户端设备是否支持apple pay|
### 响应
POST
code为200即为成功,否则是失败。
响应JSON格式如下所示:
```json
{
"alg": "SALT_MD5",
"code": 200,
"data": {
"delivery_address": {
"address": "南京",
"address_id": "4555851",
"area": "北京市 北京市 东城区",
"area_code": "110101",
"consignee": "123",
"is_delivery": "Y",
"is_support": "Y",
"mobile": "139****4768",
"phone": ""
},
"delivery_time": [{
"default": "N",
"delivery_time_id": 1,
"delivery_time_string": "只工作日送货"
}, {
"default": "Y",
"delivery_time_id": 2,
"delivery_time_string": "工作日、双休日和节假日均送货"
}, {
"default": "N",
"delivery_time_id": 3,
"delivery_time_string": "只双休日、节假日送货(工作日不送货)"
}],
"delivery_way": [{
"default": "Y",
"delivery_way_cost": 10,
"delivery_way_id": 1,
"delivery_way_name": "普通快递",
"is_delivery": "Y",
"is_support": "Y"
}, {
"default": "N",
"delivery_way_cost": 15,
"delivery_way_id": 2,
"delivery_way_name": "顺丰速运",
"is_delivery": "Y",
"is_support": "Y"
}],
"goods_list": [{
"attribute": "1",
"brand_id": "141",
"buy_limit": 0,
"buy_number": "1",
"cn_alphabet": "TYAKASHABaiSeNanNvTongKuanJiaoYinJiRouJiBenKuanTXuAJN01T16XSAJN01W",
"color_id": "1",
"color_name": "白色",
"expect_arrival_time": "",
"fit_promotions": ["8479", "8477", "8475"],
"get_yoho_coin": "0",
"goods_id": "529095",
"goods_images": "http://img10.static.yhbimg.com/goodsimg/2016/04/11/10/01717d13ad6eab0a039f013dfecdb0e4a7.jpg?imageMogr2/thumbnail/{width}x{height}/extent/{width}x{height}/background/d2hpdGU=/position/center/quality/80",
"goods_type": "ordinary",
"is_advance": "N",
"is_jit": "N",
"is_limited": "N",
"is_outlets": "N",
"is_special": "N",
"last_price": "168.0",
"last_vip_price": 168,
"market_price": 168,
"max_sort_id": "1",
"middle_sort_id": "11",
"off_shelves": 0,
"product_id": 417451,
"product_name": "TYAKASHA 白色男女通款胶印肌肉基本款T恤 ",
"product_skc": "373162",
"product_skn": "51228710",
"product_sku": "1164186",
"promotion_flag": "108",
"promotion_id": "0",
"real_price": 168,
"real_vip_price": 0,
"sale_price": 0,
"sales_price": 168,
"selected": "Y",
"shop_id": 0,
"shopping_cart_goods_id": "106796919",
"shopping_cart_id": "131919063",
"size_id": "201",
"size_name": "L",
"small_sort_id": "114",
"storage_number": "100",
"str_subtotal": "¥168.00",
"subtotal": 168,
"supplier_id": 0,
"uid": "10921691",
"vip1_price": "159.60",
"vip2_price": "151.20",
"vip3_price": "147.84",
"vip_discount": 1,
"vip_discount_money": 0,
"vip_discount_type": "1",
"vip_price": 0,
"yoho_coin_num": "0"
}],
"invoices": {
"invoices_title": "",
"invoices_type_id": 0,
"invoices_type_list": [{
"invoices_type_id": 1,
"invoices_type_name": "图书"
}, {
"invoices_type_id": 2,
"invoices_type_name": "资料"
}, {
"invoices_type_id": 3,
"invoices_type_name": "办公用品"
}, {
"invoices_type_id": 4,
"invoices_type_name": "洗涤用品"
}, {
"invoices_type_id": 5,
"invoices_type_name": "化妆品"
}, {
"invoices_type_id": 6,
"invoices_type_name": "体育用品"
}, {
"invoices_type_id": 7,
"invoices_type_name": "服装"
}, {
"invoices_type_id": 8,
"invoices_type_name": "饰品"
}, {
"invoices_type_id": 9,
"invoices_type_name": "配件"
}, {
"invoices_type_id": 10,
"invoices_type_name": "数码产品"
}],
"invoiceContentList": -- 发票内容
[{
"invoices_type_id": 1,
"invoices_type_name": "服装"
}, {
"invoices_type_id": 2,
"invoices_type_name": "图书"
}, {
"invoices_type_id": 3,
"invoices_type_name": "配件"
}, {
"invoices_type_id": 4,
"invoices_type_name": "日用品"
}, {
"invoices_type_id": 5,
"invoices_type_name": "办公用品"
}, {
"invoices_type_id": 6,
"invoices_type_name": "体育用品"
}, {
"invoices_type_id": 7,
"invoices_type_name": "数码产品"
}],
"invoices_type_name": ""
},
"payment_way": [{
"default": "Y",
"is_support": "Y",
"payment_id": 15,
"payment_name": "支付宝",
"payment_type": 1,
"payment_type_name": "在线支付(推荐)",
"is_support_message":""
}, {
"default": "N",
"is_support": "Y",
"payment_id": 0,
"payment_name": "货到付款",
"payment_type": 2,
"payment_type_name": "货到付款",
"is_support_message":"送货上门后再付款"
}],
"promo_code_enabled": 0,
"shopping_cart_data": {
"discount_amount": 0,
"fast_shopping_cost": 15,
"gain_yoho_coin": 0,
"goods_count": 1,
"instalment": {//不支持或者用户没有选择分期时,不返回
"is_support": "Y",//是否支持
"plan_amount_per": 326.66,//每期应还金额
"plan_amount_per_name": "分3期(¥326.66*3)",
"plan_int_amount_per_name": "免手续费",
"term": 3 //期数
},
"last_order_amount": 178,
"order_amount": 168,
"promotion_formula": "总计¥178.00=商品金额¥168.00+运费¥10.00",
"promotion_formula_list": [{
"promotion": "商品金额",
"promotion_amount": "¥168.00"
}, {
"promotion": "运费",
"promotion_amount": "+¥10.00"
}],
"selected_goods_count": 1,
"shipping_cost": 10,
"str_discount_amount": "¥0.00",
"str_order_amount": "¥168.00"
},
"shopping_cart_tag": "3613572d1571f9cf448e3dacb8ec4c37",
"uid": 10921691,
"use_yoho_coin": 0,
"yoho_coin": 0
},
"md5": "3c89d2af5917a0f12070df8281b39fe8",
"message": "payment data."
}
```
## 4、立即购买compute接口 ##
#### 说明
购物车结算(app.Buynow.compute)
#### 请求参数
| 参数名称 | 参数类型 | 可否为空 | 示例 | 默认值 | 备注 |
|:-------| -----:|-----:|-----:|-----:|----:|
|uid|int|否|3236556|0|用户id|
|product_sku|int|否|1|1|sku|
|sku_type|string|否|I|“”|I 分期|
|buy_number|int|否|1|1|购买数量|
|yoho_coin_mode|int|是|1|1|是否使用yoho币,1使用,0不使用|
|payment_type|int|否|1|1|支付方式,1 在线支付 2 货到付款|
|delivery_way|int|否|1|1|快递方式,1 普通 2 加急|
|use_yoho_coin|double|是|1.00||使用的yoho币金额,单位元|
|use_red_envelopes|double|是|1.00||使用的红包,单位元|
|coupon_code|string|是|b123456||优惠券code|
|promotion_code|string|是|1345abc||优惠码code|
|yoho_bill_term|int|是|0||30天不分期 - 1 分期:3、6、9、12;0,不使用|
|client_type|string|否|web|iphone|终端|
### 响应
POST
code为200即为成功,否则是失败。
响应JSON格式如下所示:
```json
{
"alg": "SALT_MD5",
"code": 200,
"data": {
"coupon_amount": 0,
"delivery_way": [{
"default": "Y",
"delivery_way_cost": 0,
"delivery_way_id": 1,
"delivery_way_name": "普通快递",
"is_delivery": "Y",
"is_support": "Y"
}, {
"default": "N",
"delivery_way_cost": 5,
"delivery_way_id": 2,
"delivery_way_name": "顺丰速运",
"is_delivery": "Y",
"is_support": "Y"
}],
"discount_amount": 0,
"fast_shopping_cost": 5,
"gain_yoho_coin": 0,
"goods_count": 4,
"last_order_amount": 340,
"order_amount": 335,
"payment_way": [{
"default": "Y",
"is_support": "Y",
"is_support_message": "",
"payment_id": 15,
"payment_name": "支付宝",
"payment_type": 1,
"payment_type_name": "在线支付(推荐)"
}, {
"default": "N",
"is_support": "Y",
"is_support_message": "送货上门后再付款",
"payment_id": 0,
"payment_name": "货到付款",
"payment_type": 2,
"payment_type_name": "货到付款"
}],
"promotion_formula": "总计¥340.00=商品金额¥335.00+运费¥5.00",
"promotion_formula_list": [{
"promotion": "商品金额",
"promotion_amount": "¥335.00"
}, {
"promotion": "运费",
"promotion_amount": "+¥5.00"
}],
"selected_goods_count": 2,
"shipping_cost": 0,
"str_discount_amount": "¥0.00",
"str_order_amount": "¥335.00",
"use_red_envelopes": 0,
"use_yoho_coin": 0,
"instalment": {//不支持或者用户没有选择分期时,不返回
"is_support": "Y",//是否支持
"plan_amount_per": 326.66,//每期应还金额
"plan_amount_per_name": "分3期(¥326.66*3)",
"plan_int_amount_per_name": "免手续费",
"term": 3 //期数
},
"is_multi_package":"Y",
"package_list":[{
"supplier_id":"0",
"goods_list":[{
"buy_number": "1",
"goods_images": "http://img11.static.yhbimg.com/goodsimg/2015/12/23/07/0115f6f0e2ca345d2b413396202f97c8b5.jpg?imageMogr2/thumbnail/{width}x{height}/extent/{width}x{height}/background/d2hpdGU=/position/center/quality/80",
"goods_type": "ordinary",
"product_id": 329795,
"product_name": "Blackbird 黑鸟锥形香-Ai香型",
"product_skc": "320280",
"product_skn": "51184595",
"product_sku": "1003938"
}],
"shopping_cost":3,
"shopping_cut_cost": 7,
"shopping_orig_cost:10
},
{
"supplier_id":"23",
"goods_list":[{
"buy_number": "1",
"goods_images": "http://img11.static.yhbimg.com/goodsimg/2015/12/23/07/0115f6f0e2ca345d2b413396202f97c8b5.jpg?imageMogr2/thumbnail/{width}x{height}/extent/{width}x{height}/background/d2hpdGU=/position/center/quality/80",
"goods_type": "gift",
"product_id": 329795,
"product_name": "Blackbird 黑鸟锥形香-Ai香型",
"product_skc": "320280",
"product_skn": "51184595",
"product_sku": "1003938"
}],
"shopping_cost":3,
"shopping_cut_cost": 7,
"shopping_orig_cost:10
}]
},
"md5": "c743135bb9ee4afe3c522c59e64604ea",
"message": "compute list."
}
```
## 8、立即购买提交接口 ##
#### 说明
购物车提交订单(app.Buynow.submit)
#### 请求参数
| 参数名称 | 参数类型 | 可否为空 | 示例 | 默认值 | 备注 |
|:-------| -----:|-----:|-----:|-----:|----:|
|uid|int|否|3236556|0|用户id|
|product_sku|int|否|1|1|sku|
|sku_type|string|否|I|“”|I 分期|
|buy_number|int|否|1|1|购买数量|
|yoho_bill_term|int|是|0||30天不分期 - 1 分期:3、6、9、12;0,不使用|
|address_id|int|否|5816006||送货地址id|
|delivery_time|int|否|2||寄送时间类型|
|delivery_way|int|否|1||发货方式(1:普通,2顺丰)|
|invoices_title|string|是|""|""|发票抬头|
|invoices_type_id|int|是|""|""|发票类型|
|use_yoho_coin|double|是|1.00||使用的yoho币金额,单位元|
|use_red_envelopes|double|是|1.00||使用的红包,单位元|
|payment_id|int|否|15||支付id|
|payment_type|int|否|1||支付类型|
|remark|string|是|""|""|备注|
|coupon_code|string|是|""|""|优惠券码|
|promotion_code|string|是|1345abc||优惠码code|
|client_type|string|否|web|iphone|终端|
### 响应
POST
code为200即为成功,否则是失败。
响应JSON格式如下所示:
```json
{
"alg": "SALT_MD5",
"code": 200,
"data": {
"create_time": "2016-07-14 15:57:48",//订单创建时间
"order_amount": 1965,//订单金额
"order_code": 1613291832,//订单号
"pay_expire": "2016-07-14 17:57:48",//支付失效时间
"payment_status": 0//0 未支付,1已支付,只有0元订单才为1
},
"md5": "62723a6f81151e880b04a8480df4d2f9",
"message": "submit order ."
}
```
## 9、使用优惠券 ##
#### 说明
使用优惠券(app.Buynow.useCoupon)
#### 请求参数
| 参数名称 | 参数类型 | 可否为空 | 示例 | 默认值 | 备注 |
|:-------| -----:|-----:|-----:|-----:|----:|
|uid|int|否|3236556|0|用户id|
|product_sku|int|否|1|1|sku|
|sku_type|string|否|I 分期|“”|sku类型|
|buy_number|int|否|1|1|购买数量|
|coupon_code|string|是|""|""|优惠券|
|client_type|string|否|web|iphone|终端|
### 请求示例
POST http://192.168.102.205:8080/gateway?method=app.Buynow.useCoupon
### 响应
code为200即为成功,否则是失败。
响应JSON格式如下所示:
```json
{
"alg": "SALT_MD5",
"code": 200,
"data": {
"coupon_amount": 10,
"coupon_code": "aob9p9r204j9qz",
"coupon_title": "10元现金券",
"uid": 10921691
},
"md5": "47eb4073ca797fd7dc5968de7a20bda2",
"message": "use coupon code."
}
```
## 10、使用优惠码 ##
#### 说明
使用优惠码(app.Buynow.usePromotionCode)
#### 请求参数
| 参数名称 | 参数类型 | 可否为空 | 示例 | 默认值 | 备注 |
|:-------| -----:|-----:|-----:|-----:|----:|
|uid|int|否|3236556|0|用户id|
|product_sku|int|否|1|1|sku|
|sku_type|string|否|I 分期|“”|sku类型|
|buy_number|int|否|1|1|购买数量|
|promotion_code|string|是|""|""|优惠码|
|client_type|string|否|web|iphone|终端|
### 请求示例
POST http://192.168.102.205:8080/gateway?method=app.Buynow.usePromotionCode
### 响应
code为200即为成功,否则是失败。
响应JSON格式如下所示:
```json
{
"alg": "SALT_MD5",
"code": 200,
"data": {
"id": 10,
"name": "aob9p9r204j9qz",//优惠码名称
"code": "1111",//优惠码code
"limit_times": 1,
"discount_type": "2",
"amount_at_least": "aob9p9r204j9qz",
"count_at_least": "1111",
"discount": 1,
"discount_at_most":111,
"status":1
},
"md5": "47eb4073ca797fd7dc5968de7a20bda2",
"message": "use promotion code."
}
```
\ No newline at end of file
... ...