创建门店仓库数据源
请求接口:
/data-api/v1/store/create_store_data_source
等价接口:/data-api/v1/data_source/add(具体请查看数据源文档)
请求方法:
POST
请求参数:
参数名 | 样例 | 描述 |
---|---|---|
app_id | abc | 分配的app_id |
nonce | 61794670f155b | 随机字符串 |
sign | sha256 | 签名算法 |
timestamp | 1569232087 | 请求时间戳(秒级) |
signature | aee30792812d7b09ba7d3aa67c24e16c6a7ea81282ac728ad5966dd1b3eef6d5 | 签名结果 |
请求体类型:
application/json
请求体参数:
参数名 | 类型 | 描述 |
---|---|---|
merchantId | string | 商家id |
响应体结构:
参数名 | 二级字段 | 类型 | 描述 |
---|---|---|---|
retcode | integer | 返回码 | |
errmsg | string | 错误信息 | |
data | json object | 响应内容 | |
dataSource | DataSource | 数据源 |
请求示例:
curl 'https://域名/data-api/v1/store/create_store_data_source?app_id=abc&nonce=61794670f155b&sign=sha256×tamp=1569232087&signature=aee30792812d7b09ba7d3aa67c24e16c6a7ea81282ac728ad5966dd1b3eef6d5' \
-X POST \
-H 'Content-Type: application/json' \
-d '{
"merchantId":"123"
}'
响应示例:
{
"retcode":0,
"errmsg":"",
"data" {
"dataSource": {
"id": "105",
"type": 4,
"merchantId": "123"
}
}
}
添加门店信息
请求接口:
/data-api/v1/store/add
请求方法:
POST
请求参数:
参数名 | 样例 | 描述 |
---|---|---|
app_id | abc | 分配的app_id |
nonce | 61794670f155b | 随机字符串 |
sign | sha256 | 签名算法 |
timestamp | 1569232087 | 请求时间戳(秒级) |
signature | aee30792812d7b09ba7d3aa67c24e16c6a7ea81282ac728ad5966dd1b3eef6d5 | 签名结果 |
请求体类型:
application/json
请求体参数:
响应体结构:
参数名 | 类型 | 描述 |
---|---|---|
retcode | integer | 返回码 |
errmsg | string | 错误信息 |
data | json object | 响应内容 |
请求示例:
{
"dataSourceId": "105",
"stores": [{
"external_store_id": "9L11",
"type": 1,
"business_type": 1,
"operation_status": 1,
"daojia_operation_status": 1,
"phone_numbers": [
"075588888888"
],
"location_info": {
"country_code": "CN",
"country_name": "中国",
"province_code": 440000,
"province_name": "广东省",
"city_code": 440300,
"city_name": "深圳市",
"district_code": 440305,
"district_name": "南山区",
"address": "文心五路保利文化广场B区二楼",
"geo_info": [{
"latitude": 45.73622,
"longitude": 126.54209,
"type": 3
}]
},
"basic_props": {
"name": "品牌名称(海岸城店)",
"opening_time": "1515118117111",
"operating_time": [{
"date_zone": "周一至周日",
"time_zone": "10:00-22:00"
}],
"daojia_operating_time": [{
"date_zone": "周一至周日",
"time_zone": "10:00-22:00"
}]
},
"delivery_info": {
"range_type": 3,
"geo_group": [{
"geos": [{
"type": 1,
"latitude": 26.075368,
"longitude": 119.329487
},
{
"type": 1,
"latitude": 26.075701,
"longitude": 119.330897
},
{
"type": 1,
"latitude": 26.076569,
"longitude": 119.341892
}
]
},
{
"geos": [{
"type": 1,
"latitude": 26.075368,
"longitude": 119.329487
},
{
"type": 1,
"latitude": 26.075701,
"longitude": 119.330897
},
{
"type": 1,
"latitude": 26.076569,
"longitude": 119.341892
}
]
}
]
}
}]
}
响应示例:
{
"retcode":0,
"errmsg":"",
"data": {}
}
Copyright © 1998-2019 Tencent. All Rights Reserved.