Reporter is a command-line tool that you can use to download your Subscriptions Reports and Payments and Financial Reports. It allows you to easily switch accounts if you use one Apple ID for multiple content provider accounts. You can also look up descriptions for errors and view the estimated time of availability for any delayed reports.
Open the Reporter.properties file using a text editor.
Configuration settings for Reporter are specified in a properties file, where each property consists of a key-value pair on a separate line. Save the properties file in the same directory as the Reporter.jar file, using the ".properties" file extension.
An access token is a unique code used in your Reporter properties file that lets you download sales and financial reports with Reporter.
Note: You can generate only one access token at a time per Apple ID. Your access token will automatically expire after 180 days. If you generate a new access token, your previous access token immediately expires.
Generate access token using generateToken command
The generateToken command generates an access token to input into your properties file. This command always returns plain text, even in Robot mode.
Note: This command requires Reporter 2.2 or later. To download the latest version of Reporter, see Download Reporter.
[application name] - Replace with “Sales” or “Finance”
Note: You only need to generate one access token to access both the Sales and Finance applications. You do not need to generate separate access tokens.
Example
$ java -jar Reporter.jar p=Reporter.properties Sales.generateTokenPlease type in your username: ********Please type in your password: ********Once you generate an access token, you won't be able to log in to Reporter with your username and password. Do you still want to continue? (y/n):
If input is 'y':
Your access token has been generated.AccessToken:12abc345-de6f-7ghi-89jk123lmnoExpiration Date:2017-06-07
(Expiration Date format: YYYY-MM-DD)
If user already has a token:
$ java -jar Reporter.jar p=Reporter.properties Sales.generateTokenPlease type in your username: ********Please type in your password: ********If you generate a new access token, your existing token will be deleted. Do you still want to continue? (y/n):
View access token
The viewToken command returns your current access token. This command always returns plain text, even in Robot mode.
[application name] - Replace with “Sales” or “Finance”
Examples
Unexpired token
$ java -jar Reporter.jar p=Reporter.properties Sales.viewTokenPlease type in your username: ********Please type in your password: ********AccessToken:12abc345-de6f-7ghi-89jk123lmnoExpiration Date:2017-06-07
(Expiration Date format: YYYY-MM-DD)
Expired token
$ java -jar Reporter.jar p=Reporter.properties Sales.viewTokenPlease type in your username: ********Please type in your password: ********AccessToken:12abc345-de6f-7ghi-89jk123lmnoExpiration Date:2017-06-07Your existing token is expired. Type generateToken to generate a new one.
No token yet
$ java -jar Reporter.jar p=Reporter.properties Sales.viewTokenPlease type in your username: ********Please type in your password: ********You currently don't have an access token. Type generateToken to generate a new one.
Delete access token
The deleteToken command deletes your existing access token. You will no longer be able to use a deleted access token. This command always returns plain text, even in Robot mode.
Note: If your Apple ID has access to multiple accounts, you’ll need to specify the account number you’d like to use. The command-line parameters, if specified, will override the value in the properties file. To see a list of your accounts, use the Get Accounts command.
General Commands
Get Status
The getStatus command returns the status of the Reporter service for your financial reports.
In Robot mode, if the service is available, getStatus will return a “0” code. If the service is unavailable, getStatus will return a “1” error code.
If an estimated time of availability is known, getStatus will return a “retry” value. The retry value is expressed in milliseconds, and indicates how long to wait before trying again.
$ java -jar Reporter.jar p=[properties file] Sales.getReportVersion apSubscriptionsSales, SummaryThe current version of the apsubscriptionssales (summary) report is 1_0.
Report Versions for Subscriptions (Robot Mode)
$ java -jar Reporter.jar p=[properties file] Sales.getReportVersion Sales, Detailed<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Report Version>The current version of the Sales (Detailed) report is 1_2</Report Version>
Get Vendor Numbers (Subscriptions Reporting)
The Sales.getVendors command returns a list of vendor numbers for which you can download reports.
In Normal mode, each vendor is on a separate line.
Get Vendor Numbers and Regions (Financial Reports)
The Finance.getVendorsAndRegions command returns a list of report types you can download by vendor number and region. See the getReport command for a description of report types.
$ java -jar Reporter.jar p=Reporter.properties Finance.getVendorsAndRegionsThe following reports are available for vendor 80012345:US: Financial,Match,Radio,RadioSummaryJP: Financial,MatchThe following reports are available for vendor 80067891:CA: Financial,Match,Radio,RadioSummary,AppleMusic,AppleMusicSummary
Use the vendor number for the report you want to download. For a list of your vendor numbers, use the getVendorsAndRegions command.
Region Code
Two-character code of country of report to download. For a list of country codes by vendor number, use getVendorsAndRegions command. For a consolidated report which shows all available currencies, use region ZZ. Reporter will provide the consolidated report instead of individual reports by country.
Report Type
Specific type of report to download (for example, Financial).
Fiscal Year
Four-digit year of report to download. Year is specific to Apple’s fiscal calendar.
Fiscal Period
This is the period in fiscal year for the report you’re downloading (1–12). The period is specific to Apple’s fiscal calendar.
Version
This is the version of the report you want to download.
Application and method name are incorrectly specified. Use format ApplicationName.MethodName. For example, Sales.getHelp.
101
Invalid method is specified. Call ApplicationName.getHelp for a list of valid methods for the application.
102
Too few or too many parameters specified for the method. Call ApplicationName.getHelp for a list of valid methods and their parameters.
103
Properties file not specified. Use format p=PropertiesFile.
104
Cannot find properties file. Make sure it resides in the same directory.
105
Cannot read properties file. Check the file format and try again.
108
Invalid username and password. Change values and try again.
109
Properties file does not contain an endpoint. Add to file and try again.
110
Network is not available. Check connection and try again.
111
Network is available but cannot connect to application. Check your proxy and firewall settings and try again.
112
Cannot save file. Make sure you have enough space and have write access to the current directory.
113
Invalid output style format.
114
API Version is not specified in service end point.
115
API Version Of Service Endpoint is not matching with Application's service API.
117
[Type of report] reports are delayed. Please try again in [Availability estimate].
If an estimated time of availability is known, a “retry” value is also returned. The retry value is expressed in milliseconds, and indicates how long to wait before trying again.
119
Report was not fully downloaded. Please try again.
120
The version parameter you have specified is invalid.
121
Please include the version parameter.
123
Your Access Token is expired. Please regenerate your Access Token.
124
Your Access Token is invalid.
125
Your Access Token is incorrectly specified. Please use the following format: AccessToken=value.
131
Username and password are incorrectly entered. Use format:
Please type in your username: =value
Please type in your password: =value
132
You are required to use your Access Token in your Reporter properties file. You may no longer use your username and password in your Reporter properties file.
Invalid report subtype specified. Valid values include: Detailed and Summary.
203
Invalid combination of report type and report subtype. Try again.
204
Invalid date type specified. Valid values include: Daily, Weekly, Monthly, and Yearly.
205
Invalid date. For weekly reports, please specify the date of the Sunday ending the desired week.
206
Invalid combination of report subtype and date type. Try again.
207
Invalid date.
208
Invalid combination of date type and date. For daily and weekly reports, use format YYYYMMDD. For monthly, use YYYYMM. For yearly, use YYYY.
209
Report is no longer available. Daily reports are available for 365 days, weekly reports for 52 weeks, monthly reports for 12 months, and yearly reports indefinitely.
211
Report is unexpectedly not available. Try again later.
212
An unexpected error occurred. Try again later.
213
There were no sales for the date specified.
214
You have access to more than one account. Please specify an account number in your properties file or on the command line. To see a list of accounts, run the command getAccounts.
215
Invalid account number specified. To see a list of accounts, run the command getAccounts.
216
Invalid account number specified in properties file. To see a list of accounts, run the command getAccounts.
300
Invalid vendor number specified. Try again.
316
Invalid region code.
314
Invalid fiscal year.
315
Invalid fiscal period.
Modes
Reporter has two modes of operation: Normal and Robot.
Normal mode is intended for an actual user that executes ad-hoc commands. Messages are displayed in easily readable text.
Robot mode is intended for an automated script that’s used regularly. Messages in robot mode are displayed in XML for easy parsing.
You can specify the mode in the properties file or directly on the command line. The command line mode, if specified, will override the value in the properties file.
Mode
Properties File Format
Command Line Format
Normal
Mode=Normal
m=Normal
Robot
Mode-Robot.XML
m=Robot.XML
Properties File
The table below describes the properties used by Reporter, all of which are required.
If your Apple ID has access to multiple accounts, you’ll need to specify the account number you’d like to use.
You can also specify an account number as a parameter in the command line. The command-line mode, if specified, will override the value in the properties file.
To see a list of your accounts, use the Get Accounts command.
You can change the URL to specify different versions of the service. Only version 1 is currently available. Unless you upgrade to a new version, you usually won’t need to change this.
FinanceUrl
URL of the Payments and Financial Reports service for Reporter.
You can change the URL to specify different versions of the service. Only version 1 is currently available. Unless you upgrade to a new version, you usually won’t need to change this.