Skip to main content
Published: May 17 2006, 4:17:00 PMUpdated: July 25 2022, 9:48:27 AM

What input should I set to specify the Item location in the AddItem call?

Detailed Description

The recommended way to specify the location of an item is to use PostalCode, instead of a Location.  When you specify the PostalCode, it automatically fills out the location of the item and displays it on the ViewItem page.  Also, it uses this value in proximity searches. If you want your item to show up in proximity searches, then you need to use PostalCode.

Here is an AddItem sample which shows how to set the PostalCode:

<?xml version="1.0" encoding="utf-8"?>
<
AddItemRequest xmlns="urn:ebay:apis:eBLBaseComponents">
  <
Version>523</Version>
  <
Item>
    <
Country>US</Country>
    <
Currency>USD</Currency>
    <
Description>item description.</Description>
    <
ListingDuration>Days_7</ListingDuration>
   <
PaymentMethods>PayPal</PaymentMethods>
   <
PayPalEmailAddress>test@test.com</PayPalEmailAddress>
    <
PrimaryCategory>
      <
CategoryID>1463</CategoryID>
    </
PrimaryCategory>
    <
Quantity>1</Quantity>
    <
StartPrice>1.0</StartPrice>
    <
Title>item title</Title>
    <PostalCode>95125</PostalCode>
    <ShippingDetails>
      <ShippingServiceOptions>
        <ShippingService>UPSGround</ShippingService>
        <ShippingServiceCost>3.00</ShippingServiceCost>
  
      <ShippingServicePriority>1</ShippingServicePriority>
      </ShippingServiceOptions>
    </ShippingDetails>
  </
Item>
  <
RequesterCredentials>
    <
eBayAuthToken>*****</eBayAuthToken>
  </
RequesterCredentials>
</
AddItemRequest>


Version Info

The code example above was based on the versions specified below:

API Schema Version 523


Additional Resources

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