Home / Basics / Highnote API

Test the API

Before you start

The Highnote test environment (or dashboard) replicates the full functionality of the live environment, and lets you simulate real-time transactions and compliance scenarios.

The Highnote docs include an API Explorer (standalone and embedded as snippets) that lets you run those simulations (in the dashboard) from the docs. This guide explains how to use the API Explorer.

How It works

The API Explorer can be used in two ways:

  • Highnote API Explorer: The Highnote API Explorer is an interface for executing API calls in your test environment, perform queries, and search the Highnote API schema. You can use the default collection or create a custom collection of API mutations and queries that can be shared with your team:

  • Embedded code snippets: Highnote embeds instances of the API Explorer directly in the Highnote documentation. These instances appear as testable code snippets. You can use the sample query supplied in each instance of the built-in tool to send requests to the Highnote API executed in your test environment.

Using embedded code snippets

To use the embedded code snippets, you must sign in to your Highnote account. Once signed in, the embedded code snippets communicate with your test environment.

To execute an embedded code snippet in the Highnote docs:

  1. Go to any page with a executable code snippet, e.g., Create your card product.
  2. Review the mutation in the Query window of the embedded API Explorer. You do not need to change anything in this section for testing purposes.
  3. Click Variables to open the variables section. You can either use the pre-filled inputs or customize them for testing purposes.
  4. Click Run Query to execute the request in your test environment. The Results section populates the request response.
  5. Open your Highnote dashboard and verify that the request was executed correctly in your test environment. If you use the default values, "My Test Product" will be listed as a Commercial Prepaid product in your dashboard.

Using the Highnote API Explorer

To use the Highnote API Explorer, you must sign in to your Highnote dashboard.

Using the default collection

The API Explorer's default collection is organized into several folders representing different parts of the Highnote platform. Pre-configured queries and mutations that represent operations are nested inside each folder.

To use the default collection in the API Explorer:

  1. Open the API Explorer, click on any folder, and select an operation.

    The pre-configured query, mutation, and variables associated with the operation automatically populate in the API Explorer interface. You can edit the pre-configured fields by clicking on the corresponding line and replacing the existing text, or you can leave the fields as they are.

  2. Click Run Query or Run Mutation to execute the API call.

    The response populates in the Results field. You can also verify the API call was executed correctly in the dashboard.

Using custom collections

In the API Explorer, you can create custom collections by clicking the Collection drop-down and selecting Create New Collection. In a custom collection, you can add new operations and folders, build customized queries and mutations, and execute them in your test environment.

Use the search schema functionality, query, and mutation resources when creating custom operations.

Using autocomplete

The API Explorer has an autocomplete feature that populates options based on what is in the Highnote schema. You can use the autocomplete feature to help you build your queries and mutations in your custom collection.

To build a simple query with autocomplete:

  1. Open your custom collection and click Create New Operation. Clear the Query window if pre-populated.

  2. Start typing qu and choose query from the autocomplete box.

  3. Append curly brackets, e.g., query{ }, then inside the brackets, type re and select reportUsage to create the query, query{reportUsage}.

    The query shows an error with a red wavy line under reportUsage.

  4. Hover over reportUsage to reveal an error message above and a link to the schema docs just below.

  5. While hovering, click the blue reportUsage hyperlink under {reportUsage} to expose the schema docs on the right.

  6. In the Schema window, click ReportUsage! to expose valid subfields and their descriptions.

  7. Leaving the error as is, click Run Query in the Variables window.

    Two things happen: (a) The Query window populates with all valid subfields and the error clears. (b) The Results window returns a paginated list of reports with usage limits from your test environment.

Provide Feedback

Was this content helpful?