Skip to content

X.commerce Android Apps the Easy Way, Part 3: eBay APIs

September 27, 2011

This is the third article in my series on using App Inventor for Android and eBay Web Services to build Android commerce apps.

The first article introduced App Inventor including how to install and start using it to build and share Android apps. The second article outlined the available App Inventor components. It then focused upon using the “Web” component to access web APIs. Yahoo PlaceFinder was used to provide a specific example (click here to download the example files from GitHub).

Taken together, the first two articles gave you the basic tools and information you need to visually create Android apps that use arbitrary RESTful web services. Now let’s get more commerce-specific by learning about the eBay APIs and what you can do with them.

eBay developer information and account setup

As you get started with the eBay APIs, it’s useful to note several eBay developer resources that might be of use to you. I wrote about some of these in a recent DevZone blog post, but they’re worth repeating here to make sure you don’t miss any of them. They are:

As I discuss above, the Quick Start Guide is the best place for you to start if you’re new to the eBay APIs and developer program. If you aren’t already a member of the program, the first step in the guide is to join for free. Click here to read about the benefits, and here to join .

Once you have an account, you should get your application keys and use them to run the sample application to make sure everything is working correctly. Note that you need “Production”, not “Sandbox”, keys to execute the sample app.

After you click “Run” and the sample application executes, you should see eBay search results and the JSON server response in the output panes:

Assuming you see successful output similar to the above, you have successfully created your application keys and are ready to proceed with eBay development. eBay provides links to a number of “developer centers” with more information on using their API with given languages and technologies. As of this writing the currently available centers include:

Before we start writing our own code to use the eBay services, however, it’s worth spending some time getting to know the eBay APIs and what you can do with them.

eBay APIs overview

eBay provides information on its various APIs from the eBay Web Services Overview page. I would encourage you to read through the descriptions provided there for each particular API. I’ve done my best to paraphrase the key capabilities below, but reading the original descriptions from eBay would be a very good idea to make certain you didn’t miss any critical points.

eBay APIs include:

  • Finding API – used to search for items; among other things, you can get recommendations for search keywords; search for items by keyword, category, product identifier, and store; and get category and domain meta data.
  • Trading – authenticated access to item listing data, seller sales status, and fulfillment information
  • Large Merchant Services – file based, asynchronous execution of large number of transactions
  • Best Match Item Details – authenticated access to private eBay data enabling sellers to better understand factors affecting their search ranking
  • Open eBay Apps – used to embed applications where sellers manage their businesses on
  • Product Services – provides the information sellers need to list items with Parts Compatibility
  • Research APIs – retrieve historical eBay data (free for up to 1,000 price research non-commercial calls per month)
  • Shopping – access public read-only data for items, products, eBay member profiles, and more
  • Merchandising – access to product and item information used to up-sell or cross-sell
  • Feedback – manage account-level Feedback data, specifically Detailed Seller Ratings (DSRs)
  • Server Notifications – useful for server-side applications receiving and processing eBay events
  • Client Alerts – enables light-weight client retrieval of alert messages

eBay provides a number of tutorials to help you get started with these APIs. These tutorials include:

Before proceeding with API calls, it might also be useful for your to read “Making an API Call“. This document discusses request and response formats, call structure, syntax, testing information, how to handle failures and errors and more.

eBay developer tools

eBay also provides tools to help you try out API calls and test deploy before having your application interact with the Production eBay server.

The API Test Tool is a developer console of sorts that lets you try out specific API calls. It shows you the web service endpoint, HTTP headers, and XML request sent to the server. It also provides the call’s server response for your review. Taken together, this information can help you quickly prototype calls you wish to make against the eBay systems.

eBay’s Sandbox lets you deploy your applications against a test server, saving you from potential headaches (or worse) if you were to deploy a buggy application against the ebay Production server. You can access the Sandbox via the “Quick Links” at the left side of the main eBay Developer Program page after you’ve created an account and logged in.

I would encourage you to thoroughly explore these tools as you work through the previously linked tutorials and documentation for the eBay APIs. The more comfortable you are with the tools and APIs, the faster your commerce application development will be. We’ll make use of some of these tools again in the next article when we develop API calls to use in our Android app.

What we’ve learned so far and what’s next

In this article, you’ve learned about eBay developer resources and how to get started with the eBay APIs. You should now have your eBay application keys at the ready. You should also have the links you need to jump to the various eBay API documentation and tutorials to learn more about what each of the APIs does and how to go about invoking them. And you should be building familiarity with the provided eBay developer tools including the API Test Tool.

The next article in this series will build upon all of the previous ones. In it we’ll create an example Android app that uses eBay’s APIs to carry out some commerce transactions. Android eBay mobile commerce, FTW!

From → Uncategorized

Comments are closed.