Skip to Content
Heuristic documentation

The product's source records with their insights, newest said first

GET
/v1/products/{productId}/source-records

Feedback as received, each with its insights, narrowed by the filters given (all combined). Leave limit out for a page that fits your answer (fewer records when they are long; page on while meta.nextCursor is set). The page's first record, if too long for one answer alone, comes as its first part (part; read on with get_source_record). meta.topics says whether insights are grouped into topics (idle), being grouped (grouping), or grouping keeps failing (needs_attention, retried by retry_topics). meta.rechecking says whether the insights in New opportunity are checked against features added or changed since (idle), waiting for that check (rechecking), or rechecking keeps failing (needs_attention, retried by retry_rechecking). 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

limit?integer

How many items to return, 1 to 100. Leave it out for a page that fits your answer: up to 50, fewer when they are long; page on while meta.nextCursor is set. A number you name can go over what fits.

Range1 <= value <= 100
cursor?string

Where the next page starts: the meta.nextCursor of the previous page. Leave out for the first page.

view?string

Only some records: opportunity = records with an insight linked to New opportunity, attention = records that need attention, processing = records still being processed (received).

Value in"all""opportunity""attention""processing"
q?string

Only records whose text, company name, contact name or email contains this, ignoring case.

Lengthlength <= 200
day?string

Only records said on this UTC date, as YYYY-MM-DD.

types?string

Only records with at least one insight of any of these types, comma-separated: feature_request, bug, praise, complaint, question.

ids?string

Only these records, if they match the other filters: 1 to 100 source record ids, comma-separated. Each a uuid, in any case (read in lower case); anything else answers 400 validation_error.

Response Body

One page of records, narrowed by the filters given (all combined). meta.topics says whether the product's insights are grouped into topics (idle), being grouped (grouping), or grouping keeps failing (needs_attention). meta.rechecking says whether the insights the AI put in New opportunity are checked against the features added or changed since (idle), waiting for that check (rechecking), or rechecking keeps failing (needs_attention).

application/json
  1. response
data*array<>
meta*
Example Request
curl -X GET 'https://staging.heuristic.app/v1/products/497f6eca-6276-4993-bfeb-53cbbbba6f08/source-records' \  -H 'Authorization: Bearer <access token>'
Example Response
{  "data": [    {      "id": "string",      "text": "string",      "sourceUrl": "string",      "saidAt": "string",      "receivedAt": "string",      "status": "received",      "externalId": "string",      "source": "string",      "sentBy": {        "app": {          "clientId": "string",          "name": "string"        },        "person": {          "id": "string",          "name": "string"        }      },      "company": {        "id": "string",        "name": "string",        "domain": "string",        "customerStatus": "customer",        "arr": {          "amount": 0,          "currency": "string"        }      },      "contact": {        "id": "string",        "name": "string",        "email": "string"      },      "customerStatus": "customer",      "arr": {        "amount": 0,        "currency": "string"      },      "customFields": {        "property1": "string",        "property2": "string"      },      "insightsCapped": true,      "waitingFor": "knowledge_base",      "failedStage": "split",      "failureReason": "too_long",      "insights": [        {          "id": "string",          "statement": "string",          "quote": "string",          "quoteStart": 0,          "type": "feature_request",          "sentiment": "positive",          "linked": true,          "feature": {            "id": "string",            "title": "string"          },          "topic": {            "id": "string",            "name": "string"          },          "edited": true        }      ],      "part": {        "textFrom": 0,        "textTo": 0,        "textLength": 0,        "insightsFrom": 0,        "insightsTo": 0,        "insightsTotal": 0,        "next": {          "textFrom": 0,          "insightsFrom": 0        }      }    }  ],  "meta": {    "nextCursor": "string",    "topics": "idle",    "rechecking": "idle",    "feedbackVersion": "string"  }}