Skip to main content

Endpoint reference

This page is the normative reference for the Discover API (OAS3). It tracks the OpenAPI document, which is the machine-readable source of truth — the examples on this site are validated against it at build time.

Working from the spec

Point your generator at /openapi/discover-api.yaml (or GET /docs) to produce a typed client rather than hand-writing request models. The operationId values below are the names your generator will use.

Server​

Base URLhttps://engines.api.telmar.com/omg/prd/v1
Media typeapplication/json
AuthTelmar-Engine-Authorizer: <api-key>

All endpoints below are relative to the base URL.

Operations​

| Method | Path | Description | Auth | Billed | | --- | --- | --- | --- | | GET | /docs | Returns the OpenAPI specification for this service in JSON format | Not required | No | | POST | /crosstab | Ranks codebook items by affinity with one audience | Required | Yes, on success | | OPTIONS | /crosstab | CORS preflight check for the /crosstab endpoint | Not required | No |

operationIdMethod and path
docsGET /docs
crosstabPOST /crosstab
crosstabOptionsOPTIONS /crosstab

GET /docs​

Returns the full OpenAPI specification for this service as a JSON object. Useful for programmatic discovery of the API schema. No authentication is required.

Parameters​

None.

Response — 200 OK​

FieldTypeDescription
(body)objectThe OpenAPI specification document in application/json format

POST /crosstab​

Ranks codebook items by affinity with a single audience. The API only exposes and accepts datasets from the TelmarHelixa provider. It returns up to limit items, best affinity first. There is no chunk token and nothing to page.

Each call takes exactly one audience coding statement and returns at most 50 ranked items.

Worked examples live on the Discover page.

Request​

Content-Typeapplication/json
BodyDiscoverCrosstabRequest (required)

Request schema — DiscoverCrosstabRequest​

FieldTypeRequiredDescription
surveyCodestringYesDataset code. Only datasets from the TelmarHelixa provider are accepted
authorizationGroupstringYesAuthorization group provisioned for the caller
audiencestringYesExactly one coding statement — the audience
itemsstring[]NoOptional candidate items, ranked in the same items list
tablestringYesTable identifier (e.g. "#1")
weightIndexintegerYesSurvey weight to apply
limitintegerNoMaximum ranked items returned. Default 10, maximum 50

A mnemonic in audience or items that the caller cannot access returns 401.

Request example
{
"surveyCode": "HXUS",
"authorizationGroup": "CLIENTA",
"audience": "(GMEN=#1) AND (AGE18_34=#1)",
"table": "#1",
"weightIndex": 1,
"limit": 5
}

Response schema — DiscoverCrosstabResponse​

FieldTypeDescription
successbooleantrue when the ranking completed
messagestringok on a completed ranking
discoverDiscoverResultAudience size and the ranked items

DiscoverResult​

FieldTypeDescription
audienceSize.projnumberProjected audience size in survey report units
itemsDiscoverItem[]Up to limit items, best first

DiscoverItem​

FieldTypeDescription
rankinteger1-based position in the ranked list
mnemonicstringItem mnemonic
labelstringDisplay label
affinitynumberDiscover affinity. Higher means a stronger affinity with the audience
projnumberProjected audience who have the item
audiencePercentnumberPercentage of the audience who have the item
itemPercentnumberPercentage of the item's holders who are in the audience
stabilityinteger0 stable, 1 unstable

Sort order is affinity descending, then proj descending, then mnemonic ascending.

Response example — 200 OK
{
"success": true,
"message": "ok",
"discover": {
"audienceSize": { "proj": 24180.2 },
"items": [
{
"rank": 1,
"mnemonic": "HX_BRAND_0412",
"label": "Brand A",
"affinity": 3.42,
"proj": 2210.4,
"audiencePercent": 9.14,
"itemPercent": 41.8,
"stability": 0
}
]
}
}

Response headers​

HeaderType
Access-Control-Allow-Originstring

OPTIONS /crosstab​

CORS preflight endpoint for the /crosstab path. Browsers issue this automatically before cross-origin POST requests. No parameters required.

Response — 200 OK​

HeaderType
Access-Control-Allow-Originstring
Access-Control-Allow-Methodsstring
Access-Control-Allow-Headersstring

Error codes​

The API uses standard HTTP status codes. Discover responses add success, message, and error.

HTTP codeMeaning
200Ranking succeeded
400Bad request. Malformed JSON, missing required fields, or a Discover rule (audience, limit, audience too small)
401Unauthorized. The API key is missing or expired, or a mnemonic in the audience or in items is not accessible
403Forbidden. The Discover API is not enabled for the account
500Internal server error. Contact TelmarHelixa support
504Processing exceeded the gateway timeout. Lower limit

Failure responses set success to false and put the reason in error:

HTTPerror
400audience must be a single coding statement.
400Audience is too small to produce reliable results.
403The Discover API is not enabled for this account.

Limits​

LimitValue
Datasets per request1, and only from the TelmarHelixa provider
AudienceExactly one coding statement
Ranked items1–50 (limit, default 10)
Gateway timeout30 seconds. A call that exceeds it returns 504

Commercial terms — volume commitments, contracted throughput and pricing — are part of your agreement and are not published here. Contact Sales.