Determining Shipping Costs for a Listing


The responses of several calls such as GetItem, GetItemTransactions, GetItemShipping, and GetOrder include shipping information.

Topics:

Key Calls for Determining Shipping Costs

Determining Flat Rate Shipping Costs

Determining Calculated Shipping Costs

Determining Freight Shipping Cost

Key Calls for Determining Shipping Costs

Various Get calls, such as GetItem and GetOrders, return ShippingDetails.ShippingType.

GetItem

Use this call to retrieve shipping costs for an item at any point in the life of the listing. Note, however, that if you use it before the listing ends, information based on final item price, such as cost of insurance, cannot be known and will not be returned.

GetOrders

Use this call to retrieve actual shipping costs. Final item price is known and information based on final item price, such as cost of insurance, can be established by eBay and returned, and you can determine total cost.

GetItemShipping

This call is analogous to the Shipping Calculator seen in both the buyer and seller web pages. It is another way for you to obtain shipping cost information for an item at any point in the life of a listing for multiple shipping services. It is only for items for which calculated shipping is offered. Thus, insurance costs can only be known if the item has sold and item final price is known.

GetItemShipping with Global Shipping

International buyers can use GetItemShipping to retrieve Global Shipping Program information for a listing. Provide the DestinationCountryCode and the DestinationPostalCode in the input to get the following relevant output fields:

Example: GetItemShipping Output for Global Shipping
<InternationalShippingServiceOption>
   <ShippingService>InternationalPriorityShipping</ShippingService>
   <ShippingServiceCost currencyID="USD">40</ShippingServiceCost>
   <ImportCharge currencyID="USD">40</ImportCharge>
   <ShipToLocation>DE</ShipToLocation>
   <ShipToLocation>CA</ShipToLocation>
</InternationalShippingServiceOption>

The ShippingServiceCost and ImportCharge fields comprise the total amount the buyer must pay to ship the item. ImportCharge is not returned unless the ShippingService field has the value InternationalPriorityShipping.

GetShippingCosts

This is a Shopping API call similar to GetItemShipping. It provides the same ShippingDetails.InternationalShippingServiceOption container as GetItemShipping, but also includes the ShippingCostSummary container, which provides the same ShippingServiceCost and ImportCharge fields, along with fields for ListedShippingServiceCost and ShippingType. For more information, see the Shopping API Reference.

GetShippingCosts with Global Shipping

International buyers can use GetShippingCosts to retrieve Global Shipping Program information for a listing. Provide the DestinationCountryCode and the DestinationPostalCode in the input to get the following relevant output fields:

Example: GetShippingCosts Output for Global Shipping
<InternationalShippingServiceOption>
   <ShippingServiceName>InternationalPriorityShipping</ShippingServiceName>
   <ShippingServiceCost currencyID="USD">40</ShippingServiceCost>
   <ShippingServicePriority>0</ShippingServicePriority>
   <ShipsTo>DE</ShipsTo>
   <ShipsTo>CA</ShipsTo>
   <ImportCharge currencyID="USD">40</ImportCharge>
</InternationalShippingServiceOption>
...
<ShippingCostSummary>
   <ShippingServiceName>InternationalPriorityShipping</ShippingServiceName>
   <ShippingServiceCost currencyID="USD">40</ShippingServiceCost>
   <ShippingType>Calculated</ShippingType>
   <ListedShippingServiceCost currencyID="USD">40</ListedShippingServiceCost>
   <ImportCharge currencyID="USD">40</ImportCharge>
</ShippingCostSummary>

The ShippingServiceCost and ImportCharge fields comprise the total amount the buyer must pay to ship the item. ImportCharge is not returned unless the ShippingServiceName field has the value InternationalPriorityShipping. The ShipsTo field is the Shopping API equvalent of ShipToLocation.

Determining Flat Rate Shipping Costs

Note: The information in this section about domestic flat shipping is applicable to the domestic leg of a Global Shipping shipment. Shipping costs for the international leg are determined by the international shipping provider.

The total shipping cost (assuming the buyer chooses to pay for shipping insurance) is

ShippingServiceCost + (ShippingServiceAdditionalCost * (QuantitySold - 1)) + InsuranceFee + ShippingSurcharge

(where you use the domestic version of tags if the buyer selects a domestic shipping service and the international version of tags if the buyer selects an international shipping service).

For example, assume a multi-item fixed price listing with 10 items is listed with a ShippingServiceCost of $8.00, a ShippingServiceAdditionalCost of $2.00, and no insurance charge or surcharge. If a buyer buys four items from the listing, the total shipping cost is:

$8 + ($2 * 3) + $0 + $0 = $14

Note: The order line item-based calls (GetItemTransactions, GetSellerTransactions, and GetOrderTransactions) reflect the selection of the buyer, whether the selection was of a domestic shipping service and its costs or an international shipping service and its costs. Thus, insurance details corresponding to the buyer's selection are reflected in the (non-container) tags InsuranceFee and InsuranceOption.

For details about the individual fields, see the eBay Trading API Reference (for example, in GetItem):

eBay Trading API Reference

Address Change

If an application enables the buyer to change the shipping address outside of eBay, the application should call eBay to determine the shipping cost, since ShippingSurcharge may apply. See Shipping Surcharge.

Determining Calculated Shipping Costs

Note: The information in this section about domestic calculated shipping is applicable to the domestic leg of a Global Shipping shipment. Shipping costs for the international leg are determined by the international shipping provider.

The total shipping cost (assuming the buyer chooses to pay insurance) is

((ShippingServiceCost + ShippingInsuranceCost) * QuantitySold) + PackagingHandlingCosts

(where you use the domestic version of tags if the buyer selects a domestic shipping service and the international version of tags if the buyer selects an international shipping service).

ShippingServiceCost is the cost to ship without insurance, taxes, discounts, etc. It is a value calculated for a specific shipping service. ShippingServiceAdditionalCost is always 0.00 for calculated shipping.

See Retrieving Insurance Costs for Calculated Shipping and Retrieving Packaging and Handling Costs for Calculated Shipping.

For GetItemTransactions, the quantity of items is already factored into the values of ShippingServiceCost and ShippingInsuranceCost. (Effectively, QuantitySold should have a value of 1 in the calculation above.)

GetItemTransactions also returns the following, since item final price and shipping service are known: InsuranceWanted, the ShippingServiceSelected container, ShippingInsuranceCost (domestic and international), ShippingRateErrorMessage, ShippingRateType, ShippingServiceUsed.

For details about the individual fields, see the eBay Trading API Reference (for example, in GetItem):

eBay Trading API Reference

Determining Freight Shipping Cost

Freight shipping cost is found in ShippingDetails.ShippingServiceOptions.ShippingServiceCost.

It is non-zero for a listing only if the item is on the eBay US site and FreightQuote.com was selected as the freight shipping service.

Copyright © 2005–2016 eBay Inc. All rights reserved. This documentation and the API may only be used in accordance with the eBay Developers Program and API License Agreement.