AppStore Finance icon

AppStore Finance

Download Apple App Store financial reports

Overview

This node allows users to download financial reports from the Apple App Store Connect API. It supports downloading two types of reports: a general Financial Report and a more detailed Financial Detail Report. The node can either download the raw report file or download and parse the report into structured JSON data.

Common scenarios for this node include:

  • Automating the retrieval of monthly financial data for app sales, subscriptions, and in-app purchases.
  • Integrating Apple App Store financial data into business intelligence or accounting workflows.
  • Parsing detailed transaction-level data for deeper analysis of revenue sources by region or product.

For example, a user could configure the node to download the financial report for vendor number "123456" for March 2024 across all regions ("ZZ"), then parse and store the aggregated revenue data in their database.

Properties

Name Meaning
Report Type Select between "Financial Report" (summary) or "Financial Detail Report" (transaction-level).
Vendor Number The unique identifier for the vendor whose reports are being requested.
Report Date (YYYY-MM) The year and month of the report to download, formatted as "YYYY-MM".
Region Code The region code for the report; use "ZZ" or "Z1" to request data for all regions.
Options Additional options:
- Put Result in Field: Name of the output field where the report data will be stored (default is "report").

Output

The node outputs an array of items corresponding to each input item processed. Each output item contains:

  • A json object with parsed report data when using the "Download & Parse" operation:

    • For Financial Detail Reports, three fields are added:
      • <result_field>_meta: Metadata key-value pairs extracted from the report header.
      • <result_field>_detailed: An array of detailed transaction records.
      • <result_field>_aggregated: An array of aggregated summary records.
    • For Financial Reports, two fields are added:
      • <result_field>_detailed: An array of detailed records.
      • <result_field>_aggregated: An array of aggregated summary records.
  • A binary property containing the raw TSV report file when using the "Download" operation. The binary data is named report_<Report Date>.tsv.

The exact output field name defaults to "report" but can be customized via the "Put Result in Field" option.

Dependencies

  • Requires an API key credential for authenticating with the Apple App Store Connect API.
  • Uses the Apple JWT authentication scheme with ES256 algorithm.
  • Makes HTTP requests to the Apple Finance Reports API endpoint.
  • Utilizes Node.js built-in modules for URL handling, zlib for decompressing gzip data, and axios for HTTP requests.

Troubleshooting

  • Authentication errors: Ensure the API key credentials (private key, issuer ID, key ID) are correctly configured and valid. Expired or malformed JWT tokens will cause authorization failures.
  • Invalid parameters: The vendor number, report date, or region code must be accurate and correspond to existing data in App Store Connect. Incorrect values may result in empty responses or errors.
  • Network issues: Connectivity problems or API rate limits may cause request failures. Check network access and retry after some time if rate limited.
  • Parsing errors: If the report format changes or the data is corrupted, parsing the TSV content may fail. Verify the report file manually if parsing errors occur.

Links and References

Discussion