(Option 3) Manually Upload Invoices
Use your tax data to create invoices, and upload them using the SP-API or through Seller Central (this option doesn't use VCS).
All sellers who do not choose to enroll on VCS also have the default option of uploading their own invoices to Amazon using the API or manually on Seller Central. This section will focus on uploading the invoices via the API. In this case, you should use your own tax data to create your invoices. You will not have access to VIDR report.
API | Feeds API |
---|---|
Operation | createFeed |
FeedType | UPLOAD_VAT_INVOICE |
marketplaceIds | Spain UK France Germany Italy Netherlands Poland Sweden |
feedOptions |
Note: Either
Invoice upload examples:
Credit note example (
Do not add quotation marks around keys or values. Amazon only accepts the following characters: commas, forward slashes, backslashes, spaces, dashes, underscores, semi colons, colons, 0-9, A-Z, a-z, #. Amazon trims extra space. |
The throttling limit for the Invoicing Feed (UPLOAD_VAT_INVOICE) is one invoice upload every three seconds.
You can use the following example code to attach the PDF file. While this example is in Java, you can use it as a model for other programming languages.
Map\<String, String\> feedOptions = new HashMap\<\>(); // building parameter map
feedOptions.put("metadata:OrderId", "XXX-XXXXXXX-XXXXXXX");
feedOptions.put("metadata:TotalAmount", String.format(TOTALAMMOUNT));
feedOptions.put("metadata:TotalVATAmount", String.format(TOTALVATAMMOUNT));
feedOptions.put("metadata:InvoiceNumber", INVOICE_NUMBER);
String options = feedOptions.entrySet().stream()
.map(e -\> String.format("%s=%s", e.getKey(), e.getValue()))
.collect(Collectors.joining(";"));
File pdfD = new File("\<PATH TO PDF\>");
byte\[\] pdfDocument = FileUtils.readFileToByteArray(pdfD); // read pdf document to byte array
String contentMD5 = Base64.encodeBase64String(pdfDocument); // building hash code
InputStream contentStream = new ByteArrayInputStream(pdfDocument); // inputstream of
SubmitFeedResponse response = submitFeed(contentStream, contentMD5, "\_UPLOAD_VAT_INVOICE\_", options, ContentType.OctetStream);
public SubmitFeedResponse submitFeed(InputStream, String contentMD5, String feedType, String feedOptions, ContentType contentType)
{
SubmitFeedRequest request = new SubmitFeedRequest();
request.setContentMD5(contentMD5);
request.setFeedContent(inputStream);
request.setFeedOptions(feedOptions);
request.setFeedType(feedType);
request.setMarketplaceIdList(new IdList(Arrays.asList(getMarketPlaces());
request.setMerchant(configuration.getAmazon().getSellerId());
request.setMWSAuthToken(configuration.getAmazon().getMwsAuthToken());
request.setContentType(contentType);
return getMarketplaceWebServiceClient().submitFeed(request);
}
With this option, you are allowed to upload more than one invoice against the same order ID. However, the invoice number must be unique. Only the latest invoice will be considered as valid.
Updated about 1 month ago