asc-reports

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

asc Sales & Finance Reports

asc 销售与财务报告

Download sales and trends data and financial reports from App Store Connect. See commands.md for detailed flag reference and valid enum values.
从App Store Connect下载销售和趋势数据以及财务报告。详细的参数参考和有效枚举值请查看commands.md

Commands

命令

Download a sales report

下载销售报告

bash
asc sales-reports download \
  [--vendor-number <VENDOR_NUMBER>] \
  --report-type SALES \
  --sub-type SUMMARY \
  --frequency DAILY \
  [--report-date 2024-01-15] \
  [--output json|table] \
  [--pretty]
--vendor-number
is auto-resolved from the active account if saved via
asc auth login --vendor-number
or
asc auth update --vendor-number
. Explicit
--vendor-number
overrides the stored value.
--report-date
is optional only for DAILY frequency — omit to get the latest available daily report. For WEEKLY, MONTHLY, and YEARLY frequencies,
--report-date
is mandatory (Apple returns
PARAMETER_ERROR.INVALID
without it).
bash
asc sales-reports download \
  [--vendor-number <VENDOR_NUMBER>] \
  --report-type SALES \
  --sub-type SUMMARY \
  --frequency DAILY \
  [--report-date 2024-01-15] \
  [--output json|table] \
  [--pretty]
如果已通过
asc auth login --vendor-number
asc auth update --vendor-number
保存了供应商编号,
--vendor-number
从当前账户自动解析。显式传入
--vendor-number
会覆盖已存储的值。仅当频率为DAILY时,
--report-date
是可选的——省略该参数将获取最新可用的每日报告。对于WEEKLY、MONTHLY和YEARLY频率,
--report-date
必填项(如果不传入,Apple会返回
PARAMETER_ERROR.INVALID
错误)。

Download a finance report

下载财务报告

bash
asc finance-reports download \
  [--vendor-number <VENDOR_NUMBER>] \
  --report-type FINANCIAL \
  --region-code US \
  --report-date 2024-01 \
  [--output json|table] \
  [--pretty]
--vendor-number
is auto-resolved from the active account if saved. All other flags are required for finance reports (including
--report-date
).
bash
asc finance-reports download \
  [--vendor-number <VENDOR_NUMBER>] \
  --report-type FINANCIAL \
  --region-code US \
  --report-date 2024-01 \
  [--output json|table] \
  [--pretty]
如果已保存供应商编号,
--vendor-number
会从当前账户自动解析。财务报告的其他所有参数均为必填项(包括
--report-date
)。

Report Types Quick Reference

报告类型速查

Sales Report TypeDescription
SALES
App and in-app purchase sales
PRE_ORDER
Pre-order data
SUBSCRIPTION
Auto-renewable subscription activity
SUBSCRIPTION_EVENT
Subscription lifecycle events
SUBSCRIBER
Active subscriber counts
INSTALLS
First-time downloads
FIRST_ANNUAL
First annual subscription renewals
WIN_BACK_ELIGIBILITY
Win-back offer eligible users
Finance Report TypeDescription
FINANCIAL
Financial summary with proceeds
FINANCE_DETAIL
Detailed financial breakdown
销售报告类型描述
SALES
应用和内购项目销售数据
PRE_ORDER
预购数据
SUBSCRIPTION
自动续订订阅活动数据
SUBSCRIPTION_EVENT
订阅生命周期事件数据
SUBSCRIBER
活跃订阅用户数
INSTALLS
首次下载量
FIRST_ANNUAL
首次年度订阅续订数据
WIN_BACK_ELIGIBILITY
符合赢回资格的用户数据
财务报告类型描述
FINANCIAL
包含收益的财务汇总报告
FINANCE_DETAIL
详细财务分项报告

Output Format

输出格式

Reports return dynamic TSV data from Apple, parsed into JSON arrays. Column names vary by report type.
json
{
  "data" : [
    {
      "Provider" : "APPLE",
      "SKU" : "com.example.app",
      "Title" : "My App",
      "Units" : "10",
      "Developer Proceeds" : "6.99",
      "Currency of Proceeds" : "USD"
    }
  ]
}
Use
--output table
for a tabular view of the same data.
报告返回的是Apple提供的动态TSV数据,会被解析为JSON数组。列名随报告类型不同而变化。
json
{
  "data" : [
    {
      "Provider" : "APPLE",
      "SKU" : "com.example.app",
      "Title" : "My App",
      "Units" : "10",
      "Developer Proceeds" : "6.99",
      "Currency of Proceeds" : "USD"
    }
  ]
}
使用
--output table
参数可获得相同数据的表格视图。

Typical Workflow

典型工作流

bash
undefined
bash
undefined

0. Save vendor number once (found in App Store Connect → Payments and Financial Reports)

0. 一次性保存供应商编号(可在App Store Connect → 付款与财务报告中找到)

asc auth update --vendor-number 88012345
asc auth update --vendor-number 88012345

1. Get daily sales summary (vendor number auto-resolved)

1. 获取每日销售汇总(供应商编号自动解析)

asc sales-reports download
--report-type SALES
--sub-type SUMMARY
--frequency DAILY
--report-date 2024-01-15
--pretty
asc sales-reports download
--report-type SALES
--sub-type SUMMARY
--frequency DAILY
--report-date 2024-01-15
--pretty

2. Check monthly subscription metrics

2. 查看月度订阅指标

asc sales-reports download
--report-type SUBSCRIPTION
--sub-type SUMMARY
--frequency MONTHLY
--report-date 2024-01
--pretty
asc sales-reports download
--report-type SUBSCRIPTION
--sub-type SUMMARY
--frequency MONTHLY
--report-date 2024-01
--pretty

3. Download financial report for US proceeds

3. 下载美国地区的收益财务报告

asc finance-reports download
--report-type FINANCIAL
--region-code US
--report-date 2024-01
--pretty
undefined
asc finance-reports download
--report-type FINANCIAL
--region-code US
--report-date 2024-01
--pretty
undefined

Important Notes

重要说明

  • Vendor number auto-resolution: Save it once with
    asc auth update --vendor-number <number>
    or
    asc auth login --vendor-number <number>
    . All report commands auto-resolve from the active account. Use
    --vendor-number
    to override.
  • The vendor number can be found in App Store Connect under "Sales and Trends" → "Payments and Financial Reports"
  • Reports are gzip-compressed TSV from Apple's API — the CLI handles decompression and parsing automatically
  • --report-date
    is only optional for DAILY frequency; WEEKLY, MONTHLY, and YEARLY require it. Weekly dates must be a Sunday.
  • Not all report type + sub-type + frequency combinations are valid; Apple returns an error for unsupported combinations
  • Finance reports require
    --region-code
    (e.g.
    US
    ,
    EU
    ,
    JP
    ,
    AU
    ) and
    --report-date
  • Daily reports are typically available after a 1-day delay; monthly reports after the month ends
  • 供应商编号自动解析:使用
    asc auth update --vendor-number <编号>
    asc auth login --vendor-number <编号>
    一次性保存后,所有报告命令都会从当前账户自动解析该编号。可使用
    --vendor-number
    参数覆盖已保存的值。
  • 供应商编号可在App Store Connect的“销售与趋势” → “付款与财务报告”中找到
  • Apple API返回的报告是gzip压缩的TSV格式——CLI会自动处理解压缩和解析操作
  • --report-date
    仅在DAILY频率下是可选的;WEEKLY、MONTHLY和YEARLY频率必须传入该参数。周报告的日期必须为周日。
  • 并非所有报告类型+子类型+频率的组合都有效;对于不支持的组合,Apple会返回错误
  • 财务报告需要传入
    --region-code
    (例如
    US
    EU
    JP
    AU
    )和
    --report-date
    参数
  • 每日报告通常会延迟1天可用;月度报告在当月结束后可用

Analytics Reports

分析报告

Multi-step workflow for app engagement, commerce, usage, framework, and performance analytics.
获取应用参与度、商务数据、使用情况、框架和性能分析报告的多步骤工作流。

Commands

命令

bash
undefined
bash
undefined

Create a report request

创建报告请求

asc analytics-reports request --app-id <id> --access-type ONE_TIME_SNAPSHOT|ONGOING
asc analytics-reports request --app-id <id> --access-type ONE_TIME_SNAPSHOT|ONGOING

List existing requests

列出现有请求

asc analytics-reports list --app-id <id> [--access-type ONGOING]
asc analytics-reports list --app-id <id> [--access-type ONGOING]

Delete a request

删除请求

asc analytics-reports delete --request-id <id>
asc analytics-reports delete --request-id <id>

List reports by category

按类别列出报告

asc analytics-reports reports --request-id <id> [--category APP_USAGE|APP_STORE_ENGAGEMENT|COMMERCE|FRAMEWORK_USAGE|PERFORMANCE]
asc analytics-reports reports --request-id <id> [--category APP_USAGE|APP_STORE_ENGAGEMENT|COMMERCE|FRAMEWORK_USAGE|PERFORMANCE]

List instances by granularity

按粒度列出实例

asc analytics-reports instances --report-id <id> [--granularity DAILY|WEEKLY|MONTHLY]
asc analytics-reports instances --report-id <id> [--granularity DAILY|WEEKLY|MONTHLY]

Get download URLs

获取下载链接

asc analytics-reports segments --instance-id <id>
undefined
asc analytics-reports segments --instance-id <id>
undefined

Analytics Workflow

分析工作流

bash
undefined
bash
undefined

1. Request analytics

1. 请求分析报告

asc analytics-reports request --app-id 6450000000 --access-type ONE_TIME_SNAPSHOT --pretty
asc analytics-reports request --app-id 6450000000 --access-type ONE_TIME_SNAPSHOT --pretty

2. List commerce reports

2. 列出商务类报告

asc analytics-reports reports --request-id req-abc --category COMMERCE --pretty
asc analytics-reports reports --request-id req-abc --category COMMERCE --pretty

3. Get daily instances

3. 获取每日实例数据

asc analytics-reports instances --report-id rpt-xyz --granularity DAILY --pretty
asc analytics-reports instances --report-id rpt-xyz --granularity DAILY --pretty

4. Get download URLs

4. 获取下载链接

asc analytics-reports segments --instance-id inst-123 --pretty

Analytics responses include CAEOAS affordances guiding the agent through each step of the hierarchy.
asc analytics-reports segments --instance-id inst-123 --pretty

分析报告的响应包含CAEOAS相关配置,可引导Agent完成层级中的每一步操作。

Reference

参考

See commands.md for the full list of valid enum values for each flag.
查看commands.md获取每个参数的完整有效枚举值列表。