Chapter 1: Using the REST API 3
Basic REST Input Parameters
Version 3.7
Basic REST Input Parameters
This section of the REST API Guide contains the following subsections:
“Root URLs, Containers, and Repeating Parameters” on page 3
“Required Parameters” on page 4
“Error Information” on page 5
“Affiliate Parameters” on page 5
“Specifying International Sites” on page 7
Root URLs, Containers, and Repeating Parameters
This section contains the following subsections:
“Root URLs” on page 3
“Containers” on page 3
“Repeating Parameters” on page 4
Root URLs
To make a call to the REST API in the production environment (which contains live eBay data), use
the following root URL:
http://rest.api.ebay.com/restapi
Additionally, if a call is supported in the Sandbox (test) environment, you can make a test call to the
following root URL:
http://rest.api.sandbox.ebay.com/restapi
Here is an example of a GetSearchResults request that uses the REST API. The value of Query is “toy
boat” with the space character HTTP-encoded as %20:
http://rest.api.ebay.com/restapi?CallName=GetSearchResults&RequestToken
=UserToken&RequestUserId=UserName&Query=toy%20boat&Version=491&UnifiedInput=1
The overall size of the string after the “?” in the URL must be no larger than 2071 characters. If you
access the REST API through a proxy, the proxy may place further size limitations on the URL.
Containers
Input parameters in the REST API can contain other parameters and can have attributes.
You can use XPATH to specify parameters that are containers or have attributes.
Nested Parameters. Use the “.” symbol (i.e., Parent.Child).
Attributes. Use the “@” symbol (i.e., Element@attribute).
Note
: In GetSearchResults, if an input parameter is unique among all of the possible input parameters for the call, then you
do not need to specify the parameter container.