Skip to main content
Published: May 09 2007, 3:03:00 PMUpdated: August 02 2022, 11:04:36 AM

GeteBayDetails is returning CustomCode for the new USPS shipping services. Why is this happening?

Summary

If you make a call to GeteBayDetails with a version of 455 or less, you will get back CustomCode for the new USPS shipping services.  Till 455, the shipping services were a code type and from 457 onwards it was converted to token (essentially string).  In order to maintain backwards compatibility with applications that are on older versions, the new shipping services are returned as CustomCode, so that applications that are still using the old code type do not break.  In order to get the new shipping services, you need to make the call to GeteBayDetails with version 457 or higher. 
 


Detailed Description

Here is a sample GeteBayDetails call with the DetailName set to ShippingServiceDetails to get just the shipping services:
 

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

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

  <Version>511</Version>

  <RequesterCredentials>

    <eBayAuthToken>*****</eBayAuthToken>

  </RequesterCredentials>

  <DetailName>ShippingServiceDetails</DetailName>

</GeteBayDetailsRequest>

This is the response with the new shipping services:

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

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

  <Timestamp>2007-05-09T21:47:11.485Z</Timestamp>

  <Ack>Success</Ack>

  <Version>511</Version>

  <Build>e511_core_Bundled_4606190_R1</Build>

  <ShippingServiceDetails>

    <Description>US Postal Service Priority Mail</Description>

    <ShippingService>USPSPriority</ShippingService>

    <ShippingServiceID>7</ShippingServiceID>

    <ShippingTimeMax>3</ShippingTimeMax>

    <ShippingTimeMin>2</ShippingTimeMin>

  </ShippingServiceDetails>

  <ShippingServiceDetails>

    <Description>US Postal Service Express Mail</Description>

    <ExpeditedService>true</ExpeditedService>

    <ShippingService>USPSExpressMail</ShippingService>

    <ShippingServiceID>11</ShippingServiceID>

    <ShippingTimeMax>1</ShippingTimeMax>

    <ShippingTimeMin>0</ShippingTimeMin>

  </ShippingServiceDetails>

  <ShippingServiceDetails>

    <Description>US Postal Service Parcel Post</Description>

    <ShippingService>USPSParcel</ShippingService>

    <ShippingServiceID>8</ShippingServiceID>

    <ShippingTimeMax>9</ShippingTimeMax>

    <ShippingTimeMin>2</ShippingTimeMin>

  </ShippingServiceDetails>

  <ShippingServiceDetails>

    <Description>US Postal Service Media Mail</Description>

    <ShippingService>USPSMedia</ShippingService>

    <ShippingServiceID>9</ShippingServiceID>

    <ShippingTimeMax>9</ShippingTimeMax>

    <ShippingTimeMin>2</ShippingTimeMin>

  </ShippingServiceDetails>

  <ShippingServiceDetails>

    <Description>US Postal Service First Class Mail</Description>

    <ShippingService>USPSFirstClass</ShippingService>

    <ShippingServiceID>10</ShippingServiceID>

    <ShippingTimeMax>5</ShippingTimeMax>

    <ShippingTimeMin>2</ShippingTimeMin>

  </ShippingServiceDetails>

  <ShippingServiceDetails>

    <Description>UPS Ground</Description>

    <ShippingService>UPSGround</ShippingService>

    <ShippingServiceID>3</ShippingServiceID>

    <ShippingTimeMax>6</ShippingTimeMax>

    <ShippingTimeMin>1</ShippingTimeMin>

  </ShippingServiceDetails>

  <ShippingServiceDetails>

    <Description>UPS 3 Day Select</Description>

    <ShippingService>UPS3rdDay</ShippingService>

    <ShippingServiceID>4</ShippingServiceID>

    <ShippingTimeMax>3</ShippingTimeMax>

    <ShippingTimeMin>1</ShippingTimeMin>

  </ShippingServiceDetails>

  <ShippingServiceDetails>

    <Description>UPS 2nd Day Air</Description>

    <ShippingService>UPS2ndDay</ShippingService>

    <ShippingServiceID>5</ShippingServiceID>

    <ShippingTimeMax>2</ShippingTimeMax>

    <ShippingTimeMin>1</ShippingTimeMin>

  </ShippingServiceDetails>

  <ShippingServiceDetails>

    <Description>UPS Next Day Air Saver</Description>

    <ExpeditedService>true</ExpeditedService>

    <ShippingService>UPSNextDay</ShippingService>

    <ShippingServiceID>6</ShippingServiceID>

    <ShippingTimeMax>1</ShippingTimeMax>

    <ShippingTimeMin>1</ShippingTimeMin>

  </ShippingServiceDetails>

  <ShippingServiceDetails>

    <Description>UPS Next Day Air</Description>

    <ExpeditedService>true</ExpeditedService>

    <ShippingService>UPSNextDayAir</ShippingService>

    <ShippingServiceID>12</ShippingServiceID>

    <ShippingTimeMax>1</ShippingTimeMax>

    <ShippingTimeMin>1</ShippingTimeMin>

  </ShippingServiceDetails>

  <ShippingServiceDetails>

    <Description>Standard Flat Rate Shipping Service</Description>

    <ShippingService>ShippingMethodStandard</ShippingService>

    <ShippingServiceID>1</ShippingServiceID>

  </ShippingServiceDetails>

  <ShippingServiceDetails>

    <Description>Expedited Flat Rate Shipping Service</Description>

    <ShippingService>ShippingMethodExpress</ShippingService>

    <ShippingServiceID>2</ShippingServiceID>

  </ShippingServiceDetails>

  <ShippingServiceDetails>

    <Description>Overnight Flat Rate Shipping Service</Description>

    <ExpeditedService>true</ExpeditedService>

    <ShippingService>ShippingMethodOvernight</ShippingService>

    <ShippingServiceID>18</ShippingServiceID>

    <ShippingTimeMax>1</ShippingTimeMax>

    <ShippingTimeMin>1</ShippingTimeMin>

  </ShippingServiceDetails>

  <ShippingServiceDetails>

    <Description>Other (see description)</Description>

    <ShippingService>Other</ShippingService>

    <ShippingServiceID>14</ShippingServiceID>

  </ShippingServiceDetails>

  <ShippingServiceDetails>

    <Description>Local Delivery/Pickup</Description>

    <ShippingService>LocalDelivery</ShippingService>

    <ShippingServiceID>15</ShippingServiceID>

  </ShippingServiceDetails>

  <ShippingServiceDetails>

    <Description>USPS Global Express Mail</Description>

    <InternationalService>true</InternationalService>

    <ShippingService>USPSGlobalExpress</ShippingService>

    <ShippingServiceID>50003</ShippingServiceID>

    <ShippingTimeMax>5</ShippingTimeMax>

    <ShippingTimeMin>3</ShippingTimeMin>

  </ShippingServiceDetails>

  <ShippingServiceDetails>

    <Description>USPS Global Priority Mail</Description>

    <InternationalService>true</InternationalService>

    <ShippingService>USPSGlobalPriority</ShippingService>

    <ShippingServiceID>50005</ShippingServiceID>

    <ShippingTimeMax>6</ShippingTimeMax>

    <ShippingTimeMin>4</ShippingTimeMin>

  </ShippingServiceDetails>

  <ShippingServiceDetails>

    <Description>USPS Economy Letter Post</Description>

    <InternationalService>true</InternationalService>

    <ShippingService>USPSEconomyLetter</ShippingService>

    <ShippingServiceID>50007</ShippingServiceID>

    <ShippingTimeMax>42</ShippingTimeMax>

    <ShippingTimeMin>28</ShippingTimeMin>

  </ShippingServiceDetails>

  <ShippingServiceDetails>

    <Description>USPS Economy Parcel Post</Description>

    <InternationalService>true</InternationalService>

    <ShippingService>USPSEconomyParcel</ShippingService>

    <ShippingServiceID>50006</ShippingServiceID>

    <ShippingTimeMax>42</ShippingTimeMax>

    <ShippingTimeMin>28</ShippingTimeMin>

  </ShippingServiceDetails>

  <ShippingServiceDetails>

    <Description>USPS Airmail Letter Post</Description>

    <InternationalService>true</InternationalService>

    <ShippingService>USPSAirmailLetter</ShippingService>

    <ShippingServiceID>50008</ShippingServiceID>

    <ShippingTimeMax>10</ShippingTimeMax>

    <ShippingTimeMin>4</ShippingTimeMin>

  </ShippingServiceDetails>

  <ShippingServiceDetails>

    <Description>USPS Airmail Parcel Post</Description>

    <InternationalService>true</InternationalService>

    <ShippingService>USPSAirmailParcel</ShippingService>

    <ShippingServiceID>50009</ShippingServiceID>

    <ShippingTimeMax>10</ShippingTimeMax>

    <ShippingTimeMin>4</ShippingTimeMin>

  </ShippingServiceDetails>

  <ShippingServiceDetails>

    <Description>UPS Worldwide Express Plus</Description>

    <InternationalService>true</InternationalService>

    <ShippingService>UPSWorldWideExpressPlus</ShippingService>

    <ShippingServiceID>50010</ShippingServiceID>

    <ShippingTimeMax>2</ShippingTimeMax>

    <ShippingTimeMin>1</ShippingTimeMin>

  </ShippingServiceDetails>

  <ShippingServiceDetails>

    <Description>UPS Worldwide Express</Description>

    <InternationalService>true</InternationalService>

    <ShippingService>UPSWorldWideExpress</ShippingService>

    <ShippingServiceID>50011</ShippingServiceID>

    <ShippingTimeMax>2</ShippingTimeMax>

    <ShippingTimeMin>1</ShippingTimeMin>

  </ShippingServiceDetails>

  <ShippingServiceDetails>

    <Description>UPS Worldwide Expedited</Description>

    <InternationalService>true</InternationalService>

    <ShippingService>UPSWorldWideExpedited</ShippingService>

    <ShippingServiceID>50012</ShippingServiceID>

    <ShippingTimeMax>5</ShippingTimeMax>

    <ShippingTimeMin>2</ShippingTimeMin>

  </ShippingServiceDetails>

  <ShippingServiceDetails>

    <Description>UPS Standard To Canada</Description>

    <InternationalService>true</InternationalService>

    <ShippingService>UPSStandardToCanada</ShippingService>

    <ShippingServiceID>50013</ShippingServiceID>

  </ShippingServiceDetails>

  <ShippingServiceDetails>

    <Description>Standard Int'l Flat Rate Shipping</Description>

    <InternationalService>true</InternationalService>

    <ShippingService>StandardInternational</ShippingService>

    <ShippingServiceID>50001</ShippingServiceID>

  </ShippingServiceDetails>

  <ShippingServiceDetails>

    <Description>Expedited Int'l Flat Rate Shipping</Description>

    <InternationalService>true</InternationalService>

    <ShippingService>ExpeditedInternational</ShippingService>

    <ShippingServiceID>50002</ShippingServiceID>

  </ShippingServiceDetails>

  <ShippingServiceDetails>

    <Description>Other Int'l Shipping (see description)</Description>

    <InternationalService>true</InternationalService>

    <ShippingService>OtherInternational</ShippingService>

    <ShippingServiceID>50014</ShippingServiceID>

  </ShippingServiceDetails>

  <ShippingServiceDetails>

    <Description>USPS First Class Mail International</Description>

    <InternationalService>true</InternationalService>

    <ShippingService>USPSFirstClassMailInternational</ShippingService>

    <ShippingServiceID>50022</ShippingServiceID>

  </ShippingServiceDetails>

  <ShippingServiceDetails>

    <Description>USPS Priority Mail International</Description>

    <InternationalService>true</InternationalService>

    <ShippingService>USPSPriorityMailInternational</ShippingService>

    <ShippingServiceID>50023</ShippingServiceID>

  </ShippingServiceDetails>

  <ShippingServiceDetails>

    <Description>USPS Express Mail International</Description>

    <InternationalService>true</InternationalService>

    <ShippingService>USPSExpressMailInternational</ShippingService>

    <ShippingServiceID>50024</ShippingServiceID>

  </ShippingServiceDetails>

</GeteBayDetailsResponse>


 


Version Info

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

API Schema Version 511



Additional Resources

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

Got thoughts? Click the feedback button – your insights help us improve!