首页
首页
- 首页
- /point/check_status 商城积分开关和起兑金额
- /util/salemenu 获取当前会话可见销售单
- /coupon/visible_coupon 优惠券搜索
- /product/category/get 获取商品分类
- /product/promotion/list 获取station客户自己添加的营销活动信息
- /product/homepage/customized 获取商户配置信息添加每日精选接口
- /product/sku/promotion 拉取首页的商品组和广告位
- /cart/get 获取购物车
- /order/count 查看订单数量
- /user/address/set 设置当前会话操作的店铺
/point/check_status 商城积分开关和起兑金额
Method:
GET
请求:
无
响应:
code M int 返回码,0表示成功,其他表示错误
msg M string 错误信息
data M dict
support_point_exchange M bool 积分商城开关
exchange_reward_min_money M float 起兑金额
返回示例:
{
"code": 0,
"msg": "ok",
"data": {
"support_point_exchange": true/false,
"exchange_reward_min_money": 0,
}
}
/util/salemenu 获取当前会话可见销售单
Method: GET
请求:
无
响应:
code M int 0为成功,其他为失败
data M dict
order_begin_time M str 订单开始时间
supplier_name M str 供应商名字
time_config_id M str 运营时间id
order_end_time M str 订单结束时间
_id M str 商户id
receive_time_limit M dict
weekdays M int
end M str
receiveTimeSpan M str
customer_weekdays M int
receiveEndSpan M int
e_span_time M int
start M str
s_span_time M int
name M str 报价单名称
station_id M str 站点id
time_config_type M int 运营时间类型
返回示例:
{
"code": 0,
"data": [
{
"order_begin_time": "2019-08-09 03:30:00",
"supplier_name": "自售单不许删",
"time_config_id": "ST662",
"order_end_time": "2019-08-09 23:30:00",
"_id": "S13144",
"receive_time_limit": {
"weekdays": 127,
"end": "09:30",
"receiveTimeSpan": "15",
"customer_weekdays": 127,
"receiveEndSpan": 1,
"e_span_time": 1,
"start": "09:30",
"s_span_time": 0
},
"name": "自售单---不许删",
"station_id": "T7442",
"time_config_type": 2
}
]
}
/coupon/visible_coupon 优惠券搜索
Method: GET
请求:
无
响应:
code M int 返回码,0表示成功,其他表示错误
msg M string 错误信息
data M list
id M int, 优惠券id
name M str, 优惠券名称
price_value M float 面值(元)
collect_limit M int 优惠活动中优惠券发放数量(张)
pending_collecte_num M int 优惠券待领取的数量(张)
min_total_price M float 满减条件
audience_type M int 优惠券类型。1:全部券 2.新用户
notify_status M int 是否需要通知。0 无需通知 1 需通知退回 2 需通知新人券'
返回示例:
{
"msg": "ok",
"code": 0,
"data": [
{
"min_total_price": 100,
"audience_type": 1,
"pending_collect_num": 10,
"price_value": 30,
"collect_limit": 10,
"name": "测试订单统计",
"station_id": "T8521",
"id": 10705,
"notify_status": 0
},
...
]
}
/product/category/get 获取商品分类
Method: GET
请求:
salemenu_ids O list 销售单ID列表
响应:
code M int 返回码 0为成功、其他为错误
msg O string 出错信息提示
data O list 成功时返回数据,json格式
[{
name M string 一级分类名
id M string 一级分类ID
children M list 二级分类信息
[{
id M string 二级分类ID
name M string 二级分类名
first_category_id M string 所属一级分类ID
}]
}]
返回示例:
{
data: [{
name: "蔬菜",
children: [{
name: "叶菜类",
first_category_id: "A101",
id: "B101"
}],
id: "A101"
}],
code: 0
}
/product/promotion/list 获取station客户自己添加的营销活动信息
Method
GET
请求
id O int
salemenu_ids O list 报价单id列表
响应
code M int 返回码, 0表示成功,其他表示错误
msg M string 错误信息
data M list
rank M int
show_method M int
promotion_id M str
label_1 M str
name M str
url M str 图片链接
返回示例:
{
"msg": "ok",
"code": 0,
"data": [
{
"rank": 9223372036854776000,
"show_method": 1,
"promotion_id": "1025",
"label_1": "回馈老客户",
"name": "促销",
"url": "http://gmfiles-1251112841.file.myqcloud.com/product_pic/b78e94a7e85ea3c7.png"
}
]
}
/product/homepage/customized 获取商户配置信息添加每日精选接口
Method
GET
请求
无
响应
code M int 返回码, 0表示成功,其他表示错误
data M list
todo
返回示例:
{
"code": 0,
"data": {
"homepage": [
{
"promotion_id": 1025,
"skus": [
{
"rank": 0,
"img_url": "https://img.guanmai.cn/product_pic/07a6b3ab586a812a.jpeg",
"std_unit_name": "件",
"name": "帝王蕉",
"cart_amount": 0,
"std_sale_price": 0,
"is_fav": false,
"salemenu_id": "S6977",
"skus": [
{
"img_url": "https://img.guanmai.cn/product_pic/07a6b3ab586a812a.jpeg",
"category_id_1": "A4507",
"cart_amount": 0,
"state": 1,
"sale_num_least": 1,
"spu_id": "C920981",
"frequency": 0,
"std_unit_name": "件",
"limit_number": null,
"img_urls": [
"https://img.guanmai.cn/product_pic/07a6b3ab586a812a.jpeg"
],
"is_price_timing": true,
"name": "帝王蕉1",
"station_id": "T8521",
"sale_unit_name": "箱",
"category_id_2": "B21012",
"stocks": -99999,
"sale_price": 0,
"salemenu_id": "S6977",
"clean_food": false,
"desc": "这是一个商品的描述看能不能成事。",
"id": "D2734104",
"is_valid": true,
"std_sale_price": 100,
"promotion_price": null,
"rule_price": null,
"sale_ratio": 24
}
],
"id": "C920981",
"img_urls": [
"https://img.guanmai.cn/product_pic/07a6b3ab586a812a.jpeg"
]
},
{
"rank": 0,
"img_url": "",
"std_unit_name": "个",
"name": "红柚",
"cart_amount": 0,
"std_sale_price": 200,
"is_fav": false,
"salemenu_id": "S6977",
"skus": [
{
"img_url": "",
"category_id_1": "A4507",
"cart_amount": 0,
"state": 1,
"sale_num_least": 1,
"spu_id": "C920983",
"frequency": 0,
"std_unit_name": "个",
"limit_number": null,
"img_urls": [],
"is_price_timing": false,
"name": "红柚",
"station_id": "T8521",
"sale_unit_name": "袋",
"category_id_2": "B21013",
"stocks": -99999,
"sale_price": 1000,
"salemenu_id": "S6977",
"clean_food": false,
"desc": "G",
"id": "D2734107",
"is_valid": true,
"std_sale_price": 200,
"promotion_price": null,
"rule_price": null,
"sale_ratio": 5
}
],
"id": "C920983",
"img_urls": []
},
{
"rank": 0,
"img_url": "https://img.guanmai.cn/product_pic/49730afa26965591.jpeg",
"std_unit_name": "斤",
"name": "雪梨",
"cart_amount": 0,
"std_sale_price": 0,
"is_fav": false,
"salemenu_id": "S6977",
"skus": [
{
"img_url": "https://img.guanmai.cn/product_pic/49730afa26965591.jpeg",
"category_id_1": "A4507",
"cart_amount": 0,
"state": 1,
"sale_num_least": 1,
"spu_id": "C1081754",
"frequency": 0,
"std_unit_name": "斤",
"limit_number": null,
"img_urls": [
"https://img.guanmai.cn/product_pic/49730afa26965591.jpeg",
"https://img.guanmai.cn/product_pic/c9da93b3dee0e8e5.jpeg"
],
"is_price_timing": true,
"name": "雪梨",
"station_id": "T8521",
"sale_unit_name": "斤",
"category_id_2": "B21013",
"stocks": -99999,
"sale_price": 0,
"salemenu_id": "S6977",
"clean_food": false,
"desc": "",
"id": "D3152393",
"is_valid": true,
"std_sale_price": 0,
"promotion_price": null,
"rule_price": null,
"sale_ratio": 1
}
],
"id": "C1081754",
"img_urls": [
"https://img.guanmai.cn/product_pic/49730afa26965591.jpeg",
"https://img.guanmai.cn/product_pic/c9da93b3dee0e8e5.jpeg"
]
}
],
"title": "今日精选",
"show_type": "tiled",
"category": "sku_groups"
},
{
"category": "ad",
"type": 1,
"ad_imgs_with_url": [
{
"img_url": "https://img.guanmai.cn/station_pic/4c156b89141d1746.jpeg",
"img_id": "4c156b89141d1746.jpeg",
"url": ""
}
]
}
],
"daily_selection_type": 1,
"is_customiszed": true,
"label_size": "medium",
"show_daily_selection": true
}
}
/product/sku/promotion 拉取首页的商品组和广告位
Method:
GET
请求:
无
响应:
code M int 返回码, 0表示成功,其他表示错误
msg M string 错误信息
data M dict
返回示例:
{
"code": 0,
"data": [
{
"name": null,
"skus": []
},
{
"name": "每日精选",
"skus": [
{
"rank": 0,
"img_url": "https://img.guanmai.cn/product_pic/07a6b3ab586a812a.jpeg",
"std_unit_name": "件",
"name": "帝王蕉",
"cart_amount": 0,
"std_sale_price": 0,
"is_fav": false,
"salemenu_id": "S6977",
"skus": [
{
"img_url": "https://img.guanmai.cn/product_pic/07a6b3ab586a812a.jpeg",
"category_id_1": "A4507",
"cart_amount": 0,
"state": 1,
"sale_num_least": 1,
"spu_id": "C920981",
"frequency": 0,
"std_unit_name": "件",
"limit_number": null,
"img_urls": [
"https://img.guanmai.cn/product_pic/07a6b3ab586a812a.jpeg"
],
"is_price_timing": true,
"name": "帝王蕉1",
"station_id": "T8521",
"sale_unit_name": "箱",
"category_id_2": "B21012",
"stocks": -99999,
"sale_price": 0,
"salemenu_id": "S6977",
"clean_food": false,
"desc": "这是一个商品的描述看能不能成事。",
"id": "D2734104",
"is_valid": true,
"std_sale_price": 100,
"promotion_price": null,
"rule_price": null,
"sale_ratio": 24
}
],
"id": "C920981",
"img_urls": [
"https://img.guanmai.cn/product_pic/07a6b3ab586a812a.jpeg"
]
},
{
"rank": 0,
"img_url": "",
"std_unit_name": "个",
"name": "红柚",
"cart_amount": 0,
"std_sale_price": 200,
"is_fav": false,
"salemenu_id": "S6977",
"skus": [
{
"img_url": "",
"category_id_1": "A4507",
"cart_amount": 0,
"state": 1,
"sale_num_least": 1,
"spu_id": "C920983",
"frequency": 0,
"std_unit_name": "个",
"limit_number": null,
"img_urls": [],
"is_price_timing": false,
"name": "红柚",
"station_id": "T8521",
"sale_unit_name": "袋",
"category_id_2": "B21013",
"stocks": -99999,
"sale_price": 1000,
"salemenu_id": "S6977",
"clean_food": false,
"desc": "G",
"id": "D2734107",
"is_valid": true,
"std_sale_price": 200,
"promotion_price": null,
"rule_price": null,
"sale_ratio": 5
}
],
"id": "C920983",
"img_urls": []
},
{
"rank": 0,
"img_url": "https://img.guanmai.cn/product_pic/49730afa26965591.jpeg",
"std_unit_name": "斤",
"name": "雪梨",
"cart_amount": 0,
"std_sale_price": 0,
"is_fav": false,
"salemenu_id": "S6977",
"skus": [
{
"img_url": "https://img.guanmai.cn/product_pic/49730afa26965591.jpeg",
"category_id_1": "A4507",
"cart_amount": 0,
"state": 1,
"sale_num_least": 1,
"spu_id": "C1081754",
"frequency": 0,
"std_unit_name": "斤",
"limit_number": null,
"img_urls": [
"https://img.guanmai.cn/product_pic/49730afa26965591.jpeg",
"https://img.guanmai.cn/product_pic/c9da93b3dee0e8e5.jpeg"
],
"is_price_timing": true,
"name": "雪梨",
"station_id": "T8521",
"sale_unit_name": "斤",
"category_id_2": "B21013",
"stocks": -99999,
"sale_price": 0,
"salemenu_id": "S6977",
"clean_food": false,
"desc": "",
"id": "D3152393",
"is_valid": true,
"std_sale_price": 0,
"promotion_price": null,
"rule_price": null,
"sale_ratio": 1
}
],
"id": "C1081754",
"img_urls": [
"https://img.guanmai.cn/product_pic/49730afa26965591.jpeg",
"https://img.guanmai.cn/product_pic/c9da93b3dee0e8e5.jpeg"
]
}
]
}
]
}
/cart/get 获取购物车
Method: GET
请求:
无
响应:
code M int 返回码 0为成功、其他为错误
msg O string 出错信息提示
data O dict 成功时返回购物车信息
{
info M dict 购物车数据
{
count M int 购物车商品数量
sum_money M int 购物车商品总价
is_price_timing M bool 是否时价
total_cost_points M int 商品总消耗积分
reward_sku_count M int 积分商品的数量
}
list M dict 购物车商品ID及数量
{
sku_id M string 商品ID及数量
}
reward_sku_list M dict 积分商品列表
{
id M string 商品ID及数量
}
}
返回示例:
{
"msg": "ok",
"code": 0,
"data": {
"list": { "D1572277": 1},
"info": {
"is_price_timing": false,
"count": 0,
"total_cost_points": 0,
"sum_money": 0,
"reward_sku_count": 0
},
"reward_sku_list":{"E123333":1, "E44442":4}
}
}
/order/count 查看订单数量
Method:
GET
请求:
type O int 订单状态
响应:
code M int 返回码 0为成功、其他为错误
msg O string 出错信息提示
data M int 订单数
返回示例:
{"msg": "ok", "code": 0, "data": 1}
/user/address/set 设置当前会话操作的店铺
Method:
POST
请求:
address_id M Int 商户id
receive_way O Int 收货方式
pick_up_st_id O Int 自提点id
响应:
code M Int 状态码
msg M String 状态信息
data M Dict 响应信息
{
id M Int 商户id(商家的id)
addr_detail M String 收货地址
user_id M Int 帐户id(登录bshop的帐号)
remarks M String 备注
resname M String 商户名称
area_id M Int 地理标签的二级区域id
name M String 收货人姓名
telephone M String 收货人电话
begintime M DateTime 收货开始时间
endtime M DateTime 收货结束时间
cms_info M List<Dict> cms_key信息
[
{
key M String cms_key
title M String 店铺名称
},
...
]
create_time M DateTime 创建时间
district_code M String 地理标签的城市code
employee_id M Int 开户经理id
finance_status M Int 餐馆的状态
freight M Int 运费
keycustomer M Int 重点客户
last_use_time M DateTime 最近使用时间
lnt M Float 经度
lat M Float 纬度
map_address M String 商户位置
sales_employee_id M String 维护经理
service_station_id M String 服务的转配点
}
示例:
请求:
{
address_id: 88348,
receive_way: 1
}
响应:
{
code: 0,
msg: "ok",
data:
{
addr_detail: "广东省深圳市南山区科技南一路1号",
area_id: 30100100000,
begintime: null,
cms_info:
[
{key: "miaotest", title: "miaotest"},
{key: "qcg2", title: "222"},
{key: "qcg", title: "123ss"}
],
create_time: "2018-05-22T17:04:49",
district_code: "440300",
employee_id: 0,
endtime: null,
finance_status: 0,
freight: 0,
id: 88348,
keycustomer: 0,
last_use_time: "2019-08-03T11:53:46",
lat: 22.535122,
lng: 113.941422,
map_address: "黑龙江省绥化市肇东市街道",
name: "福田",
remarks: null,
resname: "海底捞(深圳总店)",
sales_employee_id: -1,
service_station_id: "",
telephone: "23323",
user_id: 73655
}
}