httprequestapp-store-connect

Issues requesting DETAILED reports for API App Store Connect


I'm getting an error when trying to make a request in the API App Store Connect, but donesn't make sense to me.


("https://api.appstoreconnect.apple.com/v1/salesReports" +
                        "?filter[frequency]=DAILY" +
                        "&filter[reportDate]=" + entry.Key +
                        "&filter[reportType]=SUBSCRIBER" +
                        "&filter[reportSubType]=DETAILED" +
                        "&filter[vendorNumber]=" + vendorNumber);

I'm trying to make this request, but I always get the error "Invalid vendor number specified. Try again.".

The problem is that when I use the same value for vendorNumber in the following request:


("https://api.appstoreconnect.apple.com/v1/salesReports" +
                        "?filter[frequency]=DAILY" +
                        "&filter[reportDate]=" + entry.Key +
                        "&filter[reportSubType]=SUMMARY" +
                        "&filter[reportType]=SALES" +
                        "&filter[vendorNumber]=+ vendorNumber");

Everything works.

I've checked all documentation and all seems to be correct, there are no parameters with wrong combinations, or some mistakes like that.

Also the vendor number I'm using it from the admin account,

I don't know what I am doing wrong, any idea?


Solution

  • I encountered the same error when downloading reports (SUBSCRIBER and SUBSCRIPTION_EVENT) from the Appstore. This comment helped me. Make sure that you have offer subscriptions in your Apple account