How to fetch categories from eBay using GetCategories method

While developing a module for Zencart where the user would be able to list his products on eBay using the Zencart admin panel the client requested that he wanted the list of categories on eBay available in the admin panel so he can list the products into the category he wishes. This would allow the client to set the eBay category against the product from the add/edit product page in the admin panel.

Fortunately eBay provides this facility in their SOAP API. They provide a method called GetCategories which will return the category related information to you. Each eBay site i.e. eBay USA, eBay UK has it’s own set of categories so you need to specify the location in your input to receive the related categories to that location.

GetCategories take an array as input. The array is made up of the following

Version
RequesterCredentials
CategorySiteID
DetailLevel

and returns an array of objects which contains the category information as

BestOfferEnabled
AutoPayEnabled
CategoryID
CategoryLevel
CategoryName
CategoryParentID

Here we are concerned with CategoryID and CategoryName. If you would like more information on the above you can view the information here.

If you would like to view the code for fetching the categories and saving it into the database then you can download the code from here

Hope the above helped.

What is the eBay Platform Notifications API?

eBay provides a host of APIs on its website. You can browse the complete APIs on the eBay Developer website on this page.

I will be discussing about eBay Platform Notifications API in this post. eBay provides this API to notify the buyer and/or seller regarding a particular event occurring on the eBay website. eBay notifies in two ways

1. Email

2. XML post to website

eBay provides the first option by default to the user however you have the option to disable this notification. The second option is useful in cases where you wish to capture product inventory or order information and take appropriate action.

You can setup notifications for particular actions on eBay using the SetNotificationPreferences method. The method takes the following arguments

1. Notification mode
This can be email or xml post or both. There is no restriction. However, it should be noted that in case of xml post the web page should respond with the HTTP 200 status otherwise eBay will keep sending notifications to the URL till it receives a HTTP 200 status response.

2. Notification type
Notification types are events which when triggered are notified by eBay using the notification mode set above. Again these notifications can be related to the buyer, seller or both.

Once you have set the notifications using the SetNotificationPreferences method you can check whether they have been set correctly or not using the GetNotificationPreferences method. Of course you receive a success or error message in response to your SetNotificationPreferences method request but it’s a good idea to check.

Hope the above helped in providing you a start to the platform notifications API. If you need my help do then let me know.

What is the eBay Platform Notifications API?

eBay provides a host of APIs on its website. You can browse the complete APIs on the eBay Developer website on this page.

I will be discussing about eBay Platform Notifications API in this post. eBay provides this API to notify the buyer and/or seller regarding a particular event occurring on the eBay website. eBay notifies in two ways

1. Email

2. XML post to website

eBay provides the first option by default to the user however you have the option to disable this notification. The second option is useful in cases where you wish to capture product inventory or order information and take appropriate action.

You can setup notifications for particular actions on eBay using the SetNotificationPreferences method. The method takes the following arguments

1. Notification mode
This can be email or xml post or both. There is no restriction. However, it should be noted that in case of xml post the web page should respond with the HTTP 200 status otherwise eBay will keep sending notifications to the URL till it receives a HTTP 200 status response.

2. Notification type
Notification types are events which when triggered are notified by eBay using the notification mode set above. Again these notifications can be related to the buyer, seller or both.

Once you have set the notifications using the SetNotificationPreferences method you can check whether they have been set correctly or not using the GetNotificationPreferences method. Of course you receive a success or error message in response to your SetNotificationPreferences method request but it’s a good idea to check.

Hope the above helped in providing you a start to the platform notifications API. If you need my help do then let me know.

How to start out with eBay Developer program

eBay is one of the world’s largest auction and marketplace where millions of visitors visit each day to trade items online. It offers store owners an opportunity to list their items on eBay and sell them online. eBay also provides its own set of APIs and developers can use them to create applications which they can sell and earn commissions.

If you are a developer and wish to start with eBay API then you would need to register with their eBay Developer website. Click on Join Now and you will be taken to the registration page where you can enter you details and choose your eBay developer ID. After registration is complete and having confirmed your account you can login with your details into the eBay Developer website.

Once you are logged in you can visit the various sections on the website. eBay provides a Sandbox mode which allows you to test your application without incurring any eBay fees. To start using the eBay Sandbox you will need to generate Sandbox keys. Go to Application Keys and select Sandbox and enter the name of your application. eBay will generate the sandbox keys one each for AppID, DevID and CertID. Please note you will be using all of them in your applications.

After creating you Sandbox keys you will need to create 2 sandbox users. One user will be a seller and one will be a buyer. As eBay is a trading platform and as it’s API’s are geared towards one user or the other this step is necessary. Go to My Account page and click on Sandbox User Registration. This step will be needed to be done twice to create user for each type. Please note that emails must be valid otherwise you will not receive any notifications from eBay.

Next step would be to create a user token. You can create a user token for the sandbox buyer or sandbox seller or both. It really depends on what type of application you are building. After eBay generates the user token you will need to save this string some where safe as you will need it along with your sandbox keys.

After doing all of the above steps you can download the SDK for your relevant technology whether it is .NET, Java, JavaScript, Flex or PHP.

Hope the above helps you to start with eBay. If you need further help then do let me know.