Home > widget-integration > QUERY_PARAM
QUERY_PARAM variable
Standard URL query parameter names for filter API requests.
Defines the parameter keys used when making requests to the Boost filter API. Technical Support teams can use these when building custom filter parameters.
Signature:
QUERY_PARAM: {
readonly QUERY: "q";
readonly TAG: "tag";
readonly COLLECTION_SCOPE: "collection_scope";
readonly TIMESTAMP: "t";
readonly SESSION_ID: "sid";
readonly SORT_FIRST: "sort_first";
readonly PRODUCT_AVAILABLE: "product_available";
readonly VARIANT_AVAILABLE: "variant_available";
}
Example
window.boostWidgetIntegration.extend('FilterAPI', (FilterAPI) => {
return class extends FilterAPI {
protected buildParams(params) {
const result = super.buildParams(params);
// Add custom timestamp parameter
result[QUERY_PARAM.TIMESTAMP] = Date.now();
return result;
}
};
});