05-09-2024 08:43 AM - edited 05-09-2024 08:49 AM
As per the title, am I correct in my evaluation that getItemConditionPolicies returns invalid data when a category does not allow condition values?
For such categories it returns the itemConditionPolicies.itemConditionRequired bool stating if they are optional, but will still return a list of available values regardless of if they can be used or not (tested with category 73465). There is no flag to communicate the ConditionEnabled state for a category.
As such, there appears to be no way to determine if a category supports condition values through the REST API, and so you must resort to using the Trading API's GetCategoryFeatures.
05-30-2024 09:49 AM
itemConditionRequired field indicates that a seller is required to set the item condition when listing the item in the specified category.
If the getItemConditionPolicies call is returning itemConditionRequired as false and returning the item-condition values in the itemConditions container as well then the seller can use the conditionId value to specify the item condition for the listing if seller wants to and seller can list without item condition as well for the specified category.
05-30-2024 11:50 AM - edited 05-30-2024 11:52 AM
I'm aware of the things you mentioned. The problem is that some categories do not allow any condition values at all, and if condition values are sent an error is returned.
getItemConditionPolicies only indicates if the conditions are optional or not. It has has no way of communicating if they are allowed or not, and still returns a list of values even when they can not be used, because if they are sent then the service call results in an error.
This means you HAVE to use the Trading API's GetCategoryFeatures to determine if the category allows condition values or not, otherwise you'll get service errors since the information is not available from the REST API (and it returns invalid data - a list of available condition values, none of which are valid as none can be used).