browse APIv1_beta.21.0

checkCompatibility

POST
/item/{item_id}/check_compatibility
This method checks if a product is compatible with the specified item. You can use this method to check the compatibility of cars, trucks, and motorcycles with a specific part listed on eBay.

For example, to check the compatibility of a part, you pass in the item ID of the part as a URI parameter and specify all the attributes used to define a specific car in the compatibilityProperties container. If the call is successful, the response will be COMPATIBLE, NOT_COMPATIBLE, or UNDETERMINED. See compatibilityStatus for details.

Note: The only products supported are cars, trucks, and motorcycles.

To find the attributes and values for a specific marketplace, you can use the compatibility methods in the Taxonomy API. You can use this data to create menus to help buyers specify the product, such as their car.

For more details and a list of the required attributes for the US marketplace that describe motor vehicles, see Check compatibility in the Buy Integration Guide.

For an example, see the Samples section.

URLs for this method

Production URL: https://api.ebay.com/buy/browse/v1/item/

Note: This method is supported only on Production.

Restrictions

For a list of supported sites and other restrictions, see API Restrictions.

Input

Resource URI (production)

POST https://api.ebay.com/buy/browse/v1/item/{item_id}/check_compatibility

URI parameters

ParameterTypeDescription
item_idstringThe eBay RESTful identifier of an item (such as a part you want to check). This ID is returned by the Browse and Feed API methods.

RESTful Item ID Format: v1|#|#
For example: v1|272394640372|0 or v1|162846450672|461882996982

For more information about item ID for RESTful APIs, see the Legacy API compatibility section of the Buy APIs Overview.

Occurrence: Required

HTTP request headers

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

HeaderTypeDescription
X-EBAY-C-MARKETPLACE-IDstringThe ID of the eBay marketplace you want to use. Note: This value is case sensitive.

For example:
  X-EBAY-C-MARKETPLACE-ID = EBAY_US

For a list of supported sites see, API Restrictions.

Occurrence: Required

OAuth scope

This request requires an access token created with the client credentials grant flow, using one scope from the following list:

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

See OAuth access tokens for more information.

Input container/fieldTypeDescription
compatibilityPropertiesarray of AttributeNameValueAn array of attribute name/value pairs used to define a specific product. For example: If you wanted to specify a specific car, one of the name/value pairs would be
"name" : "Year",
"value" : "2019"

For a list of the attributes required for cars and trucks and motorcycles see Check compatibility in the Buy Integration Guide.

Occurrence: Required

compatibilityProperties.namestringThe name of the product attribute, such as Make, Model, Year, etc.

Occurrence: Required

compatibilityProperties.valuestringThe value for the name attribute, such as BMW, R1200GS, 2011, etc.

Occurrence: Required

Output

HTTP response headers

Output container/fieldTypeDescription
compatibilityStatusCompatibilityStatusAn enumeration value that tells you if the item is compatible with the product.

The values are:
  • COMPATIBLE - Indicates the item is compatible with the product specified in the request.
  • NOT_COMPATIBLE - Indicates the item is not compatible with the product specified in the request. Be sure to check all the value fields to ensure they are correct as errors in the value can also cause this response.
  • UNDETERMINED - Indicates one or more attributes for the specified product are missing so compatibility cannot be determined. The response returns the attributes that are missing.




Code so that your app gracefully handles any future changes to this list.

Occurrence: Conditional

warningsarray of ErrorDetailV3

Occurrence: Conditional

warnings.categorystringThis string value indicates the error category. There are three categories of errors: request errors, application errors, and system errors.

Occurrence: Always

warnings.domainstringThe name of the primary system where the error occurred. This is relevant for application errors.

Occurrence: Always

warnings.errorIdintegerA unique code that identifies the particular error or warning that occurred. Your application can use error codes as identifiers in your customized error-handling algorithms.

Occurrence: Always

warnings.inputRefIdsarray of stringAn array of reference IDs that identify the specific request elements most closely associated to the error or warning, if any.

Occurrence: Conditional

warnings.longMessagestringA detailed description of the condition that caused the error or warning, and information on what to do to correct the problem.

Occurrence: Conditional

warnings.messagestringA description of the condition that caused the error or warning.

Occurrence: Always

warnings.outputRefIdsarray of stringAn array of reference IDs that identify the specific response elements most closely associated to the error or warning, if any.

Occurrence: Conditional

warnings.parametersarray of ErrorParameterV3An array of warning and error messages that return one or more variables contextual information about the error or warning. This is often the field or value that triggered the error or warning.

Occurrence: Conditional

warnings.parameters.namestringThis is the name of input field that caused an issue with the call request.

Occurrence: Conditional

warnings.parameters.valuestringThis is the actual value that was passed in for the element specified in the name field.

Occurrence: Conditional

warnings.subdomainstringThe name of the subdomain in which the error or warning occurred.

Occurrence: NA

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
200OK
404Not Found
409Conflict
500Internal Server Error

Error codes

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

CodeDomainCategoryMeaning
11000API_BROWSEAPPLICATIONThere was a problem with an eBay internal system or process. Contact eBay developer support for assistance.
11001API_BROWSEREQUESTThe specified item Id was not found.
11011API_BROWSEREQUESTThe marketplace value {marketplaceId} is not supported. The supported values are: {allowedMarketplaces}
11503API_BROWSEREQUESTThe request is either empty or incomplete. For help, see the documentation for this call.
11505API_BROWSEREQUESTThe item is not valid for compatibility validation.
11506API_BROWSEREQUESTThe 'name' {compatibilityNames} appears more than once in the request.
11507API_BROWSEREQUESTThe following name(s) in the request are not supported {attributes}.

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: Checks for Part Compatibility on US Marketplace

This sample checks whether that the part specified by the item ID is compatible with the specified vehicle.

Input

The input is the item_id of the part URI parameter and the attributes (name/value pairs) that define a specific vehicle in the payload. In this sample, the part is a headlight bulb and the service is checking if it will fit a 2016 Honda EX-L Hatchback 4-Door.

You also need to pass in EBAY_US in the X-EBAY-C-MARKETPLACE-ID request header.
POST
https://api.ebay.com/buy/browse/v1/item/v1|182708228929|0/check_compatibility

Output

The output is the compatibilityStatus container, which shows whether this headlight bulb will fit this vehicle.