You can use the
OutputSelector field to restrict the data returned by a call. This field can make the call response easier to manage, especially when a large payload is returned. If you use the
OutputSelector field, the output data will only include the field(s) you specified in the request, as well as all of its child fields (if a field is a container) and its parent fields (if any). Note that it is possible that a field included through an
OutputSelector field may still not be returned if it is not applicable, or if it is not found based on other criteria set up in the request payload.
For example, if you are using
GetItem and you only want to retrieve the URL of the View Item page (emitted in
ViewItemURL field) and the item's Buy It Now price (emitted in
BuyItNowPrice field), you would include two separate
OutputSelector fields and set the value for each one as
ViewItemURL and
BuyItNowPrice as in the following example:
If the following output selectors are used:
...
<OutputSelector>ViewItemURL</OutputSelector>
<OutputSelector>BuyItNowPrice</OutputSelector>
...
...the response might look like the following
<Item>
<BuyItNowPrice currencyID="USD">0.0</BuyItNowPrice>
<ListingDetails>
<ViewItemURL>http://www.ebay.com/itm/Tag-Heuer-Mens-Watch/182879833261</ViewItemURL>
</ListingDetails>
</Item>