4.2 销售额数据接口 - getSalesAmount
优质
小牛编辑
139浏览
2023-12-01
销售额数据接口 - getSalesAmount
获取某个品类的销售额状况
Request Parameters
Parameter name | Type | Description | Required |
---|---|---|---|
category_id | string | 品类id | Yes |
platform_id | string | 平台id,如果为空,则不做过滤 | No |
brand_id | string | 品牌id,如果为空,则不做过滤 | No |
product_id | int | SKU单品id,如果为空,则不做过滤 | No |
time_type | string | 汇总标准: Year ,Quarter ,Month ,Week ,如果不提供,默认为Month | No |
start_time | 查询时间段起始时间,格式为时间字符串或者unix时间戳 | 查询开始时间,如果不提供,则根据结束时间与汇总类型进行计算 | No |
end_time | 请求串生成时间,格式为时间字符串或者unix时间戳 | 查询截止时间,如果不提供,默认当天 | No |
Response Elements
Parameter name | Type | Description |
---|---|---|
action | string | 响应动作 |
sales_volume | array | 时间序列列表,每项参数可见下面 Response Item |
total_count | int | 根据过滤条件得到的结果集数量 |
Response Item
Parameter name | Type | Description |
---|---|---|
time | string | 数据纵轴: year : 2015, month :2015-03月,quarter :2015Q1, week :2015-03-23 |
sales_amount | int | 销售量 |
annulus_growth | double | 环比增长率 |
yearonyear_growth | double | 同比增长率 |
示例
请求示例
http://open.syntun.cn/api/dq/getSalesAmount
&category_id=315
&time_type=Quarter
&COMMON_PARAMS
响应示例
{
"code": 1000,
"msg": "OK",
"data": {
"action": "getSalesAmount",
"sales_amount": [
{
"time": "2014Q1",
"sales_amount": "1526564948.35",
"annulus_growth": "-",
"yearonyear_growth": "-"
},
{
"time": "2014Q2",
"sales_amount": "2992632424.71",
"annulus_growth": "96.04",
"yearonyear_growth": "-"
},
{
"time": "2014Q3",
"sales_amount": "2687034942.02",
"annulus_growth": "-10.21",
"yearonyear_growth": "-"
},
{
"time": "2014Q4",
"sales_amount": "2224126558.01",
"annulus_growth": "-17.23",
"yearonyear_growth": "-"
},
{
"time": "2015Q1",
"sales_amount": "919757967.73",
"annulus_growth": "-58.65",
"yearonyear_growth": "-39.75"
},
{
"time": "2015Q2",
"sales_amount": "280380576.77",
"annulus_growth": "-69.52",
"yearonyear_growth": "-90.63"
}
],
"total_count": 6
}
}