Trading API
 

XML Flow Tutorial: Getting Notifications

This tutorial demonstrates how a user gets platform notifications about a listing. The demonstration consists of a series of eBay API calls that subscribe the user to certain notifications and confirm the subscriptions, and also examples of the actual notifications received by the user.

When a step includes an API call, it gives a link to an XML call sample in the Trading API Reference. The samples show how to perform those steps using the API.

This scenario involves two sandbox test users:

The scenario shows how Magical BookSeller uses API calls to configure her eBay account to receive certain notifications about her listings.

What's in this Tutorial

This tutorial contains the following sections:

Back to top

Complete Source Code

The API Flow tutorials use raw XML requests and responses. The XML call samples described in this tutorial can all be found in the Trading API Reference.

Before You Begin

All the calls in the tutorial are performed in the Sandbox environment, using a test user. To make the calls in the tutorial for your own application in the Sandbox, you must:

The tutorial has no specific code requirements. You can run the XML samples in the API Test Tool on the eBay Developers Program website (you must log in).

Back to top

Step 1: Subscribing to Notifications

MagicalBookSeller wants to be notified when certain events affect her eBay listings. She wants a notification that confirms when an item has been listed, a notification that tells her when a buyer has bid on an item, a notification that an auction has ended, and a notification that a buyer has left feedback on a sale.

MagicalBookSeller uses SetNotificationPreferences to subscribe to notifications for events she chooses. For the delivery address she could specify a URL, but she prefers to have the SOAP notifications delivered to her email address. This subscription will be good for all of her listed items.

  1. SetNotificationPreferences: subscribe to notifications

  2. Now MagicalBookSeller wants to check that all of her notification preferences are as she intends. She will make a couple of GetNotificationPreferences calls to check first that she is subscribed to the right events, and second that her delivery address is correct. She uses GetNotificationPreferences with the preference level set to User to review the events for which she's subscribed.

  3. GetNotificationPreferences: confirm events in the notification subscription

  4. Now MagicalBookseller will check her the delivery settings in her notification preferences. She uses GetNotificationPreferences with the preference level set to Application to review the delivery settings.

  5. GetNotificationPreferences: confirm the delivery preferences in the notification subscription

Back to top

Step 2: Receiving Notifications

This section shows the notifications that the seller, MagicalBookSeller, receives from eBay about events that affect her listings.

Back to top

Notes and Next Steps

This section contains notes about the tutorial and suggestions for extending it.

Here are some suggestions for ways you can learn more about the API:

Back to top

Additional Resources

More information about the Trading API is available at these locations: