Invoices API FAQ
Frequently asked questions about Invoices.
General questions
How do I find which types of invoices, transactions, and statuses the Invoices API provides?
Select to expand the answer.
Use the getInvoicesAttributes
operation to fetch the valid values for each supported marketplace.
Can I get a notification when createInvoicesExport
is complete?
createInvoicesExport
is complete?Select to expand the answer.
No. You can call the getInvoicesExport
operation every few minutes until the status is DONE
or an ERROR
is returned.
How does getInvoicesDocument
provide documents?
getInvoicesDocument
provide documents?Select to expand the answer.
The getInvoicesDocument
response includes the invoicesDocumentUrl
attribute, which provides a URL that you can use to download a ZIP file. The ZIP file contains the invoice files in XML format. Note that the URL expires in 30 seconds (as indicated by X-Amz-Expires
).
How do I relate the XML file that is returned by getInvoicesDocument
to the invoices that are returned by getInvoices
?
getInvoicesDocument
to the invoices that are returned by getInvoices
?Select to expand the answer.
The name of each XML invoice file is the same as the value of the ID attribute in the getInvoices
response.
Is it possible to filter multiple invoices in createInvoicesExport
based on the getInvoices
response?
createInvoicesExport
based on the getInvoices
response?Select to expand the answer.
No. You can only filter by one invoice at a time using the invoiceExternalId
attribute. However, you can filter by period and relate the files to the invoices. Refer to the previous question.
What is the request limit for the getInvoices
operation?
getInvoices
operation?Select to expand the answer.
The default value is 0.1 requests per second with a maximum size of 200 items per page (pageSize
= 200
). However, the number of requests per interval can vary by vendor. To get your request limit, and avoid throttling problems (error 429), refer to the x-amzn-RateLimit-Limit
value.
Brazil invoices
How should I present FBA invoices to the seller?
Select to expand the answer.
- Reports dashboard: An integrator provides a reports dashboard where sellers can visualize and extract all invoices.
- Orders dashboard: Sellers can access and extract their sales invoices through the integrator's orders dashboard.
- API integration (ERP): An integrator provides all invoices through their own APIs, which allows sellers to integrate their invoice data directly into their own ERP or accounting system.
When the invoice relates to a sale, how do I identify the sale ID in the marketplace to which the invoice is associated, before I import its XML file?
Select to expand the answer.
Before you import the invoice file, you can fetch invoice metadata using the getInvoices
operation. In the response, the ID of the order is available in the transactionId
attribute for all invoices that relate to that order.
What is the maximum number of invoices that I can get using getInvoices
?
getInvoices
?Select to expand the answer.
getInvoices
can return a maximum of 50,000 results (with up to 200 items per page). If the query results in a number greater than 50,000, a 400
error (Bad Request) is returned with this error message:
"errors": [
{
"code": "InvalidInput",
"message": "There are too many invoices in a single list request. Please, change your filter expression to reduce the number of invoices from 138217 to be lower than 50000.",
"details": ""
}
]
To avoid this error, you can implement a daily routine to search for invoices using a date filter (from D-2 to D-0), and return the maximum of 200 items per page (pageSize
= 200
). Because invoices can change in the first 24 hours, and there can be a delay in issuing invoices (for example, Sefaz instability), it is better to use invoices that were issued more than 24 hours ago (D-2).
How long after being issued can an invoice's status can change to CANCELLED
?
CANCELLED
?Select to expand the answer.
Amazon has 24 hours to cancel a seller's invoice and reflect this new CANCELLED
status. After this 24-hour period, the seller can cancel the invoice directly with Sefaz (within a time period that varies by state, usually up to seven days from authorization).
Note
If you cancel an invoice with Sefaz, the
CANCELLED
status is not reflected in the Invoices API results. This is because Amazon is not notified of this type of cancellation. To validate an invoice that is cancelled through Sefaz, you must contact Sefaz.
Need more help?
If you still have questions, you can open a Support Case.
Updated about 1 month ago