Skip to content
CatalogProducts

Count products

Returns how many products match a filter, without returning them. Cheaper than paging through a listing when you only need the number.

Query Parameters

productIds?array<ResourceId>

Only these products.

sourceIds?array<ResourceId>

Only items imported from these sources.

channelIds?array<ResourceId>

Only items from these sales channels.

modifierGroupIds?array<ResourceId>

Only items that use these customizations.

search?string

Free-text search.

searchNameAndSkuOnly?boolean

Match search only in the product name, product SKU and variant SKUs, not in the description or barcodes. Defaults to false.

status?array<>

Only items in these statuses.

Value in

  • "draft"
  • "active"
  • "inactive"
  • "outOfStock"
  • "discontinued"
  • "archived"
excludeStatus?array<>

Leave out items in these statuses.

Value in

  • "draft"
  • "active"
  • "inactive"
  • "outOfStock"
  • "discontinued"
  • "archived"
includeArchived?boolean

Include archived items.

categoryIds?array<ResourceId>

Only items in these categories.

includeSubcategories?boolean

Also match products in the subcategories of categoryIds, at any depth. Defaults to false.

excludeCategoryIds?array<ResourceId>

Leave out items in these categories.

brandIds?array<ResourceId>

Only items of these brands.

excludeBrandIds?array<ResourceId>

Leave out items of these brands.

storeIds?array<ResourceId>

Only items of these stores.

sellerIds?array<ResourceId>

Only items of these sellers.

excludeSellerIds?array<ResourceId>

Leave out items of these sellers.

skuIds?array<ResourceId>

Filter by variant identifiers.

skus?array<string>

Filter by SKU codes.

types?array<>

Only these product types.

Value in

  • "product"
  • "service"
  • "bundle"
excludeTypes?array<>

Leave out these product types.

Value in

  • "product"
  • "service"
  • "bundle"
isFeatured?boolean

Only featured items.

ean?string

Filter by EAN barcode.

minPrice?number

Lowest price to include, in the store currency.

Formatdouble
maxPrice?number

Highest price to include, in the store currency.

Formatdouble
minDiscountPercent?number

Keeps products whose price is at least this percent below their compare-at price, both taken from the cheapest active variant. Greater than 0 and at most 100.

Formatdouble
minOnHand?integer

Minimum stock on hand.

Formatint32
maxOnHand?integer

Maximum stock on hand.

Formatint32
minAvailable?integer

Minimum stock available to sell.

Formatint32
tags?array<string>

Only items with any of these tags.

excludeTags?array<string>

Leave out items with any of these tags.

limit?integer

Stop counting at this number. Defaults to 10000.

Formatint32
exact?boolean

Count every match, ignoring limit. Slower on large catalogs.

savedViewId?string

Header Parameters

x-Store-Id?string

Store the request acts on. Not needed when the token is bound to a store.

Authorization*string

OAuth 2.0 bearer token.

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X GET "https://api.ecomiq.pe/api/v1/catalog/products/count" \  -H "x-Store-Id: <store-id>" \  -H "Authorization: Bearer <token>"
{  "total": 178,  "precision": "exact",  "limit": 25}