Testing the API

Before You Start

Fluz’s staging environment replicates the full functionality of the live environment, providing simulations for tasks related to real-time transactions or compliance scenarios. Fluz has an API Explorer that lets you interact with the Fluz API to simulate capabilities and transactions in your staging environment. This guide provides an overview of how the API Explorer works and instructions for using it.

How it Works

  • API Reference: The API reference is available directly in Fluz's documentation. It provides an interface that includes a sample query or mutation, variables, and results. You can use the sample query supplied in each instance of the built-in tool to send requests to the Fluz API executed in your staging environment.
  • Embedded API Explorer: The Fluz API Explorer provides an interface to execute API calls in your staging environment, perform queries, and search the Fluz 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:\

Using the Embedded API Explorer

To use the embedded API Explorer, you must sign in to your Fluz account. Once signed in, the embedded API Explorer will communicate with your staging environment.

Use these steps from the embedded API Explorer provided to test your query:

  1. Review the query section of the embedded API Explorer. You do not need to change anything in this section for testing purposes.
  2. Click Variables to open the variables section. You can either use the pre-filled inputs or customize them for testing purposes.
  3. Click Run Query to execute the request in your Staging Environment.
  4. The Results section will populate the request response.
  5. Open your Fluz Dashboard and verify that the request is executed correctly in your staging environment.


Using the Default Collection

The API Explorer’s Default Collection is organized into several folders representing different parts of the Fluz platform. Pre-configured queries and mutations that represent operations are nested inside each folder.

  1. Open the API Explorer, click on any folder, and select an operation.
  2. 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.
  3. Click Run Query or Run Mutation to execute the API call.
  4. The response will populate in the Results field. You can also launch your Staging Environment and verify the API call is executed correctly in the dashboard.

Using Custom Collections

You can create Custom Collections in the API Explorer by clicking the Collection drop-down and selecting Create New Collection. In a custom collection, you can create new operations and folders, build customized queries and mutations, and execute them in your Staging 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’s in the schema. You can use the autocomplete feature to help you build your queries and mutations in your custom collection.

Use the following steps to use the autocomplete feature to build a simple query:

  1. Open your Custom Collection and click Create New Operation to populate an empty query.
  2. Start typing qu and choose query from the autocomplete box.
  3. Add curly brackets { }.
  4. Inside the curly brackets, start typing gi and select giftcardlist from the autocomplete box.
  5. Click Run Query. The corresponding objects for the query will populate in the Query field.
  6. The Results field will return a paginated list of card products from your Staging Environment.