门店
创建门店
调用请求
HTTP请求方式: POST https://api.convertlab.com/v1/stores?access_token={access_token}
POST请求示例:
{
"shopInfoAll": "{\"business\":{\"base_info\":{\"sid\":\"9\",\"telephone\":\"13029772341\",\"recommend\":\"\",\"introduction\":\"是风格的\",\"photo_list\":[],\"open_time\":\"\",\"avg_price\":0,\"business_name\":\"dfghdfghfdg\",\"branch_name\":\"哈哈哈\",\"province\":\"河南\",\"city\":\"洛阳\",\"district\":\"栾川县\",\"address\":\"长春北路22号\",\"categories\":[\"美食,江浙菜,上海菜\"],\"offset_type\":1,\"longitude\":\"111.617619\",\"latitude\":\"33.786008\"}}}",
}
参数说明
参数 | 是否必填 | 说明 |
---|---|---|
access_token | 是 | 用从“获取身份权限”节拿到的access_token替换 |
shopInfoAll | 是 | 门店所有的信息 (注意该字段的内容需要JSON.stringify(),实际存储的是JSON内容) |
business | 是 | 门店基本信息 |
sid | 是 | sid |
telephone | 是 | 门店电话 |
recommend | 否 | 推荐 |
introduction | 否 | 简介 |
photo_list | 否 | 门店图片 |
open_time | 否 | 营业时间(时间范围) |
avg_price | 否 | 人均价格 |
business_name | 是 | 商户名称 |
branch_name | 是 | 门店名称 |
province | 是 | 省份 |
city | 是 | 城市 |
district | 是 | 区县 |
address | 是 | 地址 |
categories | 是 | 类目 |
longitude | 是 | 经度 (火星坐标) |
latitude | 是 | 纬度 |
返回说明
{
"error": {
code: '',
message: 'xxx',
},
"shop":{
"id": 105,
"sid": "9",
"branchName": "哈哈哈",
"shopName": "dfghdfghfdg哈哈哈",
"ownerId": 0,
"dateCreated": "2020-07-02T05:45:54Z",
"meta": "{\"selectCategory\":{\"0\":\"美食\",\"1\":\"江浙菜\",\"2\":\"上海菜\"}}",
"lastUpdated": "2020-07-02T05:45:54Z",
"wechatAppid": null,
"shopStatus": null,
"refuseReason": null,
"ownerName": null,
"wechatAccount": null,
"poiId": null,
"shopInfoAll": "{\"business\":{\"base_info\":{\"sid\":\"9\",\"telephone\":\"13029772341\",\"recommend\":\"\",\"introduction\":\"是风格的\",\"photo_list\":[],\"open_time\":\"\",\"avg_price\":0,\"business_name\":\"dfghdfghfdg\",\"branch_name\":\"哈哈哈\",\"province\":\"河南\",\"city\":\"洛阳\",\"district\":\"栾川县\",\"address\":\"长春北路22号\",\"categories\":[\"美食,江浙菜,上海菜\"],\"offset_type\":1,\"longitude\":\"111.617619\",\"latitude\":\"33.786008\"}}}",
"businessName": "dfghdfghfdg",
"remark": null
}
}
返回字段说明
字段 | 说明 |
---|---|
error | 获取参数失败时会显示, 成功时不会有该字段 |
shop | 成功时返回门店对应的信息 |
更新门店
调用请求
HTTP请求方式: PUT https://api.convertlab.com/v1/stores/$id?access_token={access_token}
$id 为需要更新的门店id
PUT请求示例:
{
"shopInfoAll": "{\"business\":{\"base_info\":{\"sid\":\"9\",\"telephone\":\"13029772341\",\"recommend\":\"\",\"introduction\":\"是风格的\",\"photo_list\":[],\"open_time\":\"\",\"avg_price\":0,\"business_name\":\"但是是\",\"branch_name\":\"是的风格\",\"province\":\"河南\",\"city\":\"洛阳\",\"district\":\"栾川县\",\"address\":\"长春北路22号\",\"categories\":[\"美食,江浙菜,上海菜\"],\"offset_type\":1,\"longitude\":\"111.617619\",\"latitude\":\"33.786008\"}}}",
}
参数说明
参数 | 是否必填 | 说明 |
---|---|---|
access_token | 是 | 用从“获取身份权限”节拿到的access_token替换 |
shopInfoAll | 是 | 门店所有的信息 (注意该字段的内容需要JSON.stringify(),实际存储的是JSON内容) |
business | 是 | 门店基本信息 |
sid | 是 | sid |
telephone | 是 | 门店电话 |
recommend | 否 | 推荐 |
introduction | 否 | 简介 |
photo_list | 否 | 门店图片 |
open_time | 否 | 营业时间(时间范围) |
avg_price | 否 | 人均价格 |
business_name | 是 | 商户名称 |
branch_name | 是 | 门店名称 |
province | 是 | 省份 |
city | 是 | 城市 |
district | 是 | 区县 |
address | 是 | 地址 |
categories | 是 | 类目 |
longitude | 是 | 经度 (火星坐标) |
latitude | 是 | 纬度 |
返回说明
{
"error": {
code: '',
message: 'xxx',
},
"shop":{
"id": 105,
"sid": "9",
"branchName": "是的风格",
"shopName": "但是是是的风格",
"ownerId": 0,
"dateCreated": "2020-07-02T05:45:54Z",
"meta": "{\"selectCategory\":{\"0\":\"美食\",\"1\":\"江浙菜\",\"2\":\"上海菜\"}}",
"lastUpdated": "2020-07-02T05:48:52Z",
"wechatAppid": null,
"shopStatus": null,
"refuseReason": null,
"ownerName": null,
"wechatAccount": null,
"poiId": null,
"shopInfoAll": "{\"business\":{\"base_info\":{\"sid\":\"9\",\"telephone\":\"13029772341\",\"recommend\":\"\",\"introduction\":\"是风格的\",\"photo_list\":[],\"open_time\":\"\",\"avg_price\":0,\"business_name\":\"但是是\",\"branch_name\":\"是的风格\",\"province\":\"河南\",\"city\":\"洛阳\",\"district\":\"栾川县\",\"address\":\"长春北路22号\",\"categories\":[\"美食,江浙菜,上海菜\"],\"offset_type\":1,\"longitude\":\"111.617619\",\"latitude\":\"33.786008\"}}}",
"businessName": "但是是",
"remark": null
}
}
返回字段说明
字段 | 说明 |
---|---|
error | 获取参数失败时会显示, 成功时不会有该字段 |
shop | 成功时返回门店对应的信息 |
删除门店
调用请求
HTTP请求方式: DELETE https://api.convertlab.com/v1/stores/$id?access_token={access_token}
参数说明
$id 为需要更新的门店id
返回说明
{
"error": {
code: '',
message: "success",
}
}
返回字段说明
字段 | 说明 |
---|---|
error | 获取参数失败时会显示, 成功时不会有该字段 |
message | 成功时返回"success" |
创建并将多个门店添加为一个门店组
调用请求
HTTP请求方式: POST https://api.convertlab.com/v1/storesGroups?access_token={access_token}
POST请求示例:
{
"name": "ertyrey",
"remark": "rtyertyer",
"shopList": "103,80984,78"
}
参数说明
参数 | 是否必填 | 说明 |
---|---|---|
access_token | 是 | 用从“获取身份权限”节拿到的access_token替换 |
name | 是 | 门店组名称 |
remark | 是 | 备注信息 |
shopList | 是 | 门店组sid,多个门店用","分隔 |
返回说明
{
"error": {
code: '',
message: 'xxx',
},
"shopGroup":{
"success": [
"103",
"80984",
"78"
],
"failed": [],
"shopGroup": {
"id": 71,
"dateCreated": "2020-07-02T06:39:32Z",
"creatorId": 0,
"lastUpdated": "2020-07-02T06:39:32Z",
"name": "ertyrey",
"remark": "rtyertyer",
"creatorName": null
}
}
}
返回字段说明
字段 | 说明 |
---|---|
error | 获取参数失败时会显示, 成功时不会有该字段 |
success | 成功添加进门店组的门店sid |
failed | 没有添加进门店组的门店sid |
shopGroup | 门店组基本信息 |
查询某个门店组下的所有门店
调用请求
HTTP请求方式: GET https://api.convertlab.com/v1/storesGroups/$groupId?access_token={access_token}
参数说明
参数 | 是否必填 | 说明 |
---|---|---|
access_token | 是 | 用从“获取身份权限”节拿到的access_token替换 |
groupId | 是 | 门店组ID |
返回说明
{
"error": {
code: '',
message: 'xxx',
},
"shopGroupList":[
{
"id": 99,
"sid": "78",
"branchName": "乐山路全家",
"shopName": "全家1乐山路全家",
"ownerId": 41,
"dateCreated": "2020-07-01T10:04:55Z",
"lastUpdated": "2020-07-01T10:45:15Z",
"shopInfoAll": "{\"business\":{\"base_info\":{\"sid\":\"78\",\"telephone\":\"13078234562\",\"recommend\":\"梵蒂冈回复过的规范化的风格风格和梵蒂冈风格和风格和风格\",\"special\":\"风格和\",\"introduction\":\"\",\"photo_list\":[{\"photo_url\":\"https://cdn.dmhub.cn/image/9ae39e9853d342618b46a05e908c57d5\"}],\"open_time\":\"\",\"avg_price\":0,\"business_name\":\"全家1\",\"branch_name\":\"乐山路全家\",\"province\":\"上海\",\"city\":\"上海\",\"district\":\"徐汇区\",\"address\":\"乐山路33号\",\"categories\":[\"美食,江浙菜\"],\"offset_type\":1,\"longitude\":\"121.432469\",\"latitude\":\"31.195635\"}}}",
"remark": null
}
]
}
返回字段说明
字段 | 说明 |
---|---|
error | 获取参数失败时会显示, 成功时不会有该字段 |
shopGroupList | 门店组列表 |
id | 门店id |
branchName | 商户名称 |
shopName | 门店名称 |
ownerId | 创建者id |
dateCreated | 创建时间 |
lastUpdated | 最后更新时间 |
shopInfoAll | 详细信息同创建门店返回值 |
remark | 备注 |