Skip to main content
Published: August 06 2007, 10:25:00 AMUpdated: November 28 2020, 3:54:01 PM

Sample code for adding to a non-US site. This example is for Australia, but illustrates general differences.

Detailed Description

The PHP 5 samples include a simple AddItem.php example. The AddItem.php file (along with a couple helper files) can be used to list simple items to the eBay sandbox (or production) sites.

The PHP 5 sample bundle works "out-of-the-box" for the US site (site 0). Most files in the samples bundle will work for other sites (ex. = site 77) by simply changing the SiteID variable. However, AddItem requires a number of site-specific settings, even in a simple case. This article details some of the differences.

Site or country
$siteID = 15;

Category structure

The category structure differs from site to site. The category numbers associated with listings for a given site can be seen from (or etc.) and selecting "Show category numbers". They can be obtained through the API with the GetCategories call.

<BuyItNowPrice currencyID=AUD>

The AddItem.php sample does not address shipping; however, in general shipping is country (site) specific.

Sandbox site URL
Please adjust the sandbox (or production URL) as needed. Here is the list of international sandbox sites.
$linkBase = "";

Other considerations
Cross-site (and cross-border) listing is a common and complex issue. eBay Sites and Special Areas is one place to see how to handle this situation.

Attached to this article are PHP 5 files including the original AddItem code for the US site (SiteID = 0 = and modified code for Australia (SiteID = 15 =

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