Skip to main content
Published: July 23 2007, 12:50:00 PMUpdated: November 28 2020, 3:52:21 PM

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?

Summary

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.


Detailed Description

Lets take the following example:

ItemID 110021382896 was sold on 2007-07-23T17:28:35.000Z and the LastTimeModified of the transaction is 2007-07-23T17: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"?>

<GetItemTransactionsRequest xmlns="urn:ebay:apis:eBLBaseComponents">

  <ItemID>110021382896</ItemID>

  <ModTimeFrom>2007-07-23T10:30:00.000Z</ModTimeFrom>

  <ModTimeTo>2007-07-24T10:30:00.000Z</ModTimeTo>

  <RequesterCredentials>

    <eBayAuthToken>*****</eBayAuthToken>

  </RequesterCredentials>

</GetItemTransactionsRequest>

Now lets assume that the buyer goes through checkout and pays for the item on 2007-07-24T18:23:35.000Z.

Now if you make the call with the following ModTimeFilter:
  <ModTimeFrom>2007-07-23T10:30:00.000Z</ModTimeFrom>

  <ModTimeTo>2007-07-24T10:30:00.000Z</ModTimeTo>

it will no longer return the transaction, since the LastTimeModified is 2007-07-24T18: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:
  <ModTimeFrom>2007-07-23T10:30:00.000Z</ModTimeFrom>

  <ModTimeTo>2007-07-25T10:30:00.000Z</ModTimeTo>
 

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. 
 


Version Info

The code example above was based on the versions specified below:

API Schema Version 521


Additional Resources

How well did this answer your question?
Answers others found helpful