Developers Program

How to not retrieve the description with GetItemCall

Published: March 08 2005, 11:28:00 AMยทUpdated: July 20 2022, 3:14:39 AM

Products

Question

The Documentation for GetItemCall states that by default descriptions are not returned. Defaulting the DetailLevel does in fact return the Description. How do I prevent the Description from being returned?

Answer

The default DetailLevel for all ApiCalls is DetailLevel.ReturnAll. GetItemCall does not modify this.

Setting the detail level to null will ensure that minimal Item information is returned by the call:

GetItemCall getItemCall = new GetItemCall(apiContext);
getItemCall.setDetailLevel(null);
ItemType item = getItemCall.getItem(itemID);
How well did this answer your question?