Have a nice day everyone! I have a problem deciphering the response from Amazon sp-api. There is no way I can read or decode the response after receiving the link. I understand that most likely there is an error in my request, but what kind of error is unclear.
I’ll tell you more. To begin with, I wrote my own script for the GET_VENDOR_INVENTORY_REPORT report:
- I receive an access_token, like Atza|IwEBIHj**, using my client ID, client secret and refresh token (from Vendors Central – API Integration)
- After that, using sellingpartnerapi-eu.amazon.com/reports/2021-06-30/reports, marketplaysIds, reportType and access token send request for GET_VENDOR_INVENTORY_REPORT report. Yes, API give me reportId, no problem.
- After 30-60 second status of report go into FATAL. Of course, this can happen, but like each of us, I want to understand what is wrong.
- I take reportID and using Python or Postman I request reportDocumentID.
- Using reportDocumentID and /reports/2021-06-30/documents/{reportDocumentId} from API I receive a link to a document. But all I see is a set of characters.
Yes, I understand that this is a GZIP archive. But when answering in this thread the answer also contains the keys to decrypt the archive. I don’t have such keys, just a link to the document and other standard data.
How to read the API response? Yes, in Python. Maybe some of you have a github with example requests?
I try my own python script, also I try PYTHON-AMAZON-SP-API. They don’t use access_token, but the result is the same
1