NAV Navigation
cURL HTTP JavaScript Ruby Python Java Go PHP

Welcome

This documentation was last updated on Sat Jun 29 16:46:56 UTC 2024 and covers Mambu Version v9.163.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 more information, see API Responses and Error 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 API 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 field values 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 field values."
        }
    ],
    "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 field values 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 field values 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 field values 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 definition 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 definition 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 field definitions and their values in your filter and search queries for any entities that support custom field definitions. For more information, see Custom Fields in our User Guide.

To filter or sort using a custom field definition you must provide the custom field set ID and the custom field definition 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 field values

{
  ...
  "_customFieldSet": {
    "customFieldDefinitionId1": "value",
    "customFieldDefinitionId2": "value",
    "customFieldDefinitionId3": "value"
  }
  ...
}

Grouped custom field set with custom field values

{
  ...
  "_customFieldSet": [
          {
              "_index": "0",
              "customFieldDefinitionId1": "value",
              "customFieldDefinitionId2": "value",
              "customFieldDefinitionId3": "value"
          },
          {
              "_index": "1",
              "customFieldDefinitionId1": "value",
              "customFieldDefinitionId2": "value",
              "customFieldDefinitionId3": "value"
          }
      ]
  ...
}

Custom fields are fields you may create for several entities that allow you to capture additional relevant information and they are grouped together in custom field sets.

A custom field consists of the custom field definition and the custom field value. The custom field definition is the custom field you create using either the Mambu UI or API which contains information such as its name, ID, type, and usage settings. The custom field value is the actual value that a custom field attached to an entity holds. For more information about custom fields, how to create them, and which entities support them, see Custom Fields in our User Guide.

In API v2, if a JSON object includes a custom field value, then at the end of the JSON object, there will be a custom field set property which will contain the custom field definition ID and the custom field value.

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

A standard custom field set can contain multiple single custom field definitions. Each custom field definition 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 field values.

A grouped custom field set contains groups of custom field definitions. You may have multiple groups of custom field definitions 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 field values and the index of each object in the array.

The type of custom field set dictates how custom field definitions and their values 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 field values 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 custom field value that you have appropriate access to. We will provide more details on how to perform PATCH requests below. For more information on how access to custom field values is managed, see Custom Fields - Configuring rights for roles.

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

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

Example JSON body of a client showing a grouped custom field set with custom field values 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 field values 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 field definitions with IDs amountScore and timeScore and their values.

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

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 field definitions with IDs company and position.

Standard custom field set examples:

Affecting a single custom field value in a custom field set

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

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

To add, replace, or remove a value for a single custom field definition in a custom field set, pass the custom field set ID and the custom field definition 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 definition.

Affecting all the custom field definitions in a custom field set

Replacing all the custom field values in a custom field set

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

To add, replace, or remove all the custom field values 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 custom field values within the custom field set to the value property including the custom field value you are adding or replacing. 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 field definitions.

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

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

Removing one custom field value from the custom field set

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

Removing all the custom field values 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 field definitions 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 value in a custom field group

Adding one custom field value 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 value 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 definition.

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 return: FULL means the full details of the object will be returned (custom field values, address, contact info, or any other related objects) and BASIC will return only the first level elements of the object. query
body InterestAccrualSearchCriteria Represents the filtering criteria and a sorting criteria 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 returned. 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 or deposit account ID for which interest is accrued. none
» accountKey string The encoded key of the loan or deposit account for which interest is accrued. none
» amount number The interest accrued amount for the account in this entry. none
» bookingDate string The booking date in the organization's timezone. none
» branchKey string The encoded key of the account's branch. none
» branchName string The name of the account's branch none
» creationDate string The creation date and time of the entry in UTC. none
» entryId integer(int64) The generated ID of the interest accrual per account entry. none
» entryType string Debit or Credit. none
» foreignAmount ForeignAmount Represents the details of general ledger 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 The foreign currency amount of the accounting entry. none
»» currency Currency Represents a currency. To represent a fiat currency, the code value and the currencyCode value must be the ISO-4217 currency code of the fiat currency. To represent a non-fiat currency, the code value must be NON_FIAT and the currencyCode value must be the currency code of the non-fiat currency. 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 the general ledger account. none
» glAccountKey string The encoded key of the general ledger account used for logging the interest accrual. none
» glAccountName string The name of the general ledger account. none
» glAccountType string The general ledger account type, which can be: ASSET, LIABILITY, EQUITY, INCOME, or EXPENSE. none
» parentEntryId integer(int64) The ID of the general ledger journal entry that logged the interest accrual sum for all accounts of the 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 product type. none
» transactionId string The journal entry transaction ID. 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 ZIG
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

Get accounting rates

Parameters

Name Type Description In
currencyCode (required) string The currency code. 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 returned. 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 currency code. path
body (required) PostAccountingRateDTO Represents the information to create an accounting rate. 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 The accounting rate has been 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}

Get accounting reports

Parameters

Name Type Description In
reportKey (required) string The report's encoded key. 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 The accounting report has been returned. AccountingReport
401 Unauthorized Unauthorized ErrorResponse
403 Forbidden Forbidden ErrorResponse
404 Not Found Accounting 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

Create 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 Represents information for creating an accounting report. 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 Creation of the accounting report 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.

Your user or API consumer must have the View Manage Configuration As Code (GET_MANAGE_CONFIGURATION_AS_CODE) and/or Update Manage Configuration As Code (PUT_MANAGE_CONFIGURATION_AS_CODE) permissions to make GET and/or PUT requests to these configuration as code (CasC) endpoints. For more information about CasC, see Configuration as Code Overview.

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 Represents 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

Rotate API key

API key rotation allows you to invalidate an existing API key and replace it with a new one. To rotate an API key, you must use a secret key for authentication. The request will fail if you include an API key or basic authentication header. 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 API key, by providing the API key to be rotated and the time to live (TTL) of the newly created API key. 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",
  "id": "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}

Get API consumer

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
  }
}

Responses

Status Meaning Description Schema
200 OK API consumer returned. 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}

Update 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
  }
}

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
  }
}

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}

Delete 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 update 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}

Delete API key

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

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

Create API key

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

Get all API consumers

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

Enumerated Values

Parameter Value
paginationDetails ON
paginationDetails OFF

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
    }
  }
]

Responses

Status Meaning Description Schema
200 OK API consumers list returned. 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] [Represents an API consumer.] none
» access ApiConsumerAccess Represents the API consumer permissions and access rights. none
»» administratorAccess boolean TRUE if the API consumer has the administrator user type, FALSE otherwise. Administrators (admins) have all permissions and can perform any action in Mambu. none
»» apiAccess boolean TRUE if the API consumer can authenticate and interact with Mambu APIs, FALSE otherwise. The API consumer may still require additional permissions for specific API requests. read-only
»» canManageAllBranches boolean TRUE if the API consumer permissions apply to all branches, FALSE if they only apply to specific branches. none
»» canManageEntitiesAssignedToOtherOfficers boolean TRUE if the API consumer (that has the credit officer access) can access entities (for example, clients or accounts) assigned to other credit officers, FALSE otherwise. none
»» creditOfficerAccess boolean TRUE if the API consumer has the credit officer user type, FALSE otherwise. Credit officers have the option of having clients and groups assigned to them. none
»» managedBranches [UserManagedBranch] The list of branches that can be managed by the API consumer. If the API consumer has the canManageAllBranches property set to TRUE, this list does not apply. none
»»» branchKey string The encoded key of the branch, it is automatically generated. read-only
»» permissions [string] Permissions for the API consumer. The non-admin API consumers and users are authorized to do actions based a set of permissions in order to access Mambu features. Permissions may be relevant for the API and/or the Mambu UI. none
» assignedBranchKey string The encoded key of the branch this API consumer is assigned to. none
» creationDate string(date-time) The date when the API consumer was created in UTC. read-only
» encodedKey string The encoded key of the entity, generated, globally unique read-only
» id string The ID of the API consumer. read-only
» lastModifiedDate string(date-time) The last time the API consumer was modified in UTC. read-only
» name (required) string The API consumer name. none
» role RoleIdentifier Represents the role identifier. none
»» encodedKey string The encoded key of the entity, generated automatically, globally unique. read-only
»» id string The ID of the role, which can be generated and customized, but must be unique. none
» transactionLimits object The API consumer transaction limits. none
»» additionalProperties integer(int32) none 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 (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

Create 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
  }
}

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
  }
}

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

Get API keys

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 returned. 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] [Represents an API key of an API consumer.] none
» apiKey string A six character cleartext prefix of the API key. The prefix is not guaranteed to be unique. You must base any identification process on the API key ID, not the prefix. none
» expirationTime integer(int32) The time to live (TTL) for the API key in seconds. none
» id string The API key ID. You must base any identification process on the the API key ID as it is guaranteed to be unique. 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

Create secret key

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.

Your user or API consumer must have the View Manage Configuration As Code (GET_MANAGE_CONFIGURATION_AS_CODE) and/or Update Manage Configuration As Code (PUT_MANAGE_CONFIGURATION_AS_CODE) permissions to make GET and/or PUT requests to these configuration as code (CasC) endpoints. For more information about CasC, see Configuration as Code Overview.

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

Get 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 has been returned. 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 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 was 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. The only supported background process types are CRON_JOBS for the EOD processes and MANUAL_CRON_JOBS_TRIGGER for manually triggering the EOD process. 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 the 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 returned. 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 returned. 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}

Get branch

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 return: FULL means the full details of the object will be returned (custom field values, address, contact info, or any other related objects) and 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": {
    "Example_Checkbox_Field": "TRUE",
    "Example_ClientLink_Field": "8a19cdac84a3a6c01778a4f33baf027c",
    "Example_Date_Field": "2018-12-14",
    "Example_Datetime_Field": "2020-12-20T15:30:00.000+01:00",
    "Example_Free_Text_Field": "A free text field up to 255 characters in length",
    "Example_GroupLink_Field": "8a19d63c84a36c7f0184a4f33ba85235",
    "Example_Number_Field": "46290",
    "Example_Select_Field": {
      "example_option_id": "873023434",
      "example_option_value": "option 5"
    },
    "Example_UserLink_Field": "8a19cda5778bea6c01778c17fdff027c"
  },
  "_Example_Grouped_CF_Set": [
    {
      "Example_Checkbox_Field": "TRUE",
      "Example_Free_Text_Field": "A free text field up to 255 characters in length",
      "Example_Number_Field": "46290",
      "Example_Select_Field": [
        {
          "example_option_id": "123",
          "example_option_value": "option 1"
        },
        {
          "example_option_id": "456",
          "example_option_value": "option 7"
        }
      ],
      "_index": "0"
    }
  ],
  "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 returned. 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

Get branches

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 return: FULL means the full details of the object will be returned (custom field values, address, contact info, or any other related objects) and 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 , for example, 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": {
      "Example_Checkbox_Field": "TRUE",
      "Example_ClientLink_Field": "8a19cdac84a3a6c01778a4f33baf027c",
      "Example_Date_Field": "2018-12-14",
      "Example_Datetime_Field": "2020-12-20T15:30:00.000+01:00",
      "Example_Free_Text_Field": "A free text field up to 255 characters in length",
      "Example_GroupLink_Field": "8a19d63c84a36c7f0184a4f33ba85235",
      "Example_Number_Field": "46290",
      "Example_Select_Field": {
        "example_option_id": "873023434",
        "example_option_value": "option 5"
      },
      "Example_UserLink_Field": "8a19cda5778bea6c01778c17fdff027c"
    },
    "_Example_Grouped_CF_Set": [
      {
        "Example_Checkbox_Field": "TRUE",
        "Example_Free_Text_Field": "A free text field up to 255 characters in length",
        "Example_Number_Field": "46290",
        "Example_Select_Field": [
          {
            "example_option_id": "123",
            "example_option_value": "option 1"
          },
          {
            "example_option_id": "456",
            "example_option_value": "option 7"
          }
        ],
        "_index": "0"
      }
    ],
    "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 returned. 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] [Represents a branch.] none
» _Example_Custom_Fields object An example of some custom field values. For more information on working with custom fields using the API, see Using Custom Fields. none
»» Example_Checkbox_Field string A field that will appear as a checkbox in the UI. In the API, the value will be TRUE or FALSE as a string. The value must be provided as a string, not a boolean. none
»» Example_ClientLink_Field string A client link field stores the encodedKey of a client. none
»» Example_Date_Field string(date) A date field takes a date in YYYY-MM-DD format. none
»» Example_Datetime_Field string(datetime) A date field takes a timestamp in YYYY-MM-DDThh:mm:ss.SSS+hh:mm format. none
»» Example_Free_Text_Field any A field that can contain a string of text. Pay attention to proper JSON escaping if providing values for such fields via API. none
»» Example_GroupLink_Field string A group link field takes the encodedKey of a group. none
»» Example_Number_Field string(number) A field supporting numbers only. Please note: the value is to be provided as a string. none
»» Example_Select_Field object A field that supports enumerated values. Requests will fail if the value provided for such a field is not one of the supported IDs or values. none
»» Example_UserLink_Field string A user link field takes the encodedKey of a Mambu user. none
» _Example_Grouped_CF_Set [_Example_Grouped_CF_Set] [An example of grouped custom field values. These custom field sets can be added more than once, each set will have an index, which needs to be provided when adding, updating, or removing individual custom field values. For more information on working with grouped custom fields using the API, see Grouped Custom Fields.] none
»» Example_Checkbox_Field string A field that will appear as a checkbox in the UI. In the API, the value will be TRUE or FALSE as a string. The value must be provided as a string, not a boolean. none
»» Example_Free_Text_Field any A field that can contain a string of text. Pay attention to proper JSON escaping if providing values for such fields via API. none
»» Example_Number_Field string(number) A field supporting numbers only. Please note: the value is to be provided as a string. none
»» Example_Select_Field array A field that supports enumerated values. Requests will fail if the value provided for such a field is not one of the supported IDs or values. none
»» _index string(number) The index for this set of grouped custom field values. none
» addresses [Address] The list of branch addresses. none
»» city string The city for the address. none
»» country string The country. none
»» encodedKey string The address encoded key, which is unique and generated. read-only
»» indexInList integer(int32) The 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 of the address. 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 The address parent key indicating the object owning this address. For example: client, centre, or branch. read-only
»» postcode string The post code. none
»» region string The region for the address. none
» branchHolidays [Holiday] The list of branch holidays. none
»» creationDate string(date-time) The date when the holiday was created. read-only
»» date string(date) The date the holiday takes place. none
»» encodedKey string The encoded key of the entity, generated, globally unique read-only
»» id integer(int64) The ID of the holiday. none
»» isAnnuallyRecurring boolean TRUE if a holiday is annually recurring, FALSE otherwise. none
»» name string The name of the holiday. none
» creationDate string(date-time) The creation date of the branch. none
» emailAddress string The branch email address. none
» encodedKey string The encoded key of the entity, generated, globally unique read-only
» id (required) string The branch ID, which must be unique. none
» lastModifiedDate string(date-time) The last date when the branch was modified. none
» name (required) string The branch name. none
» notes string The notes or description attached to this object. none
» phoneNumber string The branch phone number. none
» state string The branch state. none

Enumerated Values

Property Value
Example_Checkbox_Field TRUE
Example_Checkbox_Field FALSE
Example_Checkbox_Field TRUE
Example_Checkbox_Field FALSE
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 branch

Body parameter

{
  "_Example_Custom_Fields": {
    "Example_Checkbox_Field": "TRUE",
    "Example_ClientLink_Field": "8a19cdac84a3a6c01778a4f33baf027c",
    "Example_Date_Field": "2018-12-14",
    "Example_Datetime_Field": "2020-12-20T15:30:00.000+01:00",
    "Example_Free_Text_Field": "A free text field up to 255 characters in length",
    "Example_GroupLink_Field": "8a19d63c84a36c7f0184a4f33ba85235",
    "Example_Number_Field": "46290",
    "Example_Select_Field": {
      "example_option_id": "873023434",
      "example_option_value": "option 5"
    },
    "Example_UserLink_Field": "8a19cda5778bea6c01778c17fdff027c"
  },
  "_Example_Grouped_CF_Set": [
    {
      "Example_Checkbox_Field": "TRUE",
      "Example_Free_Text_Field": "A free text field up to 255 characters in length",
      "Example_Number_Field": "46290",
      "Example_Select_Field": [
        {
          "example_option_id": "123",
          "example_option_value": "option 1"
        },
        {
          "example_option_id": "456",
          "example_option_value": "option 7"
        }
      ],
      "_index": "0"
    }
  ],
  "addresses": [
    {
      "city": "string",
      "country": "string",
      "indexInList": 0,
      "latitude": 0,
      "line1": "string",
      "line2": "string",
      "longitude": 0,
      "postcode": "string",
      "region": "string"
    }
  ],
  "branchHolidays": [
    {
      "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": {
    "Example_Checkbox_Field": "TRUE",
    "Example_ClientLink_Field": "8a19cdac84a3a6c01778a4f33baf027c",
    "Example_Date_Field": "2018-12-14",
    "Example_Datetime_Field": "2020-12-20T15:30:00.000+01:00",
    "Example_Free_Text_Field": "A free text field up to 255 characters in length",
    "Example_GroupLink_Field": "8a19d63c84a36c7f0184a4f33ba85235",
    "Example_Number_Field": "46290",
    "Example_Select_Field": {
      "example_option_id": "873023434",
      "example_option_value": "option 5"
    },
    "Example_UserLink_Field": "8a19cda5778bea6c01778c17fdff027c"
  },
  "_Example_Grouped_CF_Set": [
    {
      "Example_Checkbox_Field": "TRUE",
      "Example_Free_Text_Field": "A free text field up to 255 characters in length",
      "Example_Number_Field": "46290",
      "Example_Select_Field": [
        {
          "example_option_id": "123",
          "example_option_value": "option 1"
        },
        {
          "example_option_id": "456",
          "example_option_value": "option 7"
        }
      ],
      "_index": "0"
    }
  ],
  "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.

Your user or API consumer must have the View Manage Configuration As Code (GET_MANAGE_CONFIGURATION_AS_CODE) and/or Update Manage Configuration As Code (PUT_MANAGE_CONFIGURATION_AS_CODE) permissions to make GET and/or PUT requests to these configuration as code (CasC) endpoints. For more information about CasC, see Configuration as Code Overview.

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

Get 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 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 Introduction in our User Guide.

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

Increase authorization hold amount

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 Represents the information 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 The card or the authorization hold was not found. ErrorResponse
409 Conflict Operation cannot be performed due to another pending operation that locked shared resources. ErrorResponse

getCardTransaction (Cards)

Code samples

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

GET /cards/{cardReferenceToken}/financialtransactions/{cardTransactionExternalReferenceId} HTTP/1.1

Accept: application/vnd.mambu.v2+json

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

};

$.ajax({
  url: '/cards/{cardReferenceToken}/financialtransactions/{cardTransactionExternalReferenceId}',
  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}/financialtransactions/{cardTransactionExternalReferenceId}',
  params: {
  }, headers: headers

p JSON.parse(result)

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

r = requests.get('/cards/{cardReferenceToken}/financialtransactions/{cardTransactionExternalReferenceId}', 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}/financialtransactions/{cardTransactionExternalReferenceId}', 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}");
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}/financialtransactions/{cardTransactionExternalReferenceId}", data)
    req.Header = headers

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

GET /cards/{cardReferenceToken}/financialtransactions/{cardTransactionExternalReferenceId}

Get card transaction

Parameters

Name Type Description In
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
detailsLevel string The level of details to return: FULL means the full details of the object will be returned (custom field values, address, contact info, or any other related objects) and BASIC will return only the first level elements of the object. query

Enumerated Values

Parameter Value
detailsLevel BASIC
detailsLevel FULL

Example responses

200 Response

{
  "accountBalances": {
    "totalBalance": 0
  },
  "adjustmentTransactionKey": "string",
  "affectedAmounts": {
    "feesAmount": 0,
    "fractionAmount": 0,
    "fundsAmount": 0,
    "interestAmount": 0,
    "overdraftAmount": 0,
    "overdraftFeesAmount": 0,
    "overdraftInterestAmount": 0,
    "technicalOverdraftAmount": 0,
    "technicalOverdraftInterestAmount": 0
  },
  "amount": 0,
  "blockId": "string",
  "bookingDate": "2016-09-06T13:37:50+03:00",
  "branchKey": "string",
  "cardTransaction": {
    "advice": true,
    "amount": 0,
    "cardAcceptor": {
      "city": "string",
      "country": "string",
      "mcc": 0,
      "name": "string",
      "state": "string",
      "street": "string",
      "zip": "string"
    },
    "cardToken": "string",
    "currencyCode": "string",
    "encodedKey": "string",
    "externalAuthorizationReferenceId": "string",
    "externalReferenceId": "string",
    "userTransactionTime": "string"
  },
  "cardTransactionReversals": [
    {
      "_Example_Custom_Fields": {
        "Example_Checkbox_Field": "TRUE",
        "Example_ClientLink_Field": "8a19cdac84a3a6c01778a4f33baf027c",
        "Example_Date_Field": "2018-12-14",
        "Example_Datetime_Field": "2020-12-20T15:30:00.000+01:00",
        "Example_Free_Text_Field": "A free text field up to 255 characters in length",
        "Example_GroupLink_Field": "8a19d63c84a36c7f0184a4f33ba85235",
        "Example_Number_Field": "46290",
        "Example_Select_Field": {
          "example_option_id": "873023434",
          "example_option_value": "option 5"
        },
        "Example_UserLink_Field": "8a19cda5778bea6c01778c17fdff027c"
      },
      "amount": 0,
      "currencyCode": "string",
      "encodedKey": "string",
      "externalReferenceId": "string",
      "id": 0,
      "transactionChannelId": "string"
    }
  ],
  "centreKey": "string",
  "creationDate": "2016-09-06T13:37:50+03:00",
  "currencyCode": "string",
  "encodedKey": "string",
  "externalId": "string",
  "fees": [
    {
      "amount": 0,
      "name": "string",
      "predefinedFeeKey": "string",
      "taxAmount": 0,
      "trigger": "MANUAL"
    }
  ],
  "holdExternalReferenceId": "string",
  "id": "string",
  "interestAccruedAmounts": {
    "interestAccrued": 0,
    "negativeInterestAccrued": 0,
    "overdraftInterestAccrued": 0,
    "technicalOverdraftInterestAccrued": 0
  },
  "migrationEventKey": "string",
  "notes": "string",
  "originalTransactionKey": "string",
  "parentAccountKey": "string",
  "paymentDetails": {
    "creditor": {
      "name": "string"
    },
    "creditorAccount": {
      "currency": "string",
      "identification": {
        "iban": "string",
        "other": {
          "identification": "string",
          "scheme": "string"
        }
      }
    },
    "creditorAgent": {
      "financialInstitutionIdentification": {
        "bic": "string"
      }
    },
    "debtor": {
      "name": "string"
    },
    "debtorAccount": {
      "currency": "string",
      "identification": {
        "iban": "string",
        "other": {
          "identification": "string",
          "scheme": "string"
        }
      }
    },
    "debtorAgent": {
      "financialInstitutionIdentification": {
        "bic": "string"
      }
    },
    "paymentIdentification": {
      "endToEndIdentification": "string",
      "instructionIdentification": "string",
      "transactionIdentification": "string"
    },
    "paymentTypeInformation": {
      "serviceLevel": {
        "code": "string"
      }
    },
    "remittanceInformation": {
      "structured": {
        "creditorReferenceInformation": {
          "reference": "string",
          "referenceIssuer": "string",
          "referenceType": "string"
        }
      },
      "unstructured": "string"
    }
  },
  "paymentOrderId": "string",
  "taxes": {
    "taxRate": 0
  },
  "terms": {
    "interestSettings": {
      "indexInterestRate": 0,
      "interestRate": 0
    },
    "overdraftInterestSettings": {
      "indexInterestRate": 0,
      "interestRate": 0
    },
    "overdraftSettings": {
      "overdraftLimit": 0
    }
  },
  "tillKey": "string",
  "transactionDetails": {
    "transactionChannelId": "string",
    "transactionChannelKey": "string"
  },
  "transferDetails": {
    "linkedDepositTransactionKey": "string",
    "linkedLoanTransactionKey": "string"
  },
  "type": "IMPORT",
  "userKey": "string",
  "valueDate": "2016-09-06T13:37:50+03:00"
}

Responses

Status Meaning Description Schema
200 OK The card transaction has been returned. GetCardTransaction
400 Bad Request A validation error occurred ErrorResponse
401 Unauthorized Unauthorized ErrorResponse
403 Forbidden Forbidden ErrorResponse
404 Not Found The card was not found. 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}

Get 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

200 Response

{
  "accountKey": "string",
  "advice": true,
  "amount": 0,
  "balances": {
    "accountId": "string",
    "availableBalance": 0,
    "cardType": "DEBIT",
    "creditLimit": 0,
    "currencyCode": "string",
    "totalBalance": 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",
  "customExpirationPeriod": 0,
  "encodedKey": "string",
  "exchangeRate": 0,
  "externalReferenceId": "string",
  "originalAmount": 0,
  "originalCurrency": "string",
  "partial": true,
  "referenceDateForExpiration": "2016-09-06T13:37:50+03:00",
  "source": "CARD",
  "status": "PENDING",
  "userTransactionTime": "string"
}

Responses

Status Meaning Description Schema
200 OK The authorization hold has been returned. GetAuthorizationHold
400 Bad Request A validation error occurred ErrorResponse
401 Unauthorized Unauthorized ErrorResponse
403 Forbidden Forbidden ErrorResponse
404 Not Found The card was 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}

Reverse 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 The card or the authorization hold was not found. ErrorResponse
409 Conflict Operation cannot be performed due to another pending operation that locked shared resources. ErrorResponse

patchAuthorizationHold (Cards)

Code samples

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

PATCH /cards/{cardReferenceToken}/authorizationholds/{authorizationHoldExternalReferenceId} 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}',
  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 '/cards/{cardReferenceToken}/authorizationholds/{authorizationHoldExternalReferenceId}',
  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('/cards/{cardReferenceToken}/authorizationholds/{authorizationHoldExternalReferenceId}', 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','/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("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", "/cards/{cardReferenceToken}/authorizationholds/{authorizationHoldExternalReferenceId}", data)
    req.Header = headers

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

PATCH /cards/{cardReferenceToken}/authorizationholds/{authorizationHoldExternalReferenceId}

Partially update an authorization hold

Body parameter

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

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) 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
102 Processing Your idempotent request was already submitted and is currently being processed, try again later. None
204 No Content The authorization hold has been updated. None
400 Bad Request A validation error occurred ErrorResponse
401 Unauthorized Unauthorized ErrorResponse
403 Forbidden Forbidden ErrorResponse
404 Not Found The card was 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

Reverse card transaction

Body parameter

{
  "_Example_Custom_Fields": {
    "Example_Checkbox_Field": "TRUE",
    "Example_ClientLink_Field": "8a19cdac84a3a6c01778a4f33baf027c",
    "Example_Date_Field": "2018-12-14",
    "Example_Datetime_Field": "2020-12-20T15:30:00.000+01:00",
    "Example_Free_Text_Field": "A free text field up to 255 characters in length",
    "Example_GroupLink_Field": "8a19d63c84a36c7f0184a4f33ba85235",
    "Example_Number_Field": "46290",
    "Example_Select_Field": {
      "example_option_id": "873023434",
      "example_option_value": "option 5"
    },
    "Example_UserLink_Field": "8a19cda5778bea6c01778c17fdff027c"
  },
  "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 transaction was reversed. None
400 Bad Request A validation error occurred ErrorResponse
401 Unauthorized Unauthorized ErrorResponse
403 Forbidden Forbidden ErrorResponse
404 Not Found The card was not found. ErrorResponse
409 Conflict Operation cannot 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