question

nazgamer avatar image
0 Likes"
nazgamer asked

How to find sellingState when using findCompletedItems? sellingState only returning Ended.

Hello, I'm using findCompletedItems to search for items with 'FixedPrice' as their listing type. The problem is that I can't tell if any of the items returned have ended with a sale or not. All of the sellingStatus.sellingState fields of the responses from my API calls are always 'Ended'. In the documentation, if an item with a FixedPrice sold, the sellingState field should be 'EndedWithSales', right? But I never receive an a response with 'EndedWithSales' as the field value. Even when I use the 'SoldItemsOnly' =true in the itemFilter, the returned items just have 'Ended' as the value in sellingState (whereas I would expect these items to have a sellingState value of 'EndedWithSales'). even If you look at a listing of a completed FixedPrice item, the only way to tell if it's 'sold' or 'ended' is if you look at the picture, which has 'Ended' or 'Sold' written across it. For example: http://www.ebay.com/itm/CANON-PowerShot-SD1100-Blue-used-/222461424089 How are we supposed to be able to tell if a FixedPrice listing sold or not? Thanks! Nathan Here's a link to the documentation for sellingState: http://developer.ebay.com/devzone/finding/CallRef/findItemsAdvanced.html#Response.searchResult.item.sellingStatus.sellingState And here is relevant code. My request uses the findCompletedItems request, with the Python SDK port. Here's the most significant portions of the code: api_request = { 'categoryId' : '31388', # 31388 : Digital cameras 'itemFilter': [ {'name': 'LocatedIn', 'value': 'US'}, {'name': 'Currency', 'value':'USD'}, {'name': 'Condition', 'value': 'Used'}, {'name': 'MinPrice', 'value': 20}, {'name': 'MaxPrice', 'value': 50}, {'name': 'HideDuplicateItems', 'value':'true'}, {'name': 'ListingType', 'value':'FixedPrice'}, } response_dict = api.execute('findCompletedItems', api_request).dict()
findcompleteditemssellingstatus
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

clickimusprime avatar image
1 Like"
clickimusprime answered
Most likely there's an error in your API request, but we can't tell because you haven't provided it. I get this for your sample item: 222461424089 20.0 20.0 EndedWithSales
· 1
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Which API call are you using to get that information? I tried to use getSingleItem, but that call returns no sellingState field. api_request = { 'itemID':222461424089, 'IncludeSelector':'Details' } response = api.execute('GetSingleItem',api_request)
0 Likes 0 ·
clickimusprime avatar image
1 Like"
clickimusprime answered
What does GetSingleItem have to do with this? You posted about findCompletedItems The partial response I posted is from findCompletedItems to a simple itemid query: http://svcs.ebay.com/services/search/FindingService/v1?OPERATION-NAME=findCompletedItems&SERVICE-VERSION=1.7.0&SECURITY-APPNAME=APPID&RESPONSE-DATA-FORMAT=XML&REST-PAYLOAD&keywords=222461424089 Since you are using a SDK, there may be issues related to that. If you can capture the actual request URL sent by the SDK, that usually exposes the issue.
· 1
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

I brought up GetSingleItem because I did not know how to return details for a single itemID besides calling GetSingleItem. I just realized that you can use itemIDs in the 'keyword' field of findCompletedItems (that is not specified in the documentation). My understanding of your comment is that you used findCompletedItems with the keyword field set to 222461424089. When I do that, I get a response that has a 'sellingState' of 'Ended.' This may be a problem with the query that the python SDK is generating as you mentioned - I'll come up with the actual XML request that the SDK generates.
0 Likes 0 ·
clickimusprime avatar image
1 Like"
clickimusprime answered
**I brought up GetSingleItem because** OK I see. Please don't use the "click to add comment feature" the replies get hidden sometimes and don't show as replies at the forum level. (worthless feature, threads within threads) Just use the answer feature at the bottom of the thread. Thanks. Did you try the URL I posted? REST requests don't require XML.
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

clickimusprime avatar image
1 Like"
clickimusprime answered
**So here is the body of the request** Body looks fine. You didn't include headers. Same request via POST gets correct response when I run it. Again, your SDK may be translating something. Try and find the raw requests including headers and the raw response. Use a sniffer to look at what's really being sent back and forth. I normally recommend you use the REST format and build requests with normal string functions rather than use an SDK that alters/hides things and can go out of sync with the API. Then you can test your requests directly with a browser and use browser debug tools to review the request/response.
· 1
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

(I recognize you said to not use comments but my posts are being made to await moderation...) I'll edit my answer above to include headers. I agree with building requests, but I'm on a time crunch and wanted something quick. I may have to build requests myself if this doesn't work though!
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.