Skip to Content
Heuristic documentation

New opportunity's topics with their feedback values

GET
/v1/products/{productId}/new-opportunity/topics

The topics that read in this scope now (following merges) with at least one grouped insight, by customers, then insights, then name. Each topic's counts, arr, trend and trendByType follow get_feedback_counts' rule for that topic alone; total is the scope's row there, so the topics can add up to more than total. insights counts every grouped insight in it. With customerStatus, only matching customers count and only topics with one are listed; with period, only feedback given in it counts and only topics with some are listed, while trend and change keep their windows. unit, periods, window, trend and change as in get_feedback_counts. withoutStatus, noArr and meta as in get_feedback_counts: when noArr is true, report "no ARR yet" and where ARR comes from, not zero revenue. Read a topic's insights with list_topic_insights. The topics come in pages: every page carries the scope's own fields, and meta.nextCursor reads the next (null on the last). sort: arr or sort: change ranks them by ARR or by the rise in customers instead, so the top topics are one call; a ranking can move as feedback arrives, so later pages can repeat or skip a topic. scope.feature is null. Send meta.feedbackVersion as expectedVersion with a feedback change planned from this read.

Authorization

headerAuthorizationBearer <token>

An OAuth access token for the person who allowed your tool: register a client, then the authorization code flow with PKCE (S256). Send it as Authorization: Bearer <token> on every route that needs a signed-in person. Calls with a token are limited per person, across all their apps, to 120 calls a minute and 10,000 a UTC day; calls that start AI runs or knowledge base reads (creating an organization, starting a knowledge base read, rebuilding categories, retrying topics or rechecking) also to 10 a minute and 200 a UTC day. Over a limit a call answers 429 rate_limited with Retry-After and details.retryAfter in seconds, and changes nothing.

Path Parameters

productId*string

A Heuristic id: a uuid, in any case (it is read in lower case). Anything else answers 400 validation_error.

Formatuuid

Query Parameters

customerStatus?string

Only customers with this status count: customer or prospect. Left out: customers and prospects, and customers with no status. A customer's status is taken the way its ARR is: a company's own (the record's, else its contact's company); a contact counted alone, the status of their most recent record that carried one; a record counted alone, its own. withoutStatus says how many counted customers have no status, whatever this is.

Value in"customer""prospect"
period?string

Only feedback given in this period counts, by the date it was given: 30d and 90d are the last 30 or 90 days, 12m the last 12 calendar months (UTC), all measured back from the moment of the request; feedback dated later counts too. Left out: all time. Counts, ARR, insights, which topics are listed and withoutStatus follow it; trend, trendByType, change, changeByType and meta do not (they keep the reporting unit's own windows).

Value in"30d""90d""12m"
customerKind?string

With customerId, only the topics where that customer has a grouped insight (under customerStatus and period); each topic's figures, the scope's totals and meta stay the whole scope's, not the customer's: the customer's kind as the customers reads answer it (company, contact or record), and customerId its id. The two go together; a customer with nothing here answers an empty page.

Value in"company""contact""record"
customerId?string

A Heuristic id: a uuid, in any case (it is read in lower case). Anything else answers 400 validation_error.

Formatuuid
type?string

Only insights of this type count, trends and changes included. Left out: every type.

Value in"feature_request""bug""praise""complaint""question"
sentiment?string

Only insights with this sentiment count, trends and changes included. Left out: every sentiment.

Value in"positive""neutral""negative"
source?string

Only feedback from this source counts (an id from meta.sources), trends and changes included. A Heuristic id: a uuid, in any case (it is read in lower case). Anything else answers 400 validation_error.

Formatuuid
view?string

growing, new or shrinking: only topics in that change state over window (New is never Growing), largest rise, largest fall or most customers first unless sort is given. Default all.

Default"all"
Value in"all""growing""new""shrinking"
sort?string

customers: most customers first, then most insights, then name (the default under view: all). arr: most ARR first. change: fastest growing first, by the rise change.latest minus change.before, then the percent (new ones first). Ties follow the default order.

Value in"customers""arr""change"
from?string

With to: only feedback given from this UTC day (YYYY-MM-DD, inclusive) counts, as period narrows (not with period); copy a series entry's from and to to read that period.

to?string

With from: the last UTC day (YYYY-MM-DD, inclusive) whose feedback counts; later feedback does not.

limit?integer

How many topics a page holds, 1 to 50 (50 when left out).

Range1 <= value <= 50
cursor?string

The previous page's meta.nextCursor, with the same other inputs; left out: the first page.

Response Body

One page of New opportunity's topics

application/json
  1. response
data*
meta*
Example Request
curl -X GET 'https://staging.heuristic.app/v1/products/497f6eca-6276-4993-bfeb-53cbbbba6f08/new-opportunity/topics' \  -H 'Authorization: Bearer <access token>'
Example Response
{  "data": {    "scope": {      "feature": {        "id": "string",        "title": "string",        "description": "string",        "path": [          {            "id": "string",            "title": "string"          }        ]      }    },    "currency": "string",    "ratesAsOf": "string",    "unconverted": [      "string"    ],    "noArr": true,    "unit": "week",    "periods": [      "string"    ],    "window": {      "latest": {        "from": "string",        "to": "string"      },      "before": {        "from": "string",        "to": "string"      }    },    "total": {      "counts": {        "total": 0,        "feature_request": 0,        "bug": 0,        "praise": 0,        "complaint": 0,        "question": 0      },      "arr": {        "total": "string",        "feature_request": "string",        "bug": "string",        "praise": "string",        "complaint": "string",        "question": "string"      },      "trend": [        0      ],      "trendByType": {        "feature_request": [          0        ],        "bug": [          0        ],        "praise": [          0        ],        "complaint": [          0        ],        "question": [          0        ]      },      "change": {        "before": 0,        "latest": 0      },      "changeByType": {        "feature_request": {          "before": 0,          "latest": 0        },        "bug": {          "before": 0,          "latest": 0        },        "praise": {          "before": 0,          "latest": 0        },        "complaint": {          "before": 0,          "latest": 0        },        "question": {          "before": 0,          "latest": 0        }      }    },    "topicCount": 0,    "topics": [      {        "counts": {          "total": 0,          "feature_request": 0,          "bug": 0,          "praise": 0,          "complaint": 0,          "question": 0        },        "arr": {          "total": "string",          "feature_request": "string",          "bug": "string",          "praise": "string",          "complaint": "string",          "question": "string"        },        "trend": [          0        ],        "trendByType": {          "feature_request": [            0          ],          "bug": [            0          ],          "praise": [            0          ],          "complaint": [            0          ],          "question": [            0          ]        },        "change": {          "before": 0,          "latest": 0        },        "changeByType": {          "feature_request": {            "before": 0,            "latest": 0          },          "bug": {            "before": 0,            "latest": 0          },          "praise": {            "before": 0,            "latest": 0          },          "complaint": {            "before": 0,            "latest": 0          },          "question": {            "before": 0,            "latest": 0          }        },        "id": "string",        "name": "string",        "insights": 0,        "edited": true,        "insightsByType": {          "feature_request": 0,          "bug": 0,          "praise": 0,          "complaint": 0,          "question": 0        },        "latestAt": "string"      }    ],    "views": {      "all": {        "topics": 0,        "customers": 0      },      "growing": {        "topics": 0,        "customers": 0      },      "new": {        "topics": 0,        "customers": 0      },      "shrinking": {        "topics": 0,        "customers": 0      }    },    "tiles": {      "customers": {        "count": 0,        "change": {          "before": 0,          "latest": 0        }      },      "arr": {        "amount": "string",        "currency": "string",        "change": {          "before": 0,          "latest": 0        },        "before": "string",        "latest": "string"      },      "insights": {        "count": 0,        "change": {          "before": 0,          "latest": 0        }      }    },    "series": [      {        "from": "string",        "to": "string",        "customers": 0,        "arr": "string",        "current": true,        "expected": {          "customers": 0,          "arr": "string"        }      }    ],    "withoutStatus": {      "total": 0,      "feature_request": 0,      "bug": 0,      "praise": 0,      "complaint": 0,      "question": 0    }  },  "meta": {    "counting": true,    "uncounted": true,    "hasRecords": true,    "countingRecords": 0,    "uncountedRecords": 0,    "nextCursor": "string",    "sources": [      {        "id": "string",        "name": "string",        "kind": "endpoint"      }    ],    "feedbackVersion": "string"  }}