I'm trying to get all my items on eBay that are out of stock.
Right now I'm using the API call GetMyeBaySelling
, but I can only fetch the current active items.
In API documentation I saw that there is a GetSellingManagerInventory
call, that I think is the call I need to use.
I tried this call, but I never got any result.
Here is my request
<?xml version="1.0" encoding="utf-8"?>
<GetSellingManagerInventoryRequest xmlns="urn:ebay:apis:eBLBaseComponents">
<Pagination>
<EntriesPerPage>200</EntriesPerPage>
<PageNumber>1</PageNumber>
</Pagination>
<Sort>ActiveQuantity</Sort>
<SortOrder>Ascending</SortOrder>
<MessageID>test</MessageID>
<WarningLevel>High</WarningLevel>
<RequesterCredentials>
<eBayAuthToken>'.$auth.'</eBayAuthToken>
</RequesterCredentials>
</GetSellingManagerInventoryRequest>
Response
Array
(
[Timestamp] => 2013-09-16T18:15:17.535Z
[Ack] => Success
[CorrelationID] => test
[Version] => 841
[Build] => E841_UNI_API5_16362888_R1
[InventoryCountLastCalculatedDate] => 2013-09-16T08:56:13.000Z
[PaginationResult] => Array
(
[TotalNumberOfPages] => 0
[TotalNumberOfEntries] => 0
)
)
So I'm guessing I need to put a <Search>
like they have documented in the docs and came up with a new request
<?xml version="1.0" encoding="utf-8"?>
<GetSellingManagerInventoryRequest xmlns="urn:ebay:apis:eBLBaseComponents">
<Search>
<SearchType>Title</SearchType>
<SearchValue>2333-XL</SearchValue>
</Search>
<Pagination>
<EntriesPerPage>200</EntriesPerPage>
<PageNumber>1</PageNumber>
</Pagination>
<Sort>ActiveQuantity</Sort>
<SortOrder>Ascending</SortOrder>
<MessageID>test</MessageID>
<WarningLevel>High</WarningLevel>
<RequesterCredentials>
<eBayAuthToken>'.$auth.'</eBayAuthToken>
</RequesterCredentials>
</GetSellingManagerInventoryRequest>
The response, however, remained the same (note that the search field entered is one listing that I have, so it should give me some result).
So I must be doing something wrong.
Thanks for any help I can get!
GetMyeBaySelling will return the items with stock 0 if you set OutOfStockControl to true when listing the item using AddFixedPriceItem. When calling GetMyeBaySelling the QuantityAvailable field will not be returned which means the stock level = 0