Home > widget-integration > FilterAPIResponse
FilterAPIResponse type
Response data from the Boost filter API.
Contains rendered HTML, updated filter options, dynamic bundles, and metadata including currency formatting and request tracking.
Signature:
export type FilterAPIResponse = {
html: string;
filter: FilterOptionsProps;
bundles: unknown[];
request_id?: string;
meta?: {
rid?: string;
money_format?: string;
money_format_with_currency?: string;
currency?: string;
};
};
References: FilterOptionsProps
Remarks
The html property contains pre-rendered product HTML ready to inject into the DOM. The filter property contains updated filter options reflecting current selections.
Example
const response: FilterAPIResponse = {
html: '<div class="product-item">...</div>',
filter: { filterId: 'col-123', options: [...] },
bundles: [],
request_id: 'req-abc-123',
meta: {
rid: 'rid-xyz-789',
money_format: '${{amount}}',
currency: 'USD'
}
};