PHPackages                             salonhub/itc-reporter - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. salonhub/itc-reporter

AbandonedArchivedLibrary

salonhub/itc-reporter
=====================

PHP package for downloading stats from iTunes Connect - Replacement for Apples Java based Reporter.jar

2.0.3(1y ago)015MITPHPPHP &gt;=7.3.0

Since Dec 3Pushed 1y agoCompare

[ Source](https://github.com/Salonhub/itc-reporter)[ Packagist](https://packagist.org/packages/salonhub/itc-reporter)[ Docs](https://github.com/salonhub/itc-reporter)[ RSS](/packages/salonhub-itc-reporter/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (4)Versions (2)Used By (0)

iTunes Connect Reporter (ITC Reporter)
======================================

[](#itunes-connect-reporter-itc-reporter)

This project is a fork of the orignial ITC Reporter created by Mike Barlow for use in Salonhub. It contains only minor changes to keep it working.

[![Source Code](https://camo.githubusercontent.com/30e35ef4beb27bf09fea41bcd3ea1ddc75380f45b391e561b04b06a1a6c928c6/687474703a2f2f696d672e736869656c64732e696f2f62616467652f736f757263652d73616c6f6e6875622f6974632d2d7265706f727465722d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](https://github.com/salonhub/itc-reporter)[![Latest Version](https://camo.githubusercontent.com/78016b8656c450a96b58384150ecf8deae91e5536fe94846982f0131c0b6eb53/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f73616c6f6e6875622f6974632d7265706f727465722e7376673f7374796c653d666c61742d737175617265)](https://github.com/salonhub/itc-reporter/releases)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](https://github.com/salonhub/itc-reporter/blob/master/LICENSE)

Introduction
------------

[](#introduction)

ITC Reporter is a PSR-2 compliant package used for getting data from iTunes Connect. It acts as a PHP port of the Java based reporter.jar that apple provide [here](https://help.apple.com/itc/appsreporterguide/#/itc0f2481229).

The current Autoingestion Tool will cease to work from the end of November 2016 and they recommended everyone switch to use the new Reporter tool in this [post](https://itunespartner.apple.com/en/apps/news/47110289).

This is the first PHP Composer based port of the Reporter tool and attempts to make using the tool and reports easier by processing the XML that is returned by the API and returning it as an Array to make usage easier.

Requirements
------------

[](#requirements)

### Composer

[](#composer)

ITC-Reporter requires the following:

- "php": "&gt;=7.3.0"
- "guzzlehttp/guzzle": "7.\*"
- "snscripts/result": "1.0.\*"

And the following if you wish to run in dev mode and run tests.

- "phpunit/phpunit": "~4.0"
- "squizlabs/php\_codesniffer": "~2.0"

Installation
------------

[](#installation)

### Composer

[](#composer-1)

Simplest installation is via composer.

```
composer require salonhub/itc-reporter 2.*

```

or adding to your projects `composer.json` file.

```
{
    "require": {
        "salonhub/itc-reporter": "2.*"
    }
}

```

### Setup

[](#setup)

Instantiate the class as follows.

```
$Reporter = new \Snscripts\ITCReporter\Reporter(
	new \GuzzleHttp\Client
);

```

Usage
-----

[](#usage)

### Basics

[](#basics)

Aside from the main methods that return the data, all methods support chaining.

To use the Reporter, you will need the an access token for your iTunes Connect account. This is obtained from the [iTunes Connect Sales and Trends screen](https://reportingitc2.apple.com/reports.html), as described in the [Reporter documentation](https://help.apple.com/itc/appsreporterguide/#/apd2f1f1cfa3). Set the access token as follows.

```
$Reporter->setAccessToken('12345678-1234-abcd-abcd-12345678abcd');

```

There are also "getter" methods to retrieve the currently set data.

```
$Reporter->getAccessToken();

```

Before progressing any further with this package, it will be worth while reviewing Apples Documentation at .

### Account Numbers

[](#account-numbers)

Most actions require an account number also setting. You can retrieve the accounts your user has available for both "Sales &amp; Trends" and "Payments &amp; Financial Reports" by using the following functions.

```
$Reporter->getSalesAccounts();
$Reporter->getFinanceAccounts();

```

Both of these return data in the same array format. If you have no access to any accounts a blank array will be returned. If you do have access they will return an array in the following format.

```
[
    1234567 => [
        'Name' => 'John Smith',
        'Number' => 1234567
    ],
    9876543 => [
        'Name' => 'Jane Doe',
        'Number' => 9876543
    ]
]

```

The 'Number' element is the account number that is needed for the rest of the endpoints.

You can set the account number you wish to use by calling;

```
$Reporter->setAccountNum(1234567);

```

You can then also retrieve the currently set account number with:

```
$Reporter->getAccountNum();

```

### Vendor Number

[](#vendor-number)

One last ID needed before a report can be retrieved is the Vendor number. Before you can get the list of vendors an Account Number does need to be set.

Once an Account Number is set you can get the Vendors for both "Sales &amp; Trends" and "Payments &amp; Financial Reports", the data returned for Sales &amp; Trends Vendors differs from Payments &amp; Financial Vendors.

In both instances, if no vendors exists, a blank array will be returned.

#### Sales Vendors

[](#sales-vendors)

Use the following function to get the Vendors for the Sales &amp; Trends

```
$Reporter->getSalesVendors();

```

This will return a simple array of Vendor numbers.

```
[
    1234567,
    9876543
]

```

#### Finance Vendors

[](#finance-vendors)

Use the following function get the Vendors for the Payments &amp; Financial Reports.

```
$Reporter->getFinanceVendors();

```

This returns a slightly more complicated array, detailing the Vendor, the Region Codes available and the Reports available for each Region Code.

```
[
    1234567 => [
        'Number' => 1234567,
        'Regions' => [
            'AE' => [
                'Code' => 'AE',
                'Reports' => [
                    'Financial'
                ]
            ],
            'AU' => [
                'Code' => 'AU',
                'Reports' => [
                    'Financial'
                ]
            ]
        ]
    ],
    9876543 => [
        'Number' => 9876543,
        'Regions' => [
            'EU' => [
                'Code' => 'EU',
                'Reports' => [
                    'Financial'
                ]
            ]
        ]
    ]
]

```

### Reports

[](#reports)

Both Sales Reports and the Financial Reports require specific data regarding the type of report you want. Consult the documentation for each section so you know what parameters are available.

#### Sales Report

[](#sales-report)

For Sales reports, consult the documentation [here](https://help.apple.com/itc/appsreporterguide/#/itcbd9ed14ac) to view descriptions of the parameters.

To get reports call the method in the following way:

```
$Reporter->getSalesReport(
	$vendorNum,
	$reportType,
	$reportSubType,
	$dateType,
	$date
);

```

An actual call may look something like this:

```
$Reporter->getSalesReport(
	1234567,
	'Sales',
	'Summary',
	'Daily',
	'20161025' //YYYYMMDD
);

```

If nothing was found or a problem occurred, a blank array will be returned. If the report does have data an array similar to below will be returned.

```
[
    [
        [Provider] => APPLE
        [Provider Country] => US
        [SKU] => 12345678901
        [Developer] => John Smith
        [Title] => My App
        [Version] => 2.0.1
        [Product Type Identifier] => 1F
        [Units] => 1
        [Developer Proceeds] => 0
        [Begin Date] => 10/23/2016
        [End Date] => 10/23/2016
        [Customer Currency] => AUD
        [Country Code] => AU
        [Currency of Proceeds] => AUD
        [Apple Identifier] => 123456789
        [Customer Price] => 0
        [Promo Code] =>
        [Parent Identifier] =>
        [Subscription] =>
        [Period] =>
        [Category] => Travel
        [CMB] =>
        [Device] => iPad
        [Supported Platforms] => iOS
        [Proceeds Reason] =>
        [Preserved Pricing] =>
        [Client] =>
    ],
    [
        [Provider] => APPLE
        [Provider Country] => US
        [SKU] => 12345678901
        [Developer] => John Smith
        [Title] => My App
        [Version] => 2.0.1
        [Product Type Identifier] => 3F
        [Units] => 1
        [Developer Proceeds] => 0
        [Begin Date] => 10/23/2016
        [End Date] => 10/23/2016
        [Customer Currency] => USD
        [Country Code] => BR
        [Currency of Proceeds] => USD
        [Apple Identifier] => 123456789
        [Customer Price] => 0
        [Promo Code] =>
        [Parent Identifier] =>
        [Subscription] =>
        [Period] =>
        [Category] => Travel
        [CMB] =>
        [Device] => iPhone
        [Supported Platforms] => iOS
        [Proceeds Reason] =>
        [Preserved Pricing] =>
        [Client] =>
    ]
]

```

#### Financials- Report

[](#financials--report)

For Financial reports, consult the documentation [here](https://help.apple.com/itc/appsreporterguide/#/itc21263284f) to view descriptions of the parameters.

To get reports call the method in the following way:

```
$Reporter->getFinanceReport(
	$vendorNum,
	$regionCode,
	$reportType,
	$fiscalYear,
	$fiscalPeriod
);

```

An actual call may look something like this:

```
$Reporter->getSalesReport(
	1234567,
	'GB',
	'Financial',
	'2016',
	'1' //YYYYMMDD
);

```

If nothing was found or a problem occurred, a blank array will be returned. If the report does have data an array similar to below will be returned.

```
[
    [
        [Start Date] => 09/27/2015
        [End Date] => 10/31/2015
        [UPC] =>
        [ISRC/ISBN] =>
        [Vendor Identifier] => 123456789012
        [Quantity] => 22
        [Partner Share] => 0.46
        [Extended Partner Share] => 10.12
        [Partner Share Currency] => GBP
        [Sales or Return] => S
        [Apple Identifier] => 123456789
        [Artist/Show/Developer/Author] => John Smith
        [Title] => My App
        [Label/Studio/Network/Developer/Publisher] =>
        [Grid] =>
        [Product Type Identifier] => 1
        [ISAN/Other Identifier] =>
        [Country Of Sale] => GB
        [Pre-order Flag] =>
        [Promo Code] =>
        [Customer Price] => 0.79
        [Customer Currency] => GBP
    ],
    [
        [Start Date] => 09/27/2015
        [End Date] => 10/31/2015
        [UPC] =>
        [ISRC/ISBN] =>
        [Vendor Identifier] => 123789456
        [Quantity] => 1
        [Partner Share] => 0.46
        [Extended Partner Share] => 0.46
        [Partner Share Currency] => GBP
        [Sales or Return] => S
        [Apple Identifier] => 987654321
        [Artist/Show/Developer/Author] => John Smith
        [Title] => My App 2
        [Label/Studio/Network/Developer/Publisher] =>
        [Grid] =>
        [Product Type Identifier] => 1F
        [ISAN/Other Identifier] =>
        [Country Of Sale] => GB
        [Pre-order Flag] =>
        [Promo Code] =>
        [Customer Price] => 0.79
        [Customer Currency] => GBP
    ],
    [Total_Rows] => 6
    [Total_Amount] => 28.32
    [Total_Units] => 58
]

```

Debugging
---------

[](#debugging)

If you've run a method to get a report or account / vendor numbers to find you are not getting the results expected, you can retrieve the last Result object returned, this method should contain any information relating to why a request may have failed.

```
$Reporter = new \Snscripts\ITCReporter\Reporter(
    new \GuzzleHttp\Client
);

$Reporter->setAccessToken('12345678-1234-abcd-abcd-12345678abcd');

$failedAccounts = $Reporter->getSalesAccount();

$Result = $Reporter->getLastResult();

```

If no action has been run, the result will return a `null` value.

Changelog
---------

[](#changelog)

You can view the changelog [HERE](https://github.com/mikebarlow/itc-reporter/blob/master/CHANGELOG.md)

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](https://github.com/mikebarlow/itc-reporter/blob/master/CONTRIBUTING.md) for details.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](https://github.com/mikebarlow/itc-reporter/blob/master/LICENSE) for more information.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance39

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity33

Early-stage or recently created project

 Bus Factor1

Top contributor holds 71.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

525d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/512d063f8b788a806a07cdffed91c203b1a9c46487f4dbbb1a480cc4c0e3f438?d=identicon)[Salonhub](/maintainers/Salonhub)

---

Top Contributors

[![mikebarlow](https://avatars.githubusercontent.com/u/293049?v=4)](https://github.com/mikebarlow "mikebarlow (50 commits)")[![gemal](https://avatars.githubusercontent.com/u/69105?v=4)](https://github.com/gemal "gemal (12 commits)")[![dafyd](https://avatars.githubusercontent.com/u/301993?v=4)](https://github.com/dafyd "dafyd (5 commits)")[![andybee](https://avatars.githubusercontent.com/u/113305?v=4)](https://github.com/andybee "andybee (1 commits)")[![NielsLeenheer](https://avatars.githubusercontent.com/u/233230?v=4)](https://github.com/NielsLeenheer "NielsLeenheer (1 commits)")[![Salonhub](https://avatars.githubusercontent.com/u/262993?v=4)](https://github.com/Salonhub "Salonhub (1 commits)")

---

Tags

itunesconnectReporter.jarApp Stats

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/salonhub-itc-reporter/health.svg)

```
[![Health](https://phpackages.com/badges/salonhub-itc-reporter/health.svg)](https://phpackages.com/packages/salonhub-itc-reporter)
```

###  Alternatives

[snscripts/itc-reporter

PHP package for downloading stats from iTunes Connect - Replacement for Apples Java based Reporter.jar

2241.0k](/packages/snscripts-itc-reporter)[aporat/store-receipt-validator

PHP receipt validator for Apple App Store and Amazon Appstore

6503.9M9](/packages/aporat-store-receipt-validator)[ringcentral/ringcentral-php

RingCentral Platform PHP SDK

541.2M5](/packages/ringcentral-ringcentral-php)[simplesamlphp/simplesamlphp-module-oidc

A SimpleSAMLphp module adding support for the OpenID Connect protocol

5016.9k1](/packages/simplesamlphp-simplesamlphp-module-oidc)[yanlongli/app-store-server-api

PHP client for App Store Server API. Manage your customers’ App Store transactions from your server.The App Store Server API is a REST API that you call from your server to request and provide information about your customers' in-app purchases. The App Store signs the transaction and subscription renewal information that this API returns using the JSON Web Signature (JWS) specification.App Store Server API is independent of the app’s installation status on the customer’s devices. The App Store server returns information based on the customer’s in-app purchase history regardless of whether the customer installed, removed, or reinstalled the app on their devices.To request transaction and subscription status information with this API, provide any original transaction identifier that belongs to the customer. The transaction history API responds with a complete list of transactions, 20 at a time, starting with the oldest first. The subscription status API returns the status for all of the customer’s subscriptions, organized by their subscription group identifier.Use the Send Consumption Information endpoint to send information to the App Store when customers request a refund for a consumable in-app purchase, after you receive the CONSUMPTION\_REQUEST App Store server notification. Your data helps inform refund decisions.

2532.0k](/packages/yanlongli-app-store-server-api)[nullform/app-store-server-api-client

PHP client for App Store Server API and App Store Server Notifications

131.3k](/packages/nullform-app-store-server-api-client)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
