inventory API1.7.0

getProductCompatibility

GET
/inventory_item/{sku}/product_compatibility
This call is used by the seller to retrieve the list of products that are compatible with the inventory item. The SKU value for the inventory item is passed into the call URI, and a successful call with return the compatible vehicle list associated with this inventory item. Product compatibility is currently only applicable to motor vehicle parts and accessory categories, but more categories may be supported in the future.

Input

Resource URI (production)

GET https://api.ebay.com/sell/inventory/v1/inventory_item/{sku}/product_compatibility

URI parameters

ParameterTypeDescription
skustringA SKU (stock keeping unit) is an unique identifier defined by a seller for a product

Occurrence: Required

HTTP request headers

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

OAuth scope

This request requires an access token created with the authorization code 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/sell.inventory.readonly

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

See OAuth access tokens for more information.

Output

HTTP response headers

Output container/fieldTypeDescription
compatibleProductsarray of CompatibleProductThis container consists of an array of motor vehicles (defined by make, model, year, trim, engine) that are compatible with the motor vehicle part or accessory specified by the SKU value.

Occurrence: Always

compatibleProducts.productFamilyPropertiesProductFamilyPropertiesThis container consists of an array of motor vehicles that are compatible with the motor vehicle part or accessory specified by the SKU value in the call URI. These motor vehicles are identified by properties such as make, model, year, trim, and engine type. A separate productFamilyProperties node is needed to specify each compatible motor vehicle. Typically, the make, model, and year of the motor vehicle are always required, with the trim and engine being necessary sometimes, but it will be dependent on the part or accessory, and on the vehicle class.

Note: The productFamilyProperties container is in the process of being deprecated and will no longer be supported in February of 2021, so if you are a new user of createOrReplaceProductCompatibility, you should use the newer compatibilityProperties container instead, and if you are already integrated and using the productFamilyProperties container, you should make plans to migrate to compatibilityProperties. The productFamilyProperties and compatibilityProperties containers may not be used together or the call will fail.

Occurrence: Conditional

compatibleProducts.productFamilyProperties.makestringThis field indicates the make of the vehicle (e.g. Toyota). This field is always required to identify a motor vehicle.

Occurrence: Conditional

compatibleProducts.productFamilyProperties.modelstringThis field indicates the model of the vehicle (e.g. Camry). This field is always required to identify a motor vehicle.

Occurrence: Conditional

compatibleProducts.productFamilyProperties.yearstringThis field indicates the year of the vehicle (e.g. 2016). This field is always required to identify a motor vehicle.

Occurrence: Conditional

compatibleProducts.productFamilyProperties.trimstringThis field indicates the trim of the vehicle (e.g. 2-door Coupe). This field is conditionally required, but should be supplied if known/applicable.

Occurrence: Conditional

compatibleProducts.productFamilyProperties.enginestringThis field indicates the specifications of the engine, including its size, block type, and fuel type. An example is 2.7L V6 gas DOHC naturally aspirated. This field is conditionally required, but should be supplied if known/applicable.

Occurrence: Conditional

compatibleProducts.productIdentifierProductIdentifierThis container is used in a createOrReplaceProductCompatibility call to identify a motor vehicle that is compatible with the inventory item. The user specifies either an eBay Product ID (ePID) or K-Type value to identify a vehicle, and if the motor vehicle is found in the eBay product catalog, the motor vehicle properties (make, model, year, trim, engine) will automatically be populated for the vehicle. If the vehicle cannot be found using these identifiers, the vehicle will not be added to the compatible vehicle list.

Note that this container will not be returned in the getProductCompatibility call.

Occurrence: NA

compatibleProducts.productIdentifier.epidstringThis field can be used if the seller already knows the eBay catalog product ID (ePID) associated with the motor vehicle that is to be added to the compatible product list. If this eBay catalog product ID is found in the eBay product catalog, the motor vehicle properties (e.g. make, model, year, engine, and trim) will automatically get picked up for that motor vehicle.

Occurrence: NA

compatibleProducts.productIdentifier.gtinstringThis field can be used if the seller knows the Global Trade Item Number for the motor vehicle that is to be added to the compatible product list. If this GTIN value is found in the eBay product catalog, the motor vehicle properties (e.g. make, model, year, engine, and trim will automatically get picked up for that motor vehicle.

Note: This field is for future use.

Occurrence: NA

compatibleProducts.productIdentifier.ktypestringThis field can be used if the seller knows the K Type Number for the motor vehicle that is to be added to the compatible product list. If this K Type value is found in the eBay product catalog, the motor vehicle properties (e.g. make, model, year, engine, and trim) will automatically get picked up for that motor vehicle.

Only the DE, UK, and AU sites support the use of K Type Numbers.

Occurrence: NA

compatibleProducts.notesstringThis field is optionally used by the seller to input any notes pertaining to the compatible vehicle list being defined. The seller might use this field to specify the placement of the part on a vehicle or other applicable information. This field will only be returned if specified by the seller.

Max Length: 500

Occurrence: Conditional

compatibleProducts.compatibilityPropertiesarray of NameValueListThis container consists of an array of motor vehicles that are compatible with the motor vehicle part or accessory specified by the SKU value in the call URI. Each motor vehicle is defined through a separate set of name/value pairs. In the name field, the vehicle aspect (such as 'make', 'model', 'year', 'trim', or 'engine') will be identified, and the value field will be used to identify the value of each aspect. The getCompatibilityProperties method of the Taxonomy API can be used to retrieve applicable vehicle aspect names for a specified category, and the getCompatibilityPropertyValues method of the Taxonomy API can be used to retrieve possible values for these same vehicle aspect names. Below is an example of identifying one motor vehicle using the compatibilityProperties container:

"compatibilityProperties" : [
  {
   "name" : "make",
   "value" : "Subaru"
  },
  {
   "name" : "model",
   "value" : "GL"
  },
  {
   "name" : "year",
   "value" : "1983"
  },
  {
   "name" : "trim",
   "value" : "Base Wagon 4-Door"
  },
  {
   "name" : "engine",
   "value" : "1.8L Turbocharged"
  }
]


Typically, the make, model, and year of the motor vehicle are always required, with the trim and engine being necessary sometimes, but it will be dependent on the part or accessory, and on the vehicle class.

Note: The productFamilyProperties container is in the process of being deprecated and will no longer be supported in February of 2021, so if you are a new user of createOrReplaceProductCompatibility, you should use the compatibilityProperties container instead, and if you are already integrated and using the productFamilyProperties container, you should make plans to migrate to compatibilityProperties. The productFamilyProperties and compatibilityProperties containers may not be used together or the call will fail.

Occurrence: Conditional

compatibleProducts.compatibilityProperties.namestringThis string value identifies the motor vehicle aspect, such as 'make', 'model', 'year', 'trim', and 'engine'. Typically, the make, model, and year of the motor vehicle are always required, with the trim and engine being necessary sometimes, but it will be dependent on the part or accessory, and on the vehicle class.

Occurrence: Conditional

compatibleProducts.compatibilityProperties.valuestringThis string value identifies the motor vehicle aspect specified in the corresponding name field. For example, if the name field is 'make', this field may be 'Toyota', or if the name field is 'model', this field may be 'Camry'.

Occurrence: Conditional

skustringThis is the seller-defined SKU value of the inventory item that will be associated with the compatible vehicles. This field is not applicable to the createOrReplaceProductCompatibility call, but it is always returned with the getProductCompatibility call. For the createOrReplaceProductCompatibility call, the SKU value for the inventory item is actually passed in as part of the call URI, and not in the request payload.

Occurrence: Always

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
400Bad Request
404Not Found
500Internal Server Error

Error codes

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

CodeDomainCategoryMeaning
25001API_INVENTORYAPPLICATIONA system error has occurred. {additionalInfo}
25702API_INVENTORYREQUEST{skuValue} could not be found or is not available in the system.
25709API_INVENTORYREQUESTInvalid value for {fieldName}. {additionalInfo}

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: Retrieving a Product Compatibility List

This call will retrieve a product compatibility list that is associated with a particular SKU.

Input

The SKU value of the product whose product compatibility list will be retrieved is input into the end of the call URI. In this case, the SKU value for the product is Al-8730.
GET
https://api.ebay.com/sell/inventory/v1/inventory_item/Al-8730/product_compatibility

Output

Three compatible vehicles are returned for the product, 'Al-8730'. The attributes are given for each of these three vehicles. The SKU value is also returned in the response.