Skip to main content

GET/category_tree/{category_tree_id}/get_item_aspects_for_category

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
Use this information to construct an interface through which sellers can enter or select the appropriate values for their items or item variations. Once you collect those values, include them as product aspects when creating inventory items using the Inventory API.

Input

Resource URI

GET https://api.ebay.com/commerce/taxonomy/v1/category_tree/{category_tree_id}/get_item_aspects_for_category?

This method is supported in Sandbox environment. To access the endpoint, just replace the api.ebay.com root URI with api.sandbox.ebay.com

URI parameters

ParameterTypeDescription
category_tree_idstringThe unique identifier of the eBay category tree. The category tree ID for an eBay marketplace can be retrieved using the getDefaultCategoryTreeId method.

Occurrence: Required

category_idstringThe 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.

Occurrence: Required

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.

OAuth scope

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):

https://api.ebay.com/oauth/api_scope

https://api.ebay.com/oauth/api_scope/metadata.insights

See OAuth access tokens for more information.

Request payload

This call has no payload.

Request fields

This call has no field definitions.

Output

HTTP response headers

This call has no response headers.

Response payload

Response fields

Output container/fieldTypeDescription
aspectsarray 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.

Occurrence: Always

aspects.aspectConstraintAspectConstraint

Information about the formatting, occurrence, and support of this aspect.

Occurrence: Always

aspects.aspectConstraint.aspectApplicableToarray 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.

Occurrence: Conditional

aspects.aspectConstraint.aspectDataTypeAspectDataTypeEnum

The data type of this aspect.

Occurrence: Always

aspects.aspectConstraint.aspectEnabledForVariationsboolean

A value of true indicates that this aspect can be used to help identify item variations.

Occurrence: Always

aspects.aspectConstraint.aspectFormatstring

Returned only if the value of aspectDataType identifies a data type that requires specific formatting. Currently, this field provides formatting hints as follows:

  • DATE: YYYY, YYYYMM, YYYYMMDD
  • NUMBER: int32, double

Occurrence: Conditional

aspects.aspectConstraint.aspectMaxLengthinteger

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.

Occurrence: Conditional

aspects.aspectConstraint.aspectModeAspectModeEnum

The manner in which values of this aspect must be specified by the seller (as free text or by selecting from available options).

Occurrence: Always

aspects.aspectConstraint.aspectRequiredboolean

A value of true indicates that this aspect is required when offering items in the specified category.

Occurrence: Always

aspects.aspectConstraint.aspectUsageAspectUsageEnum

The enumeration value returned in this field will indicate if the corresponding aspect is recommended or optional.

Note: This field is always returned, even for hard-mandated/required aspects (where aspectRequired: true). The value returned for required aspects will be RECOMMENDED, but they are actually required and a seller will be blocked from listing or revising an item without these aspects.

Occurrence: Always

aspects.aspectConstraint.expectedRequiredByDatestring

The expected date after which the aspect will be required.

Note: The value returned in this field specifies only an approximate date, which may not reflect the actual date after which the aspect is required.

Occurrence: Conditional

aspects.aspectConstraint.itemToAspectCardinalityItemToAspectCardinalityEnum

Indicates whether this aspect can accept single or multiple values for items in the specified category.

Note: Up to 30 values can be supplied for aspects that accept multiple values.

Occurrence: Always

aspects.aspectValuesarray of AspectValue

A list of valid values for this aspect (for example: Red, Green, and Blue), along with any constraints on those values.

Occurrence: Always

aspects.aspectValues.localizedValuestring

The localized value of this aspect.

Note: This value is always localized for the specified marketplace.

Occurrence: Always

aspects.aspectValues.valueConstraintsarray of ValueConstraint

Not returned if the value of the localizedValue field can always be selected for this aspect of the specified category.

Contains a list of the dependencies that identify when the value of the localizedValue field is available for the current aspect. Each dependency specifies the values of another aspect of the same category (a control aspect), for which the current value of the current aspect can also be selected by the seller.

Example: A shirt is available in three sizes and three colors, but only the Small and Medium sizes come in Green. Thus for the Color aspect, the value Green is constrained by its dependency on Size (the control aspect). Only when the Size aspect value is Small or Medium, can the Color aspect value of Green be selected by the seller.

Occurrence: Conditional

aspects.aspectValues.valueConstraints.applicableForLocalizedAspectNamestring

The name of the control aspect on which the current aspect value depends.

Occurrence: Conditional

aspects.aspectValues.valueConstraints.applicableForLocalizedAspectValuesarray 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.

Occurrence: Conditional

aspects.localizedAspectNamestring

The localized name of this aspect (for example: Colour on the eBay UK site).

Note: This name is always localized for the specified marketplace.

Occurrence: Always

aspects.relevanceIndicatorRelevanceIndicator

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.

Note: This container is restricted to applications that have been granted permission to access this feature. You must submit an App Check ticket to request this access. In the App Check form, add a note to the Application Title/Summary and/or Application Details fields that you want access to 'Buyer Demand Data' in the Taxonomy API.

Occurrence: Conditional

aspects.relevanceIndicator.searchCountinteger

The number of recent searches (based on 30 days of data) for the aspect.

Occurrence: Conditional

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.

StatusMeaning
200Success
204No Content
400Bad Request
404Not found
500Internal Server Error

Error codes

For more on errors, plus the codes of other common errors, see Handling errors.

CodeDomainCategoryMeaning
62000API_TAXONOMYAPPLICATIONThere was a problem with an eBay internal system or process. Contact eBay developer support for assistance.
62004API_TAXONOMYREQUESTThe specified category tree ID was not found.
62005API_TAXONOMYREQUESTThe specified category ID does not belong to specified category tree.
62006API_TAXONOMYREQUESTMissing category ID.
62008API_TAXONOMYREQUESTThe specified category ID is the root for the category tree.
62009API_TAXONOMYREQUESTThe specified category ID must be a leaf category.

Warnings

This call has no warnings.

Samples

This call has no samples.