Skip to content

Get products in demand report

API v1 is the older API. It still works, but new integrations should use API v2. Migrating from v1 to v2

GET/external/intents/products_in_demand

Costs 1 rate-limit point · Rate limits

Retrieve a paginated list of product variants with demand metrics based on customer intents. Returns aggregated data showing total intents, pending intents, and last requested date for each variant. Results can be filtered by date range and sorted by different metrics.

Query parameters

  • start_datestring

    Filter by start date (YYYY-MM-DD). Filters based on last_requested_at field.

  • end_datestring

    Filter by end date (YYYY-MM-DD). Filters based on last_requested_at field.

  • sort_bystring

    Sort results by pending intents, total intents, or last requested date

    One of pendingtotallast_requested_at
    Default "pending"
  • directionstring

    Sort direction (ascending or descending)

    One of ascdesc
    Default "desc"
  • pageinteger

    Page number for pagination

    Default 1
  • per_pageinteger

    Number of items per page (maximum 500)

    Default 25
  • intent_typestring

    Filter by intent type (used when loading product data)

Headers

  • X-Auth-TokenstringRequired

    API key for authentication

Returns

  • product_variants_in_demandarray of objects
    Show 8 child attributesHide child attributes
    • shopify_variant_idinteger

      Shopify variant identifier

    • shopify_product_idinteger

      Shopify product identifier

    • shopify_inventory_item_idinteger, nullable

      Shopify inventory item identifier

    • totalinteger

      Total number of intents (both pending and sent) for this variant

    • pendinginteger

      Number of pending (unsent) intents for this variant

    • last_requested_atstring, nullable

      Timestamp of the most recent intent created for this variant

    • product_dataobject, nullable

      Shopify product data including variants

      Show 4 child attributesHide child attributes
      • idinteger

        Shopify product ID

      • titlestring

        Product title

      • vendorstring

        Product vendor/brand

      • variantsarray of objects

        Array of product variants

        Show 3 child attributesHide child attributes
        • idinteger

          Shopify variant ID

        • titlestring

          Variant title (e.g., "Medium / Red")

        • skustring

          Variant SKU

    • variant_dataobject, nullable

      Specific variant data for this demand entry

      Show 3 child attributesHide child attributes
      • idinteger

        Shopify variant ID

      • titlestring

        Variant title (e.g., "Medium / Red")

      • skustring

        Variant SKU

  • pageinteger

    Current page number

  • per_pageinteger

    Number of items per page

  • has_next_pageboolean

    Whether there is a next page

  • has_prev_pageboolean

    Whether there is a previous page

Errors

400

Bad request - invalid parameters

401

Unauthorized

GET/external/intents/products_in_demand
curl "https://app.stoqapp.com/api/v1/external/intents/products_in_demand" \
  -H "X-Auth-Token: $STOQ_API_KEY"
Response
{
  "product_variants_in_demand": [
    {
      "shopify_variant_id": 43900910010503,
      "shopify_product_id": 7891234567890,
      "total": 42,
      "pending": 37,
      "last_requested_at": "2026-06-24T09:12:00Z",
      "variant_data": {
        "id": 43900910010503,
        "title": "Medium / Red",
        "sku": "TSHIRT-M-RED"
      },
      "product_data": {
        "id": 7891234567890,
        "title": "Classic T-Shirt",
        "vendor": "Acme"
      }
    }
  ],
  "page": 1,
  "per_page": 25,
  "has_next_page": true,
  "has_prev_page": false
}