| http://developer.ebay.com/DevZone/XML/docs/WebHelp/CompletingTheSale-Retrieving_the_Transactions_for_a_Single_Item.html | |
| Managing Listed Items > Completing the Sale > Retrieving the Transactions for a Single Item | |
Retrieving the Transactions for a Single Item
To retrieve the transaction data for one specified item, use GetItemTransactions. In general, only use this call when you cannot use GetSellerTransactions (see Options for Retrieving Transaction Data).
Retrieving the transaction data for one item involves three general steps: setting up the execution environment, specifying the item transactions to return (based on the listing's item ID), and making the API call.
Retrieving the transaction data for a single item entails specifying the item ID for the item whose transactions to return. Specify the item ID in the ItemID property of the call's request .
Optionally, the call also takes a transaction ID as input to retrieve the data for just a single transaction associated with the specified item. However, this practice results in a larger number of calls for the listing as a whole.
As this call can potentially return a very large number of transactions, use a time filter to limit the volume of the response to a particular window (range) of time. For more information, please see below and see the following topic: GetItemTransactions.
If you use the NumberOfDays time filter, the eBay database is queried to determine when transactions were last modified. Note that the modification status is updated each time the Checkout status of an item changes. The Checkout status can change any time (i.e., in seconds, minutes, or days) after the transaction is created. See Working with Checkout for more information about Checkout.
Some transactions are processed with back-end batch jobs. This means there can be a short delay between an end time of an item and the recording of the initial transaction entry in the eBay database. Therefore, to make sure you do not miss any transactions, you should add time buffers, even if they are only a few seconds in length. Better yet, use the current date as the most recent date in the range to make sure you have captured all possible transactions and any updates. For each item, use GetItemTransactions at set intervals to get updates on any transactions that are new or have changed status since the last time you executed GetItemTransactions for that item.
Depending on the window of time you specify, the call can still return hundreds of transactions. Therefore, it is recommended that you configure the request to get one page of data at a time (where each page contains a more manageable number of transactions). Pagination breaks up the total data set into smaller chunks.
For example, if 100 transactions were generated for an item within the time that you specified, you could make one call for all 100 transactions or ten calls, each for 10 transactions (ten pages). Pagination is controlled by specifying the number of transactions to return in each page of data (i.e., for each call) and the page number to return.
The first call would return page 1 of the item's transactions. Data in the call's result set will indicate whether there are additional transactions to retrieve and how many. The application can use that information to determine whether additional calls are needed and, based on the page size (the number of transactions per page), how many additional calls need to be made for all of the transactions to be retrieved. If additional calls are needed, each subsequent call would specify an incrementally higher page number to retrieve each succeeding page of transactions. If transactions per page and page number are not specified on input, no pagination occurs and the call attempts to retrieve the transactions as a single page.
GetItemTransactions returns a list of the transactions spawned by sales in the item specified as input. This list is contained in the TransactionArray property of the GetItemTransactionsCall response.
There is one
TransactionTypeobject for each transaction spawned for the item so far and meeting the input filtering criteria. Also returned are indicators of how many transactions are returned and whether there are other transactions that could be returned (additional transactions meeting the criteria that require additional calls to retrieve). The result set also contains the page number for the data returned, the number of transactions being returned per page, and the total number of pages of transactions meeting the selection criteria. In addition, the call returns data about the item that spawned the transactions.
| Managing Listed Items > Completing the Sale > Retrieving the Transactions for a Single Item | |
| http://developer.ebay.com/DevZone/XML/docs/WebHelp/CompletingTheSale-Retrieving_the_Transactions_for_a_Single_Item.html | |
| © 2004–2008 eBay Inc. All rights reserved. | Version 579 |