This call returns a list of aspects that are appropriate or necessary for accurately describing items in the specified leaf category. Each aspect identifies an item attribute (for example, color,) for which the seller will be required or encouraged to provide a value (or variation values) when offering an item in that category on eBay.
For each aspect, getItemAspectsForCategory provides complete metadata, including:
- The aspect's data type, format, and entry mode
- Whether the aspect is required in listings
- Whether the aspect can be used for item variations
- Whether the aspect accepts multiple values for an item
- Allowed values for the aspect
This method is supported in Sandbox environment. To access the endpoint, just replace the
api.ebay.com root URI with
|The unique identifier of the eBay category tree. The category tree ID for an eBay marketplace can be retrieved using the getDefaultCategoryTreeId method.
|The unique identifier of the leaf category for which aspects are being requested.
Note: If the category_id submitted does not identify a leaf node of the tree, this call returns an error.
HTTP request headers
All requests made to eBay REST operations require you to provide the
Authorization HTTP header for authentication authorization.
All other standard RESTful request headers are optional. For more information on standard RESTful request headers, see the HTTP request headers- opens rest request components page table.
This request requires an access token created with the client credentials grant flow, using one or more scopes from the following list (please check your Application Keys page for a list of OAuth scopes available to your application):
See OAuth access tokens for more information.
Note: The metadata.insights scope is conditional and is based on the App Check to gain access to the 'Buyer Demand Data'. Please refer to relevanceIndicator.
This call has no payload.
This call has no field definitions.
HTTP response headers
This call has no response headers.
|array of Aspect
A list of item aspects (for example, color) that are appropriate or necessary for accurately describing items in a particular leaf category. Each category has a different set of aspects and different requirements for aspect values. Sellers are required or encouraged to provide one or more acceptable values for each aspect when offering an item in that category on eBay.
Information about the formatting, occurrence, and support of this aspect.
|array of AspectApplicableToEnum
This value indicate if the aspect identified by the aspects.localizedAspectName field is a product aspect (relevant to catalog products in the category) or an item/instance aspect, which is an aspect whose value will vary based on a particular instance of the product.
The data type of this aspect.
A value of
Returned only if the value of aspectDataType identifies a data type that requires specific formatting. Currently, this field provides formatting hints as follows:
The maximum length of the item/instance aspect's value. The seller must make sure not to exceed this length when specifying the instance aspect's value for a product. This field is only returned for instance aspects.
The manner in which values of this aspect must be specified by the seller (as free text or by selecting from available options).
A value of
The enumeration value returned in this field will indicate if the corresponding aspect is recommended or optional.
The expected date after which the aspect will be required.
Indicates whether this aspect can accept single or multiple values for items in the specified category.
|array of AspectValue
A list of valid values for this aspect (for example:
The localized value of this aspect.
|array of ValueConstraint
Not returned if the value of the localizedValue field can always be selected for this aspect of the specified category.
The name of the control aspect on which the current aspect value depends.
|array of string
Contains a list of the values of the control aspect on which this aspect's value depends. When the control aspect has any of the specified values, the current value of the current aspect will also be available.
The localized name of this aspect (for example:
The relevance of this aspect. This field is returned if eBay has data on how many searches have been performed for listings in the category using this item aspect.
The number of recent searches (based on 30 days of data) for the aspect.
HTTP status codes
This call can return one of the following HTTP status codes. For an overview of the status codes, see HTTP status codes in Using eBay RESTful APIs.
|Internal Server Error
For more on errors, plus the codes of other common errors, see Handling errors.
|There was a problem with an eBay internal system or process. Contact eBay developer support for assistance.
|The specified category tree ID was not found.
|The specified category ID does not belong to specified category tree.
|Missing category ID.
|The specified category ID is the root for the category tree.
|The specified category ID must be a leaf category.
This call has no warnings.
New to making API calls? Please see Making a Call.
Note: Identifiers, such as order IDs or user IDs, and personal data in these samples might be anonymized or may no longer be active on eBay. If necessary, substitute current, relevant eBay data in your requests.
Sample 1: Get aspects for a leaf category
This sample returns an array of aspects that are appropriate or necessary for accurately describing items in the specified leaf category.
Use the category_tree_id path parameter to specify the category tree, and use the category_id query parameter to specify the leaf category for which to retrieve associated aspects.
A successful call returns a list of the aspects associated with category
67726, including each aspect's data type, format, entry mode, cardinality, and support. It also returns a list of valid values for each aspect, including any constraints on the applicability of each value.
Sample 2: Get the expected required by date for an aspect
This sample retrieves an array of aspects for the specified leaf category, including the expected date after which aspects will be required.
Note: The category specified in this sample is a test category used for example purposes only.
Use the category_tree_id path parameter to specify the category tree, and use the category_id query parameter to specify the leaf category for which the associated aspects should be retrieved.
A successful call returns a list of aspects associated with category
178090, including the expected date after which each aspect will be required, if available.