1.拉取已下单SKU
接口名:/station/order/get_order_sku
Method : GET
请求参数:
start_date date M 下单时间开始日期
end_date date M 下单时间截止日期
sku_text string O 商品过滤条件
customer_text string O 商户过滤条件
order_id string O 订单ID
status string O 订单状态:undelivery-拉取未配送订单,否则拉取全部订单;默认为undelivery;
return_all string O 是否返回所有sku的统计信息:yes-返回全选需要的信息;no-返回sku列表;默认为no;
offset int O 分页字段
limit int O 分页字段
示例:
请求示例:
http://test.guanmai.cn:10080/station/order/get_order_sku?start_date=2016-11-14&end_date=2016-11-14&sku_text=D804813
搜索返回示例:
{
"code": 0,
"msg": "ok",
"data": {
"pagination": {
"limit": 20,
"offset": 0,
"count": 2
},
"list": [
{
"sale_ratio": 45,
"salemenu_id": "S0520",
"std_unit_name": "斤",
"name": "上海青|中条|优质|件",
"salemenu_name": "深圳餐厅售卖单",
"address_id": "S05633",
"id": "D804813",
"status": 5,
"resname": "兰州拉面",
"sale_unit_name": "件",
"std_sale_price": 10,
"order_id": "PL344093"
},
{
"sale_ratio": 45,
"salemenu_id": "S0520",
"std_unit_name": "斤",
"name": "上海青|中条|优质|件",
"salemenu_name": "深圳餐厅售卖单",
"address_id": "S05633",
"id": "D804813",
"status": 5,
"resname": "兰州拉面",
"sale_unit_name": "件",
"std_sale_price": 10,
"order_id": "PL344091"
}
]
}
}
全部批量改价示例:
{
"code": 0,
"msg": "ok",
"data": [
{
"sale_ratio": 45,
"sale_unit_name": "件",
"sku_id": "D804813",
"salemenu_name": "深圳餐厅售卖单",
"sku_name": "上海青|中条|优质|件",
"orders": [
{
"order_id": "PL344093",
"std_sale_price": 10,
"resname": "兰州拉面",
"std_unit_name": "斤"
},
{
"order_id": "PL344091",
"std_sale_price": 10,
"resname": "兰州拉面",
"std_unit_name": "斤"
}
]
}
]
}
2.修改sku价格接口
接口名:/station/order/update_sku_price
Method : POST
请求参数:
price_data json M sku改价信息, 结构看示例
返回:
{
"code": 0,
"msg": "ok"
}
示例:
request:
http://test.guanmai.cn:10080/station/update_sku_price
POST参数:
price_data:{"D804813":{"sale_price": 450, "std_sale_price": 10,"orders": ["PL344093", "PL344091"]}}
response:
{
"code": 0,
"msg": "ok"
}