@wildix/wim-cache-client > SearchEntitiesByParamsCommand
SearchEntitiesByParamsCommand class
Searches for entities, unlike a POST request allows to specify additional parameters such as 'query', 'from', and 'size'. requires one of the parameters: query or email or phone
Signature:
export declare class SearchEntitiesByParamsCommand extends SearchEntitiesByParamsCommand_base
Extends: SearchEntitiesByParamsCommand_base
Example
Use a bare-bones client and the command you need to make an API call.
import { WimCacheClient, SearchEntitiesByParamsCommand } from "@wildix/wim-cache-client"; // ES Modules import
// const { WimCacheClient, SearchEntitiesByParamsCommand } = require("@wildix/wim-cache-client"); // CommonJS import
const client = new WimCacheClient(config);
const input = { // SearchEntitiesByParamsInput
organizationId: "STRING_VALUE",
phone: "STRING_VALUE",
email: "STRING_VALUE",
query: "STRING_VALUE",
from: Number("int"),
size: Number("int"),
};
const command = new SearchEntitiesByParamsCommand(input);
const response = await client.send(command);
// { // SearchEntitiesByParamsOutput
// items: [ // SearchResultList
// { // SearchResult
// email: "STRING_VALUE",
// phone: "STRING_VALUE",
// items: [ // EntityList
// { // Entity
// integrationId: "STRING_VALUE", // required
// entityType: "STRING_VALUE", // required
// data: { // EntityData
// Id: "STRING_VALUE",
// Name: "STRING_VALUE",
// FirstName: "STRING_VALUE",
// LastName: "STRING_VALUE",
// Phone: "STRING_VALUE",
// Email: "STRING_VALUE",
// OwnerId: "STRING_VALUE",
// MobilePhone: "STRING_VALUE",
// AccountId: "STRING_VALUE",
// Company: "STRING_VALUE",
// IsConverted: true || false,
// LastModifiedDate: "STRING_VALUE",
// CompanyName: "STRING_VALUE",
// IsActive: true || false,
// TimeZoneSidKey: "STRING_VALUE",
// Extension: "STRING_VALUE",
// attributes: { // SalesforceAttrubuteField
// url: "STRING_VALUE",
// type: "STRING_VALUE",
// },
// CallPhone: "STRING_VALUE",
// Archived: true || false,
// Domain: "STRING_VALUE",
// UpdatedAt: "STRING_VALUE",
// Avatar: "STRING_VALUE",
// CustomData: { // GeneralDataMap
// "<keys>": "STRING_VALUE",
// },
// },
// integrationOrder: Number("int"),
// },
// ],
// },
// ],
// };