Home > @vsf-enterprise/sap-commerce-webservices-sdk > ComponentApi > getComponentById
ComponentApi.getComponentById() method
Given a component identifier, return cms component data. Get component data
Signature:
getComponentById(baseSiteId: string, componentId: string, catalogCode?: string, categoryCode?: string, fields?: 'BASIC' | 'DEFAULT' | 'FULL', productCode?: string, options?: any): Promise<import("axios").AxiosResponse<object>>;
Parameters
Parameter | Type | Description |
---|---|---|
baseSiteId | string | Base site identifier |
componentId | string | Component identifier |
catalogCode | string | Catalog code |
categoryCode | string | Category code |
fields | 'BASIC' | 'DEFAULT' | 'FULL' | Response configuration (list of fields, which should be returned in response) |
productCode | string | Product code |
options | any | Override http request option. |
Returns:
Promise<import("axios").AxiosResponse<object>>
Exceptions
{RequiredError} ComponentApi