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.
Note: In addition to the authorization
header, which is required for all Inventory API calls, this call also requires the Content-Type
and Content-Language
headers. See the HTTP request headers for more information.
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
Parameter | Type | Description |
---|---|---|
sku | string | This path parameter specifies the SKU (stock keeping unit) of the inventory item associated with the compatibility list being created. Use the getInventoryItems method to retrieve SKU values. Occurrence: Required |
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-Language | string | This header sets the natural language that will be used in the field values of the request payload. For example, the value passed in this header should be en-US for English or de-DE for German.For more information on the Content-Language header, refer to HTTP request headers. Occurrence: Required |
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. Occurrence: Required |
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
See OAuth access tokens for more information.
Request payload
Copy complete valid JSON to clipboardRequest fields
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. 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 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. Occurrence: Optional |
compatibleProducts.productFamilyProperties | ProductFamilyProperties | Important! The productFamilyProperties container is deprecated and should no longer be used. The compatibilityProperties container should be used instead. Occurrence: Conditional |
compatibleProducts.productFamilyProperties.engine | string | Important! The productFamilyProperties container is no longer supported. Occurrence: Conditional |
compatibleProducts.productFamilyProperties.make | string | Important! The productFamilyProperties container is no longer supported. Occurrence: Conditional |
compatibleProducts.productFamilyProperties.model | string | Important! The productFamilyProperties container is no longer supported. Occurrence: Conditional |
compatibleProducts.productFamilyProperties.trim | string | Important! The productFamilyProperties container is no longer supported. Occurrence: Conditional |
compatibleProducts.productFamilyProperties.year | string | Important! The productFamilyProperties container is no longer supported. 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: Optional |
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: Conditional |
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: Conditional |
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: Conditional |
sku | string | The seller-defined SKU value of the inventory item that will be associated with the compatible vehicles. Occurrence: NA |
Output
HTTP response headers
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. |
Response payload
Response fields
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 |
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 |
201 | Created |
204 | No Content |
400 | Bad Request |
500 | Internal Server Error |
Error codes
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. |
Warnings
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} |
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: Create Compatible Products
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.
Input
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
Output
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.