Home / Basics / Highnote API

Highnote Query Language

Overview

The Highnote Query Language (HQL) v.1.0.0 provides programmatic search capabilities across Highnote entities using SQL-like syntax through the GraphQL API.

Specifically, HQL enables complex searches that would normally require multiple standard GraphQL requests:

Search TypeExample
Cross-field conditionstransactionAmount > USD 500 AND createdAt >= '2024-01-01'
List operationsaccountId IN ('ac_ba22446a041287274d81af25bb83eeba46b1', 'ac_c022126bc2bb629545a988564e267d8982a5')
Custom metadatacustomField='riskLevel:high'
Logical grouping(accountStatus = 'ACTIVE' OR accountStatus = 'PENDING') AND productId = 'pd_4644868cd7b749fa82a4149d46d9827d'

The API processes HQL queries through three main search contexts: Financial Accounts, Payment Transactions (acquiring), and Universal Transactions (issuing), each exposing context-specific searchable fields alongside common attributes.

HQL operates through the searchQueryLanguage field within GraphQL filterBy inputs:

Limitations

HQL is a standalone filter system that uses the searchQueryLanguage field within filterBy inputs. If provided with other standard filters, HQL takes precedence and the other filters are ignored.

Minimum API version: The minimum supported Search API version is VERSION_1.

Rate limits: See API Rate Limiting for details.

Search latency: Highnote’s Search API has a latency period of up to two minutes.

HQL Conventions

The Highnote Query Language uses the following conventions:

  • A term is a keyword used to search on attributes related to an entity.
  • An expression is <term> <operator> <value>. For example, transactionAmount > USD 100.
  • A value with special characters must be escaped with single quotes. For example, Highnote identifiers include an underscore and should be represented as 'ac_c022b9c66de3299c4f06a03293106c65234b'.

HQL Operators

OperatorDescriptionExample
=Equal toaccountId != 'ac_ba22446a041287274d81af25bb83eeba46b1'
!=Not Equal toaccountId != 'ac_ba22446a041287274d81af25bb83eeba46b1'
>Greater ThantransactionAmount > USD 100
>=Greater Than or Equal TotransactionAmount >= USD 100
<Less ThantransactionAmount < USD 100
<=Less Than or Equal TotransactionAmount <= USD 100
INReturns entities that match any value in listaccountId IN ('ac_ba22446a041287274d81af25bb83eeba46b1', 'ac_c022126bc2bb629545a988564e267d8982a5')
NOT INReturns entities that do not match any value in listaccountId NOT IN ('ac_og2234f70e5e4e384f1ca1f52b26aab8e7b5', 'ac_og22d44c3eb6e6f14929954ba278ffcd84ec)
ANDBoth sides of expression are validtransactionAmount > USD 100 AND accountId = 'ac_ba22446a041287274d81af25bb83eeba46b1'
OREither side of expression is validaccountId = 'ac_ba22446a041287274d81af25bb83eeba46b1' OR accountId = 'ac_c022126bc2bb629545a988564e267d8982a5'
( )Groups search terms togetherlast4 = 1234 AND (accountId = ‘ac_ba22446a041287274d81af25bb83eeba46b1’ OR accountId = 'ac_c022126bc2bb629545a988564e267d8982a5')

HQL Examples

Use the following query to list card product accounts, and then search by createdAt date.

Provide Feedback

Was this content helpful?