Skip to main content
Published: March 26 2007, 12:18:00 PMUpdated: November 28 2020, 3:23:21 PM

What is the recommended way to respond to best offers via the API?

What is the recommended way to respond to best offers via the API?

Summary

The recommendation is to use the API call RespondToBestOffer, where you send in the ItemID and BestOfferID as input.  We recommend not to rely on the availability of potential buyer's email address, from GetBestOffers Response / Notification and communicate directly with the buyer - there can be changes in the near future where the buyer's email address / userid can be obscured or not returned at all for trust and safety reasons.
 


Detailed Description

Here is how you can keep track of the best offers that you receive and how you can respond to them:

  1. Subscribe to Platform Notifications for the EvenType BestOffer.  You will receive a payload similar to when you make a SOAP call to GetBestOffers:
     

    <?xml version="1.0" encoding="utf-8"?>

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

      <soapenv:Header>

        <ebl:RequesterCredentials soapenv:mustUnderstand="0" xmlns:ns="urn:ebay:apis:eBLBaseComponents" xmlns:ebl="urn:ebay:apis:eBLBaseComponents">

          <ebl:NotificationSignature xmlns:ebl="urn:ebay:apis:eBLBaseComponents">zy2rcBd29XjRk1IAQkSW/Q==</ebl:NotificationSignature>

        </ebl:RequesterCredentials>

      </soapenv:Header>

      <soapenv:Body>

        <GetBestOffersResponse xmlns="urn:ebay:apis:eBLBaseComponents">

          <Timestamp>2007-03-26T18:55:38.943Z</Timestamp>

          <Ack>Success</Ack>

          <CorrelationID>1651502060</CorrelationID>

          <Version>503</Version>

          <Build>e503_core_Bundled_4329349_R1</Build>

          <NotificationEventName>BestOffer</NotificationEventName>

          <RecipientUserID>user1</RecipientUserID>

          <BestOfferArray>

            <BestOffer>

              <BestOfferID>2189752</BestOfferID>

              <ExpirationTime>2007-03-28T16:00:14.000Z</ExpirationTime>

              <Buyer>

                <Email>buyer@test.com</Email>

                <FeedbackScore>108</FeedbackScore>

                <RegistrationDate>2001-10-05T01:41:40.000Z</RegistrationDate>

                <UserID>buyer1</UserID>

              </Buyer>

              <Price currencyID="USD">6</Price>

              <Status>Pending</Status>

              <Quantity>1</Quantity>

              <BestOfferCodeType>BuyerBestOffer</BestOfferCodeType>

            </BestOffer>

          </BestOfferArray>

          <Item>

            <BuyItNowPrice currencyID="USD">10.0</BuyItNowPrice>

            <ItemID>150106275696</ItemID>

            <ListingDetails>

              <EndTime>2007-03-31T18:16:51.000Z</EndTime>

            </ListingDetails>

            <Location>San Jose, CA</Location>

            <Title>Test - do not bid</Title>

          </Item>

        </GetBestOffersResponse>

      </soapenv:Body>

    </soapenv:Envelope>

     

Alternately, use GetSellerEvents to track items for which you have received an offer; and make a call to GetBestOffers for the ItemID.

Here is a sample GetSellerEvents call which will let you know that you have a best offer:

<?xml version="1.0" encoding="utf-8"?>

<GetSellerEventsRequest xmlns="urn:ebay:apis:eBLBaseComponents">

  <Version>505</Version>

  <ModTimeFrom>2007-03-26T18:00:00.000Z</ModTimeFrom>

  <ModTimeTo>2007-03-26T19:00:00.000Z</ModTimeTo>

  <RequesterCredentials>

    <eBayAuthToken>*****</eBayAuthToken>

  </RequesterCredentials>

</GetSellerEventsRequest>

 

Response:
<?xml version="1.0" encoding="utf-8"?>

<GetSellerEventsResponse xmlns="urn:ebay:apis:eBLBaseComponents">

  <Timestamp>20070326T18:43:27.182Z</Timestamp>

  <Ack>Success</Ack>

  <Version>503</Version>

  <Build>e503_core_Bundled_4329349_R1</Build>

  <TimeTo>20070326T19:00:00.000Z</TimeTo>

  <ItemArray>

    <Item>

      <ItemID>150106275696</ItemID>

      <ListingDetails>

        <StartTime>20070326T18:16:51.000Z</StartTime>

        <EndTime>20070331T18:16:51.000Z</EndTime>

      </ListingDetails>

      <SellingStatus>

        <BidCount>0</BidCount>

        <CurrentPrice currencyID="USD">10.0</CurrentPrice>

        <QuantitySold>0</QuantitySold>

        <ListingStatus>Active</ListingStatus>

      </SellingStatus>

      <Site>US</Site>

      <Title>test do not bid</Title>

      <Quantity>1</Quantity>

      <Currency>USD</Currency>

      <BestOfferDetails>

        <BestOfferCount>1</BestOfferCount>

        <BestOfferEnabled>true</BestOfferEnabled>

      </BestOfferDetails>

    </Item>

  </ItemArray>

</GetSellerEventsResponse>
 

Keep track of the count in your database, and if you see an increase, you can make a call to GetBestOffers.

 

Make a call to GetBestOffers with this ItemID:
<?xml version="1.0" encoding="utf-8"?>

<GetBestOffersRequest xmlns="urn:ebay:apis:eBLBaseComponents">

  <Version>505</Version>

  <ItemID>150106275696</ItemID>

  <RequesterCredentials>

    <eBayAuthToken>*****</eBayAuthToken>

  </RequesterCredentials>

</GetBestOffersRequest>

  1. Get the BestOfferID and offer Price.  Depending on your application logic, respond appropriately using RespondToBestOffer.
    Here is a sample RespondToBestOffer request:
     

    <?xml version="1.0" encoding="utf-8"?>

    <RespondToBestOfferRequest xmlns="urn:ebay:apis:eBLBaseComponents">

      <Version>505</Version>

      <ItemID>150106275696</ItemID>

      <BestOfferID>2189752</BestOfferID>

      <Action>Accept</Action>

      <RequesterCredentials>

        <eBayAuthToken>*****</eBayAuthToken>

      </RequesterCredentials>

    </RespondToBestOfferRequest>

     
    Note, due to trust and safety reasons, the input tag SellerResponse may not be allowed or ignored.  If you need to send a message, and your item is listed in the Motors or Business & Industrial  categories, then you can consider using AddMemberMessagesAAQToBidder as an alternate.


Version Info

The code example above was based on the versions specified below:

API Schema Version 503


Additional Resources

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