商户行为分为:店铺菜品、店铺桌位、店铺营业状态三类。
菜品涉及四种行为:插入菜品信息、删除菜品信息、修改菜品信息、估清菜品信息。
1、使用说明
2、action_type:insert_dish
3、entity:shop
4、action_detail说明
参数名称 | 参数类型 | 必填 | 描述 |
---|---|---|---|
outerDishId | String | 是 | 外部菜品ID |
name | String | 是 | 菜品名称 |
price | Long | 是 | 菜品价格 (单位分,如果定义类型是long,金额单位都是分) |
soldout | Integer | 是 | 是不是已经售卖完成 0 正常,1 估清 |
quantity | Long | 否 | 库存数量(不传 代表没有意义) |
pict | JSONArray | 否 | 商品图片(只支持http的图片) |
status | Integer | 否 | 0 上架(可点) 1 不在线(不可点) 默认0 |
desc | String | 否 | 菜品描述 |
sort | Integer | 否 | 传入当前菜品在isv平台的顺序,我们会按照值越小越靠前来理解这个值。如果ISV平台菜品没有顺序的概念可以不传入 |
unit | String | 否 | 菜品单位(斤、份) |
dishTypeID | String | 否 | 菜品分类ID,菜品分类ID是ISV自己的菜品分类ID,如果你们有分类就传入你们的分类ID,如果没有可以不用传入。比如回锅肉挂在川菜分类下面,就可以传入川菜的类目ID |
dishTypeName | String | 否 | 菜品分类名称 |
dishSkuList | JSONArray | 否 | 菜品的SKU,有就设置 没有不传入当前key。如果传入了,下面的*都要传入 1. *String id 代表当前skuId 2. *String property 规格对 A:B;A1:B1 3. Integer quantity 菜品库存 10 4. *Long price 菜品价格 单个SKU价格 (单位分,如果定义类型是long,金额单位都是分) 具体设置规则请参考代码demo。 |
json举例:
{ "date_time":"2017-27-13 20:04:22", "action_type":"insert_dish", "outer_shop_do": { "shop_id":"2016041600077000000003126147", "type":"xxx.com", "outer_id":"2016041600077000000003126147" }, "industry":"REPAST", "action_detail":{ "quantity":100, "dishTypeID":"8b7d0301204411e78ab633383948fe8a", "sort":1, "soldout":0, "outerDishId":"XXXX", "unit":"份", "price":10, "name":"菜品名称", "dishTypeName":"冷菜区", "dishSkuList":"[{\"quantity\":10,\"price\":15,\"property\":\"规格:大份\",\"id\":\"111122\"}, {\"quantity\":\"10\",\"pName\":\"规格:小份\",\"price\":\"5\",\"id\":\"111123\"}]", "pict":["http://alipay.dl.django.t.taobao.com/rest/1.0/image?fileIds=x_DNt-sAQqCCs4QdRdd40wAAACMAAQED&zoom=original","http://alipay.dl.django.t.taobao.com/rest/1.0/image?fileIds=x_DNt-sAQqCCs4QdRdd40wAAACMAAQED&zoom=original"], "status":0, "desc":"我是菜品描述" }, "action_outer_id":"XXXX", "entity":"shop" }
1、使用说明
2、action_type:modify_dish
3、entity:shop
4、action_detail说明
参数名称 | 参数类型 | 必填 | 描述 |
---|---|---|---|
outerDishId | String | 是 | 外部菜品ID |
name | String | 否 | 菜品名称 |
price | Long | 否 | 菜品价格(单位分,定义类型是long,金额单位都是分) |
soldout | Integer | 否 | 是不是已经售卖完成 0正常,1估清,默认0 |
quantity | Long | 否 | 库存数量(不传 代表没有意义) |
pict | JSONArray | 否 | 商品图片(只支持http的图片) |
status | Integer | 否 | 0 上架(可点) 1 不在线(不可点) 默认0 |
desc | String | 否 | 菜品描述 |
sort | Integer | 否 |
传入当前菜品在isv平台的顺序,我们会按照值越小越靠前来理解这个值。如果ISV平台菜品没有顺序的概念可以不传入 |
unit | String | 否 | 菜品单位(斤、份) |
dishTypeID | String | 否 | 菜品分类ID,菜品分类ID是ISV自己的菜品分类ID,如果你们有分类就传入你们的分类ID,如果没有可以不用传入。比如回锅肉挂在川菜分类下面,就可以传入川菜的类目ID |
dishTypeName | String | 否 | 菜品分类名称 |
dishSkuList | JSONArray | 否 | 菜品的SKU,有就设置 没有不传入当前key。如果传入了,下面的*都要传入 1. *String id 代表当前skuId 2. *String property 规格对 A:B;A1:B1 3. Integer quantity 菜品库存 10 4. *Long price 菜品价格 单个SKU价格(单位分,如果定义类型是long,金额单位都是分) |
json举例:
{ "date_time":"2017-27-13 20:04:22", "action_type":"modify_dish", "outer_shop_do": { "shop_id":"2016041600077000000003126147", "type":"xxx.com", "outer_id":"2016041600077000000003126147" }, "industry":"REPAST", "action_detail": { "quantity":100, "dishTypeID":"类型ID", "sort":1, "soldout":0, "outerDishId":"XXXX", "unit":"份", "price":10, "name":"菜品名称", "dishTypeName":"冷菜区", "dishSkuList":"[ {\"quantity\":10,\"price\":15,\"property\":\"规格:大份\",\"id\":\"111122\"}, {\"quantity\":\"10\",\"pName\":\"规格:小份\",\"price\":\"5\",\"id\":\"111123\"} ]", "pict":["http://alipay.dl.django.t.taobao.com/rest/1.0/image?fileIds=x_DNt-sAQqCCs4QdRdd40wAAACMAAQED&zoom=original", "http://alipay.dl.django.t.taobao.com/rest/1.0/image?fileIds=x_DNt-sAQqCCs4QdRdd40wAAACMAAQED&zoom=original"], "status":0, "desc":"我是菜品描述" }, "action_outer_id":"XXXX", "entity":"shop" }
1、使用说明:商户不再经营当前菜品的时候进行调用,做物理删除
2、action_type:delete_dish
3、entity:shop
4、action_detail说明
参数名称 | 参数类型 | 必填 | 描述 |
---|---|---|---|
outerDishId | String | 是 | 外部菜品ID |
json举例:
{ "date_time":"2017-27-13 20:04:22", "action_type":"delete_dish", "outer_shop_do": { "shop_id":"2016041600077000000003126147", "type":"xxx.com", "outer_id":"2016041600077000000003126147" }, "industry":"REPAST", "action_detail":{"outerDishId":"XXXX"}, "action_outer_id":"XXXX", "entity":"shop" }
1、使用说明:菜品估清的时候调用,系统会更新菜品的soldout字段。
2、action_type:soldout_dish
3、entity:shop
4、action_detail说明
参数名称 | 参数类型 | 必填 | 描述 |
---|---|---|---|
outerDishId | String | 是 | 外部菜品ID |
json举例:
{ "date_time":"2017-27-13 20:04:22", "action_type":"soldout_dish", "outer_shop_do": { "shop_id":"2016041600077000000003126147", "type":"xxx.com", "outer_id":"2016041600077000000003126147" }, "industry":"REPAST", "action_detail":{"outerDishId":"XXXX"}, "action_outer_id":"XXXX", "entity":"shop" }
桌位涉及三种行为:插入桌位行为、修改桌位行为、每天全量一次全部座位。
1、使用说明
2、action_type:insert_table
3、entity:shop
4、action_detail说明
参数名称 | 参数类型 | 必填 | 描述 |
---|---|---|---|
tableId | String | 是 | 座位ID,后面通过他更新 |
max | Integer | 是 | 最大容量 |
min | Integer | 是 | 最小容量 |
tableName | String | 是 | 餐桌名称(比如:神龙包厢)如果没有名称可以使直接传入tableNum的值 |
tableNum | String | 是 | 桌位编号(比如:A01) |
tableType | String | 是 | 餐桌类型(0:普通桌 1:包厢) |
status | Integer | 是 | 0空闲 1 占用 2 不可知 -1 删除 |
json举例:
{ "date_time":"2017-04-13 20:27:22", "action_type":"insert_table", "outer_shop_do": { "shop_id":"2016041600077000000003126147", "type":"xxx.com", "outer_id":"2016041600077000000003126147" }, "industry":"REPAST", "action_detail": { "tableType":0, "min":4, "max":6, "tableNum":"A01", "tableId":"座位主键", "tableName":"4_6 人", "status":0 }, "action_outer_id":"座位主键", "entity":"shop" }
1、使用说明
2、action_type:update_table
3、entity:shop
4、action_detail说明
参数名称 | 参数类型 | 必填 | 描述 |
---|---|---|---|
tableId | String | 是 | 座位ID,后面通过他更新 |
max | Integer | 否 | 最大容量 |
min | Integer | 否 | 最小容量 |
tableName | String | 否 | 餐桌名称(比如:神龙包厢)如果没有名称可以使直接传入tableNum的值 |
tableNum | String | 是 | 桌位编号(比如:A01) |
tableType | String | 否 | 餐桌类型(0:普通桌 1:包厢) |
status | Integer | 否 | 0:空闲,当前桌位没人使用 1:占用,当前桌位已占用 2:不可知,无法判断当前桌位状态 -1:删除,删除掉桌位 默认空闲 |
json举例:
{ "date_time":"2017-04-13 20:27:22", "action_type":"update_table", "outer_shop_do": { "shop_id":"2016041600077000000003126147", "type":"xxx.com", "outer_id":"2016041600077000000003126147" }, "industry":"REPAST", "action_detail": { "tableType":0, "min":1, "max":3, "tableNum":"A01", "tableId":"座位主键", "tableName":"1_3 人", "status":0 }, "action_outer_id":"座位主键", "entity":"shop" }
1、使用说明
本接口用来全量更新一个店铺的所有桌位数据(注意:必须一次传入一个店铺在用的桌位数据,桌位状态是,空闲:0 占用:1 不可知: 2 口碑会先删除原有数据,然后插入传入数据),建议每天晚上定时上传,主要解决实时回传中数据丢失的情况。
2、action_type:insert_one_shop_all_table
3、entity:shop
4、action_detail说明
参数名称 | 参数类型 | 必填 | 描述 |
---|---|---|---|
tableId | String | 是 | 座位ID,后面通过他更新 |
max | Integer | 是 | 最大容量 |
min | Integer | 是 | 最小容量 |
tableName | String | 是 | 餐桌名称(比如:神龙包厢)如果没有名称可以使直接传入tableNum的值 |
tableNum | String | 是 | 桌位编号(比如:A01) |
tableType | String | 是 | 餐桌类型(0:普通桌 1:包厢) |
status | Integer | 是 | 0空闲 1 占用 2 不可知 -1 删除 |
json举例:
{ "date_time":"2017-04-13 21:01:49", "action_type":"insert_one_shop_all_table", "outer_shop_do": { "shop_id":"2016041600077000000003126147", "type":"xxx.com", "outer_id":"2016041600077000000003126147" }, "industry":"REPAST", "action_detail":[ {"tableType":0,"min":4,"max":6,"tableNum":"A01","tableId":"座位主键","tableName":"4_6 人","status":0}, {"tableType":0,"min":3,"max":5,"tableNum":"A01","tableId":"XXXXX","tableName":"4_6 人","status":0} ], "action_outer_id":"口碑店铺ID", "entity":"shop" }
1、使用说明
2、action_type:modify_shop_status
3、entity:shop
4、action_detail说明
参数名称 | 参数类型 | 必填 | 描述 |
---|---|---|---|
status | Integer | 是 | 1 在线0 不在线 -1 不可知 |
accuracy | Double | 是 | 结果准确度 100代表绝对正确 |
list | JSONArray | 是 | 判断原因对象 1、*string type 收银状态、最后的订单 见上面说明 2、*String feature(json结构,根据type不同而不同,参考上面说明) 3、String desc 简单描述(可以空) |
json举例:
{ "date_time":"2017-36-13 20:04:41", "action_type":"modify_shop_status", "outer_shop_do": { "shop_id":"2016041600077000000003126147", "type":"xxx.com", "outer_id":"2016041600077000000003126147" }, "industry":"REPAST", "action_detail": { "accuracy":80, "list":[ { "feature":"[ {\"startTime\";\"08:00\",\"endTime\":\"23:00\"}, {\"startTime\";\"23:30\",\"endTime\":\"03:00\"} ]", "type":"businessHours", "desc":"可有可无" }, { "feature":"[ {\"startTime\";\"09:00\",\"endTime\":\"23:00\"}, {\"startTime\";\"23:30\",\"endTime\":\"03:00\"} ]", "type":"historyBusinessHours", "desc":"可有可无" }, { "feature":"{\"time\":1492087001256}", "type":"lastOrderTime", "desc":"可有可无" }, { "feature":"{\"handover\":1}", "type":"handover", "desc":"可有可无" } ], "status":1 }, "action_outer_id":"店铺ID", "entity":"shop" }