Home / Basics / Highnote API

Custom Fields

Overview

Warning: For compliance and security reasons, do not use CustomFields to store PCI or PII data.

FinancialAccount and PaymentCard objects implement CustomFields, which allow you to add key-value pairs to the object.

CustomFields is a set of key-value pairs that include a creation date and an updated date. Each Highnote CustomFields object can store 20 alpha-numeric keys of 40 characters. The pairing value can be an alpha-numeric string of up to 255 characters. CustomFields are stored and returned in plain text.

Some example use cases for using custom fields are:

  • Linking IDs in your system with Highnote data
  • Marking notes on Highnote data
  • Adding a nickname to a card
  • Tagging an account with the application ID
  • With CustomFields search, look up all objects relating to a customer in your system

Query custom fields

You can use the following node query to find customFields on a financial account:

Search multiple objects

You can also use a nodeByCustomFields query with a CustomFieldsFilter to look up multiple objects and their custom fields. Use the following query to search multiple objects:

Filters

In addition to using the customFields filter to search multiple objects, you can use the following filters to refine your search results:

Accepts one input

Accepts one or more inputs

Example 1: Equals

The following code snippet provides an example of using the equals filter in your query input:

Input variable for equals filter

Example 2: Not equals

The following code snippet provides an example of using the notEquals filter in your query input:

Input variable for notEquals filter

Example 3: Includes

The following code snippet provides an example of using the includes filter in your query input:

Input variable for includes filter

Example 4: Excludes

The following code snippet provides an example of using the excludes filter in your query input:

Input variable for excludes filter

Create custom fields for new object

Note: Currently, objects that support custom fields are FinancialAccount and PaymentCard.

You can create custom fields when creating a new object that supports customFields.

The following mutation provides an example of creating a FinancialAccount with customFields key-value pairs entered as input variables:

Update custom fields of existing object

Warning: Setting a key-value pair's value to empty will delete the key.

You can add, update, or delete customFields of an existing object with the UpdateCustomField mutation and by referencing key-value pairs explicitly as input variables.

Example 1: Add fields

The following example uses the UpdateCustomFields mutation to add multiple customFields key-value pairs to an existing object:

Example 2: Add, update, delete fields

Continuing from the previous output, the following example uses the UpdateCustomFields mutation to do the following:

  • Delete a key-value pair (regionId)
  • Update another key-value pair (customerGroupId)
  • Add a new key-value pair (sectorId)

Delete custom fields

You can use the following mutation to delete all customFields for an object without having to specify the keys explicitly:

Provide Feedback

Was this content helpful?