Home > @vsf-enterprise/sap-commerce-webservices-sdk > ComponentApi > findComponentsByIds

ComponentApi.findComponentsByIds() method

Given a list of component identifiers, return cms component data. Find component data by id(s)

Signature:

findComponentsByIds(baseSiteId: string, catalogCode?: string, categoryCode?: string, componentIds?: Array<string>, currentPage?: number, fields?: 'BASIC' | 'DEFAULT' | 'FULL', pageSize?: number, productCode?: string, sort?: string, options?: any): Promise<import("axios").AxiosResponse<ListAdaptedComponents>>;

Parameters

Parameter Type Description
baseSiteId string Base site identifier
catalogCode string Catalog code
categoryCode string Category code
componentIds Array<string> List of Component identifiers
currentPage number Optional pagination parameter. Default value 0.
fields 'BASIC' | 'DEFAULT' | 'FULL' Response configuration (list of fields, which should be returned in response)
pageSize number Optional pagination parameter. Default value 10.
productCode string Product code
sort string Optional sort criterion. No default value.
options any Override http request option.

Returns:

Promise<import("axios").AxiosResponse<ListAdaptedComponents>>

Exceptions

{RequiredError} ComponentApi