I’ve been wrestling with eBay’s Large Merchant Services API for a while. It’s been rough. I finally have messages going all the way through their system, but I’m having issues with their schema. Apparently there are alot more restrictions than what is defined in the schema.
As an example, the schema defines shipping service options, which may look something like this:
<ShippingServiceOptions>
<ShippingService>USPSPriority</ShippingService>
<ShippingServiceCost currencyID="USD">7.99</ShippingServiceCost>
<ShippingServiceAdditionalCost currencyID="USD">0.0</ShippingServiceAdditionalCost>
<ShippingServicePriority>1</ShippingServicePriority>
</ShippingServiceOptions>
and is defined in their schema like so:
<complexType name="ShippingServiceOptionsType">
<complexContent>
<restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
<sequence>
<element name="ShippingInsuranceCost" type="{urn:ebay:apis:eBLBaseComponents}AmountType" minOccurs="0"/>
<element name="ShippingService" type="{http://www.w3.org/2001/XMLSchema}token" minOccurs="0"/>
<element name="ShippingServiceCost" type="{urn:ebay:apis:eBLBaseComponents}AmountType" minOccurs="0"/>
<element name="ShippingServiceAdditionalCost" type="{urn:ebay:apis:eBLBaseComponents}AmountType" minOccur ="0"/>
<element name="ShippingServicePriority" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/>
<element name="ExpeditedService" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
<element name="ShippingTimeMin" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/>
<element name="ShippingTimeMax" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/>
<element name="ShippingSurcharge" type="{urn:ebay:apis:eBLBaseComponents}AmountType" minOccurs="0"/>
<element name="FreeShipping" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
</sequence>
</restriction>
</complexContent>
</complexType>
Where can I find valid values for ShippingService
? I found an example where they has USPSPriority
. That one works, but everything else I’ve guessed at (UPS, UPSGround, UPS2ndDayAir, etc) results in the entire thing getting returned with an error of Invalid data
.
If anyone knows a list of valid values, or any other resources that better explains eBay’s schema for Large Merchamt Services (LMS) please let me know.
As a side question, what exatly is a type of “{http://www.w3.org/2001/XMLSchema}token”? JAXB currently converts it to a String.
3
Answers
I finally found the answer concerning Shipping Service. Their (eBay's) documentation is much better than I had initially realized, although it still can take a bit of poking around to find the data - it does appear to be there.
EBAY Trading API Call Reference
Answer to side question:
xs:token is described here.
as
For your main question, you’d have to be asking eBay.
A few things that might bring some clarity:
http://developer.ebay.com/webservices/latest/merchantdataservice.xsd
. Note: This is not the same as the Trading API XSD.http://developer.ebay.com/devzone/xml/docs/reference/ebay/AddFixedPriceItem.html#Request.Item.ShippingDetails.ShippingServiceOptions.ShippingService
See where it says
ShippingServiceCodeType links to the page you ultimately found.
Hopefully this helps 🙂