Banking API

The Banking API allows you to access and perform actions against the ledgers issued to you by Acquired.com and also lets you issue your customers ledgers with unique account numbers.

Don't forget that before you can access this API, you’ll need an API user created on your account. These details are used to complete the Authorization step explained below. Pick your best person, you can only have one API user.

To confirm if each request into the Banking API is sucessful or not, we return a HTTP response code. For a full list of codes that may be returned, please look to your right.

Within each request, we also pass the status parameter within the response. If status is set to 1, your request was successful, if it is set to -1, an error occurred but we'll give you some extra info on what went wrong.

Error Handling - HTTP response codes
  • 200 (Everything worked)
  • 400 (Check your request parameters)
  • 401 (Check your token)
  • 404 (Check the endpoint)
  • 409 (Conflicting request with a different request)
  • 429 (Too many requests at once)
  • 5XX (Errors, they are uncommon so please contact us!)

Endpoints

Time to play - access the Hub API using these endpoints:

Authorization

The first step to using the Banking API is to generate a token. This token is to be used in the "Authorization" header of all subsequent requests and acts as a security measure.

Once you've received your test account and got your details correct, you will receive the token value in response and are ready to go.

POST /login
Headers
Content-Type: application/json
Accept: application/json

Parameters

Please see to your right a code example of the Authorization request.

Parameter Format Length Description
email
Required
string 1-50 The email address of your API user.
Acceptable Characters: 0-9 a-z A-z _ - . @
password
Required
string 1-4 The password created for your API user.
Acceptable Characters: 0-9
{
  "email" : "tech@yourdomain.com",
  "password" : "4]'Hy.$.MC=dQ9Uz"
}
                        

Response

In response you will get a token value which you’ll use in the Authorization header of all other requests - please see to your right a code example.

Parameter Format Length Description
status int 1-2 The outcome of the request.
message string 0-100 Handy text describing the status for debugging.
data object
token string 240 A unique token value to be used in the "Authorization" header to access the rest of the Hub API.
last_login_time string 19 The date and time the login details were last used.
login_timeout int 4 The amount of time (in seconds) before this token becomes invalid and you need to request a new one.
{
  "status" : 1,
  "message" : "Success",
  "data" : {
    "token" : "eyJ0eXAiOiJqd3QiLCJhbGciOiJIUzI1NiJ9.eyJrZXkiOiI0NjBlYWM1ODFiOTczZjkwOTA5M2Y1NzM2MjE5N2U0OCIsImlkIjoiMzM5IiwidGltZSI6IjIwMTktMDMtMTJUMDc6NTA6MDIrMDAwMCIsInR0bCI6NzIwMCwiaXAiOiIxNzYuMjQuNDYuMTY3In0.gjxFz_q2yR1ttxSsp9xBJOjz6kXDXivPNUJTdE9HA2Q",
    "last_login_time" : "2019-08-22 16:47:18",
    "login_timeout" : 7200
  }
 }
                        
Pro tip: Only one token can be active at a time, and it expires after two hours. After that, you’ll have to ask for a new token. Alternatively, generate a new token for each request - your call.