Skip to main content
Published: April 22 2015, 11:48:00 PMUpdated: November 28 2020, 2:10:12 PM

We are using the GetMyeBaySelling call.
In the Item there is no EndTime, only StartTime and TimeLeft.
Is there a way to get the EndTime, otherwise we have to get each Item with GetItem to fetch just this information!

The recommendation is that you calculate the EndTime.
The response contains the StartTime in Item.ListingDetails.StartTime, and the TimeLeft in Item.TimeLeft.
Here is an example of an Item returned by GetMyeBaySelling:

<Item>
  <BuyItNowPrice currencyID="USD">10.0</BuyItNowPrice>
  <ItemID>170000189132</ItemID>
    <ListingDetails>
    <StartTime>2006-07-05T17:55:52.000Z</StartTime>
    <ExpressListing>false</ExpressListing>
  </ListingDetails>
  <ListingType>Chinese</ListingType>
  <Quantity>1</Quantity>
  <ReservePrice currencyID="USD">0.0</ReservePrice>
  <SellingStatus>
    <CurrentPrice currencyID="USD">10.0</CurrentPrice>
    <ReserveMet>true</ReserveMet>
  </SellingStatus>
  <StartPrice currencyID="USD">10.0</StartPrice>
  <TimeLeft>P6DT23H59M52S</TimeLeft>
  <Title>SDK item title</Title>
  <QuantityAvailable>1</QuantityAvailable>
</Item>

This item has 6 days, 23 hours, 59 minutes, and 52 seconds left before it ends.
Since you have the StartTime also, you can calculate the EndTime.
The format of TimeLeft is represented in the ISO 8601 duration format (PnYnMnDTnHnMnS).
See http://www.w3.org/TR/xmlschema-2/#duration for more information on the format.

Please note that for ended listings, the time left is PT0S (zero seconds).

One additional note ... please be careful with using DetailLevel and specifying containers.
If you use a DetailLevel of ReturnAll then the response will contain the SellingSummary and all containers, even if your request has only 1 specific container.
If your intention is to only get the container(s) you specify in your request, please do NOT specify a DetailLevel in the request.
For more information on this, please see the documentation here:
http://developer.ebay.com/Devzone/XML/docs/Reference/ebay/GetMyeBaySelling.html

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