Fitment
Enabling filtering of product results to ensure only those that "fit" are returned is easy to facilitate within the Constructor platform. The article below defines how to do so using the automotive industry as an example, however the patterns illustrated are easily extended to other applications.
For example, fitment can help users find brake pads that specifically fit a 2015 Honda Civic LX. The part must be guaranteed to fit a specific year, make, and model of vehicle.
There are two components of a fitment search:
- Selecting a vehicle
Typically, this involves choosing the year, then the make, and then the model of your vehicle. - Requesting matching results
This involves sending information about the selected vehicle with requests so Constructor only returns items that match.
Defining a fitment attribute in a product catalog
Our recommendation is to define a set of unique attributes consisting of every type of option available to the user for selection. In the automotive industry, this is typically make, model, and year. For example, a mmy_id
attribute could be defined with options such as honda:civic-lx:2015
.
Once the options have been established, each item (product) or variation record is sent to Constructor with every applicable mmy_id
assigned as an option. Please refer to the following articles or API definitions for information on defining attributes.
CSV feed - API or FTP
JSON data - REST API
In the CSV file format, these are to be delimited with a pipe character (|
).

Fitment example usingmmy_id
In summary:
- The
mmy_id
uniquely identifies every valid combination of make, model, and year. - Every item (product) or variation with fitment includes a list of
mmy_id
s for the vehicles to which it will fit.
In certain situations, it may be preferable to return results that fit a particular vehicle as well as products that fit all vehicles (universal fit).
- In this scenario, we recommend sending these "universal fit" products with a fitment attribute option value of
all
. This pattern can be extended to any items that fit only a subset of the product catalog. - When requesting items, a filter can be applied to only return items that match a specific vehicle as well as products that have the
all
value for the fitment field ("universal fit").
Configure fitment facets
Once you have uploaded your product catalog, you can configure these fitment attributes as a facet (filter).
A facet will allow users to filter their search or browse results by the fitment options provided. This could be choosing to view brake pads for a specific make, model, and year option. You can also use this facet in the API as a filter.
You can configure facets using the Constructor dashboard or our API.
Hiding fitment facets from end users
In many cases, the fitment facet contains a large number of options, making it preferable not to display it to end users. To achieve this, you should configure the facet to be non-countable. This ensures the facet will not appear under API responses as a filter for your users, but it can still be used to filter down results.
You will configure facet availability when you configure the facet:

Setting countable to false within Constructor customer dashboard
Requesting matching results
Once a fitment facet has been defined within the product catalog, filters can be added to requests to ensure only items that match the selected vehicle type are returned.
An example search request may resemble the following:
https://ac.cnstrc.com/search/shirts?key=API_KEY&filters[mmy_id]=honda:civic-lx:2012
Please refer to the API Reference for documentation on how to supply filters with requests to retrieve data from Constructor.
Updated 26 days ago