POST /api/v1/client-api/metrics/analytics/

获取分析数据

获取分析数据,用于洞察用户行为和性能数据图表,以便进一步在数据图表中使用。

Request body

chart_idstringrequired

指定所需的数据图表类型。每次请求只能指定一种数据图表类型。

One of: "revenue", "mrr", "arr", "arppu", "subscriptions_active", "subscriptions_new", "subscriptions_renewal_cancelled", "subscriptions_expired", "trials_active", "trials_new", "trials_renewal_cancelled", "trials_expired", "grace_period", "billing_issue", "refund_events", "refund_money", "non_subscriptions", "arpu", "installs"

filtersobjectrequired
datearray of stringrequired

输入您希望获取数据图表数据的日期或时间段

compare_datearray of string

输入用于对比的日期或时间段

storearray of string

按购买所在的应用商店进行筛选

countryarray of string

按购买发生地的两位字母国家代码进行筛选

store_product_idarray of string

应用商店中产品的唯一标识符

durationarray of string

指定订阅时长

attribution_sourcearray of string

归因的来源集成

attribution_statusarray of string

表示归因是自然流量还是非自然流量

attribution_channelarray of string

带来该交易的营销渠道

attribution_campaignarray of string

带来该交易的营销活动

attribution_adgrouparray of string

带来该交易的归因广告组

attribution_adsetarray of string

带来该交易的归因广告集

attribution_creativearray of string

广告或营销活动中用于衡量效果的特定视觉或文字素材

offer_categoryarray of string

指定您希望获取数据的优惠类别

offer_typearray of string

指定您希望获取数据的优惠类型

offer_idarray of string

指定您希望获取数据的具体优惠

period_unitstring

指定聚合分析数据的时间间隔

One of: "day", "week", "month", "quarter", "year"

date_typestring

指定将哪个日期视为用户加入日期

One of: "purchase_date", "profile_install_date"

segmentationstring

设置市场细分的依据

formatstring

指定导出文件格式

One of: "json", "csv"

Responses

分析数据获取成功

Schema

包含所请求数据图表类型分析数据的响应

dataobject

包含不同数据图表类型的对象(revenue、proceeds、net_revenue 等)

Example
{
  "data": {
    "revenue": {
      "data": [],
      "value": 0,
      "value_from": null,
      "value_to": null,
      "compare_value_from": null,
      "compare_value_to": null,
      "title": "revenue",
      "type": "multi",
      "default_aggregation": "sum",
      "description": "<div>Total money received from both subscriptions and one-time purchases. Does not include\nrevenue from subscriptions and purchases that were refunded afterward. Calculated before the store's fee.<br />\nFor example, there were 5 monthly $10 subs, 1 yearly $100 sub and 10 one-time $50 purchases today,<br />\nrevenue = 5*$10 + 1*$100 + 10*$50 = $650</div>",
      "metric_name": "Revenue",
      "is_json": true,
      "unit": "USD",
      "recommended_period": null
    },
    "proceeds": {
      "data": [],
      "value": 0,
      "value_from": null,
      "value_to": null,
      "compare_value_from": null,
      "compare_value_to": null,
      "title": "revenue",
      "type": "multi",
      "default_aggregation": "sum",
      "description": "<div>Total money received from both subscriptions and one-time purchases. Does not include\nrevenue from subscriptions and purchases that were refunded afterward. Calculated before the store's fee.<br />\nFor example, there were 5 monthly $10 subs, 1 yearly $100 sub and 10 one-time $50 purchases today,<br />\nrevenue = 5*$10 + 1*$100 + 10*$50 = $650</div>",
      "metric_name": "Revenue",
      "is_json": true,
      "unit": "USD",
      "recommended_period": null
    },
    "net_revenue": {
      "data": [],
      "value": 0,
      "value_from": null,
      "value_to": null,
      "compare_value_from": null,
      "compare_value_to": null,
      "title": "revenue",
      "type": "multi",
      "default_aggregation": "sum",
      "description": "<div>Total money received from both subscriptions and one-time purchases. Does not include\nrevenue from subscriptions and purchases that were refunded afterward. Calculated before the store's fee.<br />\nFor example, there were 5 monthly $10 subs, 1 yearly $100 sub and 10 one-time $50 purchases today,<br />\nrevenue = 5*$10 + 1*$100 + 10*$50 = $650</div>",
      "metric_name": "Revenue",
      "is_json": true,
      "unit": "USD",
      "recommended_period": null
    }
  }
}

错误请求

Schema
errorsarray of object
sourcestring
errorsarray of string
error_codestring
status_codeinteger

未授权

Schema
errorsarray of object
sourcestring
errorsarray of string
error_codestring
status_codeinteger