Invalid vendor number specified. Try again.

HI All


I am trying to use the API in Python and am getting the followin gerror:


{
  "errors" : [ {
    "id" : "285874b4-16fb-4109-b810-ffa2973be714",
    "status" : "400",
    "code" : "PARAMETER_ERROR.INVALID",
    "title" : "A parameter has an invalid value",
    "detail" : "Invalid vendor number specified. Try again.",
    "source" : {
      "parameter" : "filter[vendorNumber]"
    }
  } ]
}



I am passing the Following payload:

payload = {'filter[frequency]':'DAILY', 'filter[reportSubType]': 'SUMMARY', 'filter[reportDate]':'2019-03-01', 'filter[vendorNumber]': '12345678', 'filter[reportType]': 'SALES' }

Here is the request call:

r = requests.get('https://api.appstoreconnect.apple.com/v1/salesReports', headers={'Authorization': 'Bearer {}'.format(token)}, params=payload)



Any suggestions on how do i resolve this error?


Thanks

Post not yet marked as solved Up vote post of tkansara Down vote post of tkansara
5.1k views

Replies

Same here, I know the token and other parameters are ok as they displayed specific errors when invalid. This is really frustrating.

Hello tkansara,

When you login to the App Store Connect portal, if you follow the steps below, you should be able to identify your Organization Vendor Number.


https://appstoreconnect.apple.com


App Store Connect Home -> Payments and Financial Reports -> Vendor Number should be located in the top left in the gray bar in light gray text right under the App Store Connect button. You should also see your Organization Name above your Vendor Number.


Let me know if you encounter difficulties but hopefully this helps!

The vendor number is exactly as it's displayed there, and when generating reports through the website UI, looking at the requests in Fiddler confirms the exact same vendor number being sent as from my requests. Yet "invalid vendor number"...

Hello wbprx,

Apologies as I thought the question was around getting the correct Vendor Number. If you are a part of multiple Apple Developer Accounts, I would double check that you have the right Vendor Number for the account that you are creating the App Store Connect API token for.


Have you been able to successfully make this API call in a tool like Postman? If so, you could then use the "Code" button to export the Python code sample into your script / application to determine if it has something to do with your script or the API call that you are making itself.


Hopefully this helps!

Hi everybody, please, still not working downloading reports data. Dod someone find solution? Or did someone repair bug?

I am getting for all reports except SALES SUMMARY this error: b'{\n "errors" : [ {\n "id" : "21f713f3-0891-42c3-860e-acd9f1d1ee73",\n "status" : "400",\n "code" : "PARAMETER_ERROR.INVALID",\n "title" : "A parameter has an invalid value",\n "detail" : "Invalid vendor number specified. Try again.",\n "source" : {\n "parameter" : "filter[vendorNumber]"\n }\n } ]\n}'

Because I am getting correct data for SALES REPORT and for others report I am getting error about vendor number(all report sharing same vendor number, even sales summary report) .

It is REALLY frustrating.... Please give me information how to get data from other reports.

  • same thing here! SALES works, but as soon as I change the reportTime parameter I get invalid vendor number error ... Could you solve it @david-slozil ?

Add a Comment

I finally found a solution for this error. The error message is misleading. The problem is when you are requesting a detailed report with: filter[reportSubType] = DETAILED and this for your sales with filter[reportType]=SALES, the error occurs. After changing filter[reportSubType] to, SUMMARY it works.

I am encountering the exact same problem. My role in the App Store = Developer, Finance and I have checked the box: Access to Reports

Maybe we need more permissions to perform this operation? The question remains: Which role do we need then?

  • The OP question is in regards with App Store Connect API which will require you to create an API Key. The key access and user role access under Apple Developer Program are the same if you leave the optional permissions out. You are clearly meaning the Apple Developer Program User Role access, so I am confused whether you are intending to generate the report through the API. Anyhow, to proactively answer, you would be needing a key with access set at least to "Sales and Reports".

Add a Comment