个体客流

获取门店列表

接口描述: 获取当前企业下所有的客流门店信息

接口地址: https://yd.yunding360.com/openapi/store/storeArea/allList

版本号:V1

请求方式:GET

请求参数:

参数名称 参数说明 in 是否必须 数据类型 schema
api-version 版本号 headers true string v1
Authorization 安全认证 headers true string tokenType + accessToken

响应示例:

[
  {
    "storeId": "41833b40-e818-11ea-8518-f18d5e21b428",
    "storeName": "云盯001店",
    "storeCode": "YD001",
    "address": "望江路01号",
    "latitude": "116.445366",
    "longitude": "39.949443",
    "businessHoursEnd": "23:00:00",
    "businessHoursStart": "09:00:00",
    "area": "1000",
    "city": "西安",
    "province": "陕西",
    "groupIdUuid": "a85c4d90-3fb6-11e9-9d1e-d395929b703a",
    "groupName": "高新区",
    "groupIdsUuid": [
      "a85c4d90-3fb6-11e9-9d1e-d395929c723a",
      "a1a95820-7878-11ea-9d75-39447283023d"
    ],
    "status": "营业",
    "storeTag": "",
    "type": "一级经销商"
  }
]

响应参数

参数名称 参数说明 类型 schema
storeId 门店Id uuid
storeName 门店名称 string
storeCode 门店编号 string
address 门店地址 string
businessHoursEnd 结束营业时间 string
businessHoursStart 开始营业时间 string
groupId 所属分组id uuid
groupIds 所属分组ids List
groupName 所属分组名称 string
latitude 纬度 number(double)
longitude 经度 number(double)
status 营业状态,可用值:IN_BUSINESS,CLOSING string
type 门店类型 string
storeTag 门店标签 string
area 面积 string
city 城市 string
province 省份 string

响应状态:

状态码 说明 schema
200 OK 门店列表信息

获取门店下区域列表

接口描述: 根据门店ID获取门店下的区域列表

接口地址: https://yd.yunding360.com/openapi/store/storeArea/getAreaList

版本号:V1

请求方式:GET

请求参数:

参数名称 参数说明 in 是否必须 数据类型 schema
api-version 版本号 headers true string v1
Authorization 安全认证 headers true string tokenType + accessToken
storeId 门店id path true uuid 多门店用,隔开

响应示例:

[
  {
    "areaId": "2d158087-3188-10ec-587d-63359e505f93",
    "areaName": "正门",
    "storeId": "41833b40-2818-11ea-8518-f18d5e21b4c6",
    "storeName": "店铺一",
    "status": "营业",
    "areaCode": "区域Code",
    "storeAreaType": "通道",
    "parentId": "父级Id",
    "parentName": "父级名称"
  }
]

响应参数:

参数名称 参数说明 类型 schema
areaId 区域id uuid
areaName 区域名称 string
storeId 所属门店ID uuid
status 营业状态,可用值:IN_BUSINESS,CLOSING string
areaCode 区域Code string
storeAreaType 区域类型 string
parentId 父级Id uuid
parentName 父级名称 string
storeName 店铺名称 string

响应状态:

状态码 说明 schema
200 OK 区域列表信息

获取门店下区域列表V2

接口描述: 根据门店ID获取门店下的区域列表

接口地址: https://yd.yunding360.com/openapi/store/storeArea/getAreaList

版本号:V2

请求方式:GET&POST

请求参数:

参数名称 参数说明 in 是否必须 数据类型 schema
api-version 版本号 headers true string v2
Authorization 安全认证 headers true string tokenType + accessToken
storeId 门店id path&body false List 多门店用,隔开(storeCode二选一)
storeCodes 门店codes path&body false List 多门店用,隔开(storeId二选一)

响应示例:

[
  {
    "areaId": "2d158087-3188-10ec-587d-63359e505f93",
    "areaName": "正门",
    "storeId": "41833b40-2818-11ea-8518-f18d5e21b4c6",
    "storeName": "店铺一",
    "status": "营业",
    "areaCode": "区域Code",
    "storeAreaType": "通道",
    "parentId": "父级Id",
    "parentName": "父级名称",
    "isChannel": "true"
  }
]

响应参数:

参数名称 参数说明 类型 schema
areaId 区域id uuid
areaName 区域名称 string
storeId 所属门店ID uuid
status 营业状态,可用值:IN_BUSINESS,CLOSING string
areaCode 区域Code string
storeAreaType 区域类型 string
parentId 父级Id uuid
parentName 父级名称 string
storeName 店铺名称 string
isChannel 是否为外围通道 string

响应状态:

状态码 说明 schema
200 OK 区域列表信息

根据更新时间获取客流数据

接口描述 通过门店id或者区域id根据更新时间来查询客流数据

接口地址 https://yd.yunding360.com/openapi/store/customerFlow/getDataByModifyTime

版本号:V1

请求方式 GET

请求参数

参数名称 参数说明 in 是否必须 数据类型 选填
api-version 版本号 headers true string v1
Authorization 安全认证 headers true string tokenType + accessToken
storeIds 门店id path false uuid storeIds/groupIds/areaIds只选一个
startModifyTime 开始更新时间 path true long 毫秒级时间戳
endModifyTime 结束更新时间 path true long 毫秒级时间戳
timeType 时间类型枚举,HOUR-小时,DAY-天 path true string
groupIds 场所区域Id path false uuid storeIds/groupIds/areaIds只选一个
areaIds 店内区域Id path false uuid storeIds/groupIds/areaIds只选一个
page 页码 path true integer
size 每页展示个数 path true integer

响应示例

{
  "content": [
    {
      "storeIdUuid": "b19831d0-3fb6-11e9-9d1e-d395929c70321",
      "storeCode": "门店编号1",
      "name": "",
      "realTime": "2021-07-01",
      "indoorCount": 0,
      "outdoorCount": 0,
      "statDimensionDayTime": "20210701",
      "statDimensionHourTime": "2021101316",
      "outsum": "",
      "areaCode": "",
      "areaName": "",
      "storeAreaIdUuid": ""
    }
  ],
  "metadata": {
    "size": 20,
    "totalElements": 30,
    "totalPages": 2,
    "page": 0
  }
}

响应参数

参数名称 参数说明 类型 schema
storeIdUuid 门店Id uuid
storeCode 门店编号 string
name 传区域返回区域名称,传门店返回门店名称,传店内区域返回店内区域名称 string
realTime 传小时按小时粒度返回数据,传天按天粒度返回数据 string
indoorCount 进店客流 integer
outdoorCount 过店客流(查门店区域不支持) integer
statDimensionDayTime 数据库中的天时间 string
statDimensionHourTime 数据库中的小时时间 string
outsum 出店客流(查门店区域不支持) integer
areaCode 门店区域Code string
areaName 门店区域名称 string
storeAreaIdUuid 门店区域Id uuid

响应状态:

状态码 说明 schema
200 OK 根据更新时间获取客流信息

根据更新时间获取客流数据V2

接口描述 通过门店id或者区域id根据更新时间来查询客流数据

接口地址 https://yd.yunding360.com/openapi/store/customerFlow/getDataByModifyTime

版本号:V2

请求方式 POST

请求参数

参数名称 参数说明 in 是否必须 数据类型 选填
api-version 版本号 headers true string v2
Authorization 安全认证 headers true string tokenType + accessToken
storeIds 门店id body false List storeIds/groupIds/areaIds/storeCode只选一个
startModifyTime 开始更新时间 body true long 毫秒级时间戳
endModifyTime 结束更新时间 body true long 毫秒级时间戳
timeType 时间类型枚举,HOUR-小时,DAY-天 body true string
groupIds 场所区域Id body false List storeIds/groupIds/areaIds/storeCode只选一个
areaIds 店内区域Id body false List storeIds/groupIds/areaIds/storeCode只选一个
storeCodes 门店id body false List storeIds/groupIds/areaIds/storeCodes只选一个
page 页码 path true integer
size 每页展示个数 path true integer

响应示例

{
  "content": [
    {
      "storeIdUuid": "b19831d0-3fb6-11e9-9d1e-d395929c70321",
      "storeCode": "门店编号1",
      "name": "",
      "realTime": "2021-07-01",
      "indoorCount": 0,
      "outdoorCount": 0,
      "statDimensionDayTime": "20210701",
      "statDimensionHourTime": "2021101316",
      "outsum": "",
      "areaCode": "",
      "areaName": "",
      "storeAreaIdUuid": ""
    }
  ],
  "metadata": {
    "size": 20,
    "totalElements": 30,
    "totalPages": 2,
    "page": 0
  }
}

响应参数

参数名称 参数说明 类型 schema
storeIdUuid 门店Id uuid
storeCode 门店编号 string
name 传区域返回区域名称,传门店返回门店名称,传店内区域返回店内区域名称 string
realTime 传小时按小时粒度返回数据,传天按天粒度返回数据 string
indoorCount 进店客流 integer
outdoorCount 过店客流(查门店区域不支持) integer
statDimensionDayTime 数据库中的天时间 string
statDimensionHourTime 数据库中的小时时间 string
outsum 出店客流(查门店区域不支持) integer
areaCode 门店区域Code string
areaName 门店区域名称 string
storeAreaIdUuid 门店区域Id uuid

响应状态:

状态码 说明 schema
200 OK 根据更新时间获取客流信息

根据数据时间获取客流数据

接口描述 通过门店id或者区域id根据数据时间来查询客流数据

接口地址 https://yd.yunding360.com/openapi/store/customerFlow/getDataByTime

版本号:V1

请求方式 GET

请求参数

参数名称 参数说明 in 是否必须 数据类型 备注
api-version 版本号 headers true string v1
Authorization 安全认证 headers true string tokenType + accessToken
storeIds 门店id path false uuid storeIds/groupIds/areaIds只选一个
startTime 数据开始时间 path true long 毫秒级时间戳
endTime 数据结束时间 path true long 毫秒级时间戳
timeType 时间类型枚举,HOUR-小时,DAY-天 path true string
groupIds 场所区域Id path false uuid storeIds/groupIds/areaIds只选一个
areaIds 店内区域Id path false uuid storeIds/groupIds/areaIds只选一个
page 页码 path true integer
size 每页展示个数 path true integer

响应示例

{
  "content": [
    {
      "storeIdUuid": "b19831d0-3fb6-11e9-9d1e-d395929c70321",
      "storeCode": "门店编号1",
      "name": "",
      "realTime": "2021-07-01",
      "indoorCount": 0,
      "outdoorCount": 0,
      "statDimensionDayTime": "20210701",
      "statDimensionHourTime": "2021101316",
      "outsum": "",
      "areaCode": "",
      "areaName": "",
      "storeAreaIdUuid": ""
    }
  ],
  "metadata": {
    "size": 20,
    "totalElements": 30,
    "totalPages": 2,
    "page": 0
  }
}

响应参数

参数名称 参数说明 类型 schema
storeIdUuid 门店Id uuid
storeCode 门店编号 string
name 传区域返回区域名称,传门店返回门店名称,传店内区域返回店内区域名称 string
time 传小时按小时粒度返回数据,传天按天粒度返回数据 string
indoorCount 进店客流 integer
outdoorCount 过店客流(查门店区域不支持) integer
statDimensionDayTime 数据库中的天时间 string
statDimensionHourTime 数据库中的小时时间 string
count 查门店区域返回的客流值 integer
outsum 出店客流(查门店区域不支持) integer
areaCode 门店区域Code string
areaName 门店区域名称 string
storeAreaIdUuid 门店区域Id uuid

响应状态:

状态码 说明 schema
200 OK 根据数据时间获取客流信息

根据数据时间获取客流数据V2

接口描述 通过门店id或者区域id根据数据时间来查询客流数据

接口地址 https://yd.yunding360.com/openapi/store/customerFlow/getDataByTime

版本号:V2

请求方式 POST

请求参数

参数名称 参数说明 in 是否必须 数据类型 备注
api-version 版本号 headers true string v2
Authorization 安全认证 headers true string tokenType + accessToken
storeIds 门店id body false List storeIds/groupIds/areaIds/storeCode只选一个
startTime 数据开始时间 body true long 毫秒级时间戳
endTime 数据结束时间 body true long 毫秒级时间戳
timeType 时间类型枚举,HOUR-小时,DAY-天 body true string
groupIds 场所区域Id body false List storeIds/groupIds/areaIds/storeCode只选一个
areaIds 店内区域Id body false List storeIds/groupIds/areaIds/storeCode只选一个
storeCodes 门店code body false List storeIds/groupIds/areaIds/storeCodes只选一个
page 页码 path true integer
size 每页展示个数 path true integer

响应示例

{
  "content": [
    {
      "storeIdUuid": "b19831d0-3fb6-11e9-9d1e-d395929c70321",
      "storeCode": "门店编号1",
      "name": "",
      "realTime": "2021-07-01",
      "indoorCount": 0,
      "outdoorCount": 0,
      "statDimensionDayTime": "20210701",
      "statDimensionHourTime": "2021101316",
      "outsum": "",
      "areaCode": "",
      "areaName": "",
      "storeAreaIdUuid": ""
    }
  ],
  "metadata": {
    "size": 20,
    "totalElements": 30,
    "totalPages": 2,
    "page": 0
  }
}

响应参数

参数名称 参数说明 类型 schema
storeIdUuid 门店Id uuid
storeCode 门店编号 string
name 传区域返回区域名称,传门店返回门店名称,传店内区域返回店内区域名称 string
time 传小时按小时粒度返回数据,传天按天粒度返回数据 string
indoorCount 进店客流 integer
outdoorCount 过店客流(查门店区域不支持) integer
statDimensionDayTime 数据库中的天时间 string
statDimensionHourTime 数据库中的小时时间 string
count 查门店区域返回的客流值 integer
outsum 出店客流(查门店区域不支持) integer
areaCode 门店区域Code string
areaName 门店区域名称 string
storeAreaIdUuid 门店区域Id uuid

响应状态:

状态码 说明 schema
200 OK 根据数据时间获取客流信息

根据时间获取门店天气

接口描述 通过门店id或者门店code时间来查询门店天气,如果不传门店获取所有配置过地址的门店天气

接口地址 https://yd.yunding360.com/openapi/store/customerFlow/getWeatherByTime

版本号:V1

请求方式 POST

请求参数

参数名称 参数说明 in 是否必须 数据类型 备注
api-version 版本号 headers true string v2
Authorization 安全认证 headers true string tokenType + accessToken
storeIds 门店id body false List storeIds/storeCodes只选一个或者不填写
storeCodes 门店编号 body false List storeIds/storeCodes只选一个或者不填写
startTime 数据开始时间 body true long 毫秒级时间戳
endTime 数据结束时间 body true long 毫秒级时间戳
page 页码 path true integer
size 每页展示个数 path true integer

响应示例

{
  "content": [
    {
      "storeIdUuid": "b19831d0-3fb6-11e9-9d1e-d395929c70321",
      "storeCode": "门店编号1",
      "storeName": "门店名称1",
      "realTime": "2021-07-01",
      "province": "中国,北京市",
      "city": "北京市",
      "weather": "多云",
      "minTemp": -7,
      "maxTemp": 5,
      "wind": "南风"
    }
  ],
  "metadata": {
    "size": 20,
    "totalElements": 30,
    "totalPages": 2,
    "page": 0
  }
}

响应参数

参数名称 参数说明 类型 schema
storeIdUuid 门店Id uuid
storeCode 门店编号 string
storeName 门店名称 string
realTime 日期 string
province 省级分类 string
city 城市 string
weather 天气 string
minTemp 最小温度 integer
maxTemp 最大温度 integer
wind 风向 string

响应状态:

状态码 说明 schema
200 OK 通过门店id或者门店code时间来查询门店天气

客流多维度数据统计

接口地址:https://yd.yunding360.com/openapi/customer_flow/dimensions/multi

接口描述:通过门店id根据数据时间来查询客群多维度聚合统计数据

请求方式:POST

请求数据类型:application/json

请求示例:

{
  "storeIds": [
    "6ba88db0-0366-11ee-b1e7-3bfdb6ca4fd1"
  ],
  "storeCodes": [
    "code001"
  ],
  "mainDimension": "AGE",
  "contrastDimension": "GENDER",
  "queryDimension": "STORE",
  "timeType": "DAY",
  "startTime": 1686067200000,
  "endTime": 1686150000000
}

请求参数:

参数名称 参数说明 请求类型 是否必须 数据类型
api-version API版本号,可用值:v1 header true string
Authorization Oauth2认证令牌 header false string
storeIds 门店ID,如果不传则统计企业所有门店 body false List
storeCodes 门店编号(code) body false List
storeAreaIds 店内区域ID body false List
startTime 开始时间(必填),毫秒级时间戳 body true long
endTime 结束时间(必填),毫秒级时间戳 body true long
timeType 查询时间维度(必填),HOUR:小时 ,DAY:天 body true string
queryDimension 查询数据维度(必填),STORE:门店 ,STORE_AREA:店内区域 body true string
mainDimension 查询数据主维度(必填),AGE: 年龄 ,GENDER: 性别 body true string
contrastDimension 查询数据次维度(必填),AGE: 年龄 ,GENDER: 性别 body true string

响应状态:

状态码 说明
200 OK

响应示例:

{
  "mainDimension": "AGE",
  "contrastDimension": "GENDER",
  "content": [{
    "name": "sexFemale",  //主维度参数 , 当前为性别: 女
    "item": {
      "ageUnknown": 0,  //次维度参数 , 当前为年龄: 未知
      "ageUnderEighteen": 0, //次维度参数 , 当前为年龄: 小于18岁
      "ageNineteenToTwentyNine": 344, //次维度参数 , 当前为年龄: 19-29
      "ageThirtyToThirtyNine": 0, //次维度参数 , 当前为年龄: 30-39
      "ageFortyToFortyNine": 0, //次维度参数 , 当前为年龄: 40-49
      "ageFiftyToFiftyNine": 0, //次维度参数 , 当前为年龄: 50-59
      "ageOverSixty": 0, //次维度参数 , 当前为年龄: 60岁以上
      "count": 344, //总数
      "proportion": 1.0,
      "ageUnknownProportion": 0.0, //年龄: 未知  占比
      "ageUnderEighteenProportion": 0.0, //年龄: 小于18岁  占比
      "ageNineteenToTwentyNineProportion": 1.0, //年龄: 19-29  占比
      "ageThirtyToThirtyNineProportion": 0.0,//年龄: 30-39  占比
      "ageFortyToFortyNineProportion": 0.0,//年龄: 40-49  占比
      "ageFiftyToFiftyNineProportion": 0.0,//年龄: 50-59  占比
      "ageOverSixtyProportion": 0.0 //年龄: 60岁以上  占比
    }
  }, {
    "name": "sexUnknown",  //主维度参数 , 当前为性别: 未知
    "item": {
      "ageUnknown": 0,    //次维度参数 , 当前为年龄: 未知
      "ageUnderEighteen": 0, //次维度参数 , 当前为年龄: 小于18岁
      "ageNineteenToTwentyNine": 0, //次维度参数 , 当前为年龄: 19-29
      "ageThirtyToThirtyNine": 0, //次维度参数 , 当前为年龄: 30-39
      "ageFortyToFortyNine": 0, //次维度参数 , 当前为年龄: 40-49
      "ageFiftyToFiftyNine": 0, //次维度参数 , 当前为年龄: 50-59
      "ageOverSixty": 0, //次维度参数 , 当前为年龄: 60岁以上
      "count": 0, //总数
      "proportion": 0.0,
      "ageUnknownProportion": 0.0, //年龄: 未知  占比
      "ageUnderEighteenProportion": 0.0, //年龄: 小于18岁  占比
      "ageNineteenToTwentyNineProportion": 0.0, //年龄: 19-29  占比
      "ageThirtyToThirtyNineProportion": 0.0,//年龄: 30-39  占比
      "ageFortyToFortyNineProportion": 0.0,//年龄: 40-49  占比
      "ageFiftyToFiftyNineProportion": 0.0,//年龄: 50-59  占比
      "ageOverSixtyProportion": 0.0 //年龄: 60岁以上  占比
    }
  }, {
    "name": "sexMale",  //主维度参数 , 当前为性别: 男
    "item": {
      "ageUnknown": 0,    //次维度参数 , 当前为年龄: 未知
      "ageUnderEighteen": 0, //次维度参数 , 当前为年龄: 小于18岁
      "ageNineteenToTwentyNine": 0, //次维度参数 , 当前为年龄: 19-29
      "ageThirtyToThirtyNine": 0, //次维度参数 , 当前为年龄: 30-39
      "ageFortyToFortyNine": 0, //次维度参数 , 当前为年龄: 40-49
      "ageFiftyToFiftyNine": 0, //次维度参数 , 当前为年龄: 50-59
      "ageOverSixty": 0, //次维度参数 , 当前为年龄: 60岁以上
      "count": 0, //总数
      "proportion": 0.0,
      "ageUnknownProportion": 0.0, //年龄: 未知  占比
      "ageUnderEighteenProportion": 0.0, //年龄: 小于18岁  占比
      "ageNineteenToTwentyNineProportion": 0.0, //年龄: 19-29  占比
      "ageThirtyToThirtyNineProportion": 0.0,//年龄: 30-39  占比
      "ageFortyToFortyNineProportion": 0.0,//年龄: 40-49  占比
      "ageFiftyToFiftyNineProportion": 0.0,//年龄: 50-59  占比
      "ageOverSixtyProportion": 0.0 //年龄: 60岁以上  占比
    }
  }],
  "count": 344, //总数
  "empty": false //是否为空
}

响应参数:

参数名称 参数说明 类型
mainDimension 主维度,AGE: 年龄 GENDER: 性别 string
contrastDimension 次维度,AGE: 年龄 GENDER: 性别 string
name 主维度参数名称,AGE: 年龄 GENDER: 性别 string
ageUnknown 年龄: 未知 long
ageUnderEighteen 年龄: 小于18岁 long
ageNineteenToTwentyNine 年龄: 19-29 long
ageThirtyToThirtyNine 年龄: 30-39 long
ageFortyToFortyNine 年龄: 40-49 long
ageFiftyToFiftyNine 年龄: 50-59 long
ageOverSixty 年龄: 60岁以上 long
ageUnknownProportion 年龄: 未知 占比 float
ageUnderEighteenProportion 年龄: 小于18岁 占比 float
ageNineteenToTwentyNineProportion 年龄: 19-29 占比 float
ageThirtyToThirtyNineProportion 年龄: 30-39 占比 float
ageFortyToFortyNineProportion 年龄: 40-49 占比 float
ageFiftyToFiftyNineProportion 年龄: 50-59 占比 float
ageOverSixtyProportion 年龄: 60岁以上 占比 float
sexMale 性别:男性 long
sexFemale 性别:女性 long
sexUnknown 性别:未知 long
sexMaleProportion 性别:男性 占比 float
sexFemaleProportion 性别:女性 占比 float
sexUnknownProportion 性别:未知 占比 float
count 数量 long
proportion 主维度占比 float
empty 数据是否为空 boolean

客流多维度数据查询

接口地址:https://yd.yunding360.com/openapi/customer_flow/dimensions/multi/data

接口描述:通过门店id根据数据时间来查询客群多维度数据

请求方式:POST

请求数据类型:application/json

请求示例:

{
  "storeIds": [
    "6ba88db0-0366-11ee-b1e7-3bfdb6ca4fd1"
  ],
  "storeCodes": [
    "code001"
  ],
  "timeType": "DAY",
  "queryDimension": "STORE",
  "startTime": 1686067200000,
  "endTime": 1686150000000
}

请求参数:

参数名称 参数说明 请求类型 是否必须 数据类型
api-version API版本号,可用值:v1 header true string
Authorization Oauth2认证令牌 header false string
scrollId 滚动翻页ID,第一次请求时为空 query false string
size 每页数量,默认为20 query false integer
storeIds 门店ID,如果不传则统计企业所有门店 body false List
storeCodes 门店编号(code) body false List
storeAreaIds 店内区域ID body false List
startTime 开始时间(必填),毫秒级时间戳 body true long
endTime 结束时间(必填),毫秒级时间戳 body true long
timeType 查询时间维度(必填),HOUR:小时 ,DAY:天 body true string
queryDimension 查询数据维度(必填),STORE:门店 ,STORE_AREA:店内区域 body true string

响应状态:

状态码 说明
200 OK

响应示例:

{
  "content": [
    {
      "enterpriseId": "xxxx-xxx-xxxxx",
      "storeId": "xxxx-xxx-xxxxx",
      "storeAreaId": "xxxx-xxx-xxxxx",
      "statDimensionTime": "20240432",
      "count": 5,
      "dimension": {
        "age": "NINETEEN_TO_TWENTY_NINE",
        "gender": "NINETEEN_TO_TWENTY_NINE"
       }
    }
  ],
  "metadata": {
    "scrollId": "xxxxx"
  }
}

响应参数:

参数名称 参数说明 类型
enterpriseId 企业ID string
storeId 门店ID string
storeAreaId 店内区域ID string
statDimensionTime 时间 long
count 总数 long
dimension 数据维度 long

客流多维度数据统计-自定义年龄段

接口地址:https://yd.yunding360.com/openapi/customer_flow/dimensions/multi/customize

接口描述:通过门店id根据数据时间来查询客群多维度聚合统计数据(包含自定义年龄段)

请求方式:POST

请求数据类型:application/json

请求示例:

{
  "storeIds": [
    "6ba88db0-0366-11ee-b1e7-3bfdb6ca4fd1"
  ],
  "storeCodes": [
    "code001"
  ],
  "mainDimension": "AGE",
  "contrastDimension": "GENDER",
  "queryDimension": "STORE",
  "timeType": "DAY",
  "startTime": 1686067200000,
  "endTime": 1686150000000
}

请求参数:

参数名称 参数说明 请求类型 是否必须 数据类型
api-version API版本号,可用值:v1 header true string
Authorization Oauth2认证令牌 header false string
storeIds 门店ID,如果不传则统计企业所有门店 body false List
storeCodes 门店编号(code) body false List
storeAreaIds 店内区域ID body false List
startTime 开始时间(必填),毫秒级时间戳 body true long
endTime 结束时间(必填),毫秒级时间戳 body true long
timeType 查询时间维度(必填),HOUR:小时 ,DAY:天 body true string
queryDimension 查询数据维度(必填),STORE:门店 ,STORE_AREA:店内区域 body true string
mainDimension 查询数据主维度(必填),AGE: 年龄 ,GENDER: 性别 body true string
contrastDimension 查询数据次维度(必填),AGE: 年龄 ,GENDER: 性别 body true string

响应状态:

状态码 说明
200 OK

响应示例:

{
  "mainDimension": "AGE",  //主维度
  "contrastDimension": "GENDER",  //次维度
  "content": [
    {
      "id": "1ef96a760351188a165892e34630b18",  //自定义年龄段id
      "name": "0~15岁",   //自定义年龄段名称
      "icon": null,
      "ratio": 0.0301,
      "count": 428,  //总数
      "items": [
        {
          "id": null,
          "name": "FEMALE", //性别维度: 女
          "icon": null,
          "count": 223,    //0~15岁的女性顾客人数
          "ratio": 0.0157
        },
        {
          "id": null,
          "name": "MALE", //性别维度: 男
          "icon": null,
          "count": 205, //0~15岁的男性顾客人数
          "ratio": 0.0144
        }
      ]
    },
    ......
    {
      "id": null,
      "name": "UNDER_EIGHTEEN", //系统年龄段名称:小于18岁
      "icon": null,
      "ratio": 0.0625,
      "count": 890, //总数
      "items": [
        {
          "id": null,
          "name": "FEMALE", //性别维度: 女
          "icon": null,
          "count": 453, //小于18岁的女性顾客人数
          "ratio": 0.0318
        },
        {
          "id": null,
          "name": "MALE", //性别维度: 男
          "icon": null,
          "count": 389, //小于18岁的男性顾客人数 
          "ratio": 0.0273
        }
      ]
    },
    ......
  ],
  "count": 14238 //总数
}

响应参数:

参数名称 参数说明 类型
mainDimension 主维度,AGE: 年龄 GENDER: 性别 string
contrastDimension 次维度,AGE: 年龄 GENDER: 性别 string
content 内容 array

content列表参数说明: | 参数名称 | 参数说明 | 类型 | |-----------------------------------|------------------------|--------| | id | 自定义维度id(系统定义则无id) | string | | name | 维度名称 | string | | icon | 图标 | string | | ratio | 占比 | float | | count | 总数 | int | | items | 次维度统计数据 | array |

items列表参数说明: | 参数名称 | 参数说明 | 类型 | |-----------------------------------|------------------------|--------| | id | 自定义维度id(系统定义则无id) | string | | name | 维度名称 | string | | icon | 图标 | string | | ratio | 占比 | float | | count | 总数 | int |