Home > widget-integration > ProductAPI
ProductAPI class
API service for fetching product details used in Quick View modal.
Returns pre-rendered HTML from server including product images, variant swatches, price display, and add to cart functionality.
Signature:
export declare class ProductAPI extends BoostAPI
Extends: BoostAPI
Example
Extend to add custom query parameters:
window.boostWidgetIntegration.extend('ProductAPI', (ProductAPI) => {
return class CustomProductAPI extends ProductAPI {
protected buildQuickViewQueryParams(params) {
const enhanced = super.buildQuickViewQueryParams(params);
const customer = this.platformLoader.platform.customer;
if (customer?.tags?.includes('wholesale')) {
enhanced.pricing_tier = 'wholesale';
}
return enhanced;
}
};
});
Constructors
|
Constructor |
Modifiers |
Description |
|---|---|---|
|
Constructs a new instance of the |
Properties
|
Property |
Modifiers |
Type |
Description |
|---|---|---|---|
|
| |||
|
| |||
|
|
Methods
|
Method |
Modifiers |
Description |
|---|---|---|
|
| ||