Quickstart

Get up and running with NexumAPI.

NexumAPI provides a RESTful interface for developers to interact with their Symitar data using their existing SymXchange instances.

Want to jump straight to the code?

Skip the quickstart and dive into the SymXchange API reference.

This quickstart is designed to help you make your first API request on the NexumAPI Playground. If you're an experienced developer or want to just dive into using NexumAPI, the API reference is a great place to start. Throughout this quickstart, you will learn:

  • How to get access to the NexumAPI Playground

  • Overview of some of the basic concepts of NexumAPI

  • How to send your first API request

If you run into any challenges or have questions getting started, please join our Libum Community on Discord.

Accessing the playground

We've created a playground environment to give credit union developers an immediate first look at NexumAPI. First, tag a Libum Team Member in the #api-key-requests channel on our Libum Community server with your email alias (if you don't have Discord, reach out to our team at development@libum.io).

Making your first request

Select the tool or language you want to get started using the NexumAPI Playground with. The NexumAPI Playground is provided as a ready-to-use service called NexumAPI as a Service or "NaaS" meaning ultimately it's language agnostic.

Node.js is a popular JavaScript framework that is commonly used for web development. We'll use the popular node-fetch library to make light weight requests to NaaS.

Install Node.js

To use node-fetch to make a NexumAPI call, you will need to ensure you have Node.js installed. To download Node.js, head to the official Node website and download the LTS version. If you're installing Node.js for the first time, you can follow the official Node.js usage guide to get started

Install the node-fetch library

Once you have Node.js installed, the node-fetch library can be installed. From the terminal / command line, run:

npm install --save node-fetch
# or
yarn add node-fetch

Set up your API key

Follow the below steps for your OS to make your API key accessible for this and all future projects.

macOS

  1. Open Terminal: Search for it using Spotlight (Command + Space)

  2. Edit bash profile: Use the command nano ~/.bash_profile or nano ~/.zshrc (for newer macOS versions) to open the profile file in the nano text editor.

  3. Add Environment Variable: In the editor, add export NEXUM_API_KEY='your-api-key-here', replacing your-api-key-here with your actual API key.

  4. Save and exit: Press Ctrl+O to write changes, followed by Ctrl+X to close the editor.

  5. Load your profile: Use the command source ~/.bash_profile or source ~/.zshrc to load the updated profile.

  6. Verification: Verify the setup by typing echo $NEXUM_API_KEY in the terminal. It should display your API key.

Windows

  1. Open command prompt: You can find it by searching "cmd" in the start menu.

  2. Set permanent environment variable: Add the variable through the system properties as follows:

    1. Right-click on This PC or My Computer and select Properties.

    2. Click on Advanced system settings.

    3. Click the Environment Variables button

    4. In the System variables section, click New.. and enter NEXUM_API_KEY as the variable name and your API key as the variable value

  3. Verification: To verify the setup, open a new command prompt and type the command below: echo %NEXUM_API_KEY%, it should display your API key.

Sending an API request

After you have Node.js configured and set up an API key, the final step is to send a request to the NexumAPI Playground. To do this, create a file named naas-test.js using the terminal / command line or an IDE.

Inside the file, copy and paste the example below:

import fetch from 'node-fetch';

const body = {
    "AccountNumber": "13824",
    "Credentials": {
        "AdministrativeCredentials": {
            "Password": "suwn37834b91&"
        }
    }
};
const response = await fetch('https://naas.ymcu.libum.io/nexum/627/2022.01/account/getAccount', {
    method: 'POST',
    headers: {
        "Authorization": `Bearer ${process.env.NEXUM_API_KEY}`,
        "Content-Type": "application/json",
    },
    body: JSON.stringify(body),
});
const data = await response.json();

console.log(data);

To run the code, enter node naas-test.js into the terminal / command line. You should see the following in the console:

{
    "Account": {
        "ActivityDate": "2010-04-25",
        "AlternateAddress": [
            {
                "AlternateAddress": "SETH A ZAMORA",
                "EntryId": "1"
            },
            {
                "AlternateAddress": "8479 M ST",
                "EntryId": "2"
            },
// ...

Last updated