Skip to main content

POST/compatibilities/get_compatibilities_by_specification

This method is used to retrieve all compatible application name-value pairs for a part based on the provided specification(s).

The part's relevant dimensions and/or characteristics can be provided through the specifications container. For example, when retrieving compatible application name-value pairs for a tire, the tire's dimensions (such as the section width or rim diameter) should be provided.

By default, all compatible application name-value pairs for the specifications are returned. You can limit the size of the result set by using the compatibilityPropertyFilters array to specify the properties (such as make, model, year, or trim) you wish to be included in the response.

Note: The getCompatibilityPropertyNames and getCompatibilityPropertyValues methods can be used to retrieve valid property names and values that can be used as the name-value pairs to define specifications.

Input

Resource URI

POST https://api.ebay.com/sell/metadata/v1/compatibilities/get_compatibilities_by_specification

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

This method has no URI parameters.

HTTP request headers

All requests made to eBay REST operations require you to provide the Authorization HTTP header for authentication authorization.

The table below shows additional HTTP request headers that are either required, conditionally required, or strongly recommended for this method. Other standard HTTP request headers- opens rest request components page (not in this table) can also be used, but they are optional.

HeaderTypeDescription
Content-TypestringThis header indicates the format of the request body provided by the client.

Its value should be set to application/json.

For more information, refer to HTTP request headers in the Using eBay RESTful APIs guide.

Occurrence: Required

X-EBAY-C-MARKETPLACE-IDstringThis header identifies the seller's eBay marketplace.

See Metadata API requirements and restrictions for supported values.

Occurrence: Required

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

See OAuth access tokens for more information.

Request payload

Copy complete valid JSON to clipboard

Request fields

Input container/fieldTypeDescription
categoryIdstring

The unique identifier of the eBay leaf category for which compatibility details are being retrieved. This category must be a valid eBay category on the specified eBay marketplace, and the category must support parts compatibility for cars, trucks, or motorcycles.

Use the getAutomotivePartsCompatibilityPolicies method to retrieve a list of categories that support parts compatibility by specification. For the categories in the response that support compatibility by specification, you’ll see SPECIFICATIONS as the value for the compatibilityBasedOn field

Occurrence: Required

compatibilityPropertyFiltersarray of PropertyFilterInner

This comma-delimited array can be used to restrict the number of compatible application name-value pairs returned in the response by specifying the properties that the seller wishes to be included in the response.

Only compatible applications with the specified properties will be returned. Properties that can be specified here include make, model, year, and trim.

Occurrence: Optional

compatibilityPropertyFilters.propertyNamestring

The name of the property being described.

For example, typical vehicle property names are 'Make', 'Model', 'Year', 'Engine', and 'Trim', but will vary based on the eBay marketplace and the eBay category. Use the getCompatibilityPropertyNames method to retrieve valid property names for a specified category.

Occurrence: Conditional

compatibilityPropertyFilters.propertyValuestring

The value for the property specified in the properyName field.

For example, if the propertyName is Make, then the propertyValue will be the specific make of the vehicle, such as Toyota. Use the getCompatibilityPropertyValues to retreive valid property values associated with a specified property name.

Occurrence: Conditional

compatibilityPropertyFilters.unitOfMeasurementstring

The unit of measurement of the property being described, if applicable.

Occurrence: Optional

compatibilityPropertyFilters.urlstring

The URL associated with the property being described, if applicable.

Occurrence: Optional

datasetstring

This field can be used to define the type of properties that will be returned in the response.

For example, if you specify Searchable, the compatibility details will contain properties that can be used to search for products, such as make or model.

Note: This field cannot be used alongside dataPropertyName. If both are used, an error will occur.
Valid values:

  • DisplayableProductDetails: Properties for use in a user interface to describe products.
  • DisplayableSearchResults: Properties for use in results for product searches.
  • Searchable: Properties for use in searches.
  • Sortable: Properties that are suitable for sorting.
Default value: DisplayableSearchResults

Occurrence: Optional

datasetPropertyNamearray of string

This comma-delimited array can be used to define the specific property name(s) that will be returned in the response.

For example, if you specify Engine, the result set will only contain engines that are compatible with the input criteria.

Note: This array cannot be used alongside dataset. If both are used, an error will occur.

Occurrence: Optional

exactMatchboolean

This boolean can be used to specify that the compatibilities returned in the response are to be defined by an exact match on the input value of specification properties.

By default, an expanded compatibility match is done when it applies, such as for Load Index, where a compatible vehicle is one that has a load index requirement that is less than or equal to the input. By specifying this field as true, only exact matches are returned.

Occurrence: Optional

paginationInputPaginationInput

Important! Pagination is not yet supported by this method. If this container is included in the request, it will be ignored.

Occurrence: Optional

paginationInput.limitinteger

The max number of items, from the current result set, returned on a single page.

Note: For getProductCompatibilities, the max value is 100. If no limit is specified, this field defaults to the max value.

Occurrence: Optional

paginationInput.offsetinteger

The number of items that will be skipped in the result set before returning the first item in the paginated response.

Combine offset with limit to control the items returned in the response. For example, if you supply an offset of 10 and a limit of 20, the first page of the response contains items 11-30 from the complete result set.

Default: 0

Occurrence: Optional

sortOrdersarray of SortOrderInner

This array specifies the sorting order of the compatibility properties. Any of the searchable properties can be used to specify search order. Up to 5 levels of sort order may be specified.

Note: If no sort order is specified through this field, the default sort order of popularity descending is applied.

Occurrence: Optional

sortOrders.sortOrderSortOrderProperties

This container is used to define the property to be used in the sorting.

Occurrence: Conditional

sortOrders.sortOrder.orderstring

Defines the order of the sort.

Valid values:

  • Ascending
  • Descending

Occurrence: Conditional

sortOrders.sortOrder.propertyNamestring

The name of the searchable property to be used for sorting.

For example, typical vehicle property names are 'Make', 'Model', 'Year', 'Engine', and 'Trim', but will vary based on the eBay marketplace and the eBay category.

Occurrence: Conditional

sortOrders.sortPrioritystring

The priority of the specified sort order provided.

For example, when a property is assigned Sort1, its values are sorted first. Values for the property assigned Sort2 are sorted second, and so on.

Valid values:

  • Sort1
  • Sort2
  • Sort3
  • Sort4
  • Sort5

Occurrence: Conditional

specificationsarray of PropertyFilterInner

This array defines the specifications of the part, in the form of name-value pairs, for which compatible applications will be retrieved.

Occurrence: Required

specifications.propertyNamestring

The name of the property being described.

For example, typical vehicle property names are 'Make', 'Model', 'Year', 'Engine', and 'Trim', but will vary based on the eBay marketplace and the eBay category. Use the getCompatibilityPropertyNames method to retrieve valid property names for a specified category.

Occurrence: Conditional

specifications.propertyValuestring

The value for the property specified in the properyName field.

For example, if the propertyName is Make, then the propertyValue will be the specific make of the vehicle, such as Toyota. Use the getCompatibilityPropertyValues to retreive valid property values associated with a specified property name.

Occurrence: Conditional

specifications.unitOfMeasurementstring

The unit of measurement of the property being described, if applicable.

Occurrence: Optional

specifications.urlstring

The URL associated with the property being described, if applicable.

Occurrence: Optional

Output

HTTP response headers

This call has no response headers.

Response payload

Response fields

Output container/fieldTypeDescription
compatibilityDetailsarray of Compatibility

This container returns the list of all compatible application name-value pairs for the given filter criteria.

Occurrence: Conditional

compatibilityDetails.compatibilityDetailsarray of CompatibilityDetails

This array returns a list of compatibility details associated with the specified property name(s).

Occurrence: Conditional

compatibilityDetails.compatibilityDetails.propertyNamestring

The name of the property being described.

Occurrence: Conditional

compatibilityDetails.compatibilityDetails.propertyValuestring

The value for the property specified in the propertyName field.

Occurrence: Conditional

paginationPagination

Important! Not currently returned. For future use.

Occurrence: Conditional

pagination.countinteger

The number of results showing on the current page of results.

Occurrence: Conditional

pagination.limitinteger

The max number of entries that can be returned on a single page.

Occurrence: Conditional

pagination.offsetinteger

The number of items that will be skipped in the result set before returning the first item in the paginated response.

Occurrence: Conditional

pagination.totalinteger

The total number of results in a result set.

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
401Unauthorized
500Internal Server Error

Error codes

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

CodeDomainCategoryMeaning
46000APIAPPLICATIONThere was a problem with an eBay internal system or process. Contact eBay developer support for assistance.
47000APIREQUESTItem compatibilities are not enabled for category ID {{category_id}} or invalid propertyFilter.
47002APIREQUESTThe category {{category_id}} specified in the request does not support compatibilities.
47003APIREQUESTA required field is missing from the request.
47004APIREQUESTInvalid data supplied in the request.
47005APIREQUESTThe marketplace id {{marketplaceId}} specified in the request is invalid.
47006APIREQUESTThe marketplace id {{marketplaceId}} specified in the request does not support compatibility.

Warnings

This call has no warnings.

Samples

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: Retrieve compatible applications for a part

This method will retrieve the compatible vehicles for a part based on the provided specification.

Input

The category ID for which to retrieve compatibility property names must be provided in the request body. In addition, the specifications for which to retrieve compatible vehicles for the part must be specified through the specifications array in the request. The size of the result set can be filtered by using the compatibilityPropertyFilters and dataSet arrays to specify the properties to be returned.

In this sample, the user wishes to find compatible vehicles for the tires specified through the specifications container. The results are then filtered down to only the vehicles that are compatible with the vehicle properties specified in the compatibilityPropertyFilters container.

POSThttps://api.ebay.com/sell/metadata/v1/compatibilities/get_compatibilities_by_specification

Output

If the call is successful, all compatible vehicles for the specification are returned (within the confines of the specified filters).

In this sample, only vehicles with the specified trim and engine are compatible with the provided specifications.