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.
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 URL | https://engines.api.telmar.com/omg/prd/v1 |
| Media type | application/json |
| Auth | Telmar-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 |
operationId | Method and path |
|---|---|
docs | GET /docs |
crosstab | POST /crosstab |
crosstabOptions | OPTIONS /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
| Field | Type | Description |
|---|---|---|
| (body) | object | The 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-Type | application/json |
| Body | DiscoverCrosstabRequest (required) |
Request schema — DiscoverCrosstabRequest
| Field | Type | Required | Description |
|---|---|---|---|
surveyCode | string | Yes | Dataset code. Only datasets from the TelmarHelixa provider are accepted |
authorizationGroup | string | Yes | Authorization group provisioned for the caller |
audience | string | Yes | Exactly one coding statement — the audience |
items | string[] | No | Optional candidate items, ranked in the same items list |
table | string | Yes | Table identifier (e.g. "#1") |
weightIndex | integer | Yes | Survey weight to apply |
limit | integer | No | Maximum ranked items returned. Default 10, maximum 50 |
A mnemonic in audience or items that the caller cannot access returns 401.
{
"surveyCode": "HXUS",
"authorizationGroup": "CLIENTA",
"audience": "(GMEN=#1) AND (AGE18_34=#1)",
"table": "#1",
"weightIndex": 1,
"limit": 5
}
Response schema — DiscoverCrosstabResponse
| Field | Type | Description |
|---|---|---|
success | boolean | true when the ranking completed |
message | string | ok on a completed ranking |
discover | DiscoverResult | Audience size and the ranked items |
DiscoverResult
| Field | Type | Description |
|---|---|---|
audienceSize.proj | number | Projected audience size in survey report units |
items | DiscoverItem[] | Up to limit items, best first |
DiscoverItem
| Field | Type | Description |
|---|---|---|
rank | integer | 1-based position in the ranked list |
mnemonic | string | Item mnemonic |
label | string | Display label |
affinity | number | Discover affinity. Higher means a stronger affinity with the audience |
proj | number | Projected audience who have the item |
audiencePercent | number | Percentage of the audience who have the item |
itemPercent | number | Percentage of the item's holders who are in the audience |
stability | integer | 0 stable, 1 unstable |
Sort order is affinity descending, then proj descending, then mnemonic
ascending.
{
"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
| Header | Type |
|---|---|
Access-Control-Allow-Origin | string |
OPTIONS /crosstab
CORS preflight endpoint for the /crosstab path. Browsers issue this
automatically before cross-origin POST requests. No parameters required.
Response — 200 OK
| Header | Type |
|---|---|
Access-Control-Allow-Origin | string |
Access-Control-Allow-Methods | string |
Access-Control-Allow-Headers | string |
Error codes
The API uses standard HTTP status codes. Discover responses add success,
message, and error.
| HTTP code | Meaning |
|---|---|
200 | Ranking succeeded |
400 | Bad request. Malformed JSON, missing required fields, or a Discover rule (audience, limit, audience too small) |
401 | Unauthorized. The API key is missing or expired, or a mnemonic in the audience or in items is not accessible |
403 | Forbidden. The Discover API is not enabled for the account |
500 | Internal server error. Contact TelmarHelixa support |
504 | Processing exceeded the gateway timeout. Lower limit |
Failure responses set success to false and put the reason in error:
| HTTP | error |
|---|---|
400 | audience must be a single coding statement. |
400 | Audience is too small to produce reliable results. |
403 | The Discover API is not enabled for this account. |
Limits
| Limit | Value |
|---|---|
| Datasets per request | 1, and only from the TelmarHelixa provider |
| Audience | Exactly one coding statement |
| Ranked items | 1–50 (limit, default 10) |
| Gateway timeout | 30 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.