Can we get data from sandbox appstore by using app store connect api? How ? anyone can please help me ?
Post
Replies
Boosts
Views
Activity
How to get sales report data between two date range from app store connect api? This API does not allows us to provide startDate & endDate in its request call.
When I tried to fetch sales and trends data from app store connect api, it worked very well. but it shows many special characters on browser. I have implemented it in PHP.
Can you say please it will generate a zip file to download or It will give a json formatted output.
Why it shows special characters on browser?
My Code:
$api_url = 'https://api.appstoreconnect.apple.com/v1/salesReports';
$api_url .= "?filter[reportType]=SALES&filter[reportSubType]=SUMMARY&filter[frequency]=YEARLY&filter[reportDate]=2020&filter[vendorNumber]=".$vendorNum."&filter[version]=1_0";
$headers = [
'Content-Type: application/json; charset=utf-8',
'Accept: application/a-gzip, application/json',
'Authorization: Bearer '. $token,
];
$response = callAPI('GET', $api_url, false, $headers);
//$response = json_decode($response, true);
echo $response;