NAV Navigation
cURL HTTP JavaScript Ruby Python Java Go PHP

Welcome

This documentation was last updated on Tue Nov 29 20:59:53 UTC 2022 and covers Mambu Version v9.131.2

Welcome to the Mambu API v2 documentation. Here you can learn everything you need to know about API v2 and how to interact with Mambu!

We offer language bindings in cURL, HTTP, JavaScript, Node.js, Ruby, Python, Java, and Go. You can view code examples in the dark area to the right, and you can switch the programming language of the examples with the tabs at the top right.

You can also download OpenAPI specifications for all of our endpoints which can be used to generate client SDKs, interactive documentation, create mock servers and more. For more information, see the OpenAPI specification section.

About Mambu API v2

Scroll down for code samples, example requests, and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

Mambu API v2 is a fully compliant RESTful API and we recommend building all new integrations with API v2 (instead of API v1).

Base URLs

The base URL for requests to the API is:

To make requests to your tenant's sandbox, use the following base URL:

For more information, see the Sandbox section.

HTTP Verbs

Standard HTTP verbs are used to indicate the API request method.

Verb Function
GET To retrieve a resource or a collection of resources
POST To create a resource
PATCH To modify an existing resource
PUT To replace an existing resource
DELETE To delete a resource

Authentication

Mambu supports two methods for authenticating API requests:

Basic Authentication

curl --location --request GET 'https://TENANT_NAME.mambu.com/api/users' \
--header 'Authorization: Basic U29tZVVzZXI6T3BlblNlc2FtZQ=='
GET /api/users HTTP/1.1
Host: TENANT_NAME.mambu.com
Authorization: Basic U29tZVVzZXI6T3BlblNlc2FtZQ==
var settings = {
  "url": "https://TENANT_NAME.mambu.com/api/users",
  "method": "GET",
  "timeout": 0,
  "headers": {
    "Authorization": "Basic U29tZVVzZXI6T3BlblNlc2FtZQ=="
  },
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
require "uri"
require "net/http"

url = URI("https://TENANT_NAME.mambu.com/api/users")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = "Basic U29tZVVzZXI6T3BlblNlc2FtZQ=="

response = https.request(request)
puts response.read_body
import requests

url = "https://TENANT_NAME.mambu.com/api/users"

payload={}
headers = {
  'Authorization': 'Basic U29tZVVzZXI6T3BlblNlc2FtZQ=='
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
Request request = new Request.Builder()
  .url("https://TENANT_NAME.mambu.com/api/users")
  .method("GET", null)
  .addHeader("Authorization", "Basic U29tZVVzZXI6T3BlblNlc2FtZQ==")
  .build();
Response response = client.newCall(request).execute();
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {

  url := "https://TENANT_NAME.mambu.com/api/users"
  method := "GET"

  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, nil)

  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("Authorization", "Basic U29tZVVzZXI6T3BlblNlc2FtZQ==")

  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := ioutil.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}

For basic authorization, provide your username and password directly via the Authorization header in the format Basic {base64-encoded-string}, where base64-encoded-string is the base-64-encoded value of your username and password separated by a colon ':'.

For example, a user with the username SomeUser and the password OpenSesame would take the value SomeUser:OpenSesame and base-64 encode it, yielding U29tZVVzZXI6T3BlblNlc2FtZQ==. They would then provide an Authorization header for their request with the value Basic U29tZVVzZXI6T3BlblNlc2FtZQ==.

See the code samples for this section for sample GET requests to the /users endpoint using the above example.

Note that the login credentials must be for a user account with API access permissions. For more information, see Creating a User - Access Rights in our User Guide.

API Keys

API keys are tokens that you provide in an apiKey header to authenticate requests. They are generated by API consumers, which are an abstraction similar to an OAuth client.

API consumers are currently an Early Access feature. If you would like to request access to this feature, please get in touch with your Mambu Customer Success Manager to discuss your requirements.

For more information on API consumers and keys, see API Consumers in our User Guide.

Versioning

# You can also use wget
curl -X {HTTP Verb} https://TENANT_NAME.mambu.com/api/{Insert resource URI here} \
  -H 'Accept: application/vnd.mambu.v2+json'

GET https://TENANT_NAME.mambu.com/api/Insert-Resource-URI-here HTTP/1.1
Host: TENANT_NAME.mambu.com

Accept: application/vnd.mambu.v2+json
var headers = {
  'Accept':'application/vnd.mambu.v2+json'

};

$.ajax({
  url: 'TENANT_NAME.mambu.com/api/{Insert resource URI here}',
  method: '{HTTP Verb}',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})
require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/vnd.mambu.v2+json'
}

result = RestClient.{HTTP Verb} 'https://TENANT_NAME.mambu.com/api/{Insert resource URI here}',
  params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Accept': 'application/vnd.mambu.v2+json'
}

r = requests.{HTTP Verb}('https://TENANT_NAME.mambu.com/api/{Insert resource URI here}', params={

}, headers = headers)

print r.json()
URL obj = new URL("https://TENANT_NAME.mambu.com/api/{Insert resource URI here}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestProperty(“Accept”, “application/vnd.mambu.v2+json”);
con.setRequestMethod("{HTTP Verb}");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/vnd.mambu.v2+json"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("{HTTP Verb}", "https://TENANT_NAME.mambu.com/api/{Insert resource URI here}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

Mambu API v2 provides a versioning system to assist with backwards compatibility. Contract changes will result in a new version of each affected resource becoming available without the old version immediately becoming obsolete.

Versioning is supported in API requests via the Accept header.

Template: application/vnd.mambu.{version}+json

To retrieve a specific version of an entity, fill a value into the template above. The highest currently supported version is v2.

Payloads

Mambu API v2 currently has endpoints that accept and return either application/json, application/yaml, or multipart/form-data payloads.

When making a POST, PUT, or PATCH request, you must use the Content-Type header to specify the content type of the payload.

Requests

Code samples

# You can also use wget
curl -X {HTTP Verb} https://TENANT_NAME.mambu.com/api/{Insert resource URI here} \
  -H 'Accept: application/vnd.mambu.v2+json'

GET https://TENANT_NAME.mambu.com/api/Insert-Resource-URI-here HTTP/1.1
Host: TENANT_NAME.mambu.com

Accept: application/vnd.mambu.v2+json
var headers = {
  'Accept':'application/vnd.mambu.v2+json'

};

$.ajax({
  url: 'https://TENANT_NAME.mambu.com/api/{Insert resource URI here}',
  method: '{HTTP Verb}',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/vnd.mambu.v2+json'
}

result = RestClient.{HTTP Verb} 'https://TENANT_NAME.mambu.com/api/{Insert resource URI here}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/vnd.mambu.v2+json'
}

r = requests.{HTTP Verb}('https://TENANT_NAME.mambu.com/api/{Insert resource URI here}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://TENANT_NAME.mambu.com/api/{Insert resource URI here}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestProperty(“Accept”, “application/vnd.mambu.v2+json”);
con.setRequestMethod("{HTTP Verb}");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/vnd.mambu.v2+json"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("{HTTP Verb}", "https://TENANT_NAME.mambu.com/api/{Insert resource URI here}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

API requests (also known as API calls) to the Mambu API identify who the requester is and exactly what information they wish to retrieve or which action they wish to perform.

To put together an API request you will need to combine:

Responses

Error Response

{
  "errorCode":"4",
  "errorSource":"Property scheduleSettings.repaymentInstallments may not be null",
  "errorReason":"INVALID_PARAMETERS"
}

The response to a request will contain either an error response or a payload in the content type that the endpoint accepts.

Error response

An error response will consist of:

Field Type Availability Content
errorCode number Always present A unique error code. For a full list, please see Mambu Response Codes.
errorSource string Sometimes present A human-readable message capturing unsatisfied constraints.
errorReason string Always present A human-readable message stating the general category of the failure.

Idempotency

Code samples

# You can also use wget
curl -X POST https://TENANT_NAME.mambu.com/api/deposits/{depositAccountId}/transactions \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/vnd.mambu.v2+json' \
  -H 'Idempotency-Key: 01234567-9abc-def0-1234-56789abcdef0'
POST https://TENANT_NAME.mambu.com/api/deposits/{depositAccountId}/transactions HTTP/1.1
Host: TENANT_NAME.mambu.com
Content-Type: application/json
Accept: application/vnd.mambu.v2+json
Idempotency-Key: 01234567-9abc-def0-1234-56789abcdef0
var headers = {
  'Content-Type':'application/json',
  'Accept':'application/vnd.mambu.v2+json',
  'Idempotency-Key':'01234567-9abc-def0-1234-56789abcdef0'

};

$.ajax({
  url: 'https://TENANT_NAME.mambu.com/api/deposits/{depositAccountId}/transactions',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})
require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/vnd.mambu.v2+json',
  'Idempotency-Key' => '01234567-9abc-def0-1234-56789abcdef0'
}

result = RestClient.post 'https://TENANT_NAME.mambu.com/api/deposits/{depositAccountId}/transactions',
  params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/vnd.mambu.v2+json',
  'Idempotency-Key': '01234567-9abc-def0-1234-56789abcdef0'
}

r = requests.post('https://TENANT_NAME.mambu.com/api/deposits/{depositAccountId}/transactions', params={

}, headers = headers)

print r.json()
URL obj = new URL("https://TENANT_NAME.mambu.com/api/deposits/{depositAccountId}/transactions");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
String idempotentKey = UUID.randomUUID().toString();
con.setRequestProperty(“Idempotency-Key”, idempotentKey);
con.setRequestProperty(“Accept”, “application/vnd.mambu.v2+json”);
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/vnd.mambu.v2+json"},
        "Idempotency-Key": []string{"01234567-9abc-def0-1234-56789abcdef0"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://TENANT_NAME.mambu.com/api/deposits/{depositAccountId}/transactions", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

Idempotent requests to the Mambu UI are guaranteed to be executed no more than once.

Working with financial transactions, it is important to ensure some requests are not repeated for any reason, which may result in data loss or accidental duplication. You may configure requests to be idempotent by providing an Idempotency-Key header and providing a unique UUID token for the request. This will guard against the possibility of error if a request must be retried.

When an idempotent request is processed, the status code and body of the response is associated with the idempotency key and stored in a cache. If the request is duplicated for any reason, the duplicate request will not be processed, and the response will be re-sent to the client.

Idempotent requests that fail at the server level such validation failures are not stored in the cache. Subsequent requests with the same idempotency key will be processed as if they were new, receiving the same 400 BAD REQUEST status code.

For examples of idempotent requests, see the code samples for this section.

Idempotency Keys and Retry Mechanisms

Idempotency keys must use the v4 UUID format (32 hexadecimal digits, in a 8-4-4-4-12 arrangement, such as 01234567-9abc-def0-1234-56789abcdef0).

We recommend generating UUIDs programmatically or by using an online generator such as UUID Generator to ensure that all keys are valid V4 UUIDs.

Retry mechanisms must:

Sandbox

The sandbox tenant (also known as sandbox environment) is independent from the production tenant, and any changes you make in the sandbox will not affect the data in your production tenant. For more information, see Sandbox in our User Guide.

To make requests to your tenant's sandbox, use the following base URL:

The sandbox is generally one version ahead of the production tenant. As such, it may include changes that are currently in, or may soon be in, the production environment. For more information, see Mambu Release Cycle.

Sandbox management

To manage your sandbox go to the Customer Service Portal. For more information and instructions, see Customer Service Portal - Sandbox Management.

Pagination

Code samples

# You can also use wget
curl -X GET https://TENANT_NAME.mambu.com/api/{Insert resource URI here}?offset=10&limit=10&paginationDetails=ON \
  -H 'Accept: application/vnd.mambu.v2+json'

GET https://TENANT_NAME.mambu.com/api/Insert-Resource-URI-here?offset=10&limit=10&paginationDetails=ON HTTP/1.1
Host: TENANT_NAME.mambu.com

Accept: application/vnd.mambu.v2+json
var headers = {
  'Accept':'application/vnd.mambu.v2+json'

};

$.ajax({
  url: 'https://TENANT_NAME.mambu.com/api/{Insert resource URI here}?offset=10&limit=10&paginationDetails=ON',
  method: '{HTTP Verb}',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/vnd.mambu.v2+json'
}

result = RestClient.{HTTP Verb} 'https://TENANT_NAME.mambu.com/api/{Insert resource URI here}?offset=10&limit=10&paginationDetails=ON',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/vnd.mambu.v2+json'
}

r = requests.{HTTP Verb}('https://TENANT_NAME.mambu.com/api/{Insert resource URI here}?offset=10&limit=10&paginationDetails=ON', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://TENANT_NAME.mambu.com/api/{Insert resource URI here}?offset=10&limit=10&paginationDetails=ON");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestProperty(“Accept”, “application/vnd.mambu.v2+json”);
con.setRequestMethod("{HTTP Verb}");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/vnd.mambu.v2+json"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("{HTTP Verb}", "https://TENANT_NAME.mambu.com/api/{Insert resource URI here}?offset=10&limit=10&paginationDetails=ON", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

Response headers

(...)
content-type: application/vnd.mambu.v2+json
date: Mon, 03 Sep 2018 10:56:15 GMT
items-limit: 10
items-offset: 10
items-total: 35
(...)

Mambu API v2 has customisable pagination capabilities which can be used with all GET requests. It also has sorting and filtering capabilities for search endpoints.

We strongly recommend using the pagination, sorting, and filtering capabilities when making requests which will return a large number of records because response times are much faster.

Pagination query parameters

Pagination is deactivated by default and must be specified in each request. There are three available query parameters you may use, paginationDetails, offset, and limit.

paginationDetails

The paginationDetails query parameter returns pagination details in the header of your response. The default value is OFF. To include pagination details set the value to ON. Pagination details includes the total number of records, the limit value, and the offset value.

limit

The limit query parameter determines the number of records that will be retrieved. The default value is 50. The maximum value is 1,000.

offset

The offset query parameter determines how many records will be skipped before being included in the returned results. The default value is 0.

In the example, we can see that there are 35 total records. By setting offset to 10 and limit to 10, we are returning the second set of 10 records, essentially "Page 2" of our paginated response.

Pagination best practices

Once you have used the pagination query parameters to retrieve all the available records in the database for your specific query, you no longer need to make any additional API requests.

To determine whether you need to make any additional API requests you may compare the value of the limit parameter to the number of records retrieved in the body of your request.

If the number of records is less than the value of the limit parameter then no additional API requests are necessary.

If the number of records is equal to the limit value then you may make additional API requests.

If you receive an empty array [] in the body of your request, this means there are no records for that request and you do not need to make any additional API requests.

Sorting and filtering with search endpoints

All the search endpoints in API v2 end in :search. Search endpoints accept a filterCriteria array of objects and a sortingCriteria object in their request body.

When making broad searches that will return a lot of records, using pagination with appropriate values can ensure that your result set will not shift as new records matching your search criteria are created, which may otherwise lead to duplicates across pages.

sortingCriteria

The sortingCriteria object has two properties, field and order.

field property

We recommend you enter either an incremental ID or a timestamp as the value for the field property.

order property

The order property accepts two values, ascending (ASC) or descending (DESC). The default value is DESC, however, if using pagination or a search where new records are being actively created, for example transactions or journal entries created up to and including the current day, we strongly recommend you set the value to ASC. This will cause new records to be added to the end of your result set.

filterCriteria

If you are making a broad search that will return a lot of results, we recommend constraining your search query using a time interval. This may be done by setting the field property to a date property such as creationDate or valueDate. Setting the operator property to BETWEEN. And entering two dates as the values for the value and secondValue properties. This will ensure that no newly created records will interfere with a set of results. Please see the related note about searches using the BETWEEN operator in the considerations for specific field types section below for more information about this operator.

Details Level

Code samples

# You can also use wget
curl -X GET https://TENANT_NAME.mambu.com/api/{Insert resource URI here}?detailsLevel=FULL \
  -H 'Accept: application/vnd.mambu.v2+json'

GET https://TENANT_NAME.mambu.com/api/Insert-Resource-URI-here?detailsLevel=FULL HTTP/1.1
Host: TENANT_NAME.mambu.com

Accept: application/vnd.mambu.v2+json
var headers = {
  'Accept':'application/vnd.mambu.v2+json'

};

$.ajax({
  url: 'https://TENANT_NAME.mambu.com/api/{Insert resource URI here}?detailsLevel=FULL',
  method: '{HTTP Verb}',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/vnd.mambu.v2+json'
}

result = RestClient.{HTTP Verb} 'https://TENANT_NAME.mambu.com/api/{Insert resource URI here}?detailsLevel=FULL',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/vnd.mambu.v2+json'
}

r = requests.{HTTP Verb}('https://TENANT_NAME.mambu.com/api/{Insert resource URI here}?detailsLevel=FULL', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://TENANT_NAME.mambu.com/api/{Insert resource URI here}?detailsLevel=FULL");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestProperty(“Accept”, “application/vnd.mambu.v2+json”);
con.setRequestMethod("{HTTP Verb}");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/vnd.mambu.v2+json"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("{HTTP Verb}", "https://TENANT_NAME.mambu.com/api/{Insert resource URI here}?detailsLevel=FULL", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

Mambu API v2 supports two details levels for responses:

To view a higher level of detail, include detailsLevel as a query parameter in your request and give it the value FULL.

Audit Trail and the User-Agent Header

Error when User Agent header is not provided

{
  "errors": [
    {
      "errorCode": 4,
      "errorSource": "The user agent cannot be null when the Audit Trail feature is enabled",
      "errorReason": "INVALID_PARAMETERS"
    }
  ]
}

Audit trail tracks all activities performed in the Mambu Core Banking system via the UI or API v1 and v2. For more information, see Audit Trail in our User Guide.

When the audit trail feature is enabled, you must provide a User-Agent header for all requests to any endpoint, or the request will fail with the error message The user agent cannot be null when the Audit Trail feature is enabled.

Note that if you are using a REST client like Postman or Curl, this header is probably provided automatically. However, if you generate a request to the API, you must provide it yourself.

The User-Agent header provides information regarding the browser and operating system (such as the browser version), and information about the library or tool issuing the request (such as the client Java version). It is generally used to assist with debugging problems.

OpenAPI Specification

This API Reference documentation is automatically generated from OpenAPI Specification (OAS) files.

We allow you to:

You can use the JSON-formatted OAS files to scaffold client SDKs in various languages. See Generating SDKs from OAS below.

API discovery

Request samples

Code samples

# You can also use wget
curl -X GET https://TENANT_NAME.mambu.com/api/swagger/resources \
  -H 'apikey: APIKEY'

GET https://TENANT_NAME.mambu.com/api/swagger/resources HTTP/1.1
Host: TENANT_NAME.mambu.com

apikey: APIKEY
var headers = {
  'apikey':'APIKEY'

};

$.ajax({
  url: 'https://TENANT_NAME.mambu.com/api/swagger/resources',
  method: 'GET',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

require 'rest-client'
require 'json'

headers = {
  'apikey' => 'APIKEY'
}

result = RestClient.get 'https://TENANT_NAME.mambu.com/api/swagger/resources',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'apikey': 'APIKEY'
}

r = requests.get('https://TENANT_NAME.mambu.com/api/swagger/resources', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://TENANT_NAME.mambu.com/api/swagger/resources");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestProperty("apikey", "APIKEY");
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "apikey": []string{"APIKEY"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://TENANT_NAME.mambu.com/api/swagger/resources", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

Example response

{
    "items": [
        {
            "jsonPath": "json/clients_v2_swagger.json",
            "label": "Clients",
            "hashValue": "Clients",
            "index": 0
        },
        {
            "jsonPath": "json/clients_documents_v2_swagger.json",
            "label": "Client Documents",
            "hashValue": "Client_Documents",
            "index": 1
        },
        {
            "jsonPath": "json/branches_v2_swagger.json",
            "label": "Branches",
            "hashValue": "Branches",
            "index": 2
        },
        {
            "jsonPath": "json/centres_v2_swagger.json",
            "label": "Centres",
            "hashValue": "Centres",
            "index": 3
        },
        ...
        {
            "jsonPath": "json/configuration_iddocumenttemplates.yaml_v2_swagger.json",
            "label": "Identification Document Templates Configuration",
            "hashValue": "Identification_Document_Templates_Configuration",
            "index": 64
        },
        {
            "jsonPath": "json/configuration_loanrisklevels.yaml_v2_swagger.json",
            "label": "Loan Risk Levels Configuration",
            "hashValue": "Loan_Risk_Levels_Configuration",
            "index": 65
        },
        {
            "jsonPath": "json/currencies_v2_swagger.json",
            "label": "Currencies",
            "hashValue": "Currencies",
            "index": 66
        }
    ]
}

To retrieve either the basic OAS file or the enriched OAS file with custom fields for a specific API, you must first build the path for the resource.

To build the path for a resource you must retrieve the jsonPath value. This value is provided when you retrieve the list of all available APIs.

To retrieve the list of all available APIs you may use the https://TENANT_NAME.mambu.com/api/swagger/resources endpoint.

The response returns an array of objects. Each object represents an API and includes its jsonPath value.

Next, to retrieve the OAS file for a specific API. See Retrieving OAS Files below.

Retrieving OAS Files

Code Samples

# You can also use wget
curl -X GET https://TENANT_NAME.mambu.com/api/swagger/completejson/{OAS-file} \
  -H 'apikey: APIKEY'

GET https://TENANT_NAME.mambu.com/api/swagger/completejson/{OAS-file} HTTP/1.1
Host: TENANT_NAME.mambu.com

apikey: APIKEY
var headers = {
  'apikey':'APIKEY'

};

$.ajax({
  url: 'https://TENANT_NAME.mambu.com/api/swagger/completejson/{OAS-file}',
  method: 'GET',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

require 'rest-client'
require 'json'

headers = {
  'apikey' => 'APIKEY'
}

result = RestClient.get 'https://TENANT_NAME.mambu.com/api/swagger/completejson/{OAS-file}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'apikey': 'APIKEY'
}

r = requests.get('https://TENANT_NAME.mambu.com/api/swagger/completejson/{OAS-file}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://TENANT_NAME.mambu.com/api/swagger/completejson/{OAS-file}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestProperty("apikey", "APIKEY");
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "apikey": []string{"APIKEY"}
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://TENANT_NAME.mambu.com/api/swagger/completejson/{OAS-file}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

Example response

{
    "swagger": "2.0",
    "info": {
        "version": "v2",
        "title": "clients"
    },
    "host": "localhost:8889",
    "basePath": "/api",
    "tags": [
        {
            "name": "Clients",
            "description": "Allows you to retrieve, create, update or delete clients. Clients may have associated information such as their address, identification documents or custom fields."
        }
    ],
    "schemes": [
        "http",
        "https"
    ],
    "paths": {
    ...
    },
    "securityDefinitions": {
        "basic": {
            "description": "",
            "type": "basic"
        }
    },
    "definitions": {
    ...
    }
}

Once you have followed the steps to retrieve the jsonPath value for a specific API, you can build the path to a specific resource.

To retrieve the specification file for a given API, join the base URL with the value of the relevant jsonPath.

Basic OAS file

The basic OAS file will not include any custom fields and you do not need to authenticate to access this endpoint.

The endpoint to retrieve the basic OAS file is:

https://TENANT_NAME.mambu.com/api/swagger/{jsonPath}

For example, to retrieve the basic OAS file for the Clients API you would use:

https://TENANT_NAME.mambu.com/api/swagger/json/clients_v2_swagger.json

Enriched OAS file

The enriched OAS file will include any custom fields you have set up for your organisation at the time of generation. This endpoint requires authentication using either HTTP Basic Auth or an API key provided in an apikey header.

The endpoint to retrieve the enriched OAS file with custom fields is:

https://TENANT_NAME.mambu.com/api/swagger/complete{jsonPath}

For example, to retrieve the enriched OAS file for the Clients API you would use:

https://TENANT_NAME.mambu.com/api/swagger/completejson/clients_v2_swagger.json

Both endpoints are available for both your production and sandbox environments. Replace TENANT_NAME with TENANT_NAME.sandbox to access API specifications for the sandbox environment, which is usually one version ahead of production. This gives you time to investigate new features and functionality before using it in production.

Generating SDKs from OAS

Once you have your OAS file you are free to use any number of tools to generate a client SDK in your preferred language, for example, the freely available and online Swagger Editor. By either importing the file or copying the specification into the editor window you will be able to see both navigable documentation and the option located at the top of the window to Generate Client.

Generating a client SDK in your preferred language on Swagger Editor

Remember to edit the host field in your OAS file to reflect your Mambu domain before generating your SDK. For more information on your Mambu domain, see Base URLs.

Searching for Records

A basic search query for loans from a particular product type, sort by approval date
POST /loans:search

{
  "filterCriteria": [
    {
      "field": "loanName",
      "operator": "EQUALS_CASE_SENSITIVE",
      "value": "Agriculture Loan"
    }
  ],
  "sortingCriteria": {
    "field": "approvedDate",
    "order": "DESC"
  }
}

A search for current accounts which are active and overdrawn from two different branches using compound filters, sort by overdraft balance
POST /deposits:search

{
  "filterCriteria": [
    {
        "field": "accountState",
        "operator": "EQUALS_CASE_SENSITIVE",
        "value": "ACTIVE"
    },
    {
      "field": "accountType",
      "operator": "EQUALS_CASE_SENSITIVE",
      "value": "CURRENT_ACCOUNT"
    },
    {
        "field": "balances.overdraftAmount",
        "operator": "MORE_THAN",
        "value": 0
    },
    {
        "field": "assignedBranchKey",
        "operator": "in",
        "values": [
            "8a193c26722b51b701722d779e7122de",
            "8a193c26722b51b701722d779e7122df"
        ]

    }
  ],
  "sortingCriteria": {
    "field": "balances.overdraftAmount",
    "order": "DESC"
  }
}

Search functionality is provided for a number of entities through dedicated endpoints that can be identified by the :search suffix, for example to search for deposit accounts you can use the /deposits:search endpoint. Search endpoints accept a POST request that can include an object containing a filterCriteria array of objects and a sortingCriteria object in the request body.

The filterCriteria array of objects allows you to narrow your search using multiple fields to filter by. Every entity that supports search has a schema that provides the enumerated values available for the filter properties, for example, the schema for a deposit account search is DepositAccountFilterCriteria.

The sortingCriteria object allows you to specify according to which field and in what way you would like to sort the returned results. Every entity that supports search provides a schema with all the available fields you can sort by. For example, the schema for sorting the results of a deposit account search is DepositAccountSortingCriteria.

Apart from native fields that are enumerated in the relevant schemas that you can use in your filter criteria, you can also filter by custom fields. For more information, see Searching by custom fields.

API v2 also provides a couple of additional features that allow you to further customize and manage your search queries.

The pagination query parameters allow you to break up your search into smaller chunks, for more information, see Pagination and Optimising Searches.

The detailsLevel query parameter allows you to specify the level of detail to include in the results. For more information, see Details Level and Optimising Searches.

Searching by custom fields

Search for entries where the given custom field has the value FALSE

{
  "filterCriteria": [
    {
      "field": "_marketing_opt_in.investor_newsletter",
      "operator": "EQUALS_CASE_SENSITIVE",
      "value": "FALSE"
    }
  ]
}

Search for entries where the given custom field has one of the given values, sort by ID

{
  "filterCriteria": [
    {
      "field": "_group_details.industry",
      "operator": "IN",
      "values": [
        "agriculture",
        "arboriculture"
      ]
    }
  ],
  "sortingCriteria": {
    "field": "id",
    "order": "ASC"
  }
}

You can build your filter and search queries using the native fields enumerated in the relevant schemas, for more information, see Searching for Records. However, you can also use custom fields in your filter and search queries for any entities that support custom fields. For more information, see Custom Fields in our User Guide.

To filter or sort using a custom field you must provide the custom field set ID and the custom field ID using dot nation, for example _custom_field_set_ID.custom_field_ID. You can see an example of the syntax to the right. The custom field set can belong to the same entity or to a parent entity.

Filter Operators

Equals

{
    "field": "overdraftSettings.allowOverdraft",
    "operator": "EQUALS",
    "value": true
}

Equals (case sensitive)

{
    "field": "name",
    "operator": "EQUALS_CASE_SENSITIVE",
    "value": "Daily Savings"
}

More than

{
    "field": "balances.totalBalance",
    "operator": "MORE_THAN",
    "value": 500000.50
}

Less than

{
    "field": "accruedAmounts.interestAccrued",
    "operator": "LESS_THAN",
    "value": 10000.10
}

Between

{
    "field": "balances.feesDue",
    "operator": "BETWEEN",
    "value": 100,
    "secondValue" : 500
}

On

{
    "field": "approvedDate",
    "operator": "ON",
    "value": "2021-06-15"
}

After

{
    "field": "lastModifiedDate",
    "operator": "AFTER",
    "value": "2022-04-20"
}

Before

{
    "field": "creationDate",
    "operator": "BEFORE",
    "value": "2021-12-25"
}

Before inclusive

{
    "field": "creationDate",
    "operator": "BEFORE_INCLUSIVE",
    "value": "2020-06-15"
}

Starts with

{
    "field": "id",
    "operator": "STARTS_WITH",
    "value":"eban"
}

Starts with (case sensitive)

{
    "field": "id",
    "operator": "STARTS_WITH",
    "value":"EBAN"
}

In

{
    "field": "accountType",
    "operator": "IN",
    "values":[
        "REGULAR_SAVINGS",
        "CURRENT_ACCOUNT"
    ]
}

Today

{
    "field": "approvedDate",
    "operator": "TODAY"
}

This week

{
    "field": "disbursementDetails.expectedDisbursementDate",
    "operator": "THIS_WEEK"
}

This month

{
    "field": "lastPaymentDate",
    "operator": "THIS_MONTH"
}

This year

{
    "field": "expectedMaturityDate",
    "operator": "THIS_YEAR"
}

Last x days

{
    "field": "firstRepaymentDate",
    "operator": "LAST_DAYS",
    "value": 12
}

Empty

{
    "field": "overdraftRiskLevelKey",
    "operator": "EMPTY"
}

Not empty

{
    "field": "lastSetToArrearsDate",
    "operator": "NOT_EMPTY"
}

The table below contains available operators as well as the types of field they are compatible with and the number of values they support.

Operator Affected values Available for
EQUALS ONE_VALUE BIG_DECIMAL, BOOLEAN, LONG, MONEY, NUMBER, PERCENT, STRING, ENUM, KEY
EQUALS_CASE_SENSITIVE ONE_VALUE STRING, BOOLEAN, DATE, NUMBER, ENUM, KEY
MORE_THAN ONE_VALUE BIG_DECIMAL, NUMBER, MONEY
LESS_THAN ONE_VALUE BIG_DECIMAL, NUMBER, MONEY
BETWEEN TWO_VALUES BIG_DECIMAL, NUMBER, MONEY, DATE, DATE_TIME
ON ONE_VALUE DATE, DATE_TIME
AFTER ONE_VALUE DATE, DATE_TIME
BEFORE ONE_VALUE DATE, DATE_TIME
BEFORE_INCLUSIVE ONE_VALUE DATE, DATE_TIME
STARTS_WITH ONE_VALUE STRING
STARTS_WITH_CASE_SENSITIVE ONE_VALUE STRING
IN LIST ENUM,KEY
TODAY NO_VALUE DATE, DATE_TIME
THIS_WEEK NO_VALUE DATE, DATE_TIME
THIS_MONTH NO_VALUE DATE, DATE_TIME
THIS_YEAR NO_VALUE DATE, DATE_TIME
LAST_DAYS ONE_VALUE NUMBER
EMPTY NO_VALUE BIG_DECIMAL, LONG, MONEY, NUMBER, PERCENT, STRING, ENUM, KEY, DATE, DATE_TIME
NOT_EMPTY NO_VALUE BIG_DECIMAL, LONG, MONEY, NUMBER, PERCENT, STRING, ENUM, KEY, DATE, DATE_TIME

Considerations for specific field types

Optimising Searches

There are a few ways to make sure that your searches are optimised for performance. This becomes increasingly necessary the more records there are in the system.

Time Zone Offsets

Here is how we handle time zone offsets in API v2 calls:

Example JSON body showing an invalid date offset request

{
    "errors": [
        {
            "errorCode": 4,
            "errorSource": "Invalid date offset for value 2021-03-09T13:37:50 org offset is +02:00",
            "errorReason": "INVALID_PARAMETERS"
        }
    ]
}

Example

Each Mambu tenant has one time zone. Let’s take for example tenants in the East European time zone (UTC+02:00).

Date and time of request Error message or What is saved in the database
2021-03-09T13:37:50 “Invalid date offset for value 2021-03-09T13:37:50 org offset is +02:00”
2021-03-09T13:37:50+03:00 “Invalid date offset for value 2021-03-09T13:37:50 org offset is +02:00”
2021-03-09T13:37:50+02:00 2021-03-09 13:37:50

Using Custom Fields

Overview

Standard custom field set with custom fields

{
  ...
  "_customFieldSet": {
    "customField1": "value",
    "customField2": "value",
    "customField3": "value"
  }
  ...
}

Grouped custom field set with custom fields

{
  ...
  "_customFieldSet": [
          {
              "_index": "0",
              "customField1": "value",
              "customField2": "value",
              "customField3": "value"
          },
          {
              "_index": "1",
              "customField1": "value",
              "customField2": "value",
              "customField3": "value"
          }
      ]
  ...
}

Custom fields are fields you may create for several entities that allow you to capture additional relevant information. Custom fields are grouped together in custom field sets. For more information about custom fields, how to create them, and which entities support them, see Custom Fields in our User Guide.

When working with API v2, custom field values are nested within a custom field set property and they are at the end of any JSON object.

There are two kinds of custom field sets, standard and grouped.

A standard custom field set can contain multiple single custom fields. Each custom field may contain only one value. In a JSON object, it is represented by a custom field set property that contains an object with the associated custom fields.

A grouped custom field set contains groups of custom fields. You may have multiple groups of custom fields within the custom field set. In a JSON object, it is represented by a custom field set property that contains an array of objects with the associated custom fields and the index of each object in the array.

The type of custom field set dictates how custom fields must be handled in PATCH operations.

To the right you can see an example of a single custom field set and a grouped custom field set.

You can identify any custom field set because the ID starts with an underscore _. To retrieve the custom fields of any object, you must set the detailsLevel query parameter to FULL when making a request. For more information, see Details Level.

You may make PATCH requests to add, replace, or remove a value from any custom field that you have appropriate access to. We will provide more details on how to do so below. For more information on how access to custom fields is managed, see Custom Fields - Configuring rights for roles.

Example JSON body of a loan showing a standard custom field set with custom fields nested below

{
  "id": "ABC001",
  "loanName": "Mortgage Loan",
  "loanState": "PARTIAL_APPLICATION",
  ...
  "_loanPerformanceScore": {    //custom field set
    "amountScore": "10",       //custom fields nested under the set
    "timeScore": "5"
  }
}

Example JSON body of a client showing a grouped custom field set with custom fields nested below

{
  "encodedKey": "8a19aad43801888d017801f0dd841c1d",
  "id": "190955358",
  "state": "ACTIVE",
  "creationDate": "2021-03-05T11:31:05+01:00",
  "lastModifiedDate": "2022-08-08T12:42:35+02:00",
  "activationDate": "2021-11-18T10:19:13+01:00",
  "approvedDate": "2021-03-05T11:31:05+01:00",
  "firstName": "John ",
  "lastName": "Smith ",
  ...
  "_assets": [  //custom field set
          {     //custom fields in groups nested under the set
              "_index": "0",
              "asset_value": "965000",
              "asset_type": "land",
              "asset_age": "10"
          },
          {
              "_index": "1",
              "asset_value": "25,000",
              "asset_type": "car",
              "asset_age": "2"
          }
      ]
}

Example

To the right you can see an example of a standard custom field set with ID _loanPerformanceScore that includes two custom fields with IDs amountScore and timeScore.

To the right you can see an example of a grouped custom field set with ID _assets and three custom fields asset_age, asset_type, and asset_value.

Standard custom field sets

In the examples provided for standard custom fields sets, we assume we have a custom field set with ID _employer_information and it contains a total of two custom fields with IDs company and position.

Standard custom field set examples:

Affecting a single custom field in a custom field set

Adding a value to a single custom field in a custom field set

[
  {
    "op": "ADD",
    "path": "/_employer_information/company",
    "value": "Google"
  }
]

To add, replace, or remove a value for a single field in a custom field set, pass the custom field set ID and the custom field ID to the path property. To add or replace a value, enter it directly to the value property. To remove a value, do not include the value property in the JSON object.

In the example to the right, we are adding a value for the company custom field.

Affecting all the custom fields in a custom field set

Replacing values for all the custom fields in a custom field set

[
  {
    "op": "REPLACE",
    "path": "/_employer_information",
    "value": {
        "company": "Amazon",
        "position": "senior frontend developer"
    }
  }
]

To add, replace, or remove values for all the fields in a custom field set, pass the custom field set ID to the path property. To add or replace values, provide an object with all the fields within the custom field set to the value property including the field you are adding or replacing with the appropriate value. To remove values, do not include the value property in the JSON object.

In the example to the right, we are replacing the values for both the company and position custom fields.

In the first example to the right, we are removing the value for the company custom field.

In the second example to the right, we are removing the values for all the custom fields in the _employer_information custom field set.

Removing one custom field from the custom field set

[
  {
    "op": "REMOVE",
    "path": "/_employer_information/company"
  }
]

Removing all the custom fields from a custom field set

[
  {
    "op": "REMOVE",
    "path": "/_employer_information"
  }
]

Grouped custom field sets

Grouped custom field set examples

In the group custom field set examples, we assume we have a custom field set with ID _assets and it contains groups of three custom fields with IDs asset_type, asset_value, and asset_age. These are used to capture the client assets that are used as guarantees for loans.

Affecting one custom field in a custom field group

Adding a value for one custom field in a custom field group

[
  {
    "op": "ADD",
    "path": "/_assets/2/asset_age",
    "value": "5"
  }
]

Adding two custom field groups to a custom field set

[
  {
    "op": "ADD",
    "path": "/_assets",
    "value": [
      {
        "asset_type": "Land",
        "asset_age": "10",
        "asset_value": "965000"
      },
      {
        "asset_type": "Car",
        "asset_age": "2",
        "asset_value": "25000"
      }
    ]
  }
]

To add, replace, or remove a single custom field within a custom field group, the path property must specify the custom field set ID, the index of the group in the array, and the specific custom field.

In the example to the right, we are adding a value for the asset_age property for the custom field group with index 2 in the array.

Adding entire custom field groups to a custom field set

To add an entire new custom field group or multiple new groups, the path property must specify just the custom field set ID. The new group will always be added to the end of the array. You cannot specify a specific index in the array to add it to.

In the example to the right, we are adding two new custom field groups to the custom field set.






Replacing or removing one custom field group in a custom field set

Replacing one custom field group in a custom field set

[
  {
    "op": "REPLACE",
    "path": "/_assets/2",
    "value": {
        "asset_type": "House",
        "asset_age": "3",
        "asset_value": "100000"
    }
  }
]

To replace or remove an entire custom field group, the path property must specify the custom field set ID and the index of the group in the array.

In the example to the right, we are replacing the entire custom field group that is at index 2 in the array.

Replacing or removing all custom field groups in a custom field set

Removing all the custom field groups in a custom field set

[
  {
    "op": "REMOVE",
    "path": "/_assets"
  }
]

To replace or remove all the custom field groups for a custom field set, the path property only needs the custom field set ID.

In the example to the right we are removing the custom field group at index 2 in the array.

Accounting Interest Accrual

Allows search of interest accrual breakdown entries by various criteria.

searchInterestAccrual (Accounting Interest Accrual)

Code samples

# You can also use wget
curl -X POST /accounting/interestaccrual:search \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/vnd.mambu.v2+json'

POST /accounting/interestaccrual:search HTTP/1.1

Content-Type: application/json
Accept: application/vnd.mambu.v2+json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/vnd.mambu.v2+json'

};

$.ajax({
  url: '/accounting/interestaccrual:search',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/vnd.mambu.v2+json'
}

result = RestClient.post '/accounting/interestaccrual:search',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/vnd.mambu.v2+json'
}

r = requests.post('/accounting/interestaccrual:search', params={

}, headers = headers)

print r.json()

 'application/json',
    'Accept' => 'application/vnd.mambu.v2+json',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','/accounting/interestaccrual:search', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("/accounting/interestaccrual:search");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/vnd.mambu.v2+json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "/accounting/interestaccrual:search", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /accounting/interestaccrual:search

Allows search of interest accrual breakdown entries by various criteria

For more information on performing searches, please read the Searching for Records section above.

Body parameter

{
  "filterCriteria": [
    {
      "field": "entryId",
      "operator": "EQUALS",
      "secondValue": "string",
      "value": "string",
      "values": [
        "string"
      ]
    }
  ],
  "sortingCriteria": {
    "field": "entryId",
    "order": "ASC"
  }
}

Parameters

Name Type Description In
offset integer(int32) Pagination, index to start searching at when retrieving elements, used in combination with limit to paginate results query
limit integer(int32) Pagination, the number of elements to retrieve, used in combination with offset to paginate results query
paginationDetails string Flag specifying whether the pagination details should be provided in response headers. Please note that by default it is disabled (OFF), in order to improve the performance of the APIs query
detailsLevel string The level of details to retrieve, FULL means the full details of the object will be retrieved (custom fields, address, contact info or any other related object), BASIC will return only the first level elements of the object query
body InterestAccrualSearchCriteria Criteria to be used to search interest accrual breakdown body

Enumerated Values

Parameter Value
paginationDetails ON
paginationDetails OFF
detailsLevel BASIC
detailsLevel FULL

Example responses

200 Response

[
  {
    "accountId": "string",
    "accountKey": "string",
    "amount": 0,
    "bookingDate": "string",
    "branchKey": "string",
    "branchName": "string",
    "creationDate": "string",
    "entryId": 0,
    "entryType": "string",
    "foreignAmount": {
      "accountingRate": {
        "encodedKey": "string",
        "endDate": "2016-09-06T13:37:50+03:00",
        "fromCurrencyCode": "string",
        "rate": 0,
        "startDate": "2016-09-06T13:37:50+03:00",
        "toCurrencyCode": "string"
      },
      "amount": 0,
      "currency": {
        "code": "AED",
        "currencyCode": "string"
      }
    },
    "glAccountId": "string",
    "glAccountKey": "string",
    "glAccountName": "string",
    "glAccountType": "string",
    "parentEntryId": 0,
    "productId": "string",
    "productKey": "string",
    "productType": "string",
    "transactionId": "string"
  }
]

Responses

Status Meaning Description Schema
200 OK Interest accrual breakdown retrieved Inline
400 Bad Request A Validation error occurred ErrorResponse
401 Unauthorized UNAUTHORIZED ErrorResponse
403 Forbidden Forbidden ErrorResponse

Response Schema

Status Code 200

Name Type Description Restrictions
anonymous [InterestAccrualBreakdown] [Represents an interest accrual breakdown entry] none
» accountId string The loan/deposit account ID for which the interest accrued amount is retrieved none
» accountKey string The encoded key of the loan/deposit account for which the interest accrual amount is retrieved none
» amount number The interest accrued amount for the account referred in this entry none
» bookingDate string The booking date, in Organization Time Zone none
» branchKey string The encoded Key for branch of the account none
» branchName string The name for branch of the account none
» creationDate string The creation datetime of the entry, in UTC none
» entryId integer(int64) Generated Id for the interest accrual per account entry none
» entryType string Debit or Credit none
» foreignAmount ForeignAmount Representation of details of GL Journal Entries posted in foreign currency. none
»» accountingRate AccountingRate Represents the conversion rate used in accounting to convert amounts from one currency to organisation currency none
»»» encodedKey string The encoded key of the accounting rate, auto generated, unique read-only
»»» endDate string(date-time) Rate validity end date (as Organization Time) none
»»» fromCurrencyCode string Organisation currency code none
»»» rate number Value of rate to be used for accounting conversions none
»»» startDate string(date-time) Rate validity start date (as Organization Time) none
»»» toCurrencyCode string Foreign currency code none
»» amount number Amount in foreign currency none
»» currency Currency Represents a currency eg. USD, EUR. none
»»» code string Fiat(ISO-4217) currency code or NON_FIAT for non fiat currencies. none
»»» currencyCode string Currency code for NON_FIAT currency. none
» glAccountId string The id of GL Account none
» glAccountKey string The encoded key of the GL Account used for logging the interest accrual none
» glAccountName string The name of GL Account none
» glAccountType string The type of GL Account: ASSET / LIABILITY / EQUITY / INCOME / EXPENSE none
» parentEntryId integer(int64) The Id of the GL Journal Entry that represents the interest accrual sum logged for all of the very same product none
» productId string The id of the account's product none
» productKey string The encoded key of the account's product none
» productType string The type of Product (Loan or Deposit) none
» transactionId string The Id of the Journal Entry transaction none

Enumerated Values

Property Value
code AED
code AFN
code ALL
code AMD
code ANG
code AOA
code ARS
code AUD
code AWG
code AZN
code BAM
code BBD
code BDT
code BGN
code BHD
code BIF
code BMD
code BND
code BOB
code BOV
code BRL
code BSD
code BTN
code BWP
code BYR
code BYN
code BZD
code CAD
code CDF
code CHE
code CHF
code CHW
code CLF
code CLP
code CNY
code COP
code COU
code CRC
code CUC
code CUP
code CVE
code CZK
code DJF
code DKK
code DOP
code DZD
code EGP
code ERN
code ETB
code EUR
code FJD
code FKP
code GBP
code GEL
code GHS
code GIP
code GMD
code GNF
code GTQ
code GYD
code HKD
code HNL
code HRK
code HTG
code HUF
code IDR
code ILS
code INR
code IQD
code IRR
code ISK
code JMD
code JOD
code JPY
code KES
code KGS
code KHR
code KMF
code KPW
code KRW
code KWD
code KYD
code KZT
code LAK
code LBP
code LKR
code LRD
code LSL
code LTL
code LVL
code LYD
code MAD
code MDL
code MGA
code MKD
code MMK
code MNT
code MOP
code MRO
code MRU
code MUR
code MVR
code MWK
code MXN
code MXV
code MYR
code MZN
code NAD
code NGN
code NIO
code NOK
code NPR
code NZD
code OMR
code PAB
code PEN
code PGK
code PHP
code PKR
code PLN
code PYG
code QAR
code RON
code RSD
code RUB
code RWF
code SAR
code SBD
code SCR
code SDG
code SEK
code SGD
code SHP
code SLL
code SOS
code SRD
code STD
code STN
code SVC
code SYP
code SZL
code THB
code TJS
code TMT
code TND
code TOP
code TRY
code TTD
code TWD
code TZS
code UAH
code UGX
code USD
code USN
code UYI
code UYU
code UYW
code UZS
code VED
code VEF
code VES
code VND
code VUV
code WST
code XAG
code XAU
code XAF
code XBA
code XBB
code XBC
code XBD
code XCD
code XDR
code XOF
code XPD
code XPF
code XPT
code XSU
code XTS
code XUA
code XXX
code YER
code ZAR
code ZMK
code ZWL
code ZMW
code SSP
code NON_FIAT

Accounting Rates

Create Accounting Rates.

getAll (Accounting Rates)

Code samples

# You can also use wget
curl -X GET /currencies/{currencyCode}/accountingRates \
  -H 'Accept: application/vnd.mambu.v2+json'

GET /currencies/{currencyCode}/accountingRates HTTP/1.1

Accept: application/vnd.mambu.v2+json

var headers = {
  'Accept':'application/vnd.mambu.v2+json'

};

$.ajax({
  url: '/currencies/{currencyCode}/accountingRates',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/vnd.mambu.v2+json'
}

result = RestClient.get '/currencies/{currencyCode}/accountingRates',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/vnd.mambu.v2+json'
}

r = requests.get('/currencies/{currencyCode}/accountingRates', params={

}, headers = headers)

print r.json()

 'application/vnd.mambu.v2+json',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','/currencies/{currencyCode}/accountingRates', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("/currencies/{currencyCode}/accountingRates");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/vnd.mambu.v2+json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/currencies/{currencyCode}/accountingRates", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /currencies/{currencyCode}/accountingRates

Allows retrieval of Accounting Rates using various query parameters

Parameters

Name Type Description In
currencyCode (required) string The Code of Currency path
offset integer(int32) Pagination, index to start searching at when retrieving elements, used in combination with limit to paginate results query
limit integer(int32) Pagination, the number of elements to retrieve, used in combination with offset to paginate results query
paginationDetails string Flag specifying whether the pagination details should be provided in response headers. Please note that by default it is disabled (OFF), in order to improve the performance of the APIs query
from string(date-time) The date and time of the Accounting Rates to search from query
to string(date-time) The date and time of the Accounting Rates to search to query

Enumerated Values

Parameter Value
paginationDetails ON
paginationDetails OFF

Example responses

200 Response

[
  {
    "encodedKey": "string",
    "endDate": "2016-09-06T13:37:50+03:00",
    "fromCurrencyCode": "string",
    "rate": 0,
    "startDate": "2016-09-06T13:37:50+03:00",
    "toCurrencyCode": "string"
  }
]

Responses

Status Meaning Description Schema
200 OK Accounting Rates list retrieved Inline
400 Bad Request A Validation error occurred ErrorResponse
401 Unauthorized UNAUTHORIZED ErrorResponse
403 Forbidden Forbidden ErrorResponse
404 Not Found Currency not found ErrorResponse

Response Schema

Status Code 200

Name Type Description Restrictions
anonymous [AccountingRate] [Represents the conversion rate used in accounting to convert amounts from one currency to organisation currency] none
» encodedKey string The encoded key of the accounting rate, auto generated, unique read-only
» endDate string(date-time) Rate validity end date (as Organization Time) none
» fromCurrencyCode string Organisation currency code none
» rate number Value of rate to be used for accounting conversions none
» startDate string(date-time) Rate validity start date (as Organization Time) none
» toCurrencyCode string Foreign currency code none

Response Headers

Status Header Type Format Description
200 Items-Limit integer int32 Pagination details, the requested page size
200 Items-Offset integer int32 Pagination details, the index of the first returned item
200 Items-Total integer int32 Pagination details, the total available items

create (Accounting Rates)

Code samples

# You can also use wget
curl -X POST /currencies/{currencyCode}/accountingRates \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/vnd.mambu.v2+json' \
  -H 'Idempotency-Key: string'

POST /currencies/{currencyCode}/accountingRates HTTP/1.1

Content-Type: application/json
Accept: application/vnd.mambu.v2+json
Idempotency-Key: string

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/vnd.mambu.v2+json',
  'Idempotency-Key':'string'

};

$.ajax({
  url: '/currencies/{currencyCode}/accountingRates',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/vnd.mambu.v2+json',
  'Idempotency-Key' => 'string'
}

result = RestClient.post '/currencies/{currencyCode}/accountingRates',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/vnd.mambu.v2+json',
  'Idempotency-Key': 'string'
}

r = requests.post('/currencies/{currencyCode}/accountingRates', params={

}, headers = headers)

print r.json()

 'application/json',
    'Accept' => 'application/vnd.mambu.v2+json',
    'Idempotency-Key' => 'string',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','/currencies/{currencyCode}/accountingRates', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("/currencies/{currencyCode}/accountingRates");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/vnd.mambu.v2+json"},
        "Idempotency-Key": []string{"string"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "/currencies/{currencyCode}/accountingRates", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /currencies/{currencyCode}/accountingRates

Create Accounting Rates

Body parameter

{
  "rate": 0,
  "startDate": "2016-09-06T13:37:50+03:00"
}

Parameters

Name Type Description In
Idempotency-Key string Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. header
currencyCode (required) string The Code of Currency path
body (required) PostAccountingRateDTO Accounting Rate to be created body

Example responses

201 Response

{
  "encodedKey": "string",
  "endDate": "2016-09-06T13:37:50+03:00",
  "fromCurrencyCode": "string",
  "rate": 0,
  "startDate": "2016-09-06T13:37:50+03:00",
  "toCurrencyCode": "string"
}

Responses

Status Meaning Description Schema
102 Processing Your idempotent request was already submitted and is currently being processed, try again later. None
201 Created Accounting Rate Created AccountingRate
400 Bad Request A Validation error occurred ErrorResponse
401 Unauthorized UNAUTHORIZED ErrorResponse
403 Forbidden Forbidden ErrorResponse
404 Not Found Currency not found ErrorResponse

Accounting Reports

Allows you to generate and retrieve accounting reports. More information on the types of reports available can be found in our accounting reports user guide article.

Once generated using the POST request, your reports will be accessible for 24 hours using the unique reportKey.

get (Accounting Reports)

Code samples

# You can also use wget
curl -X GET /accounting/reports/{reportKey} \
  -H 'Accept: application/vnd.mambu.v2+json'

GET /accounting/reports/{reportKey} HTTP/1.1

Accept: application/vnd.mambu.v2+json

var headers = {
  'Accept':'application/vnd.mambu.v2+json'

};

$.ajax({
  url: '/accounting/reports/{reportKey}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/vnd.mambu.v2+json'
}

result = RestClient.get '/accounting/reports/{reportKey}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/vnd.mambu.v2+json'
}

r = requests.get('/accounting/reports/{reportKey}', params={

}, headers = headers)

print r.json()

 'application/vnd.mambu.v2+json',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','/accounting/reports/{reportKey}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("/accounting/reports/{reportKey}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/vnd.mambu.v2+json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/accounting/reports/{reportKey}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /accounting/reports/{reportKey}

Retrieve accounting report

Parameters

Name Type Description In
reportKey (required) string The encoded key of the report path

Example responses

200 Response

{
  "items": [
    {
      "amounts": {
        "closingBalance": 0,
        "credits": 0,
        "debits": 0,
        "netChange": 0,
        "openingBalance": 0
      },
      "foreignAmounts": {
        "closingBalance": 0,
        "credits": 0,
        "debits": 0,
        "netChange": 0,
        "openingBalance": 0
      },
      "glAccount": {
        "activated": true,
        "allowManualJournalEntries": true,
        "balance": 0,
        "creationDate": "2016-09-06T13:37:50+03:00",
        "currency": {
          "code": "AED",
          "currencyCode": "string"
        },
        "description": "string",
        "encodedKey": "string",
        "glCode": "string",
        "lastModifiedDate": "2016-09-06T13:37:50+03:00",
        "migrationEventKey": "string",
        "name": "string",
        "stripTrailingZeros": true,
        "type": "ASSET",
        "usage": "DETAIL"
      }
    }
  ],
  "reportKey": "string",
  "status": "QUEUED"
}

Responses

Status Meaning Description Schema
200 OK Accounting report retrieved AccountingReport
401 Unauthorized UNAUTHORIZED ErrorResponse
403 Forbidden Forbidden ErrorResponse
404 Not Found Report not found ErrorResponse

create (Accounting Reports)

Code samples

# You can also use wget
curl -X POST /accounting/reports \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/vnd.mambu.v2+json' \
  -H 'Idempotency-Key: string'

POST /accounting/reports HTTP/1.1

Content-Type: application/json
Accept: application/vnd.mambu.v2+json
Idempotency-Key: string

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/vnd.mambu.v2+json',
  'Idempotency-Key':'string'

};

$.ajax({
  url: '/accounting/reports',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/vnd.mambu.v2+json',
  'Idempotency-Key' => 'string'
}

result = RestClient.post '/accounting/reports',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/vnd.mambu.v2+json',
  'Idempotency-Key': 'string'
}

r = requests.post('/accounting/reports', params={

}, headers = headers)

print r.json()

 'application/json',
    'Accept' => 'application/vnd.mambu.v2+json',
    'Idempotency-Key' => 'string',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','/accounting/reports', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("/accounting/reports");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/vnd.mambu.v2+json"},
        "Idempotency-Key": []string{"string"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "/accounting/reports", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /accounting/reports

Generate accounting report

Body parameter

{
  "balanceTypes": [
    "OPENING_BALANCE"
  ],
  "branchId": "string",
  "currencyCode": "string",
  "endDate": "1987-04-26",
  "glTypes": [
    "ASSET"
  ],
  "startDate": "1987-04-26"
}

Parameters

Name Type Description In
Idempotency-Key string Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. header
body (required) AccountingReportGenerationInput Input for accounting report generation to be started body

Example responses

202 Response

{
  "reportKey": "string",
  "status": "QUEUED"
}

Responses

Status Meaning Description Schema
102 Processing Your idempotent request was already submitted and is currently being processed, try again later. None
202 Accepted Accounting report generation started AccountingReportGenerationResponse
400 Bad Request A Validation error occurred ErrorResponse
401 Unauthorized UNAUTHORIZED ErrorResponse
403 Forbidden Forbidden ErrorResponse
404 Not Found Currency not found ErrorResponse

Accounting Rules Configuration

Retrieve and update the configuration for accounting rules.

Accounting rules allows you to create general rules for your accounts such as setting automatic accounting closures that recur on a regular basis and defining rules for how to handle any transactions that affect GL balances in two different branches. For more information about this resource, see Accounting Rules Configuration in our User Guide.

get (Accounting Rules Configuration)

Code samples

# You can also use wget
curl -X GET /configuration/accountingrules.yaml \
  -H 'Accept: application/vnd.mambu.v2+yaml'

GET /configuration/accountingrules.yaml HTTP/1.1

Accept: application/vnd.mambu.v2+yaml

var headers = {
  'Accept':'application/vnd.mambu.v2+yaml'

};

$.ajax({
  url: '/configuration/accountingrules.yaml',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/vnd.mambu.v2+yaml'
}

result = RestClient.get '/configuration/accountingrules.yaml',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/vnd.mambu.v2+yaml'
}

r = requests.get('/configuration/accountingrules.yaml', params={

}, headers = headers)

print r.json()

 'application/vnd.mambu.v2+yaml',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','/configuration/accountingrules.yaml', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("/configuration/accountingrules.yaml");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/vnd.mambu.v2+yaml"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/configuration/accountingrules.yaml", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /configuration/accountingrules.yaml

Retrieve current accounting rules configuration.

Example responses

An example of accounting rules

---
defaultGlCode: "defaultGlAccountCode"
automatedAccountingClosuresInterval: 7
customRules:
  - id: "ruleId1"
    leftBranchId: "branchId1"
    rightBranchId: "branchId2"
    glCode: "glCode1"
  - id: "ruleId2"
    leftBranchId: "branchId3"
    rightBranchId: "branchId1"
    glCode: "glCode2"

401 invalid credentials

{
    "errors": [
        {
            "errorCode": 2,
            "errorSource": "credentials",
            "errorReason": "INVALID_CREDENTIALS"
        }
    ]
}

403 forbidden

{
    "errors": [
        {
            "errorCode": 15,
            "errorSource": "not authorized",
            "errorReason": "INVALID_PERMISSIONS"
        }
    ]
}

Responses

Status Meaning Description Schema
200 OK Accounting rules configuration retrieved AccountingRulesConfiguration
401 Unauthorized UNAUTHORIZED ErrorResponse
403 Forbidden Forbidden ErrorResponse

update (Accounting Rules Configuration)

Code samples

# You can also use wget
curl -X PUT /configuration/accountingrules.yaml \
  -H 'Content-Type: application/yaml' \
  -H 'Accept: application/vnd.mambu.v2+yaml'

PUT /configuration/accountingrules.yaml HTTP/1.1

Content-Type: application/yaml
Accept: application/vnd.mambu.v2+yaml

var headers = {
  'Content-Type':'application/yaml',
  'Accept':'application/vnd.mambu.v2+yaml'

};

$.ajax({
  url: '/configuration/accountingrules.yaml',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/yaml',
  'Accept' => 'application/vnd.mambu.v2+yaml'
}

result = RestClient.put '/configuration/accountingrules.yaml',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/yaml',
  'Accept': 'application/vnd.mambu.v2+yaml'
}

r = requests.put('/configuration/accountingrules.yaml', params={

}, headers = headers)

print r.json()

 'application/yaml',
    'Accept' => 'application/vnd.mambu.v2+yaml',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PUT','/configuration/accountingrules.yaml', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("/configuration/accountingrules.yaml");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/yaml"},
        "Accept": []string{"application/vnd.mambu.v2+yaml"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "/configuration/accountingrules.yaml", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PUT /configuration/accountingrules.yaml

Update the current accounting rules configuration

Body parameter

An example of accounting rules

---
defaultGlCode: "defaultGlAccountCode"
automatedAccountingClosuresInterval: 7
customRules:
  - id: "ruleId1"
    leftBranchId: "branchId1"
    rightBranchId: "branchId2"
    glCode: "glCode1"
  - id: "ruleId2"
    leftBranchId: "branchId3"
    rightBranchId: "branchId1"
    glCode: "glCode2"

Parameters

Name Type Description In
body AccountingRulesConfiguration Representation of the accounting rules configuration body

Example responses

200 - Success Response

---
warnings: []

400 Invalid Syntax

{
    "errors": [
        {
            "errorCode": 10000,
            "errorSource": "customRules: while scanning a simple key",
            "errorReason": "INVALID_YAML_SYNTAX"
        }
    ]
}

401 invalid credentials

{
    "errors": [
        {
            "errorCode": 2,
            "errorSource": "credentials",
            "errorReason": "INVALID_CREDENTIALS"
        }
    ]
}

403 forbidden

{
    "errors": [
        {
            "errorCode": 15,
            "errorSource": "not authorized",
            "errorReason": "INVALID_PERMISSIONS"
        }
    ]
}

404 not found

{
    "errors": [
        {
            "errorCode": 3,
            "errorSource": "server",
            "errorReason": "INVALID_API_OPERATION"
        }
    ]
}

Responses

Status Meaning Description Schema
200 OK Accounting rules configuration updated. None
400 Bad Request A Validation error occurred ErrorResponse
401 Unauthorized UNAUTHORIZED ErrorResponse
403 Forbidden Forbidden ErrorResponse
404 Not Found Accounting rules configuration not found. ErrorResponse

Response Schema

API Consumers

API consumers are used to generate API keys and secret keys for your Mambu account. They are an abstraction similar to an OAuth client.

API keys are used to authenticate API requests. They inherit the scope of access settings from the API consumer that creates them. The API consumer access settings determine which capabilities an API key may access and which actions it may authorize. For more information on how to manage or assign these permissions, see API consumer access settings and permissions in our User Guide.

Secret keys are used to authenticate API key rotation requests, which allow you to invalidate existing API keys and replace them with new ones.

For more information about API consumers and API keys, see API Consumers in our User Guide.

rotateKey (API Consumers)

Code samples

# You can also use wget
curl -X POST /apikey/rotation \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/vnd.mambu.v2+json' \
  -H 'secretkey: string'

POST /apikey/rotation HTTP/1.1

Content-Type: application/json
Accept: application/vnd.mambu.v2+json
secretkey: string

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/vnd.mambu.v2+json',
  'secretkey':'string'

};

$.ajax({
  url: '/apikey/rotation',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/vnd.mambu.v2+json',
  'secretkey' => 'string'
}

result = RestClient.post '/apikey/rotation',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/vnd.mambu.v2+json',
  'secretkey': 'string'
}

r = requests.post('/apikey/rotation', params={

}, headers = headers)

print r.json()

 'application/json',
    'Accept' => 'application/vnd.mambu.v2+json',
    'secretkey' => 'string',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','/apikey/rotation', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("/apikey/rotation");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/vnd.mambu.v2+json"},
        "secretkey": []string{"string"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "/apikey/rotation", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /apikey/rotation

Rotates an API key using a secret key for authentication. The request will fail if you include an API key or basic authentication header.

API key rotation allows you to invalidate an existing API key and replace it with a new one. If you have set a value for the Automatic Expiry of API Consumer Key in Mambu UI then the value specified in the Mambu UI will override any value you include in the body of your request to the expirationTime field. For more information, see API key rotation in our User Guide.

Keys that have been invalidated by rotation remain valid for a default grace period of thirty minutes. This value can be configured using the API Key Rotation Grace Period field in the Mambu UI. For more information, see Key rotation grace period in our User Guide.

Body parameter

{
  "apiKey": "string",
  "expirationTime": 100000000,
  "id": "string"
}

Parameters

Name Type Description In
secretkey (required) string Secret key used to authenticate to this endpoint in order to perform a rotate key operation header
body ApiKey Represents the action of rotating an existing apikey, by providing the apikey to be rotated and the TTL (time to live) of the newly created apikey. If a TTL is set in Preferences, it will have priority over the one provided in the API. If no TTL is set in Preferences and none is provided in the API, the generated key will have unlimited TTL by default. body

Example responses

200 Response

{
  "apiKey": "string",
  "secretKey": "string"
}

Responses

Status Meaning Description Schema
200 OK Api key rotated successfully. ApiKeyRotationResult
400 Bad Request A Validation error occurred ErrorResponse
401 Unauthorized UNAUTHORIZED ErrorResponse
403 Forbidden Forbidden ErrorResponse

getById (API Consumers)

Code samples

# You can also use wget
curl -X GET /consumers/{apiConsumerId} \
  -H 'Accept: application/vnd.mambu.v2+json'

GET /consumers/{apiConsumerId} HTTP/1.1

Accept: application/vnd.mambu.v2+json

var headers = {
  'Accept':'application/vnd.mambu.v2+json'

};

$.ajax({
  url: '/consumers/{apiConsumerId}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/vnd.mambu.v2+json'
}

result = RestClient.get '/consumers/{apiConsumerId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/vnd.mambu.v2+json'
}

r = requests.get('/consumers/{apiConsumerId}', params={

}, headers = headers)

print r.json()

 'application/vnd.mambu.v2+json',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','/consumers/{apiConsumerId}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("/consumers/{apiConsumerId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/vnd.mambu.v2+json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/consumers/{apiConsumerId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /consumers/{apiConsumerId}

Gets a single API consumer by ID or encoded key.

Parameters

Name Type Description In
apiConsumerId (required) string The id or encoded key of the API Consumer path

Example responses

200 Response

{
  "access": {
    "administratorAccess": true,
    "apiAccess": true,
    "canManageAllBranches": true,
    "canManageEntitiesAssignedToOtherOfficers": true,
    "creditOfficerAccess": true,
    "managedBranches": [
      {
        "branchKey": "string"
      }
    ],
    "permissions": [
      "AUDIT_TRANSACTIONS"
    ]
  },
  "assignedBranchKey": "string",
  "creationDate": "2016-09-06T13:37:50+03:00",
  "encodedKey": "string",
  "id": "string",
  "lastModifiedDate": "2016-09-06T13:37:50+03:00",
  "name": "string",
  "role": {
    "encodedKey": "string",
    "id": "string"
  },
  "transactionLimits": {
    "property1": 0,
    "property2": 0
  },
  "type": "STREAMING_API"
}

Responses

Status Meaning Description Schema
200 OK API Consumer retrieved ApiConsumer
400 Bad Request A Validation error occurred ErrorResponse
401 Unauthorized UNAUTHORIZED ErrorResponse
403 Forbidden Forbidden ErrorResponse
404 Not Found API Consumer not found ErrorResponse

update (API Consumers)

Code samples

# You can also use wget
curl -X PUT /consumers/{apiConsumerId} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/vnd.mambu.v2+json' \
  -H 'Idempotency-Key: string'

PUT /consumers/{apiConsumerId} HTTP/1.1

Content-Type: application/json
Accept: application/vnd.mambu.v2+json
Idempotency-Key: string

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/vnd.mambu.v2+json',
  'Idempotency-Key':'string'

};

$.ajax({
  url: '/consumers/{apiConsumerId}',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/vnd.mambu.v2+json',
  'Idempotency-Key' => 'string'
}

result = RestClient.put '/consumers/{apiConsumerId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/vnd.mambu.v2+json',
  'Idempotency-Key': 'string'
}

r = requests.put('/consumers/{apiConsumerId}', params={

}, headers = headers)

print r.json()

 'application/json',
    'Accept' => 'application/vnd.mambu.v2+json',
    'Idempotency-Key' => 'string',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PUT','/consumers/{apiConsumerId}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("/consumers/{apiConsumerId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/vnd.mambu.v2+json"},
        "Idempotency-Key": []string{"string"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "/consumers/{apiConsumerId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PUT /consumers/{apiConsumerId}

Updates an existing API consumer.

Body parameter

{
  "access": {
    "administratorAccess": true,
    "canManageAllBranches": true,
    "canManageEntitiesAssignedToOtherOfficers": true,
    "creditOfficerAccess": true,
    "managedBranches": [
      {}
    ],
    "permissions": [
      "AUDIT_TRANSACTIONS"
    ]
  },
  "assignedBranchKey": "string",
  "name": "string",
  "role": {
    "id": "string"
  },
  "transactionLimits": {
    "property1": 0,
    "property2": 0
  },
  "type": "STREAMING_API"
}

Parameters

Name Type Description In
apiConsumerId (required) string The id or encoded key of the API Consumer to be updated path
Idempotency-Key string Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. header
body (required) ApiConsumer API Consumer to be updated body

Example responses

200 Response

{
  "access": {
    "administratorAccess": true,
    "apiAccess": true,
    "canManageAllBranches": true,
    "canManageEntitiesAssignedToOtherOfficers": true,
    "creditOfficerAccess": true,
    "managedBranches": [
      {
        "branchKey": "string"
      }
    ],
    "permissions": [
      "AUDIT_TRANSACTIONS"
    ]
  },
  "assignedBranchKey": "string",
  "creationDate": "2016-09-06T13:37:50+03:00",
  "encodedKey": "string",
  "id": "string",
  "lastModifiedDate": "2016-09-06T13:37:50+03:00",
  "name": "string",
  "role": {
    "encodedKey": "string",
    "id": "string"
  },
  "transactionLimits": {
    "property1": 0,
    "property2": 0
  },
  "type": "STREAMING_API"
}

Responses

Status Meaning Description Schema
102 Processing Your idempotent request was already submitted and is currently being processed, try again later. None
200 OK API Consumer updated ApiConsumer
400 Bad Request A Validation error occurred ErrorResponse
401 Unauthorized UNAUTHORIZED ErrorResponse
403 Forbidden Forbidden ErrorResponse
404 Not Found API Consumer not found ErrorResponse

delete (API Consumers)

Code samples

# You can also use wget
curl -X DELETE /consumers/{apiConsumerId} \
  -H 'Accept: application/vnd.mambu.v2+json'

DELETE /consumers/{apiConsumerId} HTTP/1.1

Accept: application/vnd.mambu.v2+json

var headers = {
  'Accept':'application/vnd.mambu.v2+json'

};

$.ajax({
  url: '/consumers/{apiConsumerId}',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/vnd.mambu.v2+json'
}

result = RestClient.delete '/consumers/{apiConsumerId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/vnd.mambu.v2+json'
}

r = requests.delete('/consumers/{apiConsumerId}', params={

}, headers = headers)

print r.json()

 'application/vnd.mambu.v2+json',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('DELETE','/consumers/{apiConsumerId}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("/consumers/{apiConsumerId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/vnd.mambu.v2+json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "/consumers/{apiConsumerId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /consumers/{apiConsumerId}

Deletes an existing API consumer.

Parameters

Name Type Description In
apiConsumerId (required) string The id or encoded key of the API Consumer to be deleted path

Example responses

400 Response

{
  "errors": [
    {
      "errorCode": 0,
      "errorReason": "SUCCESS",
      "errorSource": "string"
    }
  ]
}

Responses

Status Meaning Description Schema
204 No Content API Consumer deleted None
400 Bad Request A Validation error occurred ErrorResponse
401 Unauthorized UNAUTHORIZED ErrorResponse
403 Forbidden Forbidden ErrorResponse
404 Not Found API Consumer not found ErrorResponse

patch (API Consumers)

Code samples

# You can also use wget
curl -X PATCH /consumers/{apiConsumerId} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/vnd.mambu.v2+json' \
  -H 'Idempotency-Key: string'

PATCH /consumers/{apiConsumerId} HTTP/1.1

Content-Type: application/json
Accept: application/vnd.mambu.v2+json
Idempotency-Key: string

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/vnd.mambu.v2+json',
  'Idempotency-Key':'string'

};

$.ajax({
  url: '/consumers/{apiConsumerId}',
  method: 'patch',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/vnd.mambu.v2+json',
  'Idempotency-Key' => 'string'
}

result = RestClient.patch '/consumers/{apiConsumerId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/vnd.mambu.v2+json',
  'Idempotency-Key': 'string'
}

r = requests.patch('/consumers/{apiConsumerId}', params={

}, headers = headers)

print r.json()

 'application/json',
    'Accept' => 'application/vnd.mambu.v2+json',
    'Idempotency-Key' => 'string',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PATCH','/consumers/{apiConsumerId}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("/consumers/{apiConsumerId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PATCH");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/vnd.mambu.v2+json"},
        "Idempotency-Key": []string{"string"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PATCH", "/consumers/{apiConsumerId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PATCH /consumers/{apiConsumerId}

Partially updates an API consumer.

Body parameter

[
  {
    "from": "string",
    "op": "ADD",
    "path": "string",
    "value": {}
  }
]

Parameters

Name Type Description In
apiConsumerId (required) string The id or encoded key of the API Consumer to be updated path
Idempotency-Key string Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. header
body (required) PatchOperation Patch operations to be applied to a resource body

Example responses

400 Response

{
  "errors": [
    {
      "errorCode": 0,
      "errorReason": "SUCCESS",
      "errorSource": "string"
    }
  ]
}

Responses

Status Meaning Description Schema
204 No Content API Consumer updated None
400 Bad Request A Validation error occurred ErrorResponse
401 Unauthorized UNAUTHORIZED ErrorResponse
403 Forbidden Forbidden ErrorResponse
404 Not Found API Consumer not found ErrorResponse

deleteApiKeyForConsumer (API Consumers)

Code samples

# You can also use wget
curl -X DELETE /consumers/{apiConsumerId}/apikeys/{apiKeyId} \
  -H 'Accept: application/vnd.mambu.v2+json'

DELETE /consumers/{apiConsumerId}/apikeys/{apiKeyId} HTTP/1.1

Accept: application/vnd.mambu.v2+json

var headers = {
  'Accept':'application/vnd.mambu.v2+json'

};

$.ajax({
  url: '/consumers/{apiConsumerId}/apikeys/{apiKeyId}',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/vnd.mambu.v2+json'
}

result = RestClient.delete '/consumers/{apiConsumerId}/apikeys/{apiKeyId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/vnd.mambu.v2+json'
}

r = requests.delete('/consumers/{apiConsumerId}/apikeys/{apiKeyId}', params={

}, headers = headers)

print r.json()

 'application/vnd.mambu.v2+json',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('DELETE','/consumers/{apiConsumerId}/apikeys/{apiKeyId}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("/consumers/{apiConsumerId}/apikeys/{apiKeyId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/vnd.mambu.v2+json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "/consumers/{apiConsumerId}/apikeys/{apiKeyId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /consumers/{apiConsumerId}/apikeys/{apiKeyId}

Deletes an API key by its ID.

Parameters

Name Type Description In
apiConsumerId (required) string The id or encoded key of the API Consumer path
apiKeyId (required) string The id of the API key. path

Example responses

400 Response

{
  "errors": [
    {
      "errorCode": 0,
      "errorReason": "SUCCESS",
      "errorSource": "string"
    }
  ]
}

Responses

Status Meaning Description Schema
204 No Content API key deleted. None
400 Bad Request A Validation error occurred ErrorResponse
401 Unauthorized UNAUTHORIZED ErrorResponse
403 Forbidden Forbidden ErrorResponse
404 Not Found API Consumer or key not found ErrorResponse

getApiKeysByConsumerId (API Consumers)

Code samples

# You can also use wget
curl -X GET /consumers/{apiConsumerId}/apikeys \
  -H 'Accept: application/vnd.mambu.v2+json'

GET /consumers/{apiConsumerId}/apikeys HTTP/1.1

Accept: application/vnd.mambu.v2+json

var headers = {
  'Accept':'application/vnd.mambu.v2+json'

};

$.ajax({
  url: '/consumers/{apiConsumerId}/apikeys',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/vnd.mambu.v2+json'
}

result = RestClient.get '/consumers/{apiConsumerId}/apikeys',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/vnd.mambu.v2+json'
}

r = requests.get('/consumers/{apiConsumerId}/apikeys', params={

}, headers = headers)

print r.json()

 'application/vnd.mambu.v2+json',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','/consumers/{apiConsumerId}/apikeys', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("/consumers/{apiConsumerId}/apikeys");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/vnd.mambu.v2+json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/consumers/{apiConsumerId}/apikeys", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /consumers/{apiConsumerId}/apikeys

Gets the API keys of an API consumer.

Parameters

Name Type Description In
apiConsumerId (required) string The id or encoded key of the API Consumer path

Example responses

200 Response

[
  {
    "apiKey": "string",
    "expirationTime": 100000000,
    "id": "string"
  }
]

Responses

Status Meaning Description Schema
200 OK API Keys retrieved Inline
400 Bad Request A Validation error occurred ErrorResponse
401 Unauthorized UNAUTHORIZED ErrorResponse
403 Forbidden Forbidden ErrorResponse
404 Not Found API Consumer not found ErrorResponse

Response Schema

Status Code 200

Name Type Description Restrictions
anonymous [ApiKey] [Representation of an API Consumer's API Key] none
» apiKey string The api key none
» expirationTime integer(int32) The time to live for the rotated key none
» id string The api key ID none

createApiKeyForConsumer (API Consumers)

Code samples

# You can also use wget
curl -X POST /consumers/{apiConsumerId}/apikeys \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/vnd.mambu.v2+json' \
  -H 'Idempotency-Key: string'

POST /consumers/{apiConsumerId}/apikeys HTTP/1.1

Content-Type: application/json
Accept: application/vnd.mambu.v2+json
Idempotency-Key: string

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/vnd.mambu.v2+json',
  'Idempotency-Key':'string'

};

$.ajax({
  url: '/consumers/{apiConsumerId}/apikeys',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/vnd.mambu.v2+json',
  'Idempotency-Key' => 'string'
}

result = RestClient.post '/consumers/{apiConsumerId}/apikeys',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/vnd.mambu.v2+json',
  'Idempotency-Key': 'string'
}

r = requests.post('/consumers/{apiConsumerId}/apikeys', params={

}, headers = headers)

print r.json()

 'application/json',
    'Accept' => 'application/vnd.mambu.v2+json',
    'Idempotency-Key' => 'string',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','/consumers/{apiConsumerId}/apikeys', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("/consumers/{apiConsumerId}/apikeys");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/vnd.mambu.v2+json"},
        "Idempotency-Key": []string{"string"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "/consumers/{apiConsumerId}/apikeys", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /consumers/{apiConsumerId}/apikeys

Creates a new API key for an API consumer.

The Automatic Expiry of API Consumer Keys value in the Mambu UI does not affect the expiration time of an API key created by this endpoint. For more information, see Automatic API key expiration for rotated keys in our User Guide. If you do not specify an expiration time in your request then the API key does not expire, unless rotated or deleted.

Body parameter

{
  "expirationTime": 100000000
}

Parameters

Name Type Description In
apiConsumerId (required) string The id or encoded key of the API Consumer path
Idempotency-Key string Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. header
body ApiKeyInput API key expiration time in seconds. body

Example responses

201 Response

{
  "apiKey": "string",
  "expirationTime": 100000000,
  "id": "string"
}

Responses

Status Meaning Description Schema
102 Processing Your idempotent request was already submitted and is currently being processed, try again later. None
201 Created API key created. ApiKey
400 Bad Request A Validation error occurred ErrorResponse
401 Unauthorized UNAUTHORIZED ErrorResponse
403 Forbidden Forbidden ErrorResponse
404 Not Found API Consumer not found ErrorResponse

getAll (API Consumers)

Code samples

# You can also use wget
curl -X GET /consumers \
  -H 'Accept: application/vnd.mambu.v2+json'

GET /consumers HTTP/1.1

Accept: application/vnd.mambu.v2+json

var headers = {
  'Accept':'application/vnd.mambu.v2+json'

};

$.ajax({
  url: '/consumers',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/vnd.mambu.v2+json'
}

result = RestClient.get '/consumers',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/vnd.mambu.v2+json'
}

r = requests.get('/consumers', params={

}, headers = headers)

print r.json()

 'application/vnd.mambu.v2+json',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','/consumers', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("/consumers");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/vnd.mambu.v2+json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/consumers", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /consumers

Gets all API consumers. You can retrieve by type.

Parameters

Name Type Description In
offset integer(int32) Pagination, index to start searching at when retrieving elements, used in combination with limit to paginate results query
limit integer(int32) Pagination, the number of elements to retrieve, used in combination with offset to paginate results query
paginationDetails string Flag specifying whether the pagination details should be provided in response headers. Please note that by default it is disabled (OFF), in order to improve the performance of the APIs query
type string The type of API Consumer to search by query

Enumerated Values

Parameter Value
paginationDetails ON
paginationDetails OFF
type STREAMING_API
type AUDIT_TRAIL
type PAYMENTS
type MAMBU_API

Example responses

200 Response

[
  {
    "access": {
      "administratorAccess": true,
      "apiAccess": true,
      "canManageAllBranches": true,
      "canManageEntitiesAssignedToOtherOfficers": true,
      "creditOfficerAccess": true,
      "managedBranches": [
        {
          "branchKey": "string"
        }
      ],
      "permissions": [
        "AUDIT_TRANSACTIONS"
      ]
    },
    "assignedBranchKey": "string",
    "creationDate": "2016-09-06T13:37:50+03:00",
    "encodedKey": "string",
    "id": "string",
    "lastModifiedDate": "2016-09-06T13:37:50+03:00",
    "name": "string",
    "role": {
      "encodedKey": "string",
      "id": "string"
    },
    "transactionLimits": {
      "property1": 0,
      "property2": 0
    },
    "type": "STREAMING_API"
  }
]

Responses

Status Meaning Description Schema
200 OK API Consumers list retrieved Inline
400 Bad Request A Validation error occurred ErrorResponse
401 Unauthorized UNAUTHORIZED ErrorResponse
403 Forbidden Forbidden ErrorResponse

Response Schema

Status Code 200

Name Type Description Restrictions
anonymous [ApiConsumer] [Api Consumer containing keys that can be used to access mambu API] none
» access ApiConsumerAccess Wrapper containing the available API Consumer permissions and access rights none
»» administratorAccess boolean Whether the API Consumer is an administrator in Mambu. The administrators in mambu are having full permissions for all entities and for Mambu settings. none
»» apiAccess boolean API access allows the API Consumer to authenticate and interact with Mambu using Mambu's APIs, this means that most of the time such an API Consumer is not an actual person, but a piece of software that is programmed to interact with Mambu. The API API Consumer would still require the right API Consumer permissions, depending on what it is required to do in the system, and transactions posted by that API Consumer are kept in the logs in the same way as API Consumer actions from regular users. read-only
»» canManageAllBranches boolean Whether the API Consumer permissions apply to all branches or only for some branches none
»» canManageEntitiesAssignedToOtherOfficers boolean Flag specific to Credit Officers determining the access to entities assigned to other Credit Officers (eg clients, accounts) none
»» creditOfficerAccess boolean Whether the API Consumer is a credit officer or not. Credit Officers have the option of having clients and groups assigned to them, this relationship allows for better reporting and client management. none
»» managedBranches [UserManagedBranch] The list of branches that can be managed by current API Consumer. If the API Consumer has the canManageAllBranches true, this list is not taken in consideration. none
»»» branchKey string The encoded key of the branch, generated read-only
»» permissions [string] Permissions for the API Consumer. The non-admin users are authorized to do actions based a set of permissions in order to access Mambu features. Note that not all this permissions are used for validating API calls, some are used only for UI validations none
» assignedBranchKey string The encoded key of the branch this Api Consumer is assigned to. none
» creationDate string(date-time) Date when the Api Consumer was created, as UTC read-only
» encodedKey string The encoded key of the entity, generated, globally unique read-only
» id string Id of the Api Consumer read-only
» lastModifiedDate string(date-time) The last time Api Consumer was modified, as UTC read-only
» name (required) string Api Consumer name none
» role RoleIdentifier The user role identifier none
»» encodedKey string The encoded key of the entity, generated, globally unique read-only
»» id string Id of the role, unique, can be generated and customized none
» transactionLimits object Map of specifying Api Consumer transaction limits. none
»» additionalProperties integer(int32) none none
» type string This field is deprecated. Consumer types do not need to be specified anymore and will be removed soon. none

Enumerated Values

Property Value
type STREAMING_API
type AUDIT_TRAIL
type PAYMENTS
type MAMBU_API
type CARDS_CAPABILITY
type NOTIFICATIONS

Response Headers

Status Header Type Format Description
200 Items-Limit integer int32 Pagination details, the requested page size
200 Items-Offset integer int32 Pagination details, the index of the first returned item
200 Items-Total integer int32 Pagination details, the total available items

create (API Consumers)

Code samples

# You can also use wget
curl -X POST /consumers \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/vnd.mambu.v2+json' \
  -H 'Idempotency-Key: string'

POST /consumers HTTP/1.1

Content-Type: application/json
Accept: application/vnd.mambu.v2+json
Idempotency-Key: string

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/vnd.mambu.v2+json',
  'Idempotency-Key':'string'

};

$.ajax({
  url: '/consumers',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/vnd.mambu.v2+json',
  'Idempotency-Key' => 'string'
}

result = RestClient.post '/consumers',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/vnd.mambu.v2+json',
  'Idempotency-Key': 'string'
}

r = requests.post('/consumers', params={

}, headers = headers)

print r.json()

 'application/json',
    'Accept' => 'application/vnd.mambu.v2+json',
    'Idempotency-Key' => 'string',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','/consumers', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("/consumers");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/vnd.mambu.v2+json"},
        "Idempotency-Key": []string{"string"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "/consumers", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /consumers

Creates a new API consumer.

Body parameter

{
  "access": {
    "administratorAccess": true,
    "canManageAllBranches": true,
    "canManageEntitiesAssignedToOtherOfficers": true,
    "creditOfficerAccess": true,
    "managedBranches": [
      {}
    ],
    "permissions": [
      "AUDIT_TRANSACTIONS"
    ]
  },
  "assignedBranchKey": "string",
  "name": "string",
  "role": {
    "id": "string"
  },
  "transactionLimits": {
    "property1": 0,
    "property2": 0
  },
  "type": "STREAMING_API"
}

Parameters

Name Type Description In
Idempotency-Key string Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. header
body (required) ApiConsumer API Consumer to be created body

Example responses

201 Response

{
  "access": {
    "administratorAccess": true,
    "apiAccess": true,
    "canManageAllBranches": true,
    "canManageEntitiesAssignedToOtherOfficers": true,
    "creditOfficerAccess": true,
    "managedBranches": [
      {
        "branchKey": "string"
      }
    ],
    "permissions": [
      "AUDIT_TRANSACTIONS"
    ]
  },
  "assignedBranchKey": "string",
  "creationDate": "2016-09-06T13:37:50+03:00",
  "encodedKey": "string",
  "id": "string",
  "lastModifiedDate": "2016-09-06T13:37:50+03:00",
  "name": "string",
  "role": {
    "encodedKey": "string",
    "id": "string"
  },
  "transactionLimits": {
    "property1": 0,
    "property2": 0
  },
  "type": "STREAMING_API"
}

Responses

Status Meaning Description Schema
102 Processing Your idempotent request was already submitted and is currently being processed, try again later. None
201 Created API Consumer created ApiConsumer
400 Bad Request A Validation error occurred ErrorResponse
401 Unauthorized UNAUTHORIZED ErrorResponse
403 Forbidden Forbidden ErrorResponse

getKeysByConsumerId (API Consumers)

Code samples

# You can also use wget
curl -X GET /consumers/{apiConsumerId}/keys \
  -H 'Accept: application/vnd.mambu.v2+json'

GET /consumers/{apiConsumerId}/keys HTTP/1.1

Accept: application/vnd.mambu.v2+json

var headers = {
  'Accept':'application/vnd.mambu.v2+json'

};

$.ajax({
  url: '/consumers/{apiConsumerId}/keys',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/vnd.mambu.v2+json'
}

result = RestClient.get '/consumers/{apiConsumerId}/keys',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/vnd.mambu.v2+json'
}

r = requests.get('/consumers/{apiConsumerId}/keys', params={

}, headers = headers)

print r.json()

 'application/vnd.mambu.v2+json',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','/consumers/{apiConsumerId}/keys', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("/consumers/{apiConsumerId}/keys");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/vnd.mambu.v2+json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/consumers/{apiConsumerId}/keys", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /consumers/{apiConsumerId}/keys

Allows retrieval of the API Keys of an API Consumer

Parameters

Name Type Description In
apiConsumerId (required) string The id or encoded key of the API Consumer path

Example responses

200 Response

[
  {
    "apiKey": "string",
    "expirationTime": 100000000,
    "id": "string"
  }
]

Responses

Status Meaning Description Schema
200 OK API Keys retrieved Inline
400 Bad Request A Validation error occurred ErrorResponse
401 Unauthorized UNAUTHORIZED ErrorResponse
403 Forbidden Forbidden ErrorResponse
404 Not Found API Consumer not found ErrorResponse

Response Schema

Status Code 200

Name Type Description Restrictions
anonymous [ApiKey] [Representation of an API Consumer's API Key] none
» apiKey string The api key none
» expirationTime integer(int32) The time to live for the rotated key none
» id string The api key ID none

createSecretKeyForConsumer (API Consumers)

Code samples

# You can also use wget
curl -X POST /consumers/{apiConsumerId}/secretkeys \
  -H 'Accept: application/vnd.mambu.v2+json' \
  -H 'Idempotency-Key: string'

POST /consumers/{apiConsumerId}/secretkeys HTTP/1.1

Accept: application/vnd.mambu.v2+json
Idempotency-Key: string

var headers = {
  'Accept':'application/vnd.mambu.v2+json',
  'Idempotency-Key':'string'

};

$.ajax({
  url: '/consumers/{apiConsumerId}/secretkeys',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/vnd.mambu.v2+json',
  'Idempotency-Key' => 'string'
}

result = RestClient.post '/consumers/{apiConsumerId}/secretkeys',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/vnd.mambu.v2+json',
  'Idempotency-Key': 'string'
}

r = requests.post('/consumers/{apiConsumerId}/secretkeys', params={

}, headers = headers)

print r.json()

 'application/vnd.mambu.v2+json',
    'Idempotency-Key' => 'string',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','/consumers/{apiConsumerId}/secretkeys', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("/consumers/{apiConsumerId}/secretkeys");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/vnd.mambu.v2+json"},
        "Idempotency-Key": []string{"string"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "/consumers/{apiConsumerId}/secretkeys", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /consumers/{apiConsumerId}/secretkeys

Creates a new secret key for an API consumer.

Secret keys are used to authenticate API key rotation requests. They cannot be used to authenticate any request other than a key rotation request. Secret keys expire immediately upon use, unless a grace period is configured for key rotation in the Mambu UI, in which case they remain valid for that length of time after being used. Secret keys otherwise never expire. For more information, see API key rotation in our User Guide.

Parameters

Name Type Description In
apiConsumerId (required) string The id or encoded key of the API Consumer path
Idempotency-Key string Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. header

Example responses

201 Response

{
  "secretKey": "string"
}

Responses

Status Meaning Description Schema
102 Processing Your idempotent request was already submitted and is currently being processed, try again later. None
201 Created Secret key created. SecretKey
400 Bad Request A Validation error occurred ErrorResponse
401 Unauthorized UNAUTHORIZED ErrorResponse
403 Forbidden Forbidden ErrorResponse
404 Not Found API Consumer not found ErrorResponse

Authorization Holds Configuration

Retrieve and update the configuration for authorization holds.

An authorization hold is a standard practice with debit or a credit card transactions to hold a given balance as unavailable for the card holder until either the merchant settles the transaction, cancels the hold, or it expires. Using this endpoint you can configure the default authorization hold expiry for your organization as well as per merchant or merchant type using a Merchant Category Code (MCC). For more information about this resource, see Authorization Holds Configuration in our User Guide.

get (Authorization Holds Configuration)

Code samples

# You can also use wget
curl -X GET /configuration/authorizationholds.yaml \
  -H 'Accept: application/vnd.mambu.v2+yaml'

GET /configuration/authorizationholds.yaml HTTP/1.1

Accept: application/vnd.mambu.v2+yaml

var headers = {
  'Accept':'application/vnd.mambu.v2+yaml'

};

$.ajax({
  url: '/configuration/authorizationholds.yaml',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/vnd.mambu.v2+yaml'
}

result = RestClient.get '/configuration/authorizationholds.yaml',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/vnd.mambu.v2+yaml'
}

r = requests.get('/configuration/authorizationholds.yaml', params={

}, headers = headers)

print r.json()

 'application/vnd.mambu.v2+yaml',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','/configuration/authorizationholds.yaml', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("/configuration/authorizationholds.yaml");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/vnd.mambu.v2+yaml"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/configuration/authorizationholds.yaml", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /configuration/authorizationholds.yaml

Retrieve authorization holds configuration

Example responses

Authorization Hold Settings

---
defaultAuthorizationHold:
  daysToExpiration: 7
authorizationHolds:
- mcc: 123
  daysToExpiration: 14
  description: "bullseye brand - contractually agreed expiration"
- mcc: 456
  daysToExpiration: 1
  description: "widgets'r'us - short expiration"

401 invalid credentials

{
    "errors": [
        {
            "errorCode": 2,
            "errorSource": "credentials",
            "errorReason": "INVALID_CREDENTIALS"
        }
    ]
}

403 forbidden

{
    "errors": [
        {
            "errorCode": 15,
            "errorSource": "not authorized",
            "errorReason": "INVALID_PERMISSIONS"
        }
    ]
}

Responses

Status Meaning Description Schema
200 OK Authorization holds configuration retrieved AuthorizationHoldsConfiguration
401 Unauthorized UNAUTHORIZED ErrorResponse
403 Forbidden Forbidden ErrorResponse

update (Authorization Holds Configuration)

Code samples

# You can also use wget
curl -X PUT /configuration/authorizationholds.yaml \
  -H 'Content-Type: application/yaml' \
  -H 'Accept: application/vnd.mambu.v2+yaml'

PUT /configuration/authorizationholds.yaml HTTP/1.1

Content-Type: application/yaml
Accept: application/vnd.mambu.v2+yaml

var headers = {
  'Content-Type':'application/yaml',
  'Accept':'application/vnd.mambu.v2+yaml'

};

$.ajax({
  url: '/configuration/authorizationholds.yaml',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/yaml',
  'Accept' => 'application/vnd.mambu.v2+yaml'
}

result = RestClient.put '/configuration/authorizationholds.yaml',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/yaml',
  'Accept': 'application/vnd.mambu.v2+yaml'
}

r = requests.put('/configuration/authorizationholds.yaml', params={

}, headers = headers)

print r.json()

 'application/yaml',
    'Accept' => 'application/vnd.mambu.v2+yaml',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PUT','/configuration/authorizationholds.yaml', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("/configuration/authorizationholds.yaml");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/yaml"},
        "Accept": []string{"application/vnd.mambu.v2+yaml"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "/configuration/authorizationholds.yaml", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PUT /configuration/authorizationholds.yaml

Update the current authorization holds configuration

Body parameter

Authorization Hold Settings

---
defaultAuthorizationHold:
  daysToExpiration: 7
authorizationHolds:
- mcc: 123
  daysToExpiration: 14
  description: "bullseye brand - contractually agreed expiration"
- mcc: 456
  daysToExpiration: 1
  description: "widgets'r'us - short expiration"

Parameters

Name Type Description In
body AuthorizationHoldsConfiguration Represents the authorization holds body

Example responses

200 - Success Response

---
warnings: []

400 - Example failure response

{
    "errors": [
        {
            "errorCode": 9957,
            "errorSource": "Days to expire value must be a positive number",
            "errorReason": "INVALID_DAYS_TO_EXPIRE_FOR_AUTHORIZATION_HOLD"
        }
    ]
}

401 invalid credentials

{
    "errors": [
        {
            "errorCode": 2,
            "errorSource": "credentials",
            "errorReason": "INVALID_CREDENTIALS"
        }
    ]
}

403 forbidden

{
    "errors": [
        {
            "errorCode": 15,
            "errorSource": "not authorized",
            "errorReason": "INVALID_PERMISSIONS"
        }
    ]
}

404 not found

{
    "errors": [
        {
            "errorCode": 3,
            "errorSource": "server",
            "errorReason": "INVALID_API_OPERATION"
        }
    ]
}

Responses

Status Meaning Description Schema
200 OK Authorization holds configuration updated. None
400 Bad Request A Validation error occurred ErrorResponse
401 Unauthorized UNAUTHORIZED ErrorResponse
403 Forbidden Forbidden ErrorResponse
404 Not Found Authorization holds configuration not found. ErrorResponse

Response Schema

Background Process

Allows you to check the status of manual and automatic EOD processes and, under certain conditions, to cancel them. EOD processes may be cancelled if they are queued or if they have been running in the same state for longer than the average length of the last five runs of the same type. For more information, see Cancelling EOD processing in our User Guide.

Your user or API consumer must have Admin access rights or the Manage Eod Processing (MANAGE_EOD_PROCESSING) permission to use these endpoints.

update (Background Process)

Code samples

# You can also use wget
curl -X PUT /backgroundprocess/{encodedKey} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/vnd.mambu.v2+json'

PUT /backgroundprocess/{encodedKey} HTTP/1.1

Content-Type: application/json
Accept: application/vnd.mambu.v2+json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/vnd.mambu.v2+json'

};

$.ajax({
  url: '/backgroundprocess/{encodedKey}',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/vnd.mambu.v2+json'
}

result = RestClient.put '/backgroundprocess/{encodedKey}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/vnd.mambu.v2+json'
}

r = requests.put('/backgroundprocess/{encodedKey}', params={

}, headers = headers)

print r.json()

 'application/json',
    'Accept' => 'application/vnd.mambu.v2+json',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PUT','/backgroundprocess/{encodedKey}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("/backgroundprocess/{encodedKey}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/vnd.mambu.v2+json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "/backgroundprocess/{encodedKey}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PUT /backgroundprocess/{encodedKey}

Allows you to cancel manual or automatic EOD processes using the encoded key.

Manual or automatic EOD processes may only be cancelled if their status is QUEUED or if the status is IN_PROGRESS and they have been running in the same state for longer than the average of the last five runs of the same type. The only supported string in the body of a request is "CANCEL". For more information, see Cancelling EOD processing in our User Guide.

Body parameter

"string"

Parameters

Name Type Description In
encodedKey (required) string The Encoded Key of background process which should be changed path
body (required) string Background Process state to set body

Example responses

200 Response

{
  "creationDate": "2016-09-06T13:37:50+03:00",
  "encodedKey": "string",
  "endDate": "2016-09-06T13:37:50+03:00",
  "startDate": "2016-09-06T13:37:50+03:00",
  "state": "CANCEL",
  "type": "CRON_JOBS"
}

Responses

Status Meaning Description Schema
200 OK Background Process state has been changed BackgroundProcess
400 Bad Request A Validation error occurred ErrorResponse
401 Unauthorized UNAUTHORIZED ErrorResponse
403 Forbidden Forbidden ErrorResponse
404 Not Found Background Process not found ErrorResponse
500 Internal Server Error Internal Error ErrorResponse

getLatestByType (Background Process)

Code samples

# You can also use wget
curl -X GET /backgroundprocess/latest \
  -H 'Accept: application/vnd.mambu.v2+json'

GET /backgroundprocess/latest HTTP/1.1

Accept: application/vnd.mambu.v2+json

var headers = {
  'Accept':'application/vnd.mambu.v2+json'

};

$.ajax({
  url: '/backgroundprocess/latest',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/vnd.mambu.v2+json'
}

result = RestClient.get '/backgroundprocess/latest',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/vnd.mambu.v2+json'
}

r = requests.get('/backgroundprocess/latest', params={

}, headers = headers)

print r.json()

 'application/vnd.mambu.v2+json',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','/backgroundprocess/latest', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("/backgroundprocess/latest");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/vnd.mambu.v2+json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/backgroundprocess/latest", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /backgroundprocess/latest

Allows you to retrieve the latest manual or automatic EOD process by specifying the type.

The only supported background process types are CRON_JOBS for automatic EOD processes and MANUAL_CRON_JOBS_TRIGGER for manual EOD processes.

Parameters

Name Type Description In
type string The type of background process according to which the latest process should be retrieved. query

Enumerated Values

Parameter Value
type CRON_JOBS
type MANUAL_CRON_JOBS_TRIGGER

Example responses

200 Response

{
  "creationDate": "2016-09-06T13:37:50+03:00",
  "encodedKey": "string",
  "endDate": "2016-09-06T13:37:50+03:00",
  "startDate": "2016-09-06T13:37:50+03:00",
  "state": "CANCEL",
  "type": "CRON_JOBS"
}

Responses

Status Meaning Description Schema
200 OK Latest background process retrieved BackgroundProcess
401 Unauthorized UNAUTHORIZED ErrorResponse
403 Forbidden Forbidden ErrorResponse

Branches

Allows you to retrieve branches which are being used by an organization.

getById (Branches)

Code samples

# You can also use wget
curl -X GET /branches/{branchId} \
  -H 'Accept: application/vnd.mambu.v2+json'

GET /branches/{branchId} HTTP/1.1

Accept: application/vnd.mambu.v2+json

var headers = {
  'Accept':'application/vnd.mambu.v2+json'

};

$.ajax({
  url: '/branches/{branchId}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/vnd.mambu.v2+json'
}

result = RestClient.get '/branches/{branchId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/vnd.mambu.v2+json'
}

r = requests.get('/branches/{branchId}', params={

}, headers = headers)

print r.json()

 'application/vnd.mambu.v2+json',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','/branches/{branchId}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("/branches/{branchId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/vnd.mambu.v2+json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/branches/{branchId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /branches/{branchId}

Allows retrieval of a single the branch via id or encoded key

Parameters

Name Type Description In
branchId (required) string The id or or encoded key of a branch path
detailsLevel string The level of details to retrieve, FULL means the full details of the object will be retrieved (custom fields, address, contact info or any other related object), BASIC will return only the first level elements of the object query

Enumerated Values

Parameter Value
detailsLevel BASIC
detailsLevel FULL

Example responses

200 Response

{
  "_Example_Custom_Fields": {
    "exampleCheckboxField": "TRUE",
    "exampleFreeTextField": "A free text field up to 255 characters in length",
    "exampleNumberField": "46290",
    "exampleSelectField": "Option 1"
  },
  "_Example_Grouped_CF_Set_br": [
    {
      "cf_group_field_1": "string",
      "cf_group_field_2": "string"
    }
  ],
  "addresses": [
    {
      "city": "string",
      "country": "string",
      "encodedKey": "string",
      "indexInList": 0,
      "latitude": 0,
      "line1": "string",
      "line2": "string",
      "longitude": 0,
      "parentKey": "string",
      "postcode": "string",
      "region": "string"
    }
  ],
  "branchHolidays": [
    {
      "creationDate": "2016-09-06T13:37:50+03:00",
      "date": "1987-04-26",
      "encodedKey": "string",
      "id": 0,
      "isAnnuallyRecurring": true,
      "name": "string"
    }
  ],
  "creationDate": "2016-09-06T13:37:50+03:00",
  "emailAddress": "string",
  "encodedKey": "string",
  "id": "string",
  "lastModifiedDate": "2016-09-06T13:37:50+03:00",
  "name": "string",
  "notes": "string",
  "phoneNumber": "string",
  "state": "ACTIVE"
}

Responses

Status Meaning Description Schema
200 OK Branch retrieved Branch
400 Bad Request A Validation error occurred ErrorResponse
401 Unauthorized UNAUTHORIZED ErrorResponse
403 Forbidden Forbidden ErrorResponse
404 Not Found Branch not found ErrorResponse

getAll (Branches)

Code samples

# You can also use wget
curl -X GET /branches \
  -H 'Accept: application/vnd.mambu.v2+json'

GET /branches HTTP/1.1

Accept: application/vnd.mambu.v2+json

var headers = {
  'Accept':'application/vnd.mambu.v2+json'

};

$.ajax({
  url: '/branches',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/vnd.mambu.v2+json'
}

result = RestClient.get '/branches',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/vnd.mambu.v2+json'
}

r = requests.get('/branches', params={

}, headers = headers)

print r.json()

 'application/vnd.mambu.v2+json',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','/branches', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("/branches");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/vnd.mambu.v2+json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/branches", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /branches

Allows retrieval of branches using various query parameters

Parameters

Name Type Description In
offset integer(int32) Pagination, index to start searching at when retrieving elements, used in combination with limit to paginate results query
limit integer(int32) Pagination, the number of elements to retrieve, used in combination with offset to paginate results query
paginationDetails string Flag specifying whether the pagination details should be provided in response headers. Please note that by default it is disabled (OFF), in order to improve the performance of the APIs query
detailsLevel string The level of details to retrieve, FULL means the full details of the object will be retrieved (custom fields, address, contact info or any other related object), BASIC will return only the first level elements of the object query
sortBy string The criteria based on which the records will be sorted. Expected format is , eg sortBy = field1:ASC,field2:DESC.
Only the following fields can be used: id,name, creationDate, lastModifiedDate
Default sorting is done by creationDate:DESC
query

Enumerated Values

Parameter Value
paginationDetails ON
paginationDetails OFF
detailsLevel BASIC
detailsLevel FULL

Example responses

200 Response

[
  {
    "_Example_Custom_Fields": {
      "exampleCheckboxField": "TRUE",
      "exampleFreeTextField": "A free text field up to 255 characters in length",
      "exampleNumberField": "46290",
      "exampleSelectField": "Option 1"
    },
    "_Example_Grouped_CF_Set_br": [
      {
        "cf_group_field_1": "string",
        "cf_group_field_2": "string"
      }
    ],
    "addresses": [
      {
        "city": "string",
        "country": "string",
        "encodedKey": "string",
        "indexInList": 0,
        "latitude": 0,
        "line1": "string",
        "line2": "string",
        "longitude": 0,
        "parentKey": "string",
        "postcode": "string",
        "region": "string"
      }
    ],
    "branchHolidays": [
      {
        "creationDate": "2016-09-06T13:37:50+03:00",
        "date": "1987-04-26",
        "encodedKey": "string",
        "id": 0,
        "isAnnuallyRecurring": true,
        "name": "string"
      }
    ],
    "creationDate": "2016-09-06T13:37:50+03:00",
    "emailAddress": "string",
    "encodedKey": "string",
    "id": "string",
    "lastModifiedDate": "2016-09-06T13:37:50+03:00",
    "name": "string",
    "notes": "string",
    "phoneNumber": "string",
    "state": "ACTIVE"
  }
]

Responses

Status Meaning Description Schema
200 OK Branches list retrieved Inline
400 Bad Request A Validation error occurred ErrorResponse
401 Unauthorized UNAUTHORIZED ErrorResponse
403 Forbidden Forbidden ErrorResponse

Response Schema

Status Code 200

Name Type Description Restrictions
anonymous [Branch] [Branch Date Transfer Object] none
» _Example_Custom_Fields object An example of Custom Fields, which are configured using the Mambu UI. The example fields represent a selection of the possible field types available. none
»» exampleCheckboxField string A field that will appear as a checkbox in the UI. In the API value will be TRUE or FALSE as a string. Please note: the value must be provided as a string, not a boolean. none
»» exampleFreeTextField string A field that can contain a string of text. Pay attention to proper JSON escaping if providing values for such fields via API. none
»» exampleNumberField string(number) A field supporting numbers only. Please note: the value is to be provided as a string. none
»» exampleSelectField string A custom field type supporting enumerated values. Requests will fail if the value provided for such a field is not one of the supported values. none
» _Example_Grouped_CF_Set_br [_Example_Grouped_CF_Set_br] none none
»» cf_group_field_1 string none none
»» cf_group_field_2 string(number) none none
» addresses [Address] list of branch addresses none
»» city string The city for this address none
»» country string The country none
»» encodedKey string Address encoded key, unique, generated read-only
»» indexInList integer(int32) Index of this address in the list of addresses none
»» latitude number The GPS latitude of this address in signed degrees format (DDD.dddd) with 6 decimal positions, ranging from -90 to +90 none
»» line1 string The first line of the address none
»» line2 string The second line for the address, in case the first one doesn't fit the information, this is completely optional none
»» longitude number The GPS longitude of this address in signed degrees format (DDD.dddd) with 6 decimal positions, ranging from -180 to +180 none
»» parentKey string Address parent key, the object owning this address, client, centre, branch read-only
»» postcode string The post code none
»» region string The region that is part of the address none
» branchHolidays [Holiday] list of branch holidays none
»» creationDate string(date-time) holiday creation date none
»» date string(date) holiday date none
»» encodedKey string The encoded key of the entity, generated, globally unique read-only
»» id integer(int64) holiday id none
»» isAnnuallyRecurring boolean if is annually recurring none
»» name string holiday name none
» creationDate string(date-time) creation date of the branch none
» emailAddress string branch email address none
» encodedKey string The encoded key of the entity, generated, globally unique read-only
» id string branch ID, unique none
» lastModifiedDate string(date-time) last date when the branch was modified none
» name string branch name none
» notes string notes about this branch none
» phoneNumber string branch phone number, as a string none
» state string branch state none

Enumerated Values

Property Value
exampleCheckboxField TRUE
exampleCheckboxField FALSE
exampleSelectField Option 1
exampleSelectField Option 2
exampleSelectField Option 3
state ACTIVE
state INACTIVE

Response Headers

Status Header Type Format Description
200 Items-Limit integer int32 Pagination details, the requested page size
200 Items-Offset integer int32 Pagination details, the index of the first returned item
200 Items-Total integer int32 Pagination details, the total available items

create (Branches)

Code samples

# You can also use wget
curl -X POST /branches \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/vnd.mambu.v2+json' \
  -H 'Idempotency-Key: string'

POST /branches HTTP/1.1

Content-Type: application/json
Accept: application/vnd.mambu.v2+json
Idempotency-Key: string

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/vnd.mambu.v2+json',
  'Idempotency-Key':'string'

};

$.ajax({
  url: '/branches',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/vnd.mambu.v2+json',
  'Idempotency-Key' => 'string'
}

result = RestClient.post '/branches',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/vnd.mambu.v2+json',
  'Idempotency-Key': 'string'
}

r = requests.post('/branches', params={

}, headers = headers)

print r.json()

 'application/json',
    'Accept' => 'application/vnd.mambu.v2+json',
    'Idempotency-Key' => 'string',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','/branches', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("/branches");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/vnd.mambu.v2+json"},
        "Idempotency-Key": []string{"string"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "/branches", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /branches

Create a new Branch

Body parameter

{
  "_Example_Custom_Fields": {
    "exampleCheckboxField": "TRUE",
    "exampleFreeTextField": "A free text field up to 255 characters in length",
    "exampleNumberField": "46290",
    "exampleSelectField": "Option 1"
  },
  "_Example_Grouped_CF_Set_br": [
    {
      "cf_group_field_1": "string",
      "cf_group_field_2": "string"
    }
  ],
  "addresses": [
    {
      "city": "string",
      "country": "string",
      "indexInList": 0,
      "latitude": 0,
      "line1": "string",
      "line2": "string",
      "longitude": 0,
      "postcode": "string",
      "region": "string"
    }
  ],
  "branchHolidays": [
    {
      "creationDate": "2016-09-06T13:37:50+03:00",
      "date": "1987-04-26",
      "id": 0,
      "isAnnuallyRecurring": true,
      "name": "string"
    }
  ],
  "creationDate": "2016-09-06T13:37:50+03:00",
  "emailAddress": "string",
  "id": "string",
  "lastModifiedDate": "2016-09-06T13:37:50+03:00",
  "name": "string",
  "notes": "string",
  "phoneNumber": "string",
  "state": "ACTIVE"
}

Parameters

Name Type Description In
Idempotency-Key string Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. header
body (required) Branch Branch to be created body

Example responses

201 Response

{
  "_Example_Custom_Fields": {
    "exampleCheckboxField": "TRUE",
    "exampleFreeTextField": "A free text field up to 255 characters in length",
    "exampleNumberField": "46290",
    "exampleSelectField": "Option 1"
  },
  "_Example_Grouped_CF_Set_br": [
    {
      "cf_group_field_1": "string",
      "cf_group_field_2": "string"
    }
  ],
  "addresses": [
    {
      "city": "string",
      "country": "string",
      "encodedKey": "string",
      "indexInList": 0,
      "latitude": 0,
      "line1": "string",
      "line2": "string",
      "longitude": 0,
      "parentKey": "string",
      "postcode": "string",
      "region": "string"
    }
  ],
  "branchHolidays": [
    {
      "creationDate": "2016-09-06T13:37:50+03:00",
      "date": "1987-04-26",
      "encodedKey": "string",
      "id": 0,
      "isAnnuallyRecurring": true,
      "name": "string"
    }
  ],
  "creationDate": "2016-09-06T13:37:50+03:00",
  "emailAddress": "string",
  "encodedKey": "string",
  "id": "string",
  "lastModifiedDate": "2016-09-06T13:37:50+03:00",
  "name": "string",
  "notes": "string",
  "phoneNumber": "string",
  "state": "ACTIVE"
}

Responses

Status Meaning Description Schema
102 Processing Your idempotent request was already submitted and is currently being processed, try again later. None
201 Created Branch has been created Branch
400 Bad Request A Validation error occurred ErrorResponse
401 Unauthorized UNAUTHORIZED ErrorResponse
403 Forbidden Forbidden ErrorResponse

Branches Configuration

Retrieve and update the configuration for branches.

A branch is the default label for an organization's subdivision. For more information about this resource, see Branches Configuration in our User Guide.

get (Branches Configuration)

Code samples

# You can also use wget
curl -X GET /configuration/branches.yaml \
  -H 'Accept: application/vnd.mambu.v2+yaml'

GET /configuration/branches.yaml HTTP/1.1

Accept: application/vnd.mambu.v2+yaml

var headers = {
  'Accept':'application/vnd.mambu.v2+yaml'

};

$.ajax({
  url: '/configuration/branches.yaml',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/vnd.mambu.v2+yaml'
}

result = RestClient.get '/configuration/branches.yaml',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/vnd.mambu.v2+yaml'
}

r = requests.get('/configuration/branches.yaml', params={

}, headers = headers)

print r.json()

 'application/vnd.mambu.v2+yaml',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','/configuration/branches.yaml', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("/configuration/branches.yaml");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/vnd.mambu.v2+yaml"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/configuration/branches.yaml", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /configuration/branches.yaml

Retrieve branches configuration

Example responses

a single branch

---
- id: "demoBranchId"
  name: "Maputo Downtown"
  state: "ACTIVE"
  phoneNumber: "0049302345678"
  emailAddress: "petula.clark@downtown.com"
  notes: "Is located in the surroundings of the local market with a <i>lot of potential</i>\
    \ to reach new clients."
  holidays:
  - id: 12
    name: "only maputo holiday day"
    dayOfMonth: 30
    monthOfYear: 7
    year: 2020
    isAnnuallyRecurring: true
  customFieldValueSets:
  - id: "_branches_grouped_cf_set"
    groupedCustomFieldValues:
    - index: 0
      customFieldValues:
      - customFieldId: "cf_group_field_1"
        value: "group field 1"
      - customFieldId: "cf_group_field_2"
        value: "2"
    - index: 1
      customFieldValues:
      - customFieldId: "cf_group_field_2"
        value: "500"
  - id: "_example_branch_custom_field_set"
    standardCustomFieldValues:
    - customFieldId: "cf_branch"
      value: "TRUE"

401 invalid credentials

{
    "errors": [
        {
            "errorCode": 2,
            "errorSource": "credentials",
            "errorReason": "INVALID_CREDENTIALS"
        }
    ]
}

403 forbidden

{
    "errors": [
        {
            "errorCode": 15,
            "errorSource": "not authorized",
            "errorReason": "INVALID_PERMISSIONS"
        }
    ]
}

Responses

Status Meaning Description Schema
200 OK Branches configuration retrieved. BranchesConfiguration
401 Unauthorized UNAUTHORIZED ErrorResponse
403 Forbidden Forbidden ErrorResponse

update (Branches Configuration)

Code samples

# You can also use wget
curl -X PUT /configuration/branches.yaml \
  -H 'Content-Type: application/yaml' \
  -H 'Accept: application/vnd.mambu.v2+yaml'

PUT /configuration/branches.yaml HTTP/1.1

Content-Type: application/yaml
Accept: application/vnd.mambu.v2+yaml

var headers = {
  'Content-Type':'application/yaml',
  'Accept':'application/vnd.mambu.v2+yaml'

};

$.ajax({
  url: '/configuration/branches.yaml',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/yaml',
  'Accept' => 'application/vnd.mambu.v2+yaml'
}

result = RestClient.put '/configuration/branches.yaml',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/yaml',
  'Accept': 'application/vnd.mambu.v2+yaml'
}

r = requests.put('/configuration/branches.yaml', params={

}, headers = headers)

print r.json()

 'application/yaml',
    'Accept' => 'application/vnd.mambu.v2+yaml',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PUT','/configuration/branches.yaml', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("/configuration/branches.yaml");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/yaml"},
        "Accept": []string{"application/vnd.mambu.v2+yaml"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "/configuration/branches.yaml", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PUT /configuration/branches.yaml

Update the current branch configuration

Body parameter

example array of branches

---
branches:
- id: "2"
  name: "Matola City"
  state: "ACTIVE"
  phoneNumber: "+7534987676"
  emailAddress: "matola@BofAlg.es"
  notes: "Is currently under construction to add an extra room that can be used for\
    \ the meetings.<p></p>Have <b>six new computers</b> for their staff."
  address:
    line1: "1 Bank Street"
    line2: "Old Town"
    city: "Matola City"
    region: "Matola"
    postcode: "10775"
    country: "Bankistan"
  holidays:
  - id: 13
    name: "joe matola only day"
    dayOfMonth: 26
    monthOfYear: 8
    year: 2020
    isAnnuallyRecurring: true
- id: "demoBranchId"
  name: "Maputo Downtown"
  state: "ACTIVE"
  phoneNumber: "0049302345678"
  emailAddress: "petula.clark@downtown.com"
  notes: "Is located in the surroundings of the local market with a <i>lot of potential</i>\
    \ to reach new clients."
  holidays:
  - id: 12
    name: "only maputo holiday day"
    dayOfMonth: 30
    monthOfYear: 7
    year: 2020
    isAnnuallyRecurring: true
  customFieldValueSets:
  - id: "_branches_grouped_cf_set"
    groupedCustomFieldValues:
    - index: 0
      customFieldValues:
      - customFieldId: "cf_group_field_1"
        value: "group field 1"
      - customFieldId: "cf_group_field_2"
        value: "2"
    - index: 1
      customFieldValues:
      - customFieldId: "cf_group_field_2"
        value: "500"
  - id: "_example_branch_custom_field_set"
    standardCustomFieldValues:
    - customFieldId: "cf_branch"
      value: "TRUE"

Parameters

Name Type Description In
body BranchesConfiguration Model representation of the branches configuration body

Example responses

200 success response

---
warnings: []

400 error response

{
    "errors": [
        {
            "errorCode": 0,
            "errorSource": "human-readable description of the error",
            "errorReason": "SOURCE_OF_ERROR"
        }
    ]
}

401 invalid credentials

{
    "errors": [
        {
            "errorCode": 2,
            "errorSource": "credentials",
            "errorReason": "INVALID_CREDENTIALS"
        }
    ]
}

403 forbidden

{
    "errors": [
        {
            "errorCode": 15,
            "errorSource": "not authorized",
            "errorReason": "INVALID_PERMISSIONS"
        }
    ]
}

404 not found

{
    "errors": [
        {
            "errorCode": 3,
            "errorSource": "server",
            "errorReason": "INVALID_API_OPERATION"
        }
    ]
}

Responses

Status Meaning Description Schema
200 OK Branches configuration updated. None
400 Bad Request A Validation error occurred ErrorResponse
401 Unauthorized UNAUTHORIZED ErrorResponse
403 Forbidden Forbidden ErrorResponse
404 Not Found Branches configuration not found. ErrorResponse

Response Schema

Bulk Operations

Allows you to query the results of bulk operations or background asynchronous processes. The scope of this API is to get the status of the entire operation and return a list of successful operations and a list of operations resulting in error. Since bulk operations work as independent tasks, it may be the case that some of the operations are successful while others fail. One example where this API can be used is to get the status of bulk deposit transactions - for more information, see /deposits/deposit-transactions:bulk.

getBulkStatus (Bulk Operations)

Code samples

# You can also use wget
curl -X GET /bulks/{bulkProcessKey} \
  -H 'Accept: application/vnd.mambu.v2+json'

GET /bulks/{bulkProcessKey} HTTP/1.1

Accept: application/vnd.mambu.v2+json

var headers = {
  'Accept':'application/vnd.mambu.v2+json'

};

$.ajax({
  url: '/bulks/{bulkProcessKey}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/vnd.mambu.v2+json'
}

result = RestClient.get '/bulks/{bulkProcessKey}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/vnd.mambu.v2+json'
}

r = requests.get('/bulks/{bulkProcessKey}', params={

}, headers = headers)

print r.json()

 'application/vnd.mambu.v2+json',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','/bulks/{bulkProcessKey}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("/bulks/{bulkProcessKey}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/vnd.mambu.v2+json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/bulks/{bulkProcessKey}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /bulks/{bulkProcessKey}

Allow retrieval the status of a bulk process via key

Parameters

Name Type Description In
bulkProcessKey (required) string The identifier of the bulk process path

Example responses

200 Response

{
  "errors": [
    {
      "errorCode": 0,
      "errorReason": "string",
      "errorSource": "string",
      "externalId": "string",
      "indexInRequest": 0
    }
  ],
  "processedItems": [
    {
      "externalId": "string",
      "id": "string",
      "indexInRequest": 0
    }
  ],
  "status": "QUEUED"
}

Responses

Status Meaning Description Schema
200 OK Bulk process status retrieved BulkProcessStatus
401 Unauthorized UNAUTHORIZED ErrorResponse
403 Forbidden Forbidden ErrorResponse
404 Not Found Bulk process key invalid ErrorResponse

Cards

Supports industry standard authorization hold flows for card payments and allows you to request, adjust, reverse, and settle holds against Current Account and Revolving Credit type products. For more information, see Cards.

increaseAuthorizationHold (Cards)

Code samples

# You can also use wget
curl -X POST /cards/{cardReferenceToken}/authorizationholds/{authorizationHoldExternalReferenceId}:increase \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/vnd.mambu.v2+json' \
  -H 'Idempotency-Key: string'

POST /cards/{cardReferenceToken}/authorizationholds/{authorizationHoldExternalReferenceId}:increase HTTP/1.1

Content-Type: application/json
Accept: application/vnd.mambu.v2+json
Idempotency-Key: string

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/vnd.mambu.v2+json',
  'Idempotency-Key':'string'

};

$.ajax({
  url: '/cards/{cardReferenceToken}/authorizationholds/{authorizationHoldExternalReferenceId}:increase',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/vnd.mambu.v2+json',
  'Idempotency-Key' => 'string'
}

result = RestClient.post '/cards/{cardReferenceToken}/authorizationholds/{authorizationHoldExternalReferenceId}:increase',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/vnd.mambu.v2+json',
  'Idempotency-Key': 'string'
}

r = requests.post('/cards/{cardReferenceToken}/authorizationholds/{authorizationHoldExternalReferenceId}:increase', params={

}, headers = headers)

print r.json()

 'application/json',
    'Accept' => 'application/vnd.mambu.v2+json',
    'Idempotency-Key' => 'string',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','/cards/{cardReferenceToken}/authorizationholds/{authorizationHoldExternalReferenceId}:increase', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("/cards/{cardReferenceToken}/authorizationholds/{authorizationHoldExternalReferenceId}:increase");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/vnd.mambu.v2+json"},
        "Idempotency-Key": []string{"string"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "/cards/{cardReferenceToken}/authorizationholds/{authorizationHoldExternalReferenceId}:increase", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /cards/{cardReferenceToken}/authorizationholds/{authorizationHoldExternalReferenceId}:increase

Increases the amount of an authorization hold.

Body parameter

{
  "advice": true,
  "amount": 0,
  "currencyCode": "string",
  "externalReferenceId": "string"
}

Parameters

Name Type Description In
Idempotency-Key string Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. header
cardReferenceToken (required) string The token used to externally identify the card. path
authorizationHoldExternalReferenceId (required) string The ID used to reference the authorization hold. path
body (required) AuthorizationHoldAmountAdjustmentRequest The request containing the necessary fields to increase the amount of an authorization hold. body

Example responses

400 Response

{
  "errors": [
    {
      "errorCode": 0,
      "errorReason": "SUCCESS",
      "errorSource": "string"
    }
  ]
}

Responses

Status Meaning Description Schema
102 Processing Your idempotent request was already submitted and is currently being processed, try again later. None
204 No Content The authorization hold was successfully increased. None
400 Bad Request A Validation error occurred ErrorResponse
401 Unauthorized UNAUTHORIZED ErrorResponse
403 Forbidden Forbidden ErrorResponse
404 Not Found Card or authorization hold not found. ErrorResponse
409 Conflict Operation can not be performed due to another pending operation that locked shared resources. ErrorResponse

getAuthorizationHoldById (Cards)

Code samples

# You can also use wget
curl -X GET /cards/{cardReferenceToken}/authorizationholds/{authorizationHoldExternalReferenceId} \
  -H 'Accept: application/vnd.mambu.v2+json'

GET /cards/{cardReferenceToken}/authorizationholds/{authorizationHoldExternalReferenceId} HTTP/1.1

Accept: application/vnd.mambu.v2+json

var headers = {
  'Accept':'application/vnd.mambu.v2+json'

};

$.ajax({
  url: '/cards/{cardReferenceToken}/authorizationholds/{authorizationHoldExternalReferenceId}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/vnd.mambu.v2+json'
}

result = RestClient.get '/cards/{cardReferenceToken}/authorizationholds/{authorizationHoldExternalReferenceId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/vnd.mambu.v2+json'
}

r = requests.get('/cards/{cardReferenceToken}/authorizationholds/{authorizationHoldExternalReferenceId}', params={

}, headers = headers)

print r.json()

 'application/vnd.mambu.v2+json',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','/cards/{cardReferenceToken}/authorizationholds/{authorizationHoldExternalReferenceId}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("/cards/{cardReferenceToken}/authorizationholds/{authorizationHoldExternalReferenceId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/vnd.mambu.v2+json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/cards/{cardReferenceToken}/authorizationholds/{authorizationHoldExternalReferenceId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /cards/{cardReferenceToken}/authorizationholds/{authorizationHoldExternalReferenceId}

Allows retrieval of a single card authorization hold via external reference id

Parameters

Name Type Description In
cardReferenceToken (required) string The token used to externally identify the card. path
authorizationHoldExternalReferenceId (required) string The ID used to reference the authorization hold. path

Example responses

200 Response

{
  "accountKey": "string",
  "advice": true,
  "amount": 0,
  "cardAcceptor": {
    "city": "string",
    "country": "string",
    "mcc": 0,
    "name": "string",
    "state": "string",
    "street": "string",
    "zip": "string"
  },
  "cardToken": "string",
  "creationDate": "2016-09-06T13:37:50+03:00",
  "creditDebitIndicator": "DBIT",
  "currencyCode": "string",
  "encodedKey": "string",
  "exchangeRate": 0,
  "externalReferenceId": "string",
  "originalAmount": 0,
  "originalCurrency": "string",
  "source": "CARD",
  "status": "PENDING",
  "userTransactionTime": "string"
}

Responses

Status Meaning Description Schema
200 OK Authorization hold retrieved. GetAuthorizationHold
400 Bad Request A Validation error occurred ErrorResponse
401 Unauthorized UNAUTHORIZED ErrorResponse
403 Forbidden Forbidden ErrorResponse
404 Not Found Card not found. ErrorResponse

reverseAuthorizationHold (Cards)

Code samples

# You can also use wget
curl -X DELETE /cards/{cardReferenceToken}/authorizationholds/{authorizationHoldExternalReferenceId} \
  -H 'Accept: application/vnd.mambu.v2+json'

DELETE /cards/{cardReferenceToken}/authorizationholds/{authorizationHoldExternalReferenceId} HTTP/1.1

Accept: application/vnd.mambu.v2+json

var headers = {
  'Accept':'application/vnd.mambu.v2+json'

};

$.ajax({
  url: '/cards/{cardReferenceToken}/authorizationholds/{authorizationHoldExternalReferenceId}',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/vnd.mambu.v2+json'
}

result = RestClient.delete '/cards/{cardReferenceToken}/authorizationholds/{authorizationHoldExternalReferenceId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/vnd.mambu.v2+json'
}

r = requests.delete('/cards/{cardReferenceToken}/authorizationholds/{authorizationHoldExternalReferenceId}', params={

}, headers = headers)

print r.json()

 'application/vnd.mambu.v2+json',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('DELETE','/cards/{cardReferenceToken}/authorizationholds/{authorizationHoldExternalReferenceId}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("/cards/{cardReferenceToken}/authorizationholds/{authorizationHoldExternalReferenceId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/vnd.mambu.v2+json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "/cards/{cardReferenceToken}/authorizationholds/{authorizationHoldExternalReferenceId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /cards/{cardReferenceToken}/authorizationholds/{authorizationHoldExternalReferenceId}

Reverses a card authorization hold.

Parameters

Name Type Description In
cardReferenceToken (required) string The token used to externally identify the card. path
authorizationHoldExternalReferenceId (required) string The ID used to reference the authorization hold. path

Example responses

400 Response

{
  "errors": [
    {
      "errorCode": 0,
      "errorReason": "SUCCESS",
      "errorSource": "string"
    }
  ]
}

Responses

Status Meaning Description Schema
204 No Content The card authorization hold was successfully reversed. None
400 Bad Request A Validation error occurred ErrorResponse
401 Unauthorized UNAUTHORIZED ErrorResponse
403 Forbidden Forbidden ErrorResponse
404 Not Found Card or authorization hold not found. ErrorResponse
409 Conflict Operation can not be performed due to another pending operation that locked shared resources. ErrorResponse

getAccountBalances (Cards)

Code samples

# You can also use wget
curl -X GET /cards/{cardReferenceToken}/balanceInquiry \
  -H 'Accept: application/vnd.mambu.v2+json'

GET /cards/{cardReferenceToken}/balanceInquiry HTTP/1.1

Accept: application/vnd.mambu.v2+json

var headers = {
  'Accept':'application/vnd.mambu.v2+json'

};

$.ajax({
  url: '/cards/{cardReferenceToken}/balanceInquiry',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/vnd.mambu.v2+json'
}

result = RestClient.get '/cards/{cardReferenceToken}/balanceInquiry',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/vnd.mambu.v2+json'
}

r = requests.get('/cards/{cardReferenceToken}/balanceInquiry', params={

}, headers = headers)

print r.json()

 'application/vnd.mambu.v2+json',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','/cards/{cardReferenceToken}/balanceInquiry', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("/cards/{cardReferenceToken}/balanceInquiry");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/vnd.mambu.v2+json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/cards/{cardReferenceToken}/balanceInquiry", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /cards/{cardReferenceToken}/balanceInquiry

Allows retrieval of account balances by its card token

Parameters

Name Type Description In
cardReferenceToken (required) string The token used to externally identify the card. path

Example responses

200 Response

{
  "accountId": "string",
  "availableBalance": 0,
  "cardType": "DEBIT",
  "creditLimit": 0,
  "currencyCode": "string",
  "totalBalance": 0
}

Responses

Status Meaning Description Schema
200 OK Card's account balances retrieved AccountBalances
401 Unauthorized UNAUTHORIZED ErrorResponse
403 Forbidden Forbidden ErrorResponse
404 Not Found CARD_REFERENCE_NOT_FOUND ErrorResponse

reverseCardTransaction (Cards)

Code samples

# You can also use wget
curl -X POST /cards/{cardReferenceToken}/financialtransactions/{cardTransactionExternalReferenceId}:decrease \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/vnd.mambu.v2+json' \
  -H 'Idempotency-Key: string'

POST /cards/{cardReferenceToken}/financialtransactions/{cardTransactionExternalReferenceId}:decrease HTTP/1.1

Content-Type: application/json
Accept: application/vnd.mambu.v2+json
Idempotency-Key: string

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/vnd.mambu.v2+json',
  'Idempotency-Key':'string'

};

$.ajax({
  url: '/cards/{cardReferenceToken}/financialtransactions/{cardTransactionExternalReferenceId}:decrease',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/vnd.mambu.v2+json',
  'Idempotency-Key' => 'string'
}

result = RestClient.post '/cards/{cardReferenceToken}/financialtransactions/{cardTransactionExternalReferenceId}:decrease',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/vnd.mambu.v2+json',
  'Idempotency-Key': 'string'
}

r = requests.post('/cards/{cardReferenceToken}/financialtransactions/{cardTransactionExternalReferenceId}:decrease', params={

}, headers = headers)

print r.json()

 'application/json',
    'Accept' => 'application/vnd.mambu.v2+json',
    'Idempotency-Key' => 'string',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','/cards/{cardReferenceToken}/financialtransactions/{cardTransactionExternalReferenceId}:decrease', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("/cards/{cardReferenceToken}/financialtransactions/{cardTransactionExternalReferenceId}:decrease");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/vnd.mambu.v2+json"},
        "Idempotency-Key": []string{"string"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "/cards/{cardReferenceToken}/financialtransactions/{cardTransactionExternalReferenceId}:decrease", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /cards/{cardReferenceToken}/financialtransactions/{cardTransactionExternalReferenceId}:decrease

Reverses a card transaction.

Body parameter

{
  "_Example_Custom_Fields": {
    "exampleCheckboxField": "TRUE",
    "exampleFreeTextField": "A free text field up to 255 characters in length",
    "exampleNumberField": "46290",
    "exampleSelectField": "Option 1"
  },
  "amount": 0,
  "currencyCode": "string",
  "externalReferenceId": "string",
  "transactionChannelId": "string"
}

Parameters

Name Type Description In
Idempotency-Key string Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. header
cardReferenceToken (required) string The token used to externally identify the card. path
cardTransactionExternalReferenceId (required) string The external reference of a card transaction used to identify the card transaction. path
body (required) CardTransactionReversal The card transaction to be reversed. body

Example responses

400 Response

{
  "errors": [
    {
      "errorCode": 0,
      "errorReason": "SUCCESS",
      "errorSource": "string"
    }
  ]
}

Responses

Status Meaning Description Schema
102 Processing Your idempotent request was already submitted and is currently being processed, try again later. None
204 No Content The card reversal was successfully completed None
400 Bad Request A Validation error occurred ErrorResponse
401 Unauthorized UNAUTHORIZED ErrorResponse
403 Forbidden Forbidden ErrorResponse
404 Not Found Card not found. ErrorResponse
409 Conflict Operation can not be performed due to another pending operation that locked shared resources. ErrorResponse

createCardTransaction (Cards)

Code samples

# You can also use wget
curl -X POST /cards/{cardReferenceToken}/financialtransactions \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/vnd.mambu.v2+json' \
  -H 'Idempotency-Key: string'

POST /cards/{cardReferenceToken}/financialtransactions HTTP/1.1

Content-Type: application/json
Accept: application/vnd.mambu.v2+json
Idempotency-Key: string

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/vnd.mambu.v2+json',
  'Idempotency-Key':'string'

};

$.ajax({
  url: '/cards/{cardReferenceToken}/financialtransactions',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/vnd.mambu.v2+json',
  'Idempotency-Key' => 'string'
}

result = RestClient.post '/cards/{cardReferenceToken}/financialtransactions',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/vnd.mambu.v2+json',
  'Idempotency-Key': 'string'
}

r = requests.post('/cards/{cardReferenceToken}/financialtransactions', params={

}, headers = headers)

print r.json()

 'application/json',
    'Accept' => 'application/vnd.mambu.v2+json',
    'Idempotency-Key' => 'string',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','/cards/{cardReferenceToken}/financialtransactions', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("/cards/{cardReferenceToken}/financialtransactions");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/vnd.mambu.v2+json"},
        "Idempotency-Key": []string{"string"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "/cards/{cardReferenceToken}/financialtransactions", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /cards/{cardReferenceToken}/financialtransactions

Creates a financial transaction corresponding to a given card.

Body parameter

{
  "_Example_Custom_Fields": {
    "exampleCheckboxField": "TRUE",
    "exampleFreeTextField": "A free text field up to 255 characters in length",
    "exampleNumberField": "46290",
    "exampleSelectField": "Option 1"
  },
  "advice": true,
  "amount": 0,
  "cardAcceptor": {
    "city": "string",
    "country": "string",
    "mcc": 0,
    "name": "string",
    "state": "string",
    "street": "string",
    "zip": "string"
  },
  "creditDebitIndicator": "DBIT",
  "currencyCode": "string",
  "externalAuthorizationReferenceId": "string",
  "externalReferenceId": "string",
  "firstRepaymentDate": "2016-09-06T13:37:50+03:00",
  "increaseAmountIfNeeded": true,
  "transactionChannelId": "string",
  "userTransactionTime": "string"
}

Parameters

Name Type Description In
Idempotency-Key string Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. header
cardReferenceToken (required) string The token used to externally identify the card. path
body (required) CardTransactionInput The financial transaction to be created. body

Example responses

201 Response

{
  "advice": true,
  "amount": 0,
  "cardAcceptor": {
    "city": "string",
    "country": "string",
    "mcc": 0,
    "name": "string",
    "state": "string",
    "street": "string",
    "zip": "string"
  },
  "cardToken": "string",
  "creditDebitIndicator": "DBIT",
  "currencyCode": "string",
  "encodedKey": "string",
  "externalAuthorizationReferenceId": "string",
  "externalReferenceId": "string",
  "firstRepaymentDate": "2016-09-06T13:37:50+03:00",
  "increaseAmountIfNeeded": true,
  "linkedTransaction": {
    "linkedTransactionKey": "string",
    "linkedTransactionType": "LOAN"
  },
  "transactionChannelId": "string",
  "userTransactionTime": "string"
}

Responses

Status Meaning Description Schema
102 Processing Your idempotent request was already submitted and is currently being processed, try again later. None
201 Created The financial transaction was successfully created. CardTransactionOutput
400 Bad Request A Validation error occurred ErrorResponse
401 Unauthorized UNAUTHORIZED ErrorResponse
403 Forbidden Forbidden ErrorResponse
404 Not Found Card not found. ErrorResponse
409 Conflict Operation can not be performed due to another pending operation that locked shared resources. ErrorResponse

decreaseAuthorizationHold (Cards)

Code samples

# You can also use wget
curl -X POST /cards/{cardReferenceToken}/authorizationholds/{authorizationHoldExternalReferenceId}:decrease \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/vnd.mambu.v2+json' \
  -H 'Idempotency-Key: string'

POST /cards/{cardReferenceToken}/authorizationholds/{authorizationHoldExternalReferenceId}:decrease HTTP/1.1

Content-Type: application/json
Accept: application/vnd.mambu.v2+json
Idempotency-Key: string

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/vnd.mambu.v2+json',
  'Idempotency-Key':'string'

};

$.ajax({
  url: '/cards/{cardReferenceToken}/authorizationholds/{authorizationHoldExternalReferenceId}:decrease',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/vnd.mambu.v2+json',
  'Idempotency-Key' => 'string'
}

result = RestClient.post '/cards/{cardReferenceToken}/authorizationholds/{authorizationHoldExternalReferenceId}:decrease',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/vnd.mambu.v2+json',
  'Idempotency-Key': 'string'
}

r = requests.post('/cards/{cardReferenceToken}/authorizationholds/{authorizationHoldExternalReferenceId}:decrease', params={

}, headers = headers)

print r.json()

 'application/json',
    'Accept' => 'application/vnd.mambu.v2+json',
    'Idempotency-Key' => 'string',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','/cards/{cardReferenceToken}/authorizationholds/{authorizationHoldExternalReferenceId}:decrease', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("/cards/{cardReferenceToken}/authorizationholds/{authorizationHoldExternalReferenceId}:decrease");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/vnd.mambu.v2+json"},
        "Idempotency-Key": []string{"string"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "/cards/{cardReferenceToken}/authorizationholds/{authorizationHoldExternalReferenceId}:decrease", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /cards/{cardReferenceToken}/authorizationholds/{authorizationHoldExternalReferenceId}:decrease

Decreases the amount of an authorization hold. If the amount is greater or equal to the authorization hold amount, then the authorization hold is reversed.

Body parameter

{
  "advice": true,
  "amount": 0,
  "currencyCode": "string",
  "externalReferenceId": "string"
}

Parameters

Name Type Description In
Idempotency-Key string Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. header
cardReferenceToken (required) string The token used to externally identify the card. path
authorizationHoldExternalReferenceId (required) string The ID used to reference the authorization hold. path
body (required) AuthorizationHoldAmountAdjustmentRequest The request containing the necessary fields to decrease the amount of an authorization hold. body

Example responses

400 Response

{
  "errors": [
    {
      "errorCode": 0,
      "errorReason": "SUCCESS",
      "errorSource": "string"
    }
  ]
}

Responses

Status Meaning Description Schema
102 Processing Your idempotent request was already submitted and is currently being processed, try again later. None
204 No Content The authorization hold was successfully decreased. None
400 Bad Request A Validation error occurred ErrorResponse
401 Unauthorized UNAUTHORIZED ErrorResponse
403 Forbidden Forbidden ErrorResponse
404 Not Found Card or authorization hold not found. ErrorResponse
409 Conflict Operation can not be performed due to another pending operation that locked shared resources. ErrorResponse

createAuthorizationHold (Cards)

Code samples

# You can also use wget
curl -X POST /cards/{cardReferenceToken}/authorizationholds \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/vnd.mambu.v2+json' \
  -H 'Idempotency-Key: string'

POST /cards/{cardReferenceToken}/authorizationholds HTTP/1.1

Content-Type: application/json
Accept: application/vnd.mambu.v2+json
Idempotency-Key: string

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/vnd.mambu.v2+json',
  'Idempotency-Key':'string'

};

$.ajax({
  url: '/cards/{cardReferenceToken}/authorizationholds',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/vnd.mambu.v2+json',
  'Idempotency-Key' => 'string'
}

result = RestClient.post '/cards/{cardReferenceToken}/authorizationholds',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/vnd.mambu.v2+json',
  'Idempotency-Key': 'string'
}

r = requests.post('/cards/{cardReferenceToken}/authorizationholds', params={

}, headers = headers)

print r.json()

 'application/json',
    'Accept' => 'application/vnd.mambu.v2+json',
    'Idempotency-Key' => 'string',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','/cards/{cardReferenceToken}/authorizationholds', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("/cards/{cardReferenceToken}/authorizationholds");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/vnd.mambu.v2+json"},
        "Idempotency-Key": []string{"string"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "/cards/{cardReferenceToken}/authorizationholds", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /cards/{cardReferenceToken}/authorizationholds

Creates an authorization hold corresponding to a given card.

Body parameter

{
  "advice": true,
  "amount": 0,
  "cardAcceptor": {
    "city": "string",
    "country": "string",
    "mcc": 0,
    "name": "string",
    "state": "string",
    "street": "string",
    "zip": "string"
  },
  "creditDebitIndicator": "DBIT",
  "currencyCode": "string",
  "exchangeRate": 0,
  "externalReferenceId": "string",
  "originalAmount": 0,
  "originalCurrency": "string",
  "userTransactionTime": "string"
}

Parameters

Name Type Description In
Idempotency-Key string Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. header
cardReferenceToken (required) string The token used to externally identify the card. path
body (required) AuthorizationHold The authorization hold to be created. body

Example responses

201 Response

{
  "accountKey": "string",
  "advice": true,
  "amount": 0,
  "cardAcceptor": {
    "city": "string",
    "country": "string",
    "mcc": 0,
    "name": "string",
    "state": "string",
    "street": "string",
    "zip": "string"
  },
  "cardToken": "string",
  "creationDate": "2016-09-06T13:37:50+03:00",
  "creditDebitIndicator": "DBIT",
  "currencyCode": "string",
  "exchangeRate": 0,
  "externalReferenceId": "string",
  "originalAmount": 0,
  "originalCurrency": "string",
  "source": "CARD",
  "status": "PENDING",
  "userTransactionTime": "string"
}

Responses

Status Meaning Description Schema
102 Processing Your idempotent request was already submitted and is currently being processed, try again later. None
201 Created The card authorization hold was successfully created. AuthorizationHold
400 Bad Request A Validation error occurred ErrorResponse
401 Unauthorized UNAUTHORIZED ErrorResponse
403 Forbidden Forbidden ErrorResponse
404 Not Found Card not found. ErrorResponse
409 Conflict Operation can not be performed due to another pending operation that locked shared resources. ErrorResponse

Centres

Allows retrieving centres which are being used by an organization. A branch in Mambu is the default label for an organization's subdivision. A centre is the default label for a subdivision of a branch. It can be considered a sub-branch. Each branch can have multiple centres assigned to it.

getById (Centres)

Code samples

# You can also use wget
curl -X GET /centres/{centreId} \
  -H 'Accept: application/vnd.mambu.v2+json'

GET /centres/{centreId} HTTP/1.1

Accept: application/vnd.mambu.v2+json

var headers = {
  'Accept':'application/vnd.mambu.v2+json'

};

$.ajax({
  url: '/centres/{centreId}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/vnd.mambu.v2+json'
}

result = RestClient.get '/centres/{centreId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/vnd.mambu.v2+json'
}

r = requests.get('/centres/{centreId}', params={

}, headers = headers)

print r.json()

 'application/vnd.mambu.v2+json',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','/centres/{centreId}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("/centres/{centreId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/vnd.mambu.v2+json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/centres/{centreId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /centres/{centreId}

Allows retrieval of a single centre via id or encoded key

Parameters

Name Type Description In
centreId (required) string The id or encoded key of the centre to be retrieved path
detailsLevel string The level of details to retrieve, FULL means the full details of the object will be retrieved (custom fields, address, contact info or any other related object), BASIC will return only the first level elements of the object query

Enumerated Values

Parameter Value
detailsLevel BASIC
detailsLevel FULL

Example responses

200 Response

{
  "_Example_Custom_Fields": {
    "exampleCheckboxField": "TRUE",
    "exampleFreeTextField": "A free text field up to 255 characters in length",
    "exampleNumberField": "46290",
    "exampleSelectField": "Option 1"
  },
  "_Example_Grouped_CF_Set_cntr": [
    {
      "cntr_cf_Grp_1": "string",
      "cntr_cf_grp_2": "option 1",
      "cntr_cf_slct_2": "dep 1 a"
    }
  ],
  "addresses": [
    {
      "city": "string",
      "country": "string",
      "encodedKey": "string",
      "indexInList": 0,
      "latitude": 0,
      "line1": "string",
      "line2": "string",
      "longitude": 0,
      "parentKey": "string",
      "postcode": "string",
      "region": "string"
    }
  ],
  "assignedBranchKey": "string",
  "creationDate": "2016-09-06T13:37:50+03:00",
  "encodedKey": "string",
  "id": "string",
  "lastModifiedDate": "2016-09-06T13:37:50+03:00",
  "meetingDay": "string",
  "name": "string",
  "notes": "string",
  "state": "ACTIVE"
}

Responses

Status Meaning Description Schema
200 OK Centre retrieved Centre
400 Bad Request A Validation error occurred ErrorResponse
401 Unauthorized UNAUTHORIZED ErrorResponse
403 Forbidden Forbidden ErrorResponse
404 Not Found Centre not found ErrorResponse

getAll (Centres)

Code samples

# You can also use wget
curl -X GET /centres \
  -H 'Accept: application/vnd.mambu.v2+json'

GET /centres HTTP/1.1

Accept: application/vnd.mambu.v2+json

var headers = {
  'Accept':'application/vnd.mambu.v2+json'

};

$.ajax({
  url: '/centres',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/vnd.mambu.v2+json'
}

result = RestClient.get '/centres',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/vnd.mambu.v2+json'
}

r = requests.get('/centres', params={

}, headers = headers)

print r.json()

 'application/vnd.mambu.v2+json',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','/centres', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("/centres");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/vnd.mambu.v2+json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/centres", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /centres

Allows retrieval of centres using various query parameters

Parameters

Name Type Description In
offset integer(int32) Pagination, index to start searching at when retrieving elements, used in combination with limit to paginate results query
limit integer(int32) Pagination, the number of elements to retrieve, used in combination with offset to paginate results query
paginationDetails string Flag specifying whether the pagination details should be provided in response headers. Please note that by default it is disabled (OFF), in order to improve the performance of the APIs query
detailsLevel string The level of details to retrieve, FULL means the full details of the object will be retrieved (custom fields, address, contact info or any other related object), BASIC will return only the first level elements of the object query
branchId string The branch id the centre belongs to query
sortBy string The criteria based on which the records will be sorted. Expected format is , eg sortBy = field1:ASC,field2:DESC.
Only the following fields can be used: id,name, creationDate, lastModifiedDate
Default sorting is done by creationDate:DESC
query

Enumerated Values

Parameter Value
paginationDetails ON
paginationDetails OFF
detailsLevel BASIC
detailsLevel FULL

Example responses

200 Response

[
  {
    "_Example_Custom_Fields": {
      "exampleCheckboxField": "TRUE",
      "exampleFreeTextField": "A free text field up to 255 characters in length",
      "exampleNumberField": "46290",
      "exampleSelectField": "Option 1"
    },
    "_Example_Grouped_CF_Set_cntr": [
      {
        "cntr_cf_Grp_1": "string",
        "cntr_cf_grp_2": "option 1",
        "cntr_cf_slct_2": "dep 1 a"
      }
    ],
    "addresses": [
      {
        "city": "string",
        "country": "string",
        "encodedKey": "string",
        "indexInList": 0,
        "latitude": 0,
        "line1": "string",
        "line2": "string",
        "longitude": 0,
        "parentKey": "string",
        "postcode": "string",
        "region": "string"
      }
    ],
    "assignedBranchKey": "string",
    "creationDate": "2016-09-06T13:37:50+03:00",
    "encodedKey": "string",
    "id": "string",
    "lastModifiedDate": "2016-09-06T13:37:50+03:00",
    "meetingDay": "string",
    "name": "string",
    "notes": "string",
    "state": "ACTIVE"
  }
]

Responses

Status Meaning Description Schema
200 OK Centres list retrieved Inline
400 Bad Request A Validation error occurred ErrorResponse
401 Unauthorized UNAUTHORIZED ErrorResponse
403 Forbidden Forbidden ErrorResponse

Response Schema

Status Code 200

Name Type Description Restrictions
anonymous [Centre] [A Centre is a common meeting area that credit officers and the individual and group clients go to. Each centre is assigned to a branch (a branch can have multiple centres) and might have a specific meeting day and location.] none
» _Example_Custom_Fields object An example of Custom Fields, which are configured using the Mambu UI. The example fields represent a selection of the possible field types available. none
»» exampleCheckboxField string A field that will appear as a checkbox in the UI. In the API value will be TRUE or FALSE as a string. Please note: the value must be provided as a string, not a boolean. none
»» exampleFreeTextField string A field that can contain a string of text. Pay attention to proper JSON escaping if providing values for such fields via API. none
»» exampleNumberField string(number) A field supporting numbers only. Please note: the value is to be provided as a string. none
»» exampleSelectField string A custom field type supporting enumerated values. Requests will fail if the value provided for such a field is not one of the supported values. none
» _Example_Grouped_CF_Set_cntr [_Example_Grouped_CF_Set_cntr] [grouped centre custom fields] none
»» cntr_cf_Grp_1 string(number) a number custom field none
»» cntr_cf_grp_2 string a selection custom field for centres none
»» cntr_cf_slct_2 string a custom field in which the options available are dependent on another field none
» addresses [Address] The addresses of this centre none
»» city string The city for this address none
»» country string The country none
»» encodedKey string Address encoded key, unique, generated read-only
»» indexInList integer(int32) Index of this address in the list of addresses none
»» latitude number The GPS latitude of this address in signed degrees format (DDD.dddd) with 6 decimal positions, ranging from -90 to +90 none
»» line1 string The first line of the address none
»» line2 string The second line for the address, in case the first one doesn't fit the information, this is completely optional none
»» longitude number The GPS longitude of this address in signed degrees format (DDD.dddd) with 6 decimal positions, ranging from -180 to +180 none
»» parentKey string Address parent key, the object owning this address, client, centre, branch read-only
»» postcode string The post code none
»» region string The region that is part of the address none
» assignedBranchKey string Encoded key of the branch this centre is assigned to none
» creationDate string(date-time) Date the centre was created none
» encodedKey string The encoded key of the entity, generated, globally unique read-only
» id string Id of the centre, unique, can be generated and customized none
» lastModifiedDate string(date-time) The last time the centre was modified none
» meetingDay string Day of the week when repayments are collected, influences repayments schedule, upon update all repayments are update to this day of the week none
» name string Name of the centre none
» notes string Extra notes about this centre none
» state string The state of the centre none

Enumerated Values

Property Value
exampleCheckboxField TRUE
exampleCheckboxField FALSE
exampleSelectField Option 1
exampleSelectField Option 2
exampleSelectField Option 3
cntr_cf_grp_2 option 1
cntr_cf_grp_2 option 2
cntr_cf_slct_2 dep 1 a
cntr_cf_slct_2 dep 1 b
cntr_cf_slct_2 dep 2 a
cntr_cf_slct_2 dep 2 b
state ACTIVE
state INACTIVE

Response Headers

Status Header Type Format Description
200 Items-Limit integer int32 Pagination details, the requested page size
200 Items-Offset integer int32 Pagination details, the index of the first returned item
200 Items-Total integer int32 Pagination details, the total available items

Centres Configuration

Retrieve and update the configuration for centres.

A branch in Mambu is the default label for an organization's subdivision. A centre is the default label for a subdivision of a branch. It can be considered a sub-branch. Each branch can have multiple centres assigned to it. For more information about this resource, see Centres Configuration in our User Guide.

get (Centres Configuration)

Code samples

# You can also use wget
curl -X GET /configuration/centres.yaml \
  -H 'Accept: application/vnd.mambu.v2+yaml'

GET /configuration/centres.yaml HTTP/1.1

Accept: application/vnd.mambu.v2+yaml

var headers = {
  'Accept':'application/vnd.mambu.v2+yaml'

};

$.ajax({
  url: '/configuration/centres.yaml',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/vnd.mambu.v2+yaml'
}

result = RestClient.get '/configuration/centres.yaml',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/vnd.mambu.v2+yaml'
}

r = requests.get('/configuration/centres.yaml', params={

}, headers = headers)

print r.json()

 'application/vnd.mambu.v2+yaml',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','/configuration/centres.yaml', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("/configuration/centres.yaml");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/vnd.mambu.v2+yaml"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/configuration/centres.yaml", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /configuration/centres.yaml

Retrieve the centres configuration.

Example responses

a single centre

---
centres:
- id: "DT1"
  name: "Down Town"
  state: "ACTIVE"
  notes: "some rich text notes about this centre"
  meetingDay: "FRIDAY"
  assignedBranchId: "demoBranchId"
  address:
    line1: "Chuffington House"
    line2: "123 Main High Road"
    city: "Big Town"
    region: "Big Conglomeration"
    postcode: "123 456"
    country: "Countrystan"
  customFieldValueSets:
  - id: "_centres_custom_field_set"
    standardCustomFieldValues:
    - customFieldId: "centre_cf_1"
      value: "custom field value for cf 1"
    - customFieldId: "cntr_cf_2"
      value: "FALSE"
    - customFieldId: "cntr_cf_usr_lnk"
      value: "jonnyt"
  - id: "_cntr_cf_grp"
    groupedCustomFieldValues:
    - index: 0
      customFieldValues:
      - customFieldId: "cntr_cf_Grp_1"
        value: "12"
      - customFieldId: "cntr_cf_grp_2"
        value: "414828471"
      - customFieldId: "cntr_cf_slct_2"
        value: "745255722"

401 invalid credentials

{
    "errors": [
        {
            "errorCode": 2,
            "errorSource": "credentials",
            "errorReason": "INVALID_CREDENTIALS"
        }
    ]
}

403 forbidden

{
    "errors": [
        {
            "errorCode": 15,
            "errorSource": "not authorized",
            "errorReason": "INVALID_PERMISSIONS"
        }
    ]
}

Responses

Status Meaning Description Schema
200 OK Centres configuration retrieved. CentresConfiguration
401 Unauthorized UNAUTHORIZED ErrorResponse
403 Forbidden Forbidden ErrorResponse

update (Centres Configuration)

Code samples

# You can also use wget
curl -X PUT /configuration/centres.yaml \
  -H 'Content-Type: application/yaml' \
  -H 'Accept: application/vnd.mambu.v2+yaml'

PUT /configuration/centres.yaml HTTP/1.1

Content-Type: application/yaml
Accept: application/vnd.mambu.v2+yaml

var headers = {
  'Content-Type':'application/yaml',
  'Accept':'application/vnd.mambu.v2+yaml'

};

$.ajax({
  url: '/configuration/centres.yaml',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/yaml',
  'Accept' => 'application/vnd.mambu.v2+yaml'
}

result = RestClient.put '/configuration/centres.yaml',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/yaml',
  'Accept': 'application/vnd.mambu.v2+yaml'
}

r = requests.put('/configuration/centres.yaml', params={

}, headers = headers)

print r.json()

 'application/yaml',
    'Accept' => 'application/vnd.mambu.v2+yaml',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PUT','/configuration/centres.yaml', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("/configuration/centres.yaml");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/yaml"},
        "Accept": []string{"application/vnd.mambu.v2+yaml"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "/configuration/centres.yaml", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PUT /configuration/centres.yaml

Update the current centres configuration

Body parameter

an array of centres

---
centres:
- id: "DT1"
  name: "Down Town"
  state: "ACTIVE"
  notes: "some rich text notes about this centre"
  meetingDay: "FRIDAY"
  assignedBranchId: "demoBranchId"
  address:
    line1: "Chuffington House"
    line2: "123 Main High Road"
    city: "Big Town"
    region: "Big Conglomeration"
    postcode: "123 456"
    country: "Countrystan"
  customFieldValueSets:
  - id: "_centres_custom_field_set"
    standardCustomFieldValues:
    - customFieldId: "centre_cf_1"
      value: "custom field value for cf 1"
    - customFieldId: "cntr_cf_2"
      value: "FALSE"
    - customFieldId: "cntr_cf_usr_lnk"
      value: "jonnyt"
  - id: "_cntr_cf_grp"
    groupedCustomFieldValues:
    - index: 0
      customFieldValues:
      - customFieldId: "cntr_cf_Grp_1"
        value: "12"
      - customFieldId: "cntr_cf_grp_2"
        value: "414828471"
      - customFieldId: "cntr_cf_slct_2"
        value: "745255722"
- id: "MP1"
  name: "Market Place"
  state: "ACTIVE"
  notes: "All clients and officers gather in the market to discuss loans and savings\
    \ situation."
  assignedBranchId: "2"
  address:
    line1: "Hegyalja út 95."
    city: "Debrecen"
    postcode: "4032"

Parameters

Name Type Description In
body CentresConfiguration Model representation of the centres configuration. body

Example responses

200 success response

---
warnings: []

200 response with warnings

---
warnings:
- "Centre [id = DT1] could not be deleted and was deactivated"

400 error response

{
    "errors": [
        {
            "errorCode": 0,
            "errorSource": "human-readable description of the error",
            "errorReason": "SOURCE_OF_ERROR"
        }
    ]
}

401 invalid credentials

{
    "errors": [
        {
            "errorCode": 2,
            "errorSource": "credentials",
            "errorReason": "INVALID_CREDENTIALS"
        }
    ]
}

403 forbidden

{
    "errors": [
        {
            "errorCode": 15,
            "errorSource": "not authorized",
            "errorReason": "INVALID_PERMISSIONS"
        }
    ]
}

404 not found

{
    "errors": [
        {
            "errorCode": 3,
            "errorSource": "server",
            "errorReason": "INVALID_API_OPERATION"
        }
    ]
}

Responses

Status Meaning Description Schema
200 OK Centres configuration updated None
400 Bad Request A Validation error occurred ErrorResponse
401 Unauthorized UNAUTHORIZED ErrorResponse
403 Forbidden Forbidden ErrorResponse
404 Not Found Centres configuration not found ErrorResponse

Response Schema

Clients

Allows you to retrieve, create, update or delete clients. Clients may have associated information such as their address, identification documents or custom fields.

getById (Clients)

Code samples

# You can also use wget
curl -X GET /clients/{clientId} \
  -H 'Accept: application/vnd.mambu.v2+json'

GET /clients/{clientId} HTTP/1.1

Accept: application/vnd.mambu.v2+json

var headers = {
  'Accept':'application/vnd.mambu.v2+json'

};

$.ajax({
  url: '/clients/{clientId}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/vnd.mambu.v2+json'
}

result = RestClient.get '/clients/{clientId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/vnd.mambu.v2+json'
}

r = requests.get('/clients/{clientId}', params={

}, headers = headers)

print r.json()

 'application/vnd.mambu.v2+json',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','/clients/{clientId}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("/clients/{clientId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/vnd.mambu.v2+json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/clients/{clientId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /clients/{clientId}

Allows retrieval of a single client via id or encoded key

Parameters

Name Type Description In
clientId (required) string The id or encoded key of the client to be retrieved path
detailsLevel string The level of details to retrieve, FULL means the full details of the object will be retrieved (custom fields, address, contact info or any other related object), BASIC will return only the first level elements of the object query

Enumerated Values

Parameter Value
detailsLevel BASIC
detailsLevel FULL

Example responses

200 Response

{
  "_Example_Custom_Fields": {
    "exampleCheckboxField": "TRUE",
    "exampleFreeTextField": "A free text field up to 255 characters in length",
    "exampleNumberField": "46290",
    "exampleSelectField": "Option 1"
  },
  "_Example_Grouped_CF_Set_cl": [
    {
      "grp_set_1": "string",
      "grp_set_clt_2": "string",
      "grp_set_fld_3": "TRUE"
    }
  ],
  "activationDate": "2016-09-06T13:37:50+03:00",
  "addresses": [
    {
      "city": "string",
      "country": "string",
      "encodedKey": "string",
      "indexInList": 0,
      "latitude": 0,
      "line1": "string",
      "line2": "string",
      "longitude": 0,
      "parentKey": "string",
      "postcode": "string",
      "region": "string"
    }
  ],
  "approvedDate": "2016-09-06T13:37:50+03:00",
  "assignedBranchKey": "string",
  "assignedCentreKey": "string",
  "assignedUserKey": "string",
  "birthDate": "1987-04-26",
  "clientRoleKey": "string",
  "closedDate": "2016-09-06T13:37:50+03:00",
  "creationDate": "2016-09-06T13:37:50+03:00",
  "emailAddress": "string",
  "encodedKey": "string",
  "firstName": "string",
  "gender": "MALE",
  "groupKeys": [
    "string"
  ],
  "groupLoanCycle": 0,
  "homePhone": "string",
  "id": "string",
  "idDocuments": [
    {
      "attachments": [
        {
          "creationDate": "2016-09-06T13:37:50+03:00",
          "encodedKey": "string",
          "fileName": "string",
          "fileSize": 0,
          "id": 0,
          "lastModifiedDate": "2016-09-06T13:37:50+03:00",
          "location": "string",
          "name": "string",
          "notes": "string",
          "ownerKey": "string",
          "ownerType": "CLIENT",
          "type": "string"
        }
      ],
      "clientKey": "string",
      "documentId": "string",
      "documentType": "string",
      "encodedKey": "string",
      "identificationDocumentTemplateKey": "string",
      "indexInList": 0,
      "issuingAuthority": "string",
      "validUntil": "1987-04-26"
    }
  ],
  "lastModifiedDate": "2016-09-06T13:37:50+03:00",
  "lastName": "string",
  "loanCycle": 0,
  "middleName": "string",
  "migrationEventKey": "string",
  "mobilePhone": "string",
  "mobilePhone2": "string",
  "notes": "string",
  "portalSettings": {
    "encodedKey": "string",
    "lastLoggedInDate": "2016-09-06T13:37:50+03:00",
    "portalState": "ENABLED"
  },
  "preferredLanguage": "ENGLISH",
  "profilePictureKey": "string",
  "profileSignatureKey": "string",
  "state": "PENDING_APPROVAL"
}

Responses

Status Meaning Description Schema
200 OK Client retrieved Client
400 Bad Request A Validation error occurred ErrorResponse
401 Unauthorized UNAUTHORIZED ErrorResponse
403 Forbidden Forbidden ErrorResponse
404 Not Found Client not found ErrorResponse

update (Clients)

Code samples

# You can also use wget
curl -X PUT /clients/{clientId} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/vnd.mambu.v2+json'

PUT /clients/{clientId} HTTP/1.1

Content-Type: application/json
Accept: application/vnd.mambu.v2+json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/vnd.mambu.v2+json'

};

$.ajax({
  url: '/clients/{clientId}',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/vnd.mambu.v2+json'
}

result = RestClient.put '/clients/{clientId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/vnd.mambu.v2+json'
}

r = requests.put('/clients/{clientId}', params={

}, headers = headers)

print r.json()

 'application/json',
    'Accept' => 'application/vnd.mambu.v2+json',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PUT','/clients/{clientId}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("/clients/{clientId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package