A SERVICE OF

logo

Chapter 1: Using the REST API 18
Obtain Shipping Costs with GetItemShipping
Version 3.7
Obtain Shipping Costs with GetItemShipping
You can use GetItemShipping to obtain estimated shipping cost information for an item. To use
GetItemShipping, include the applicable item ID.
The data returned is similar to the data returned by the Shipping Calculator on the eBay site. Note
that the shipping insurance cost can only be determined after the final price of the item is
determined.
For example, using item ID 123456789123, you could specify destination information in an URL
similar to the following for estimated shipping cost information:
http://rest.api.ebay.com/
restapi?CallName=GetItemShipping&RequestToken=UserToken&RequestUserId=UserName&ItemID=123
456789123&DestinationPostalCode=40404&DestinationCountryCode=US&Version=491
Parameters for GetItemShipping are the same in the REST API as in the unified schema, except for
the basic REST input parameters. For the REST-specific input parameters, see “Basic REST Input
Parameters” on page 3. For more information about using GetItemShipping, including descriptions
of the call-specific input and output parameters, see the following document:
GetItemShipping
General information about the unified schema format is available at the following location:
http://developer.ebay.com/support/docs/
After you have tested your program’s ability to handle output, you can use your program in
production to transform output or you can enable server-side processing. Server-side processing
uses your XSL files to format the output for you. For more information on server-side processing that
uses your XSL files, see “Transforming Data Returned” on page 20.
Obtain a Category Hierarchy with GetCategories
GetCategories retrieves the latest category hierarchy available on a site. You can retrieve all
categories on the site, or one particular category and its subcategories.
You can use GetCategories to retrieve category information before you use GetCategoryListings (see
“Find Items in a Category with GetCategoryListings” on page 13). For example, you can specify the
ID of the highest-level category you want returned in order to return that category and its
subcategories:
http://rest.api.ebay.com/
restapi?CallName=GetCategories&RequestToken=UserToken&RequestUserId=UserName&CategoryParent
=20081&DetailLevel=ReturnAll&Version=491
GetCategories can return a large amount of data in the response. To use this call, see the article “Best
Practices for GetCategories API call” in the Developers Program Knowledge Base. Although the article
applies to the call in the unified schema, you can convert the unified schema XML code in the article