Home
PUT/inventory_item/{sku}/product_compatibility
This call is used by the seller to create or replace a list of products that are compatible with the inventory item. The inventory item is identified with a SKU value in the URI. Product compatibility is currently only applicable to motor vehicle parts and accessory categories, but more categories may be supported in the future.
In addition to the authorization
header, which is required for all eBay REST API calls, the createOrReplaceProductCompatibility call also requires the Content-Language
header, that sets the natural language that will be used in the field values of the request payload. For US English, the code value passed in this header should be en-US
. To view other supported Content-Language
values, and to read more about all supported HTTP headers for eBay REST API calls, see the HTTP request headers topic in the Using eBay RESTful APIs document.
This method is supported in Sandbox environment. To access the endpoint, just replace the api.ebay.com
root URI with api.sandbox.ebay.com
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-Language | string | This request header sets the natural language that will be provided in the field values of the request payload. Occurrence: Required |
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
See OAuth access tokens for more information.
Input container/field | Type | Description |
---|---|---|
compatibleProducts | array of CompatibleProduct | This container consists of an array of motor vehicles (make, model, year, trim, engine) that are compatible with the motor vehicle part or accessory specified by the sku value. Occurrence: Required |
compatibleProducts.compatibilityProperties | array of NameValueList | This 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: Occurrence: Conditional |
compatibleProducts.compatibilityProperties.name | string | This 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.value | string | This 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 |
compatibleProducts.notes | string | This 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. Occurrence: Conditional |
compatibleProducts.productFamilyProperties | ProductFamilyProperties | This 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. Occurrence: Conditional |
compatibleProducts.productFamilyProperties.engine | string | This field indicates the specifications of the engine, including its size, block type, and fuel type. An example is Occurrence: Conditional |
compatibleProducts.productFamilyProperties.make | string | This field indicates the make of the vehicle (e.g. Occurrence: Conditional |
compatibleProducts.productFamilyProperties.model | string | This field indicates the model of the vehicle (e.g. Occurrence: Conditional |
compatibleProducts.productFamilyProperties.trim | string | This field indicates the trim of the vehicle (e.g. Occurrence: Conditional |
compatibleProducts.productFamilyProperties.year | string | This field indicates the year of the vehicle (e.g. Occurrence: Conditional |
compatibleProducts.productIdentifier | ProductIdentifier | This 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. Occurrence: Conditional |
compatibleProducts.productIdentifier.epid | string | This 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: Optional |
compatibleProducts.productIdentifier.gtin | string | This 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. Occurrence: Optional |
compatibleProducts.productIdentifier.ktype | string | This 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. Occurrence: Optional |
sku | string | This 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: NA |
See HTTP response headers for details.
Header | Meaning |
---|---|
Content-Language | This response header sets the natural language that will be provided in the field values of the response payload. |
Output container/field | Type | Description |
---|---|---|
warnings | array of ErrorDetailV3 | This container will be returned in a call response payload if one or more warnings or errors are triggered when an Inventory API call is made. This container will contain detailed information about the error or warning. Occurrence: Conditional |
warnings.category | string | This string value indicates the error category. There are three categories of errors: request errors, application errors, and system errors. Occurrence: Conditional |
warnings.domain | string | The name of the domain in which the error or warning occurred. Occurrence: Conditional |
warnings.errorId | integer | A 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: Conditional |
warnings.inputRefIds | array of string | An array of one or more reference IDs which identify the specific request element(s) most closely associated to the error or warning, if any. Occurrence: Conditional |
warnings.longMessage | string | A detailed description of the condition that caused the error or warning, and information on what to do to correct the problem. Occurrence: Conditional |
warnings.message | string | A description of the condition that caused the error or warning. Occurrence: Conditional |
warnings.outputRefIds | array of string | An array of one or more reference IDs which identify the specific response element(s) most closely associated to the error or warning, if any. Occurrence: Conditional |
warnings.parameters | array of ErrorParameterV3 | Various warning and error messages return one or more variables that contain contextual information about the error or waring. This is often the field or value that triggered the error or warning. Occurrence: Conditional |
warnings.parameters.name | string | This type contains the name and value of an input parameter that contributed to a specific error or warning condition. Occurrence: Conditional |
warnings.parameters.value | string | This is the actual value that was passed in for the element specified in the name field. Occurrence: Conditional |
warnings.subdomain | string | The name of the subdomain in which the error or warning occurred. Occurrence: Conditional |
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 |
201 | Created |
204 | No Content |
400 | Bad Request |
500 | Internal Server Error |
For more on errors, plus the codes of other common errors, see Handling errors.
Code | Domain | Category | Meaning |
---|---|---|---|
25001 | API_INVENTORY | APPLICATION | A system error has occurred. {additionalInfo} |
25002 | API_INVENTORY | REQUEST | A user error has occurred. {additionalInfo} |
25003 | API_INVENTORY | REQUEST | The eBay listing associated with the inventory item, or the unpublished offer has an invalid price. {additionalInfo} |
25004 | API_INVENTORY | REQUEST | The eBay listing associated with the inventory item, or the unpublished offer has an invalid quantity. {additionalInfo} |
25005 | API_INVENTORY | REQUEST | The eBay listing associated with the inventory item, or the unpublished offer has an invalid category ID. {additionalInfo} |
25006 | API_INVENTORY | REQUEST | The eBay listing associated with the inventory item, or the unpublished offer has an invalid listing option. {additionalInfo} |
25007 | API_INVENTORY | REQUEST | The eBay listing associated with the inventory item, or the unpublished offer has invalid data in the associated Fulfillment policy. {additionalInfo} |
25008 | API_INVENTORY | REQUEST | The eBay listing associated with the inventory item, or the unpublished offer has invalid data in the associated Payment policy. {additionalInfo} |
25009 | API_INVENTORY | REQUEST | The eBay listing associated with the inventory item, or the unpublished offer has invalid data in the associated Return policy. {additionalInfo} |
25011 | API_INVENTORY | REQUEST | The eBay listing associated with the inventory item, or the unpublished offer has invalid tax information. {additionalInfo} |
25012 | API_INVENTORY | REQUEST | Invalid inventory location. {additionalInfo} |
25013 | API_INVENTORY | REQUEST | Invalid data in the Inventory Item Group. {additionalInfo} |
25014 | API_INVENTORY | REQUEST | The eBay listing associated with the inventory item, or the unpublished offer has invalid pictures. {additionalInfo} |
25015 | API_INVENTORY | REQUEST | The eBay listing associated with the inventory item, or the unpublished offer has an invalid picture URL. {additionalInfo} |
25016 | API_INVENTORY | REQUEST | The {fieldName} value is invalid. {additionalInfo} |
25017 | API_INVENTORY | REQUEST | {fieldName} is missing. {additionalInfo} |
25018 | API_INVENTORY | REQUEST | Incomplete account information. {additionalInfo} |
25019 | API_INVENTORY | REQUEST | Cannot revise listing. {additionalInfo} |
25020 | API_INVENTORY | REQUEST | The eBay listing associated with the inventory item, or the unpublished offer has invalid shipping package details. {additionalInfo} |
25021 | API_INVENTORY | REQUEST | The eBay listing associated with the inventory item, or the unpublished offer has invalid item condition information. {additionalInfo} |
25022 | API_INVENTORY | REQUEST | Invalid attribute. {fieldName} |
25023 | API_INVENTORY | REQUEST | Invalid compatibility information. {additionalInfo} |
25025 | API_INVENTORY | APPLICATION | Concurrent access of the same Inventory or Inventory Item Group object is not allowed. Please try again later. |
25026 | API_INVENTORY | REQUEST | Selling limit exceeded. {additionalInfo} |
25702 | API_INVENTORY | REQUEST | {skuValue} could not be found or is not available in the system. |
25739 | API_INVENTORY | REQUEST | User input error. The number of compatibilityProperties in the request cannot exceed {additionalInfo}. |
25740 | API_INVENTORY | REQUEST | User input error. Invalid name for compatibilityProperties. The length should be between 1 and {additionalInfo} characters. |
25741 | API_INVENTORY | REQUEST | User input error. Invalid value for compatibilityProperties. The length should be between 1 and {additionalInfo} characters. |
25742 | API_INVENTORY | REQUEST | User input error. productFamilyProperties and compatibilityProperties cannot be used together. Please use compatibilityProperties. |
For more on warnings, plus the codes of other common warnings, see Handling errors.
Code | Domain | Category | Meaning |
---|---|---|---|
25401 | API_INVENTORY | APPLICATION | Invalid listing format removed. {additionalInfo} |
25402 | API_INVENTORY | APPLICATION | System warning. {additionalInfo} |
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.
This call creates a list of compatible vehicles for a motor vehicle part. When this particular part is listed as an eBay item, these compatible vehicles will be shown.
The SKU value for the motor vehicle part is passed in as part of call URI. The attributes for two compatible vehicles are passed in the request payload.
PUThttps://api.ebay.com/sell/inventory/v1/inventory_item/Al-8730/product_compatibility
Unless there are any errors or warnings, there is no output payload with this response. A successful call contains an HTTP status code of 200.