创建门店仓库数据源
请求接口:
/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
请求体参数:
参数名 | 类型 | 描述 |
---|---|---|
dataSourceId | string | 数据源id(create方法返回的data.dataSource.id) |
stores | json array | 商品SPU列表(数组最大长度50),SKU对象的结构请参考通用数据结构 |
响应体结构:
参数名 | 类型 | 描述 |
---|---|---|
retcode | integer | 返回码 |
errmsg | string | 错误信息 |
data | json object | 响应内容 |
请求示例:
curl 'https://域名/data-api/v1/store/add?app_id=abc&nonce=61794670f155b&sign=sha256×tamp=1569232087&signature=aee30792812d7b09ba7d3aa67c24e16c6a7ea81282ac728ad5966dd1b3eef6d5' \
-X POST \
-H 'Content-Type: application/json' \
-d '{
"dataSourceId":"105",
"stores": [
{
"innerId": 7829,
"merchantId": 50,
"outerStoreId": "32002033",
"reportTime": 1569690184697,
"accountId": 9563349,
"basicProps": {
"name": "xxxxxx",
"operating_time": {
"time_zones": [
{
"date_zone": "xxxxx",
"hour_zone": "10:00-22:00"
}
]
}
},
"locationInfo": {
"address": "xxxx",
"city_name": "xxxx",
"country_code": "CNN",
"country_name": "xxxx",
"district_name": "xxxxx",
"geos": [
{
"latitude": 45.73622,
"longitude": 126.54209,
"type": 3
}
],
"province_name": "xxxxx"
},
"storeType": "SHOP"
}
]
}'
响应示例:
{
"retcode":0,
"errmsg":"",
"data": {}
}
Copyright © 1998-2019 Tencent. All Rights Reserved.