Skip to content

Count tagged products

API v2 is in public beta: endpoints and fields can change before general availability. See the changelog

GET/preorders/products/tags/count

Costs 1 rate-limit point · Rate limits

Count the products that carry any of the given tags, as the offer's tag picker does while you type.

tags is a list (or comma-separated). Counts active, published products that carry one of the tags as a whole tag. Past 500 products the count stops and exact is false.

Also searched ascount products by tagtag match counthow many products have this tag

Query parameters

  • tagsstring

    Comma-separated product tags; counts products carrying any of them as a whole tag. An array also works.

Returns

  • products_countinteger
    Example: 1
  • exactboolean
    Example: true
  • tagsarray of anys

Errors

422
validation_failed

The request failed validation.

502
shopify_error

A Shopify call the operation needs failed after the operation had started.

Any request can also fail with auth_invalid (401) or rate_limited (429).

Every error has the same shape: see Errors and the list of error codes.

GET/preorders/products/tags/count
curl "https://app.stoqapp.com/api/v2/external/preorders/products/tags/count" \
  -H "X-Auth-Token: $STOQ_API_KEY"
Response
{
  "products_count": 1,
  "exact": true,
  "tags": [
    null
  ]
}