Skip to main content
Published: February 02 2005, 4:28:00 PMUpdated: November 28 2020, 1:18:06 PM

How can I find the Shipping Fees for an item if it is to be calculated?

To find the shipping fees for an item, you can make a call to GetItemShipping. 

Here is a C# sample using the SDK:

private void GetItemShipping(string itemID, int quantity, string destinationPostalCode, CountryCodeType countryCode)
{
  GetItemShippingCall call = new GetItemShippingCall(apiContext);
  ShippingDetailsType Details = call.GetItemShipping(itemID, quantity, destinationPostalCode, countryCode);

  foreach (ShippingServiceOptionsTypeservice in Details .ShippingServiceOptions)
 {
      //Get values

      service.ShippingService;
      service.ShippingServicePriority;
      service.ShippingServiceCost.Value;
      service.ShippingInsuranceCost.Value;
   }

Here is the sample SOAP request:

<?xml version="1.0"encoding="utf-8"?>
<
soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"xmlns:xsd="http://www.w3.org/2001/XMLSchema"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <soapenv:Header>
    <RequesterCredentialssoapenv:mustUnderstand="0"xmlns="urn:ebay:apis:eBLBaseComponents">
      <ebl:eBayAuthTokenxmlns:ebl="urn:ebay:apis:eBLBaseComponents">token</ebl:eBayAuthToken>
    </RequesterCredentials>
  </soapenv:Header>
  <soapenv:Body>
    <GetItemShippingRequestxmlns="urn:ebay:apis:eBLBaseComponents">
      <Version>523</Version>
      <ItemID>4503623900</ItemID>
      <QuantitySold>1</QuantitySold>
      <DestinationPostalCode>44036</DestinationPostalCode>
    </GetItemShippingRequest>
  </soapenv:Body>
</
soapenv:Envelope>

Here is the response:

<?xml version="1.0"encoding="utf-8"?>
<
soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"xmlns:xsd="http://www.w3.org/2001/XMLSchema"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <
soapenv:Body>
    <
GetItemShippingResponse xmlns="urn:ebay:apis:eBLBaseComponents">
      <Timestamp>2005-09-12T19:49:16.539Z</Timestamp>
      <Ack>Success</Ack>
      <CorrelationID>00000000-00000000-00000000-00000000-00000000-00000000-0000000000</CorrelationID>
      <Version>553</Version>
      <Build>e553_core_Bundled_6134529_R1</Build>
      <ShippingDetails>
      <CalculatedShippingRate>
          <OriginatingPostalCode>95125</OriginatingPostalCode
          <PackageDepth unit="inchesmeasurementSystem="English" confidenceFactor="0.0">1</PackageDepth> 
         
<PackageLength unit="inchesmeasurementSystem="English" confidenceFactor="0.0">3</PackageLength> 
          <PackageWidth unit="inchesmeasurementSystem="English" confidenceFactor="0.0">2</PackageWidth> 
          <PackagingHandlingCosts currencyID="USD">0.0</PackagingHandlingCosts>
          <ShippingIrregular>true</ShippingIrregular>
          <ShippingPackage>LargeEnvelope</ShippingPackage>
          <WeightMajor unit="lbs">0</WeightMajor>
          <WeightMinor unit="oz">13</WeightMinor>
        </CalculatedShippingRate>
        <ShippingRateErrorMessage>No Error</ShippingRateErrorMessage>
        <ShippingServiceOptions>
          <ShippingInsuranceCostcurrencyID="USD">1.3</ShippingInsuranceCost>
          <ShippingService>USPSPriority</ShippingService>
  
        <ShippingServiceCostcurrencyID="USD">3.85</ShippingServiceCost>
          <
ShippingServicePriority>1</ShippingServicePriority>
        </ShippingServiceOptions>
        <ShippingServiceOptions>
          <ShippingInsuranceCostcurrencyID="USD">1.3</ShippingInsuranceCost>
          <ShippingService>USPSFirstClass</ShippingService>
  
        <ShippingServiceCostcurrencyID="USD">3.13</ShippingServiceCost>
          <
ShippingServicePriority>2</ShippingServicePriority>
        </ShippingServiceOptions>
        <
ShippingType>Calculated</ShippingType>
      </ShippingDetails>
    </GetItemShippingResponse>
  </soapenv:Body>
</
soapenv:Envelope>


Version Info 

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

API Schema Version 523
.NET SDK Version NET SDK v523.0 full release

 

 

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