Skip to main content
Skip table of contents

Using the Crassula API

This section will give you a good idea of how to set the development environment to send your first API request to Crassula in a few simple steps. We'll be focusing on making a simple GET request using a third-party API platform.

Prerequisites

  • A Crassula client profile: See Persons for more details.

  • A Crassula banking account: See the Getting started section for more detail;

  • An Administrative Panel account: See the Administrative Panel Overview section for more detail;

  • Any third-party API platform: In the example below, we will use the Postman platform.

Setting up the Postman workspace

  1. Navigate to the Postman home page, specify your email address, and click Sign Up for Free:

  2. Create a Postman free account by either specifying a username-password pair or by signing up with your Google account: Accept the End-User License Agreement, specify your name and role, and click Continue to navigate to your Postman workspace:

3. In the dialog above, select the New HTTP request option and click Continue to finish the onboarding. Do not close the Postman workspace tab in your browser since you will need to use it later.

Creating an API request

Typically, an API request has the following structure:

CODE
https://client.demo.crassu.la/api/clients/{clientId}/accounts

where

  • https://client.demo.crassu.la is a host URL;

  • api/clients/{clientId}/accounts is a request;

  • {clientId} is an internal client identification number defining which client is taken into consideration.

The following additional parameters are also required to be filled in for the request mentioned above:

  • Key: A key header parameter defined in the API request description. The parameter defines the action performed by the API request.

  • Value: A unique API key generated in the Crassula back-end. The key corresponds to the {clientId} and allows one to access the client details without client’s credentials.

Sending an API request

The Postman workspace allows you to send an API request and receive the response. The following instruction takes the aforementioned request as an example; though, you can use any request from Banking API.

To send an API request

  1. Navigate to Banking API.

  2. Copy the GET api/clients/{clientId}/accounts request from the list.

  3. Navigate to the Postman home page.

  4. Select the GET method from the drop-down menu in the top sidebar.

  5. Insert the api/clients/{clientId}/accounts part of the request into the Enter request URL field.

  6. Add the host URL to the request to complete it as follows:

    CODE
    https://client.demo.crassu.la/api/clients/{clientId}/accounts
  7. Navigate to the Authorization tab and select API key from the Type drop-down menu.

  8. Add client details and additional parameters to the request:

    1. Update the ClientId parameter:

      1. Navigate to Crassula Administrative Panel>Banking>Persons and open the profile of a client.

      2. Copy the ID field value and replace the {clientId} string with it in Postman.

    2. Set the Key field value:

      1. Navigate to Banking API and click the GET api/clients/{clientId}/accounts request.

      2. Copy the header parameter (i.e. Authorization).

      3. Insert the copied value into the Key field of Postman.

    3. Set the Value field value:

      1. Navigate to Crassula Administrative Panel>API>API keys to generate an API key for the selected client.

      2. Click Add new.

      3. Set the name of the client in the Client field. Make sure to use the name of the client defined by the {clientId} string.

      4. Click Create and copy the new API key shown in the green confirmation message. Do not close the window before you copy the key: there is no way the value can be shown after the window is closed.

      5. Insert the copied key into the Value field of Postman.

  9. Click Send to send the request.

  10. See the response body in the Response field.

API request example

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.