Discover
Your entitlements change which datasets and authorization groups you can call.
The API only exposes and accepts datasets from the TelmarHelixa provider. A
valid API key without access to the requested dataset returns 403, and a
mnemonic in the audience you cannot access returns 401. See
Authentication.
Getting started
https://engines.api.telmar.com/omg/prd/v1/crosstab
Ranks items by affinity with a single audience on POST /crosstab.
The API ranks items against that audience and returns the top items in one payload. There is nothing to page.
Every request needs a Telmar-Engine-Authorizer API key.
Main parameters
Dataset and authorization group
surveyCode is the dataset code. The API only exposes and accepts datasets
from the TelmarHelixa provider. authorizationGroup is required and must be a
group provisioned for the caller.
A mnemonic in audience or items that the caller cannot access returns
401.
{
"surveyCode": "HXUS",
"authorizationGroup": "CLIENTA"
}
Audience
audience is exactly one coding statement. An empty audience, or more than
one statement, returns 400.
An audience that is too small to rank returns 400.
{
"audience": "(GMEN=#1) AND (AGE18_34=#1)"
}
Table and weight
table and weightIndex are required. weightIndex selects the survey
weight.
{
"table": "#1",
"weightIndex": 1
}
Limit
limit is optional. It is the maximum number of ranked items in the response.
The default is 10. The maximum is 50.
{
"limit": 5
}
Optional items
items adds candidate items to rank. They are included in the same ranked
list. Unknown mnemonics in items follow failOnMnemonicNotFound (default
true).
{
"items": ["HX_BRAND_0412"]
}
Let's go to examples
Every payload below is synthetic. The shared constants they reuse — the dataset, the authorization group, the audience, and the items — are documented once in the example gallery.
Ranked items for one audience
The default Discover call. One audience, and the top items by affinity. Use it when a planner needs the items that over-index against an audience.
Items are ordered by affinity (highest first), then proj, then mnemonic. The items array is capped at limit and may be shorter.
{
"surveyCode": "HXUS",
"authorizationGroup": "CLIENTA",
"audience": "(GMEN=#1) AND (AGE18_34=#1)",
"table": "#1",
"weightIndex": 1,
"limit": 5
}
curl -X POST 'https://engines.api.telmar.com/omg/prd/v1/crosstab' \
-H 'Telmar-Engine-Authorizer: SAMPLE.ENGINE.AUTHORIZER' \
-H 'Content-Type: application/json' \
-d '{
"surveyCode": "HXUS",
"authorizationGroup": "CLIENTA",
"audience": "(GMEN=#1) AND (AGE18_34=#1)",
"table": "#1",
"weightIndex": 1,
"limit": 5
}'
{
"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
},
{
"rank": 2,
"mnemonic": "HX_BRAND_0088",
"label": "Brand B",
"affinity": 2.97,
"proj": 1504,
"audiencePercent": 6.22,
"itemPercent": 36.3,
"stability": 0
}
]
}
}
Optional items included in the ranking
You already have item mnemonics to consider. Send them in items and they are ranked with the audience in the same list.
items is optional. Supplied items appear in the same ranked items array, ordered by affinity.
{
"surveyCode": "HXUS",
"authorizationGroup": "CLIENTA",
"audience": "(GMEN=#1) AND (AGE18_34=#1)",
"items": [
"HX_BRAND_0412",
"HX_BRAND_0088"
],
"table": "#1",
"weightIndex": 1,
"limit": 5
}
curl -X POST 'https://engines.api.telmar.com/omg/prd/v1/crosstab' \
-H 'Telmar-Engine-Authorizer: SAMPLE.ENGINE.AUTHORIZER' \
-H 'Content-Type: application/json' \
-d '{
"surveyCode": "HXUS",
"authorizationGroup": "CLIENTA",
"audience": "(GMEN=#1) AND (AGE18_34=#1)",
"items": [
"HX_BRAND_0412",
"HX_BRAND_0088"
],
"table": "#1",
"weightIndex": 1,
"limit": 5
}'
{
"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
},
{
"rank": 2,
"mnemonic": "HX_BRAND_0088",
"label": "Brand B",
"affinity": 2.97,
"proj": 1504,
"audiencePercent": 6.22,
"itemPercent": 36.3,
"stability": 0
}
]
}
}
Audience is not a single coding statement
The call was sent with two audience statements. audience must be a single coding statement — the audience every item is ranked against.
To compare two audiences, make two Discover calls.
{
"surveyCode": "HXUS",
"authorizationGroup": "CLIENTA",
"audience": [
"(GMEN=#1)",
"(GWOMEN=#1)"
],
"table": "#1",
"weightIndex": 1,
"limit": 5
}
curl -X POST 'https://engines.api.telmar.com/omg/prd/v1/crosstab' \
-H 'Telmar-Engine-Authorizer: SAMPLE.ENGINE.AUTHORIZER' \
-H 'Content-Type: application/json' \
-d '{
"surveyCode": "HXUS",
"authorizationGroup": "CLIENTA",
"audience": [
"(GMEN=#1)",
"(GWOMEN=#1)"
],
"table": "#1",
"weightIndex": 1,
"limit": 5
}'
{
"success": false,
"error": "audience must be a single coding statement."
}
Audience mnemonic the caller cannot access
The API key is valid, and a mnemonic in the audience or in items is not cleared for this authorization group.
401 here is about a coding statement you sent, which is separate from a missing or expired Telmar-Engine-Authorizer header. Do not retry until the mnemonic or the authorization group changes.
{
"surveyCode": "HXUS",
"authorizationGroup": "CLIENTA",
"audience": "(SECRET_CODE=#1)",
"table": "#1",
"weightIndex": 1,
"limit": 5
}
curl -X POST 'https://engines.api.telmar.com/omg/prd/v1/crosstab' \
-H 'Telmar-Engine-Authorizer: SAMPLE.ENGINE.AUTHORIZER' \
-H 'Content-Type: application/json' \
-d '{
"surveyCode": "HXUS",
"authorizationGroup": "CLIENTA",
"audience": "(SECRET_CODE=#1)",
"table": "#1",
"weightIndex": 1,
"limit": 5
}'
{
"success": false,
"error": "The audience is not accessible for this authorization group."
}
Account is not enabled for the Discover API
The API key is valid, but this account is not enabled for the Discover API.
This is a commercial boundary. Contact Sales to enable the Discover API — no payload change will resolve it.
{
"surveyCode": "HXUS",
"authorizationGroup": "CLIENTA",
"audience": "(GMEN=#1) AND (AGE18_34=#1)",
"table": "#1",
"weightIndex": 1,
"limit": 5
}
curl -X POST 'https://engines.api.telmar.com/omg/prd/v1/crosstab' \
-H 'Telmar-Engine-Authorizer: SAMPLE.ENGINE.AUTHORIZER' \
-H 'Content-Type: application/json' \
-d '{
"surveyCode": "HXUS",
"authorizationGroup": "CLIENTA",
"audience": "(GMEN=#1) AND (AGE18_34=#1)",
"table": "#1",
"weightIndex": 1,
"limit": 5
}'
{
"success": false,
"error": "The Discover API is not enabled for this account."
}
What to read next
- OpenAPI document — fetch the live machine-readable spec.
- CORS pre-flight — pre-flight from a browser.
- Endpoint reference — full schemas and status codes.