@plentymarkets/shop-api / ProductByIdsSearchCriteria
Type Alias: ProductByIdsSearchCriteria ​
ProductByIdsSearchCriteria =
object& {itemIds?:never;variationIds:number[]; } | {itemIds:number[];variationIds?:never; }
Defined in: types/api/productByIds.ts:23
Search criteria for retrieving products by variation IDs or item IDs.
Type Declaration ​
itemsPerPage? ​
optionalitemsPerPage?:number
Number of products to retrieve per page.
page? ​
optionalpage?:number
Page of results to retrieve.
sort? ​
optionalsort?:string
Backend sorting expression, for example sorting.price.avg_desc.
Remarks ​
Provide exactly one of variationIds and itemIds, never both. itemIds are restricted to 50 items in one call. Pagination and sorting options are available for either ID type.
Example ​
ts
const byVariation: ProductByIdsSearchCriteria = {
variationIds: [123, 456],
};
const byItem: ProductByIdsSearchCriteria = {
itemIds: [789],
page: 2,
itemsPerPage: 10,
};