Skip to main content
Published: March 23 2012, 1:18:00 PMUpdated: September 07 2022, 8:08:36 AM

How can I create an ItemCompatibilityList using the API?

Summary

How to create an ItemCompatibilityList using the API without having to specify a <Compatibility> container for every part. 

*Note - This example applies to <ItemCompatibilityEnabled>ByApplication</ItemCompatibilityEnabled>



Detailed Description

When specifying parts using the SYI, you only need to select values for the required details, and then you can have the rest selected as "All".  This will automatically create all search results for you.  See the following picture (also attached) for an example,

Image

When using an add item API you can do the same.  First make a call to GetCategoryFeatures, if <ItemCompatibilityEnabled>ByApplication</ItemCompatibilityEnabled>, you can use this example.  When creating your ItemCompatibilityList container, in order to duplicate the "All" for the non required data fields you see in the SYI, you will simply ONLY create <Compatibility> containers for the requires fields.  Using the above picture (also attached), you simply create a container for Make, Model, and Variant.  This will automatically create containers for all Types, Year, and Engines. 

 <ItemCompatibilityList>
      <Compatibility>
        <NameValueList/>
        <NameValueList>
          <Name>Car Make</Name>
          <Value>BMW</Value>
        </NameValueList>
        <NameValueList>
          <Name>Model</Name>
          <Value>3 Series</Value>
        </NameValueList>
              <NameValueList>
          <Name>Variant</Name>
          <Value>E90 [2005-2011] Saloon</Value>
        </NameValueList>
        <NameValueList>
          <Name>BodyStyle</Name>
          <Value>Saloon</Value>
        </NameValueList>
       <CompatibilityNotes>
        </CompatibilityNotes>
      </Compatibility>
    </ItemCompatibilityList>



Additional Resources

ItemCompatibilityList: http://developer.ebay.com/DevZone/XML/docs/Reference/eBay/AddFixedPriceItem.html#Request.Item.ItemCompatibilityList

GetCategoryFeatures: http://developer.ebay.com/DevZone/XML/docs/Reference/eBay/GetCategoryFeatures.html

How well did this answer your question?
Answers others found helpful