Chris Koston
Chris Koston

Reputation: 975

eBay API exclude countries using ExcludeShipToLocation in AddItem request

I'm trying to define list of countries excluded from shipping in the AddItem request using ExcludeShipToLocation in the sandbox environment. Request goes through, item is listed but can not see the excluded in countries in the shipping options.

I tried

<ShipToRegistrationCountry>true</ShipToRegistrationCountry>

and

<ExcludeShipToLocation>[two letter country code]</ExcludeShipToLocation>

as pointed out in documentation.

Upvotes: 1

Views: 644

Answers (1)

Fabio
Fabio

Reputation: 23510

From your code i can't see wich field you used anyway i can tell you what is the simple rule of shipping system. You have to chose where to ship with -> ShipToLocation

and set something like ShipToLocation -> EuropeanUnion

Now by using ExcludeShipToLocation set rest of the world an either place in europe where yuo don't want to ship, for example:

$extra_exclude = "<ExcludeShipToLocation>Asia</ExcludeShipToLocation>";
$extra_exclude .= "<ExcludeShipToLocation>Central America and Caribbean</ExcludeShipToLocation>";
$extra_exclude .= "<ExcludeShipToLocation>Middle East</ExcludeShipToLocation>";
$extra_exclude .= "<ExcludeShipToLocation>North America</ExcludeShipToLocation>";
$extra_exclude .= "<ExcludeShipToLocation>Oceania</ExcludeShipToLocation>";
$extra_exclude .= "<ExcludeShipToLocation>Southeast Asia</ExcludeShipToLocation>";
$extra_exclude .= "<ExcludeShipToLocation>South America</ExcludeShipToLocation>";
$extra_exclude .= "<ExcludeShipToLocation>AL</ExcludeShipToLocation>";
$extra_exclude .= "<ExcludeShipToLocation>AD</ExcludeShipToLocation>";
<!-- And so on -->

This is actually working like a charm for me and i still adding items with long exclusion list. I have had to get crazy to made it work but it is perfect now.

Upvotes: 3

Related Questions