question

$$anonymous$$ avatar image
1 Like"
$$anonymous$$ asked ·

AddItem API: International shipping problems

Afternoon,

 

I am having a number of issues at the moment when adding international shipping to items through the AddItem call of the Trading API. Below is the relevant parts of the XML being sent and the response coming back. Any help would be much appreciated.

 

​XML being sent to eBay:

 

<?xml version="1.0" encoding="UTF-8"?>

<AddItemRequest xmlns="urn:ebay:apis:eBLBaseComponents">

        <DetailLevel>ReturnAll</DetailLevel>

        <WarningLevel>High</WarningLevel>

        <ErrorLanguage>en_GB</ErrorLanguage>

        <Version>763</Version>

        <Item>

                <Site>UK</Site>

                <ShippingDetails>

                        <PaymentInstructions>Please make payment within 24 hours of purchase.</PaymentInstructions>

                        <ShippingType>Flat</ShippingType>

                        <GetItFast>true</GetItFast>

                        <ShippingServiceOptions>

                                <ShippingService>UK_OtherCourier</ShippingService>

                                <ShippingServicePriority>1</ShippingServicePriority>

                                <ShippingServiceCost currencyID="GBP">0</ShippingServiceCost>

                                <ShippingServiceAdditionalCost currencyID="GBP">0</ShippingServiceAdditionalCost>

                        </ShippingServiceOptions>

                        <ShippingServiceOptions>

                                <ShippingService>UK_OtherCourier24</ShippingService>

                                <ShippingServicePriority>2</ShippingServicePriority>

                                <ShippingServiceCost currencyID="GBP">8.95</ShippingServiceCost>

                                <ShippingServiceAdditionalCost currencyID="GBP">3</ShippingServiceAdditionalCost>

                        </ShippingServiceOptions>

                        <InternationalShippingServiceOption>

                                <ShippingService>UK_SellersStandardInternationalRate</ShippingService>

                                <ShippingServiceCost>7.14</ShippingServiceCost>

                                <ShippingServicePriority>5</ShippingServicePriority>

                                <ShipToLocation>AT</ShipToLocation>

                                <ShipToLocation>DK</ShipToLocation>

                                <ShipToLocation>CH</ShipToLocation>

                        </InternationalShippingServiceOption>

                        <InternationalShippingServiceOption>

                                <ShippingService>UK_SellersStandardInternationalRate</ShippingService>

                                <ShippingServiceCost>7.14</ShippingServiceCost>

                                <ShippingServicePriority>6</ShippingServicePriority>

                                <ShipToLocation>CZ</ShipToLocation>

                                <ShipToLocation>IT</ShipToLocation>

                                <ShipToLocation>SK</ShipToLocation>

                                <ShipToLocation>ES</ShipToLocation>

                        </InternationalShippingServiceOption>

                <DispatchTimeMax>1</DispatchTimeMax>

        </Item>

</AddItemRequest>

 

eBay Response:

<?xml version="1.0" encoding="UTF-8"?>

<AddItemResponse xmlns="urn:ebay:apis:eBLBaseComponents">

  <Timestamp>2012-07-02T15:21:55.364Z</Timestamp>

  <Ack>Failure</Ack>

  <Errors>

    <ShortMessage>All locations are dropped.</ShortMessage>

    <LongMessage>All locations provided for postage service "50301" are not allowable for this site.</LongMessage>

    <ErrorCode>17521</ErrorCode>

    <SeverityCode>Error</SeverityCode>

    <ErrorParameters ParamID="0">

      <Value>50301</Value>

    </ErrorParameters>

    <ErrorClassification>RequestError</ErrorClassification>

  </Errors>

  <Version>779</Version>

  <Build>E779_INTL_BUNDLED_14991382_R1</Build>

</AddItemResponse>​

Has anyone else ever come across this before?

 

Cheers,

Aran

additemshippingdelivery
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

davidtsadler avatar image
0 Likes"
davidtsadler answered ·

Hello Aran,
 
The values for your ShipToLocation options are not valid for the site that your are listing to. For the UK site (ID 3) the values that you should be using can be any of the following.
 
Americas
Asia
AU
CA
EuropeanUnion
IE
US
DE
FR
Europe
JP
 
You need to be aware that the values will be different depending on the site you want to list items on. For example, the US site (ID 0) has the option MX to allow shipping to Mexico. To determine which values you should be using you will need to make a call to the GeteBayDetails method through the Trading API. The process can be summarized as follows. Note that I'm assuming you are using the XML API.
 
1) For each site that you are interested in call GeteBayDetails.
2) In the request body you must specify ShippingLocationDetails as the value of a DetailName element.
3) In the resulting response iterate through each of the ShippingLocationDetails elements.
4) Each ShippingLocationDetails will have a ShippingLocation and Description element. The value of the ShippingLocation element is what you will pass to the AddItem request. The Description element is more descriptive than ShippingLocation and can be used as for displaying options to a user.
 
I've attached a zip file that contains a few XML examples which can be used with the eBay API test tool.
 
add_item_request.xml : This was used for an item that has been listed to the sandbox at this URL http://cgi.sandbox.ebay.co.uk/110100457011 It uses a few shipping options as an example.
 
get_ebay_details_request.xml : An example request to GeteBayDetails to determine which ShipToLocation values you can use.
 
get_ebay_details_response.xml : An example response to GeteBayDetails for the UK site (ID 3).

 

Hope it all helps.

 

David

· Share
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

$$anonymous$$ avatar image
0 Likes"
$$anonymous$$ answered ·

evoaran

/ ShippingDetails is missing at end
· Share
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

$$anonymous$$ avatar image
0 Likes"
$$anonymous$$ answered ·
> evoaran i have noticed that you have typed missing xml code at the end
· Share
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.