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
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.
Header | Type | Description |
---|---|---|
Content-Type | string | This 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-ID | string | This 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 clipboardRequest fields
Input container/field | Type | Description |
---|---|---|
categoryId | string | 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. Occurrence: Required |
compatibilityPropertyFilters | array 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. Occurrence: Optional |
compatibilityPropertyFilters.propertyName | string | The name of the property being described. Occurrence: Conditional |
compatibilityPropertyFilters.propertyValue | string | The value for the property specified in the properyName field. Occurrence: Conditional |
compatibilityPropertyFilters.unitOfMeasurement | string | The unit of measurement of the property being described, if applicable. Occurrence: Optional |
compatibilityPropertyFilters.url | string | The URL associated with the property being described, if applicable. Occurrence: Optional |
dataset | string | This field can be used to define the type of properties that will be returned in the response.
DisplayableSearchResults Occurrence: Optional |
datasetPropertyName | array of string | This comma-delimited array can be used to define the specific property name(s) that will be returned in the response. Occurrence: Optional |
exactMatch | boolean | 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. Occurrence: Optional |
paginationInput | PaginationInput | Important! Pagination is not yet supported by this method. If this container is included in the request, it will be ignored. Occurrence: Optional |
paginationInput.limit | integer | The max number of items, from the current result set, returned on a single page. Occurrence: Optional |
paginationInput.offset | integer | The number of items that will be skipped in the result set before returning the first item in the paginated response. Occurrence: Optional |
sortOrders | array 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. Occurrence: Optional |
sortOrders.sortOrder | SortOrderProperties | This container is used to define the property to be used in the sorting. Occurrence: Conditional |
sortOrders.sortOrder.order | string | Defines the order of the sort.
Occurrence: Conditional |
sortOrders.sortOrder.propertyName | string | The name of the searchable property to be used for sorting. Occurrence: Conditional |
sortOrders.sortPriority | string | The priority of the specified sort order provided.
Occurrence: Conditional |
specifications | array 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.propertyName | string | The name of the property being described. Occurrence: Conditional |
specifications.propertyValue | string | The value for the property specified in the properyName field. Occurrence: Conditional |
specifications.unitOfMeasurement | string | The unit of measurement of the property being described, if applicable. Occurrence: Optional |
specifications.url | string | 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/field | Type | Description |
---|---|---|
compatibilityDetails | array of Compatibility | This container returns the list of all compatible application name-value pairs for the given filter criteria. Occurrence: Conditional |
compatibilityDetails.compatibilityDetails | array of CompatibilityDetails | This array returns a list of compatibility details associated with the specified property name(s). Occurrence: Conditional |
compatibilityDetails.compatibilityDetails.propertyName | string | The name of the property being described. Occurrence: Conditional |
compatibilityDetails.compatibilityDetails.propertyValue | string | The value for the property specified in the propertyName field. Occurrence: Conditional |
pagination | Pagination | Important! Not currently returned. For future use. Occurrence: Conditional |
pagination.count | integer | The number of results showing on the current page of results. Occurrence: Conditional |
pagination.limit | integer | The max number of entries that can be returned on a single page. Occurrence: Conditional |
pagination.offset | integer | The number of items that will be skipped in the result set before returning the first item in the paginated response. Occurrence: Conditional |
pagination.total | integer | 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.
Status | Meaning |
---|---|
200 | Success |
204 | No Content |
400 | Bad Request |
401 | Unauthorized |
500 | Internal Server Error |
Error codes
For more on errors, plus the codes of other common errors, see Handling errors.
Code | Domain | Category | Meaning |
---|---|---|---|
46000 | API | APPLICATION | There was a problem with an eBay internal system or process. Contact eBay developer support for assistance. |
47000 | API | REQUEST | Item compatibilities are not enabled for category ID {{category_id}} or invalid propertyFilter. |
47002 | API | REQUEST | The category {{category_id}} specified in the request does not support compatibilities. |
47003 | API | REQUEST | A required field is missing from the request. |
47004 | API | REQUEST | Invalid data supplied in the request. |
47005 | API | REQUEST | The marketplace id {{marketplaceId}} specified in the request is invalid. |
47006 | API | REQUEST | The 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.