CompleteSale Ebay API for multiple items

Currently I have a system which retrieves a list of orders from Ebay (using the GetOrders API call) to do some processing. System will display the list of orders for users to check to update status to Shipped (using CompleteSale API call).

The problem I am having now is that the process of updating the status using the API is kind of slow because the CompleteSale is being called for each order (possible that user check 1000 records to update status to Shipped at one time). Is it possible to send multiple items in one CompleteSale call or is there other API calls that is able to ?



You simply add several ItemIDs and TransactionIDs to one request like this (for php)

$item_id_1 = 1234567890;
$item_id_2 = 0987654321;
$feedback = 'Thanks for a smooth transaction!';

$transaction_id_1 = 771234567819;
$transaction_id_2 = 770987654319;

$requestXmlBody = '<?xml version="1.0" encoding="utf-8" ?>';
$requestXmlBody .= '<CompleteSaleRequest xmlns="urn:ebay:apis:eBLBaseComponents">';

$requestXmlBody .= "<ItemID>$item_id_1</ItemID>";
$requestXmlBody .= "<ItemID>$item_id_2</ItemID>";

$requestXmlBody .= "<FeedbackInfo>";
$requestXmlBody .= "<CommentText>$feedback_text</CommentText>";
$requestXmlBody .= "<CommentType>Positive</CommentType>";
$requestXmlBody .= "</FeedbackInfo>";

$requestXmlBody .= "<Shipped>true</Shipped>";
$requestXmlBody .= "<TransactionID>$transaction_id_1</TransactionID>";
$requestXmlBody .= "<TransactionID>$transaction_id_2</TransactionID>";

$requestXmlBody .= "<RequesterCredentials><eBayAuthToken>$userToken</eBayAuthToken></RequesterCredentials>";
$requestXmlBody .= '</CompleteSaleRequest>';

I think it should also work if you use orderIDs instead! Please be aware that you cannot use multiple buyerUserIDs (for the recipient). Use only itemID/transactionID pairs.

This is based off the eBay PHP sample code provided here:

Just change the call to what you need!

Hope this helps!

Need Your Help

Hide and show series WITH interval Google Chart

javascript charts google-visualization

So I still have some issues with my Google Chart and JS.

tcpdump inside a shell script captures nothing

linux tcpdump

I want to start a TCP program and capture the related packets,

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.