Resources

Search resources (advanced)

POST/resources/search

Full-shape search. The body lets you combine free text with per-field, per-node, and date-range filters; pick a sort order; and paginate. fieldFilters and dateFilters are keyed by field name as returned by GET /resources/fields, and the available field names are instance-specific (they differ per publisher/deployment) — call GET /resources/fields first to learn what you can filter on for the tenant you are connected to. See GET /resources/fields/{id}/options for tree options.

X-Api-Key<token>

Issued to you when your integration is provisioned. Determines which catalogue resources are visible and which AI tools are available.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Body for POST /resources/search. All fields are optional; an empty body returns the first page of every resource the api-key can see.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/resources/search" \  -H "Content-Type: application/json" \  -d '{    "query": "watercolour",    "limit": 10  }'
{  "data": {    "results": [      {        "ref": 0,        "title": "string",        "resourceType": 0,        "resourceTypeName": "string",        "fileExtension": "string",        "thumbnailUrl": "string",        "previewUrl": "string",        "createdDate": "string",        "modifiedDate": "string",        "archive": 0,        "score": 0,        "isPrivate": true,        "fields": {}      }    ],    "total": 0,    "limit": 0,    "offset": 0  }}
{  "success": false,  "status": "fail",  "message": "string",  "error": {    "message": "API key is required",    "code": "NO_API_KEY"  }}

{  "success": false,  "status": "fail",  "message": "API key is required",  "error": {    "code": "NO_API_KEY",    "message": "API key is required"  }}

{  "success": false,  "status": "fail",  "message": "Hourly rate limit exceeded.",  "error": {    "code": "RATE_LIMITED",    "message": "Hourly rate limit exceeded."  }}

Structured catalogue query (counts + listings) POST

Answers literal catalogue questions — counts and metadata listings — without a chat. This is the direct-REST door for the AI chat's `catalog_query` tool and reuses it verbatim, so results carry EXACT server-side totals (`totalRecords`, and `distinctTitles` for unique titles counted once across formats/editions). Use it for who/where/when and how-many questions: "how many books by Agatha Christie", "list our Avon titles", "what did we publish in 2023". For topic/theme intent ("books about vampires") use `POST /resources/search` with `mode: vector` instead. The primary interface is `filters` — a list of `{field, op, value}` conditions, ANDed together. A bare `query` string is a convenience: with no `filters` it maps to a single `title` contains condition. Call `GET /resources/fields` to discover the fields available on this tenant. All results are filtered by the linked user's usergroup — the same access walls the in-app search applies.

AI token usage for this api-key and its organisation GET

Reports AI token consumption (as recorded for billing) at two levels: - **account** — usage accrued by this api-key's linked service user. - **organisation** — aggregated across every user in the linked user's usergroup. If your organisation holds several api-keys (each with its own service user), this is the combined picture; it also includes interactive platform users in the same group. Dates are inclusive ISO dates. With no parameters you get the current calendar month to date, at both levels. Counters are daily aggregates, so `byDay` has at most one entry per day; days with no usage are omitted.