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 it into structured JSON data for easier consumption in workflows.

Common scenarios where this node is beneficial include:

  • Automating the retrieval of monthly financial data for app sales, subscriptions, and other revenue streams.
  • Integrating Apple financial data into business intelligence or accounting systems.
  • Monitoring regional sales performance by specifying region codes.
  • Parsing detailed transaction-level data for deeper analysis.

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 automatically process and store the parsed data in a database.

Properties

Name Meaning
Report Type Select between "Financial Report" (summary) or "Financial Detail Report" (transaction-level).
Vendor Number The unique identifier assigned to the vendor (required).
Report Date (YYYY-MM) The month and year of the report to download, formatted as "YYYY-MM" (required).
Region Code The region code for the report; use "ZZ" or "Z1" to select all regions (required).
Options Additional options:
- Put Result in Field: Name of the output field to store the result (default: "report").

Output

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

  • json — An object containing 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: Array of detailed transaction records.
      • <result_field>_aggregated: Array of aggregated summary data.
    • For Financial Reports, two fields are added:
      • <result_field>_detailed: Array of detailed summary rows.
      • <result_field>_aggregated: Array of aggregated summary rows.
  • binary — When using the "Download" operation, the raw report file is provided as binary data under the field name specified by the "Put Result in Field" option (default "report"). The binary data represents the decompressed TSV report file.

Each output item also includes pairedItem metadata linking it back to the corresponding input item.

Dependencies

  • Requires an API key credential with appropriate permissions to access the Apple App Store Connect Finance Reports API.
  • Uses JWT authentication to generate a bearer token for API requests.
  • Makes HTTP GET requests to the Apple API endpoint for finance reports.
  • Decompresses gzip-compressed response data.
  • Uses Node.js modules: axios for HTTP requests, jsonwebtoken for JWT creation, zlib for decompression, and url for URL parameter construction.

Troubleshooting

  • API Authentication Errors: If the node fails with authorization errors, verify that the API key credentials (issuer ID, private key, key ID) are correctly configured and have sufficient permissions.
  • Invalid Report Date or Vendor Number: Ensure the "Report Date" is in "YYYY-MM" format and the vendor number is correct.
  • Region Code Issues: Use valid region codes; "ZZ" or "Z1" can be used to request all regions.
  • Network or API Errors: Network issues or Apple API downtime may cause request failures. Check connectivity and retry later.
  • Parsing Errors: If parsing fails, confirm the report type matches the expected format and the report content is not corrupted.
  • Binary Data Handling: When using the "Download" operation, ensure subsequent nodes can handle binary data properly.

Links and References

Discussion