Skip to main content

getProductsEmptyPage

Search all products that have no category, with pagination.

Description​

Fetches the products that have no category; userQuery sets pagination and sorting. Resolves to an IProductsResponse: the products are in items, the total count in total.

Unlike getProducts, body is sent as is: put the filter conditions in its filter field and, optionally, grouping settings in aggregate, for example { filter: [{ attributeMarker: "price", conditionMarker: "mth", conditionValue: 1 }] }. A bare array of conditions fails with a 400 error ("filter must be an array").

.getProductsEmptyPage( , , );

Parameters schema​

Schema

body: object
Filter object: { filter: IFilterParams[] }, optionally with aggregate. Unlike getProducts, the conditions go inside filter, not as a bare array. Default: {}.
example:

{}

langCode: string
Language code. Default: the langCode passed to defineOneEntry ("en_US" if none).
example: "en_US"

userQuery: IProductsQueryBase
Optional query parameters.
example:

{
"limit": 30,
"offset": 0,
"sortOrder": "DESC",
"sortKey": "id",
"signPrice": "orders"
}

userQuery.offset(required): number
Number of records to skip. Default: 0. offset + limit must not exceed 200; a larger window is rejected with 400.

userQuery.limit(required): number
Maximum number of records to return. Default: 30.

userQuery.sortOrder(required): string
Sort order: "DESC" or "ASC". Default: "DESC".

userQuery.sortKey(required): string
Field to sort by: "id", "position", "title", "date", "price" or "status". Default: "position".

userQuery.signPrice: string
Marker of the order storage to fix prices for. When set, each product comes with a signedPrice that holds the price for a limited time.
see: Fixing the price

Record limit. If the user group's permission for this method allows only restricted reading, the API returns at most the number of records set in the project settings (10 by default), whatever limit you pass. With full read access, limit works as usual. See Module permissions (opens in a new tab).

signPrice locks the returned price for a limited time. Set it to your order storage marker. See Fixing the price (signPrice).

Examples​

Minimal example​

const response = await Products.getProductsEmptyPage();

Example with userQuery​

const userQuery = {
"offset": 0,
"limit": 30,
"sortOrder": "DESC",
"sortKey": "id"
};

const response = await Products.getProductsEmptyPage({}, 'en_US', userQuery);

Example with filters​

const response = await Products.getProductsEmptyPage(
{ filter: [{ attributeMarker: 'price', conditionMarker: 'mth', conditionValue: 100 }] },
'en_US',
{ limit: 30 },
);
Use filters to find specific products:

attributeMarker: The text identifier of the indexed attribute by which values are filtered. conditionMarker: The type of condition to apply to the attribute value.

MarkerMeaningExample
eqEqualcolor = "red"
neqNot equalcategory ≠ "archived"
inContains (case-insensitive substring match)brand contains "app"
ninDoes not contain (case-insensitive substring match)brand does not contain "fake"
mthGreater thanprice > 100
lthLess thanprice < 50
exsExists (has value)Has description
nexsDoes not existNo image
patMatches a regular-expression pattern where each * stands for exactly one character and _ for a space. With search indexing on, the pattern must match the whole valuecurrency matches "s" (finds "usd")
sameHas the same value as at least one other product. conditionValue is ignoredproducts that share a price
same_partHas the same value as another product once the last segments are cut off. conditionValue is delimiter|count (default -|2); a value with count or fewer segments is compared wholeSKUs "ABC-1-S" and "ABC-1-M" share "ABC"

conditionValue: The value to compare against.

Example response​

The example shows an empty result. Each item has the same shape as an item of getProducts().

{
"items": [],
"total": 0
}

Response schema​

Schema: IProductsResponse

total: number
Total number of products found.
example: 100

items: IProductsEntity[]
Products in this response.
example:

[
{
"id": 12345,
"title": "Product 1"
},
{
"id": 67890,
"title": "Product 2"
}
]

items.id: number
ID of the product.
example: 12345

items.localizeInfos: ILocalizeInfo
Localized product data, such as the title.
example:

{}

items.statusIdentifier: string | null
Marker of the product status, or null.
example: "in_stock"

items.statusLocalizeInfos: ILocalizeInfo
Localized status name for the product.
example:

{ "title": "Sale" }

items.attributeSetIdentifier: string | null
Marker of the attribute set, or null if none is assigned.
example: "set_12345"

items.position: number
Position used for sorting.
example: 1

items.price: number | null
Product price from the search index.
example: 150.00

items.additional: object
Extra values computed by the search index, such as the price range in prices.min and prices.max.
example:

{
"prices": {
"min": 5,
"max": 150
}
}

items.sku: string | null
Product SKU from the search index, or null.
example: "SKU_12345"

items.isSync: boolean
Whether the product's attribute index is up to date for the requested language. When false, an empty or partial attributeValues means the values are not published yet, not that there are none.
example: true

items.attributeValues: IAttributeValues
Attribute values keyed by attribute marker.
example:

{
"color": {
"type": "string",
"value": "red",
"isIcon": false,
"position": 0,
"additionalFields": {}
}
}

items.categories: string[]
URLs of the catalog pages the product belongs to.
example:

[
"catalog"
]

items.isVisible: boolean
Whether the product is visible.
example: true

items.moduleFormConfigs: Array<IFormConfig>
Form configurations of the module.

items.rating: IRating
Rating data: average value, likes and dislikes, and the calculation method.

items.isPositionLocked: boolean
Whether the sorting position is locked.
example: false

items.relatedIds: number[]
IDs of related products.
example:

[
12345,
67890
]

items.paymentStages: unknown
Payment stages of the product: an array of { title, value, marker } objects, or null when none are set.
example: null

items.distance: number
Relevance distance in vector (semantic) search. Present only in vector search results.
example: 0.42

items.discountConfig: Record<string, unknown>
Discount configuration.
example:

{}

items.templateIdentifier: string | null
Marker of the linked template.
example: "template_12345"

items.shortDescTemplateIdentifier: string | null
Marker of the template used for the short description.
example: "short_desc_template_12345"

items.signedPrice: string
Signed token (JWT) that fixes the product price for an order. Returned when signPrice is set.
see: Fixed product price
example: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."

items.productPages: IProductPageRef[]
Links between the product and the catalog pages it belongs to.
example:

[
{
"id": 16,
"pageId": 4,
"productId": 15,
"positionId": 244,
"categoryPath": "products"
}
]

items.blocks: string[]
Markers of the blocks attached to the product.
example:

[
"block_12345",
"block_67890"
]

totalFound: number
Number of products matched before limits are applied; returned by block product endpoints (similarProducts, cart/wishlist recommendations, frequently ordered). Optional.
example: 2

signedPrice is a signed token that carries the locked price. Pass it back when you create an order. See Fixed product price (signedPrice).