amzn / selling-partner-api-models

This repository contains OpenAPI models for developers to use when developing software to call Selling Partner APIs.
Apache License 2.0
597 stars 730 forks source link

Feature Request: Api to download invoices generated by Amazon on our behalf #922

Closed florianbepunkt closed 9 months ago

florianbepunkt commented 3 years ago

We are not enrolled in the VCS (Vat calculation service), but due to changes in UK tax law, Amazon is generating invoices on our behalf.

Currently we have no way of downloading these invoices and/or the invoice numbers. This makes bookkeeping a nightmare since we need to download all these invoices manually through seller central.

Please provide an endpoint for getting information about these invoices like invoice number and a possibility to download the PDF

m4ciekm commented 3 years ago

You can download invoice information with Amazon MWS, I haven't found any option to do so using Selling Partner API (SP-API).

florianbepunkt commented 3 years ago

@m4ciekm Can you point to a reference (documentation)? Just for clarification: You can download information via MWS in order to create invoices on your own and you can bulk download invoices if you are enrolled in the VCS program. But to my knowledge you cannot download invoice or invoice metadata (like invoice number) for invoices that are generated by Amazon on behalf of the seller (new UK VAT on eCommerce legislation in effect since Jan 1st).

If I'm wrong please let me know, you would really save my day

m4ciekm commented 3 years ago

You can get full VAT invoice information in the Amazon VAT Calculation Report, which can be either downloaded through seller central: https://sellercentral-europe.amazon.com/reportcentral/VAT_TRANSACTION/1 or via Amazon MWS http://docs.developer.amazonservices.com/en_US/reports/Reports_ReportType.html see Tax Reports -> Amazon VAT Calculation Report

florianbepunkt commented 3 years ago

@m4ciekm Seriously, can I buy you a virtual coffee or beer? Thank you. Do you know, by any chance, can I download the invoice (with the url) programmatically? It seems like you need to be logged in to Seller Central in order to download them, but I would like to automate this.

m4ciekm commented 3 years ago

You can send me 0.01 BTC ;-) Each invoice has a separate URL in the Amazon VAT Calculation Report

florianbepunkt commented 3 years ago

Yes, but I can use the url only if I am logged in to the seller central, as far as I can tell. Is there a way to download them with the MWS client on a server/cron job?

m4ciekm commented 3 years ago

You can download the invoices in bulk here: https://sellercentral-europe.amazon.com/tax/vatreports/bulkdownload - choose Report type: VAT invoices. If you want to download them via a cron job, then I am not sure you can do this without a web browser (for logging in). You could automate it on a desktop running a script in python + Selenium.

florianbepunkt commented 3 years ago

Thank you for all the help. Sadly I cannot use the bulk download form. It only says that we are not enrolled to the VCS program (which we do not intend).

m4ciekm commented 3 years ago

Then I can recommend Selenium https://selenium-python.readthedocs.io/getting-started.html , you can run a python script in debug mode and stop it to log into to Seller Central on the web browser, then you can let the script run to download each PDF one by one.

florianbepunkt commented 3 years ago

@nodisk8800 You are right. But how can I download the linked invoice pdf programmatically? The link only works if I am logged in as a user in seller central. But I would need to download via api.

florianbepunkt commented 3 years ago

Yes, I get there is no public access for PII data. My feature request is to provide an api endpoint to download the PDF invoices securely via API.

florianbepunkt commented 3 years ago

I probably found a way: SC_VAT_TAX_REPORT_INVOICE returns a list of document ids, which (in theory) should be accessible by the getReportDocument api. However I always receive a 403 when trying to list either the report or get the document, although I can list and download the report via MWS (but not the invoices)

florianbepunkt commented 3 years ago

It would be great if one of the authors could shed some light on this: _ SC_VAT_TAX_REPORT_INVOICE_ gives a list of documentIds, just like for report or feed documents. However they are not downloadable via the getFeedDocument action.

lihongjie0209 commented 3 years ago

same problem

tobiaxor commented 3 years ago

same problem here, seems there's no solution...

github-actions[bot] commented 2 years ago

This is a very old issue that is probably not getting as much attention as it deserves. We encourage you to check if this is still an issue after the latest release and if you find that this is still a problem, please feel free to open a new issue and make a reference to this one.

kulisz commented 2 years ago

someone found a solution to download invoices via sp api?

piotr-lottestyle commented 2 years ago

we experience the same problem

Octobr26 commented 1 year ago

@florianbepunkt was there a solution to this issue?

What I am thinking is that either

use Amazon MWS to do this, so the program would take a hybrid approach using both SP API and MWS.

or

The invoice data can still be pulled from the API but it won't be downloaded as a PDF. Since the data can still be collected, a straightforward approach would be to build the pdf since all the data would be provided.

Note: 2nd solution is not plausible for my case since I need to collect the original pdf

piotr-lottestyle commented 1 year ago

@luisdiazco AFAIK there is no solution yet. It's even worse - Amazon won't let you download PDF if there is non-amazon referer in HTTP request

github-actions[bot] commented 1 year ago

This is a very old issue that is probably not getting as much attention as it deserves. We encourage you to check if this is still an issue after the latest release and if you find that this is still a problem, please feel free to open a new issue and make a reference to this one.

tobiaxor commented 1 year ago

I don't think Amazon will ever do this...

github-actions[bot] commented 10 months ago

This is a very old issue that is probably not getting as much attention as it deserves. We encourage you to check if this is still an issue after the latest release and if you find that this is still a problem, please feel free to open a new issue and make a reference to this one.

github-actions[bot] commented 9 months ago

closed for inactivity

quangmata2707 commented 4 months ago

I have downloaded the invoice file using Java without using Selenium. If you need the source code, please contact me via Telegram at +84398410826.

quangmata2707 commented 4 months ago

test test2