Skip to main content

Highnote Query Language

Overview

The Highnote Query Language (HQL) 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:

{
filterBy: {
searchQueryLanguage: {
query: "transactionAmount > USD 100 AND accountStatus = 'ACTIVE'",
version: "VERSION_1"
}
}
}

Limitations

info

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'.

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')

An account search applies to FinancialAccount attributes.

Returns FinancialAccount.

FieldDescriptionExample
id (or accountId)FinancialAccount
productIdThe Card Product associated to the Financial Account
activeFeaturesThe list of active features. Valid enum values: FinancialAccountFeatureTypeactiveFeatures='DIRECT_DEPOSIT'
primaryAccountHolderPrimary account holder of the Financial Accountps_ah01
primaryAccountAccountHolderAccount Id of the primary userac_c022126bc2bb629545a988564e267d8982a5
primaryAccountHolderAccountIf authorized user, Account Id of the primary user account; else Account Id of the primary userps_ap0135e1c47a453c4656bb8da5fb2a60f976,
customFieldCustom fields linked to Financial Account. Must be an exact match.customField='myCustomField:myCustomValue'
accountStatusStatus of a Financial Account. Valid enum values: FinancialAccountStatus
applicationApplication used to issue the Financial Account
createdAtDatetime (ISO 8601) the Financial Account was created

An acquiring search applies to attributes of the following: PaymentTransaction, PaymentTransactionLifecycleStep, and PaymentTransactionEvent.

Returns PaymentTransaction.

FieldDescriptionExample
idIdentifier of the PaymentTransaction
transactionAmountAmount of the transaction
accountIdFinancial Accounts linked to the Payment Transaction and corresponding Steps and Events
cardholderEmailEmail associated with the cardholder of a Payment Transaction. Must be an exact match.
cardholderNameName associated with the cardholder of a Payment Transaction. Must be an exact match.
authorizationIdentifierID of the authorization response code provided by the processor for this PaymentTransaction on a successful authorization
last4Last 4 digits of the card used for the Payment Transaction
orderIdOriginating Payment Order that this transaction was initiated from
merchantAcceptorIdOptional ID of the merchant location or terminal accepting the payment for this transaction. If not provided, the default merchantAcceptorId is used.
transferIdUnique ID of the transfer

Searches on normalized values related to all Issuing Transaction Types as well as attributes specific to individual Issuing Transaction Types.

Returns TransactionSearchResult.

FieldDescriptionApplies To
idIdentifier of the transactionAll
transactionSearchStatusA normalized value across all transaction types that represents whether a transaction is COMPLETED, PENDING, or FAILED. Dependent on the lifecycle of each transaction type.All
transactionAmountA normalized value that searches across all transaction types' amount values.. Ex: WireTransfer.amount, TransactionEvent.approvedAmountAll
transactionAmountCurrencyCodeCurrency that the transaction was initiated withAll
transactionIdThe parent transaction id, if applicableAll
accountHolderIdThe AccountHolder that may be associated with a transaction. Multiple AccountHolders may be associated with a transaction.All
transactionSearchTypeNarrows down the search to either a TRANSACTION or EVENT.All
typeNarrows down the search to a specific transaction type. Allowed values are interFinancialAccountTransfer, wireTransfer, manualAdjustment, achTransfer, cardTransaction, checkPayment, disbursement, aquiringPayment, instantNetworkTransferAll
accountIdA FinancialAccount that may be associated with a transaction. Multiple FinancialAccounts can be associated with 1 transaction.All
createdAtWhen the transaction was createdAll
actionDateA normalized timestamp field that searches on the last updated date for a transaction. For example, within the lifecycle of a Transaction, searches on the latest createdAt of a TransactionEventAll
completeDateA normalized timestamp field that searches on when a transaction was completed, if applicable. For example, if a Transaction has gone through the entire payment lifecycle, completeDate can be used to search when the final TransactionEvent occurred.All
productIdThe CardProduct that is associated with a transaction. Multiple CardProducts may be associated with a transactionAll
last4The last 4 digits of the card used in the transactionTransactionEvent types
cardProcessingTypeThe method or channel used to process the transaction. Valid enum values: cardProcessingTypeTransactionEvent types
cardAcceptorIdentificationCodeHighnote assigned Merchant IDTransactionEvent types
merchantNameName of the merchantTransactionEvent types
institutionNameName of the institutionTransactionEvent types
merchantCategoryCode or mccHuman friendly enums representing 4-digit ISO-18245 merchant category codes. Valid enum values: MerchantCategoryTransactionEvent types
cardAcceptorLocationGeographic/address info about where the transaction took placeTransactionEvent types
transactionCountryCodeCountry code where the transaction took placeTransactionEvent types
postedAmountFinal settled transaction amount charged to the cardholder's accountTransactionEvent types

HQL Examples

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

query ListCardProductAccounts(
$id: ID!
$first: Int
$after: String
$filterBy: AccountHolderFinancialAccountsFilterInput
) {
node(id: $id) {
id
__typename
... on Organization {
accounts(first: $first, after: $after, filterBy: $filterBy) {
__typename
pageInfo {
hasNextPage
hasPreviousPage
startCursor
endCursor
}
edges {
node {
id
name
createdAt
updatedAt
accountStatus
accountAttributes
cardProduct {
id
}
cardProductApplication {
... on AccountHolderCardProductApplication {
accountHolderSnapshot {
... on USPersonAccountHolderSnapshot {
accountHolderCurrent {
id
name {
familyName
givenName
middleName
suffix
title
}
}
}
... on USBusinessAccountHolderSnapshot {
accountHolderCurrent {
id
businessProfile {
name {
legalBusinessName
doingBusinessAsName
}
}
}
}
}
}
}
owner {
... on USPersonAccountHolder {
id
name {
familyName
givenName
middleName
suffix
title
}
}
... on USBusinessAccountHolder {
id
businessProfile {
name {
legalBusinessName
doingBusinessAsName
}
}
}
... on Organization {
id
profile {
displayName
}
}
}
ledgers(ledgerNames: AVAILABLE_CASH) {
id
name
normalBalance
creditBalance {
value
currencyCode
decimalPlaces
}
debitBalance {
value
currencyCode
decimalPlaces
}
}
features {
enabled
... on SecuredCreditPaymentCardFinancialAccountFeature {
creditLimit {
currencyCode
decimalPlaces
value
}
}
... on FleetCardAccountFeature {
creditLimit {
currencyCode
decimalPlaces
value
}
}
... on CommercialCreditPayInFullCardAccountFeature {
creditLimit {
currencyCode
decimalPlaces
value
}
}
... on CreditCardAccountFeature {
creditLimit {
currencyCode
decimalPlaces
value
}
}
... on OnDemandFundingFinancialAccountFeature {
sourceFinancialAccount {
id
}
}
}
}
}
}
}
... on CardProduct {
accounts(first: $first, after: $after, filterBy: $filterBy) {
__typename
pageInfo {
hasNextPage
hasPreviousPage
startCursor
endCursor
}
edges {
node {
id
name
createdAt
updatedAt
accountStatus
accountAttributes
cardProductApplication {
... on AccountHolderCardProductApplication {
accountHolderSnapshot {
... on USPersonAccountHolderSnapshot {
accountHolderCurrent {
id
name {
familyName
givenName
middleName
suffix
title
}
}
}
... on USBusinessAccountHolderSnapshot {
accountHolderCurrent {
id
businessProfile {
name {
legalBusinessName
doingBusinessAsName
}
}
}
}
}
}
}
owner {
... on USPersonAccountHolder {
id
name {
familyName
givenName
middleName
suffix
title
}
}
... on USBusinessAccountHolder {
id
businessProfile {
name {
legalBusinessName
doingBusinessAsName
}
}
}
... on Organization {
id
profile {
displayName
}
}
}
ledgers(ledgerNames: AVAILABLE_CASH) {
id
name
normalBalance
creditBalance {
value
currencyCode
decimalPlaces
}
debitBalance {
value
currencyCode
decimalPlaces
}
}
features {
enabled
... on SecuredCreditPaymentCardFinancialAccountFeature {
creditLimit {
currencyCode
decimalPlaces
value
}
}
... on FleetCardAccountFeature {
creditLimit {
currencyCode
decimalPlaces
value
}
}
... on CommercialCreditPayInFullCardAccountFeature {
creditLimit {
currencyCode
decimalPlaces
value
}
}
... on CreditCardAccountFeature {
creditLimit {
currencyCode
decimalPlaces
value
}
}
... on OnDemandFundingFinancialAccountFeature {
sourceFinancialAccount {
id
}
}
}
}
}
}
}
}
}