[Deprecated Content] #82
Replies: 3 comments 2 replies
-
|
@Tong8s this is a great starting point guide. One question I have is related to order items. We typically see rate limits relative to this endpoint. Since we need to call get orders to get the list of order IDs, each of those order IDs is then used to get the corresponding items. In in an hour there were 1000 order ids returned between 2 PM to 3 PM, attempting get all the corresponding items has a higher chance of getting limited. This leaves a use case where I have the order ID, but possibility a list partial order items for those IDs. Attempting to retry for items can lead to the thundering herd dynamics, even with exponential backoff. |
Beta Was this translation helpful? Give feedback.
-
|
@Tong8s, thank you for this guide! I am currently using the GetOrders API to retrieve orders from our EU Amazon marketplaces. However, this API lacks tax information and buyer details, which are essential for issuing EU-compliant invoices. To obtain this missing data, I additionally use the GET_FLAT_FILE_ORDER_REPORT_DATA_INVOICING report. Now, I am facing the issue that this report only returns MFN orders. Since we also use FBA, we are missing the complete buyer address and tax information for these orders. Do you have a guide on how we can retrieve tax information and buyer data for all types of orders? The challenge here is that we need this data as soon as the order is placed, as our invoices must be recorded in our accounting system on the same day whenever possible. Maybe you can drop by here for some more information: amzn/selling-partner-api-models#4668 |
Beta Was this translation helpful? Give feedback.
-
|
Hi all, As an effort to include polls in our Hot Topics, we have moved this content to #104. If you would like to retain your comment, please feel free to post there again. Thanks |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Orders API Guide: How to get latest orders update in an efficient way content is now moved here.
We understand keeping your orders data up to date is very important to your business model, Up-to-date orders data can help SP-API developers build more reliable and efficient applications for sellers. This hot topic will discuss how we can use our APIs to efficiently get latest order updates.Authored by: @Tong8s Solutions Architect, Selling Partner Developer Services
Up-to-date orders data can help you provide your sellers with:
Do you know that there are three ways to get orders data update?
GetOrders+GetOrderItemsAPI CallORDER_CHANGEnotificationEach of these ways will have its benefits and fits into different business scenarios:
GetOrders+GetOrderItemsAPI CallApplied Scenario
By using these two APIs, you can get complete order info, including fulfillment info, shipping info, payment info etc.
Through
getOrdersAPI call, you’ll be able to get all the updated orders from the time you specified in lastUpdatedAfter until 2 minutes ago — Keep in mind that the orders data will be available after two minutes when your order is created or last updated.For each "orderId", you will need to call
getOrderItemsto get item details, including orderItem ID, item price, shipping info etc. These API operations are synchronous and instant, you can expect the response to be returned in milliseconds. To find more information about how to use these two APIs, please see our use case guide.One thing to be noticed is that these APIs are rate restricted:
getOrdershas a default rate limit value of 1/min with a burst value of 20, andgetOrderItemshas a default rate limit value of 0.5/s with a burst value of 30.We have a guide on how to optimize your rate limits and your application workloads, in this guidance, you can find:
x-amz-rate-limitresponse header .this is especially useful when dealing with DUP APIs.
ORDER_CHANGEnotificationApplied Scenario
ORDER_CHANGEnotification allows you to adopt a push model for orders update, which means you don’t need to worry about throttling issues. Whenever the key attributes is changed for an order such as order status change or buyer requested change (such as cancel order), seller can receive a notification with key information about the updated order and order items.There some key things you need to be aware when using
ORDER_CHANGEnotification:ORDER_CHANGESQS message does NOT contain full information about orders and order items, for example, it does not contain order item titles, price and payment information. To fill this gap, what you can do is after receiving the notification, call getOrder for that specific order and then call getOrderItems to acquire more information, so potentially you will still be bounded by orders API rate limit if you want to get complete information.ORDER_CHANGEnotification, you need to create one queue for each seller. So extra costs are needed, for SQS cost details, here we have a youtube video guiding you how to calculate costs for SP-API notifications. you can also take a look at our SQS pricing page.Orders Report
Applied Scenario
There are two report types you can consider, the difference between these two is the file format.
GET_FLAT_FILE_ALL_ORDERS_DATA_BY_LAST_UPDATE_GENERALGET_XML_ALL_ORDERS_DATA_BY_LAST_UPDATE_GENERALThese report contains complete information about orders and corresponding order items. There are also optional columns which you can let your sellers to configure through seller central: Orders → Order Reports → Add or remove order report columns
As you can see in the code snippet, there are several API calls you need to perform, createReport → getReport → getReportDocument, usually after createReport, you will need to wait up to a few minutes based on the updated orders data size. So the latency is larger than the above two ways.
Combine and Conquer
We understand that accurate orders update information is important to your sellers, especially if you are serving big sellers who can have hundreds to thousands new orders every minute. We recommend you combine the above ways to acquire order updates for such sellers:
The above diagram is just one way of combining the orders API, ORDER_CHANGE notification and the report, you can tailor your combination strategy based on your use case. The tenet to follow is with such combination, you can get latest order updates with complete order info in low latency and high accuracy, meanwhile you don’t want to be bounded by the orders API rate limit.
Lastly, we saw your pain points of using Orders related SP-API operations, Our development teams are actively working on optimizing current Orders API to make it more accurate, efficient and user friendly.
Let us know what do you think! 👇 React or reply down below to share your feedback. Happy shopping!
❤️ Like what you see?
👍 Excited to try it out?
🎉 Want to see more of this?
Keywords: SellingPartnerAPI, AmazonSPAPI, Amazon, Orders


Beta Was this translation helpful? Give feedback.
All reactions