inventory APIv1.5.0

createOrReplaceProductCompatibility

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.

Input

Resource URI (production)

PUT 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.

HeaderTypeDescription
Content-LanguagestringThis request header sets the natural language that will be provided in the field values of the request payload.

Occurrence: Required

OAuth scope

This request requires a User access token with the following scope(s):

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

See Oauth access tokens for more information.

Input container/fieldTypeDescription
compatibleProductsarray of CompatibleProductThis 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.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.

Either the productIdentifier or the productFamilyProperties container (or both) can be used to specify one or more motor vehicles that are compatible with the inventory item. A separate productFamilyProperties is needed to specify each compatible motor vehicle. Typically, the make, model, and year of the motor vehicle are required (with trim and engine being optional sometimes), but it will be dependent on the part or accessory, and on the vehicle class.

Note: The ProductIdentifier type is for future use, so the productFamilyProperties container is currently the only way to specify a compatible motor vehicle.

Occurrence: Required

compatibleProducts.productFamilyProperties.makestringThis field indicates the make of the vehicle (e.g. Toyota).

Occurrence: Required

compatibleProducts.productFamilyProperties.modelstringThis field indicates the model of the vehicle (e.g. Camry).

Occurrence: Required

compatibleProducts.productFamilyProperties.yearstringThis field indicates the year of the vehicle (e.g. 2016).

Occurrence: Required

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. If the motor vehicle is found in the eBay catalog, the motor vehicle properties (the properties in the productFamilyProperties) will automatically be populated for the vehicle. This container is not applicable to the getProductCompatibility call.

Either the productIdentifier or the productFamilyProperties container (or both) can be used to specify one or more motor vehicles that are compatible with the inventory item. If the productIdentifier container is used, the product identifiers that are passed in that container must match vehicles in the eBay catalog in order for that vehicle to be added to the compatible vehicle list.

Note: The ProductIdentifier type is for future use, so the productFamilyProperties container is currently the only way to specify a compatible motor vehicle. Once this type becomes available for use, it will only be used to identify motor vehicles in the eBay catalog. However, it is possible that the Product Compatibility feature is expanded to other (non-vehicle) products in the future.

Occurrence: Conditional

compatibleProducts.productIdentifier.epidstringThis field can be used if the seller already knows the eBay catalog product ID 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.

Note: This field and the productIdentifier type are for future use only.

Occurrence: Optional

compatibleProducts.productIdentifier.gtinstringThis field can be used if the seller knows the Global Trade Identification 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 and the productIdentifier type are for future use only.

Occurrence: Optional

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.

Note: This field and the productIdentifier type is for future use only.

Occurrence: Optional

compatibleProducts.notesstringThis field is optionally used by the seller to input any notes pertaining to the parts compatibility being specified. 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

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 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

Output

HTTP response headers

See HTTP response headers for details.

HeaderMeaning
Content-LanguageThis response header sets the natural language that will be provided in the field values of the response payload.
Output container/fieldTypeDescription
warningsarray of ErrorDetailV3This 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.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: Conditional

warnings.domainstringThe name of the domain in which the error or warning occurred.

Occurrence: Conditional

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

Occurrence: Conditional

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

Occurrence: Conditional

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

Occurrence: Conditional

warnings.parametersarray of ErrorParameterV3Various 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.valuestringThis is the actual value that was passed in for the element specified in the name field.

Occurrence: Conditional

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

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.inputRefIdsarray of stringAn 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.outputRefIdsarray of stringAn 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

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
201Created
204No Content
400Bad Request
500Internal Server Error

Error codes

CodeDomainCategoryMeaning
25001API_INVENTORYAPPLICATIONA system error has occurred. {additionalInfo}
25002API_INVENTORYREQUESTA user error has occurred. {additionalInfo}
25003API_INVENTORYREQUESTThe eBay listing associated with the inventory item, or the unpublished offer has an invalid price. {additionalInfo}
25004API_INVENTORYREQUESTThe eBay listing associated with the inventory item, or the unpublished offer has an invalid quantity. {additionalInfo}
25005API_INVENTORYREQUESTThe eBay listing associated with the inventory item, or the unpublished offer has an invalid category ID. {additionalInfo}
25006API_INVENTORYREQUESTThe eBay listing associated with the inventory item, or the unpublished offer has an invalid listing option. {additionalInfo}
25007API_INVENTORYREQUESTThe eBay listing associated with the inventory item, or the unpublished offer has invalid data in the associated Fulfillment policy. {additionalInfo}
25008API_INVENTORYREQUESTThe eBay listing associated with the inventory item, or the unpublished offer has invalid data in the associated Payment policy. {additionalInfo}
25009API_INVENTORYREQUESTThe eBay listing associated with the inventory item, or the unpublished offer has invalid data in the associated Return policy. {additionalInfo}
25011API_INVENTORYREQUESTThe eBay listing associated with the inventory item, or the unpublished offer has invalid tax information. {additionalInfo}
25012API_INVENTORYREQUESTInvalid inventory location. {additionalInfo}
25013API_INVENTORYREQUESTInvalid data in the Inventory Item Group. {additionalInfo}
25014API_INVENTORYREQUESTThe eBay listing associated with the inventory item, or the unpublished offer has invalid pictures. {additionalInfo}
25015API_INVENTORYREQUESTThe eBay listing associated with the inventory item, or the unpublished offer has an invalid picture URL. {additionalInfo}
25016API_INVENTORYREQUESTThe {fieldName} value is invalid. {additionalInfo}
25017API_INVENTORYREQUEST{fieldName} is missing. {additionalInfo}
25018API_INVENTORYREQUESTIncomplete account information. {additionalInfo}
25019API_INVENTORYREQUESTCannot revise listing. {additionalInfo}
25020API_INVENTORYREQUESTThe eBay listing associated with the inventory item, or the unpublished offer has invalid shipping package details. {additionalInfo}
25021API_INVENTORYREQUESTThe eBay listing associated with the inventory item, or the unpublished offer has invalid item condition information. {additionalInfo}
25022API_INVENTORYREQUESTInvalid attribute. {fieldName}
25023API_INVENTORYREQUESTInvalid compatibility information. {additionalInfo}
25025API_INVENTORYAPPLICATIONConcurrent access of the same Inventory or Inventory Item Group object is not allowed. Please try again later.
25026API_INVENTORYREQUESTSelling limit exceeded. {additionalInfo}
25702API_INVENTORYREQUEST{skuValue} could not be found or is not available in the system.

Samples

New to making API calls? Please see Making a Call.

Note: Some item IDs, user IDs, or other data in these samples might no longer be active on eBay. If necessary, you can substitute current 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.
PUT
https://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.