Find the answer to your question
I am making a call to GetItemTransactions but it returns zero transactions, even though the item has sold. Why am I not getting any transactions back?
GetItemTransactions returns only those transactions whose LastTimeModified value falls in the ModTime Filter range that you specified in the input. If there are no transactions whose LastTimeModified value is in the range, then the call will not return any transactions, but just the Item information. Similarly, GetSellerTransactions will also not return any transactions if the LastTimeModified value of any transaction is not in the range that you specified - It will return just the seller information.
Lets take the following example:
ItemID 110021382896 was sold on 2022-08-01T17:28:35.000Z and the LastTimeModified of the transaction is 2022-08-01T17:28:35.000Z. In order to get this transaction information, the Mod Time filter for GetItemTransactions needs to include this time. Here is a call that will return the transaction:
<?xml version="1.0" encoding="utf-8"?>
Now lets assume that the buyer goes through checkout and pays for the item on 2022-08-02T18:23:35.000Z.
Now if you make the call with the following ModTimeFilter:
it will no longer return the transaction, since the LastTimeModified is 2022-08-02T18:23:35.000Z and not in the input range.
You will need to modify the range to get the transaction. Here is an example of a range that will now return the transaction:
Question: So, how do I find out the LastModifiedTime of a transaction and specify the ModTime filter accordingly?
Answer: There is no way to find out the last time a transaction was modified, unless you know the approximate time range when it was modified. The API is designed to tell you what happened in a certain period of time, rather than track a particular transaction. This designs helps you scale very effectively, where you make the call periodically with the Mod Time filter spanning the last time you made the call to the current time and sync your database with the changes. Therefore, in most cases, using GetSellerTransactions would be a more appropriate call to use, where you get change information about all the transactions that happened in a time period, rather than keeping track of just a particular item's transactions.
The code example above was based on the versions specified below:
|API Schema Version
How well did this answer your question?
Answers others found helpful
- Transactions missing in GetSellerTranasctions or Orders missing in GetOrders response
- Sample to determine if GetSellerTransactions response has more items in C# using .NET SDK
- ShippingServiceSelectedCost is returned as 0 in GetItemTransactions and GetSellerTransactions
- Error 340 - Invalid page number
- GetSellerTransactions returns same transaction for different ModTime filters