NAV Navbar
cURL HTTP JavaScript Node.js Ruby Python Java Go

Welcome

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

Welcome to the Mambu API 2.0 (Beta) documentation. Here you can learn everything you need to know about our API and how to interact with Mambu!

We have 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 blue tabs at the top right.

About Mambu API 2.0

HTTP Verbs

In Mambu API 2.0, standard HTTP verbs are used to indicate the intent and method of an API request.

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

Base URL

The base URL for requests to the API is found below:

Authentication

Mambu requires Basic Authentication for authorizing all API calls. A username and password is specified with each request and is verified on the server to prevent unauthorized access. To ensure the username and password cannot be intercepted, all requests must use HTTPS.

Versioning

Code samples

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

GET https://localhost:8889/api/Insert-Resource-URI-here HTTP/1.1
Host: localhost:8889

Accept: application/vnd.mambu.v2+json

NOTE: Replace 'GET' above with the required HTTP verb.
Placing a {token} at the beginning of this code sample breaks the highlighting,
making it nearly impossible to read.
var headers = {
  'Accept':'application/vnd.mambu.v2+json'

};

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

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

const request = require('node-fetch');

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

};

fetch('https://localhost:8889/api/{Insert resource URI here}',
{
  method: '{HTTP Verb}',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

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

result = RestClient.{HTTP Verb} 'https://localhost:8889/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://localhost:8889/api/{Insert resource URI here}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://localhost:8889/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://localhost:8889/api/{Insert resource URI here}", data)
    req.Header = headers

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

Mambu API 2.0 features a new 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.

Idempotency

Code samples

# You can also use wget
curl -X POST https://localhost:8889/api/deposits/{depositAccountId}/transactions \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/vnd.mambu.v2+json' \
  -H 'Idempotency-Key: oMHMjEZWF6NWvU'

POST https://localhost:8889/api/deposits/{depositAccountId}/transactions HTTP/1.1
Host: localhost:8889
Content-Type: application/json
Accept: application/vnd.mambu.v2+json
Idempotency-Key: oMHMjEZWF6NWvU

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

};

$.ajax({
  url: 'https://localhost:8889/api/deposits/{depositAccountId}/transactions',
  method: 'post',

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

const request = require('node-fetch');
const inputBody = '{
  "migrationEventKey": "string",
  "transactionDetails": {
    "encodedKey": "string",
    "transactionChannelKey": "string",
    "transactionChannelId": "string"
  },
  "notes": "string",
  "affectedAmounts": {
    "feesAmount": 0,
    "overdraftInterestAmount": 0,
    "overdraftFeesAmount": 0,
    "fractionAmount": 0,
    "overdraftAmount": 0,
    "interestAmount": 0,
    "fundsAmount": 0
  },
  "cardTransaction": {
    "externalReferenceId": "string",
    "advice": false,
    "externalAuthorizationReferenceId": "string",
    "cardAcceptor": {
      "zip": "string",
      "country": "string",
      "city": "string",
      "name": "string",
      "state": "string",
      "mcc": 0
    },
    "userTransactionTime": "string",
    "currencyCode": "string",
    "transactionChannelId": "string"
  },
  "taxes": {
    "taxRate": 0
  },
  "tillKey": "string",
  "type": "IMPORT",
  "balances": {
    "totalBalance": 0
  },
  "terms": {
    "interestSettings": {
      "interestRate": 0
    },
    "overdraftSettings": {
      "overdraftLimit": 0
    },
    "overdraftInterestSettings": {
      "interestRate": 0,
      "indexInterestRate": 0
    }
  },
  "reversalTransactionKey": "string",
  "id": "string",
  "originalTransactionKey": "string",
  "amount": 0,
  "linkedDepositTransactionKey": "string",
  "entryDate": "2016-09-06T13:37:50+03:00",
  "externalId": "string",
  "userKey": "string",
  "parentAccountKey": "string",
  "linkedLoanTransactionKey": "string",
  "productTypeKey": "string",
  "currencyCode": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/vnd.mambu.v2+json',
  'Idempotency-Key':'oMHMjEZWF6NWvU'

};

fetch('https://localhost:8889/api/deposits/{depositAccountId}/transactions',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

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

result = RestClient.post 'https://localhost:8889/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': 'oMHMjEZWF6NWvU'
}

r = requests.post('https://localhost:8889/api/deposits/{depositAccountId}/transactions', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://localhost:8889/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{"oMHMjEZWF6NWvU"},

    }

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

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

Following REST design principles, our API is designed to be robust in the event of failure. When working with financial transactions, it is especially important that interruptions in communication do not result in accidental data loss or duplication. If a user sends a request but never receives a response, they should be able to safely retry the request without fear of accidentally performing the action twice. In other words, the system should be designed so that a request will perform the desired action "exactly once", no matter how often it is repeated. This concept is called Idempotence.

Example Situations

Client Responsibilities

Support for idempotent requests is an integral part of our API and does not require any further set-up. Clients can choose whether to use Mambu in an idempotent manner or not on a request by request basis. When making idempotent request, clients should keep the following requirements in mind.

Idempotency keys must

Retry mechanisms must

Pagination

Code samples

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

GET https://localhost:8889/api/Insert-Resource-URI-here?offset=10&limit=10&paginationDetails=ON HTTP/1.1
Host: localhost:8889

Accept: application/vnd.mambu.v2+json

NOTE: Replace 'GET' above with the required HTTP verb.
Placing a {token} at the beginning of this code sample breaks the highlighting,
making it nearly impossible to read.
var headers = {
  'Accept':'application/vnd.mambu.v2+json'

};

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

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

const request = require('node-fetch');

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

};

fetch('https://localhost:8889/api/{Insert resource URI here}'?offset=10&limit=10&paginationDetails=ON,
{
  method: '{HTTP Verb}',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

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

result = RestClient.{HTTP Verb} 'https://localhost:8889/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://localhost:8889/api/{Insert resource URI here}?offset=10&limit=10&paginationDetails=ON', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://localhost:8889/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://localhost:8889/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 2.0 has customizable pagination capabilities, however this functionality is deactivated by default and must be specified in each request.

In order to view pagination details, append ?paginationDetails=ON to the end of the resource URI in your request. The pagination details (including total number of records) will be returned as headers in the response.

To further customize the response, the offset and limit parameters can be adjusted from their default values.

limit

The default limit for responses is 50. A value of up to 1,000 can be specified with limit.

offset

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

Detail Level

Code samples

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

GET https://localhost:8889/api/Insert-Resource-URI-here?detailsLevel=FULL HTTP/1.1
Host: localhost:8889

Accept: application/vnd.mambu.v2+json

NOTE: Replace 'GET' above with the required HTTP verb.
Placing a {token} at the beginning of this code sample breaks the highlighting,
making it nearly impossible to read.
var headers = {
  'Accept':'application/vnd.mambu.v2+json'

};

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

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

const request = require('node-fetch');

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

};

fetch('https://localhost:8889/api/{Insert resource URI here}?detailsLevel=FULL',
{
  method: '{HTTP Verb}',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

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

result = RestClient.{HTTP Verb} 'https://localhost:8889/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://localhost:8889/api/{Insert resource URI here}?detailsLevel=FULL', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://localhost:8889/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://localhost:8889/api/{Insert resource URI here}?detailsLevel=FULL", data)
    req.Header = headers

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

Mambu API 2.0 supports two detail levels for responses:

To view a higher level of detail, append ?detailsLevel=FULL to the end of the resource URI in your request.

Using the API

Requests

Code samples

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

GET https://localhost:8889/api/Insert-Resource-URI-here HTTP/1.1
Host: localhost:8889

Accept: application/vnd.mambu.v2+json

NOTE: Replace 'GET' above with the required HTTP verb.
Placing a {token} at the beginning of this code sample breaks the highlighting,
making it nearly impossible to read.
var headers = {
  'Accept':'application/vnd.mambu.v2+json'

};

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

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

const request = require('node-fetch');

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

};

fetch('https://localhost:8889/api/{Insert resource URI here}',
{
  method: '{HTTP Verb}',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

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

result = RestClient.{HTTP Verb} 'https://localhost:8889/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://localhost:8889/api/{Insert resource URI here}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://localhost:8889/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://localhost:8889/api/{Insert resource URI here}", data)
    req.Header = headers

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

Also referred to as "calls", requests 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",
},

Single Resource - JSON object

{
  "field": "value"
}

Collection of Resources - JSON array

[
  {
    "field": "value"
  },
  {
    "field": "value"
  }
]

The response to a request will always be in JSON format and will contain either:

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

or

Generate an SDK

You can also generate a SDK Client for each resource in 50+ programming languages. To do so:

  1. Visit your instance's Swagger documentation page at https://{yourtenantname}.mambu.com/apidocs or visit the page for our demo tenant.

  2. Choose a resource from the drop-down menu in the upper right-hand corner.

  3. Scroll down to the "SDK Client" section at the bottom of the page.

  4. Choose from the available programming languages via the drop-down menu at the left.

  5. Click Generate SDK.

Branches

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

getAll

Code samples

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

GET https://localhost:8889/api/branches HTTP/1.1
Host: localhost:8889

Accept: application/vnd.mambu.v2+json

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

};

$.ajax({
  url: 'https://localhost:8889/api/branches',
  method: 'get',

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

const request = require('node-fetch');

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

};

fetch('https://localhost:8889/api/branches',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

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

result = RestClient.get 'https://localhost:8889/api/branches',
  params: {
  }, headers: headers

p JSON.parse(result)

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

r = requests.get('https://localhost:8889/api/branches', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://localhost:8889/api/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", "https://localhost:8889/api/branches", data)
    req.Header = headers

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

GET /branches

Allows retrieval of branches using various query parameters

Parameters

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

Enumerated Values

Parameter Value
paginationDetails ON
paginationDetails OFF
detailsLevel BASIC
detailsLevel FULL

Example responses

200 Response

[
  {
    "emailAddress": "string",
    "addresses": [
      {
        "country": "string",
        "parentKey": "string",
        "city": "string",
        "latitude": 0,
        "postcode": "string",
        "indexInList": 0,
        "encodedKey": "string",
        "region": "string",
        "line2": "string",
        "line1": "string",
        "longitude": 0
      }
    ],
    "phoneNumber": "string",
    "notes": "string",
    "lastModifiedDate": "2016-09-06T13:37:50+03:00",
    "name": "string",
    "encodedKey": "string",
    "id": "string",
    "state": "ACTIVE",
    "creationDate": "2016-09-06T13:37:50+03:00",
    "branchHolidays": [
      {
        "name": "string",
        "date": "1987-04-26",
        "encodedKey": "string",
        "isAnnuallyRecurring": false,
        "creationDate": "2016-09-06T13:37:50+03:00"
      }
    ]
  }
]

Responses

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

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [Branch] false none none
» emailAddress string false none branch email address
» addresses [Address] false none list of branch addresses
»» country string false none The country
»» parentKey string false read-only Address parent key, the object owning this address, client, centre, branch
»» city string false none The city for this address
»» latitude number false none The GPS latitude of this address in signed degrees format (DDD.dddd) with 6 decimal positions, ranging from -90 to +90
»» postcode string false none The post code
»» indexInList integer(int32) false none Index of this address in the list of addresses
»» encodedKey string false read-only Address encoded key, unique, generated
»» region string false none The region that is part of the address
»» line2 string false none The second line for the address, in case the first one doesn't fit the information, this is completely optional
»» line1 string false none The first line of the address
»» longitude number false none The GPS longitude of this address in signed degrees format (DDD.dddd) with 6 decimal positions, ranging from -180 to +180
» phoneNumber string false none branch phone number, as a string
» notes string false none notes about this branch
» lastModifiedDate string(date-time) false none last date when the branch was modified
» name string false none branch name
» encodedKey string false read-only The encoded key of the entity, generated, globally unique
» id string false none branch ID, unique
» state string false none branch state
» creationDate string(date-time) false none creation date of the branch
» branchHolidays [Holiday] false none list of branch holidays
»» name string false none holiday name
»» date string(date) false none holiday date
»» encodedKey string false read-only The encoded key of the entity, generated, globally unique
»» isAnnuallyRecurring boolean false none if is annually recurring
»» creationDate string(date-time) false none holiday creation date

Enumerated Values

Property Value
state ACTIVE
state INACTIVE

Response Headers

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

getById

Code samples

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

GET https://localhost:8889/api/branches/{branchId} HTTP/1.1
Host: localhost:8889

Accept: application/vnd.mambu.v2+json

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

};

$.ajax({
  url: 'https://localhost:8889/api/branches/{branchId}',
  method: 'get',

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

const request = require('node-fetch');

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

};

fetch('https://localhost:8889/api/branches/{branchId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

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

result = RestClient.get 'https://localhost:8889/api/branches/{branchId}',
  params: {
  }, headers: headers

p JSON.parse(result)

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

r = requests.get('https://localhost:8889/api/branches/{branchId}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://localhost:8889/api/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", "https://localhost:8889/api/branches/{branchId}", data)
    req.Header = headers

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

GET /branches/{branchId}

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

Parameters

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

Enumerated Values

Parameter Value
detailsLevel BASIC
detailsLevel FULL

Example responses

200 Response

{
  "emailAddress": "string",
  "addresses": [
    {
      "country": "string",
      "parentKey": "string",
      "city": "string",
      "latitude": 0,
      "postcode": "string",
      "indexInList": 0,
      "encodedKey": "string",
      "region": "string",
      "line2": "string",
      "line1": "string",
      "longitude": 0
    }
  ],
  "phoneNumber": "string",
  "notes": "string",
  "lastModifiedDate": "2016-09-06T13:37:50+03:00",
  "name": "string",
  "encodedKey": "string",
  "id": "string",
  "state": "ACTIVE",
  "creationDate": "2016-09-06T13:37:50+03:00",
  "branchHolidays": [
    {
      "name": "string",
      "date": "1987-04-26",
      "encodedKey": "string",
      "isAnnuallyRecurring": false,
      "creationDate": "2016-09-06T13:37:50+03:00"
    }
  ]
}

Responses

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

Cards

Allows CRUD operations on card references and their associated items.

createAuthorizationHold

Code samples

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

POST https://localhost:8889/api/cards/{cardReferenceToken}/authorizationholds HTTP/1.1
Host: localhost:8889
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: 'https://localhost:8889/api/cards/{cardReferenceToken}/authorizationholds',
  method: 'post',

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

const request = require('node-fetch');
const inputBody = '{
  "externalReferenceId": "string",
  "advice": false,
  "cardAcceptor": {
    "zip": "string",
    "country": "string",
    "city": "string",
    "name": "string",
    "state": "string",
    "mcc": 0
  },
  "userTransactionTime": "string",
  "currencyCode": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/vnd.mambu.v2+json',
  'Idempotency-Key':'string'

};

fetch('https://localhost:8889/api/cards/{cardReferenceToken}/authorizationholds',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

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

result = RestClient.post 'https://localhost:8889/api/cards/{cardReferenceToken}/authorizationholds',
  params: {
  }, headers: headers

p JSON.parse(result)

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

r = requests.post('https://localhost:8889/api/cards/{cardReferenceToken}/authorizationholds', params={

}, headers = headers)

print r.json()

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

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://localhost:8889/api/cards/{cardReferenceToken}/authorizationholds", data)
    req.Header = headers

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

POST /cards/{cardReferenceToken}/authorizationholds

Creates an authorization hold corresponding to a given card.

Body parameter

{
  "externalReferenceId": "string",
  "advice": false,
  "cardAcceptor": {
    "zip": "string",
    "country": "string",
    "city": "string",
    "name": "string",
    "state": "string",
    "mcc": 0
  },
  "userTransactionTime": "string",
  "currencyCode": "string"
}

Parameters

Parameter In Type Required Description
Idempotency-Key header string false 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.
cardReferenceToken path string true The token used to externally identify the card.
body body AuthorizationHold true The authorization hold to be created.

Example responses

201 Response

{
  "externalReferenceId": "string",
  "amount": 0,
  "advice": false,
  "cardAcceptor": {
    "zip": "string",
    "country": "string",
    "city": "string",
    "name": "string",
    "state": "string",
    "mcc": 0
  },
  "encodedKey": "string",
  "userTransactionTime": "string",
  "currencyCode": "string",
  "cardToken": "string",
  "status": "PENDING"
}

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 authorization hold was successfully created. AuthorizationHold
400 Bad Request A Validation error occurred ErrorResponse
401 Unauthorized UNAUTHORIZED ErrorResponse
403 Forbidden Forbidden ErrorResponse
404 Not Found Card not found. ErrorResponse

reverseAuthorizationHold

Code samples

# You can also use wget
curl -X DELETE https://localhost:8889/api/cards/{cardReferenceToken}/authorizationholds/{authorizationHoldExternalReferenceId} \
  -H 'Accept: application/vnd.mambu.v2+json' \
  -H 'Idempotency-Key: string'

DELETE https://localhost:8889/api/cards/{cardReferenceToken}/authorizationholds/{authorizationHoldExternalReferenceId} HTTP/1.1
Host: localhost:8889

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

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

};

$.ajax({
  url: 'https://localhost:8889/api/cards/{cardReferenceToken}/authorizationholds/{authorizationHoldExternalReferenceId}',
  method: 'delete',

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

const request = require('node-fetch');

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

};

fetch('https://localhost:8889/api/cards/{cardReferenceToken}/authorizationholds/{authorizationHoldExternalReferenceId}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

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

result = RestClient.delete 'https://localhost:8889/api/cards/{cardReferenceToken}/authorizationholds/{authorizationHoldExternalReferenceId}',
  params: {
  }, headers: headers

p JSON.parse(result)

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

r = requests.delete('https://localhost:8889/api/cards/{cardReferenceToken}/authorizationholds/{authorizationHoldExternalReferenceId}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://localhost:8889/api/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"},
        "Idempotency-Key": []string{"string"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://localhost:8889/api/cards/{cardReferenceToken}/authorizationholds/{authorizationHoldExternalReferenceId}", data)
    req.Header = headers

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

DELETE /cards/{cardReferenceToken}/authorizationholds/{authorizationHoldExternalReferenceId}

Reverses an authorization hold.

Parameters

Parameter In Type Required Description
Idempotency-Key header string false 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.
cardReferenceToken path string true The token used to externally identify the card.
authorizationHoldExternalReferenceId path string true The ID used to reference the authorization hold.

Example responses

400 Response

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

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 reversed. None
400 Bad Request A Validation error occurred ErrorResponse
401 Unauthorized UNAUTHORIZED ErrorResponse
403 Forbidden Forbidden ErrorResponse
404 Not Found Card or authorization hold not found. ErrorResponse

decreaseAuthorizationHold

Code samples

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

POST https://localhost:8889/api/cards/{cardReferenceToken}/authorizationholds/{authorizationHoldExternalReferenceId}:decrease HTTP/1.1
Host: localhost:8889
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: 'https://localhost:8889/api/cards/{cardReferenceToken}/authorizationholds/{authorizationHoldExternalReferenceId}:decrease',
  method: 'post',

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

const request = require('node-fetch');
const inputBody = '{
  "externalReferenceId": "string",
  "amount": 0,
  "currencyCode": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/vnd.mambu.v2+json',
  'Idempotency-Key':'string'

};

fetch('https://localhost:8889/api/cards/{cardReferenceToken}/authorizationholds/{authorizationHoldExternalReferenceId}:decrease',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

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

result = RestClient.post 'https://localhost:8889/api/cards/{cardReferenceToken}/authorizationholds/{authorizationHoldExternalReferenceId}:decrease',
  params: {
  }, headers: headers

p JSON.parse(result)

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

r = requests.post('https://localhost:8889/api/cards/{cardReferenceToken}/authorizationholds/{authorizationHoldExternalReferenceId}:decrease', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://localhost:8889/api/cards/{cardReferenceToken}/authorizationholds/{authorizationHoldExternalReferenceId}:decrease");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://localhost:8889/api/cards/{cardReferenceToken}/authorizationholds/{authorizationHoldExternalReferenceId}:decrease", data)
    req.Header = headers

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

POST /cards/{cardReferenceToken}/authorizationholds/{authorizationHoldExternalReferenceId}:decrease

Decreases the amount of an authorization hold. If the amount is greater or equal to the authorization hold amount, then the authorization hold is reversed.

Body parameter

{
  "externalReferenceId": "string",
  "amount": 0,
  "currencyCode": "string"
}

Parameters

Parameter In Type Required Description
Idempotency-Key header string false 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.
cardReferenceToken path string true The token used to externally identify the card.
authorizationHoldExternalReferenceId path string true The ID used to reference the authorization hold.
body body AuthorizationHoldAmountAdjustmentRequest true The request containing the necessary fields to decrease the amount of an authorization hold.

Example responses

400 Response

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

Responses

Status Meaning Description Schema
102 Processing Your idempotent request was already submitted and is currently being processed, try again later. None
204 No Content The authorization hold was successfully decreased. None
400 Bad Request A Validation error occurred ErrorResponse
401 Unauthorized UNAUTHORIZED ErrorResponse
403 Forbidden Forbidden ErrorResponse
404 Not Found Card or authorization hold not found. ErrorResponse

increaseAuthorizationHold

Code samples

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

POST https://localhost:8889/api/cards/{cardReferenceToken}/authorizationholds/{authorizationHoldExternalReferenceId}:increase HTTP/1.1
Host: localhost:8889
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: 'https://localhost:8889/api/cards/{cardReferenceToken}/authorizationholds/{authorizationHoldExternalReferenceId}:increase',
  method: 'post',

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

const request = require('node-fetch');
const inputBody = '{
  "externalReferenceId": "string",
  "amount": 0,
  "currencyCode": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/vnd.mambu.v2+json',
  'Idempotency-Key':'string'

};

fetch('https://localhost:8889/api/cards/{cardReferenceToken}/authorizationholds/{authorizationHoldExternalReferenceId}:increase',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

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

result = RestClient.post 'https://localhost:8889/api/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('https://localhost:8889/api/cards/{cardReferenceToken}/authorizationholds/{authorizationHoldExternalReferenceId}:increase', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://localhost:8889/api/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", "https://localhost:8889/api/cards/{cardReferenceToken}/authorizationholds/{authorizationHoldExternalReferenceId}:increase", data)
    req.Header = headers

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

POST /cards/{cardReferenceToken}/authorizationholds/{authorizationHoldExternalReferenceId}:increase

Increases the amount of an authorization hold.

Body parameter

{
  "externalReferenceId": "string",
  "amount": 0,
  "currencyCode": "string"
}

Parameters

Parameter In Type Required Description
Idempotency-Key header string false 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.
cardReferenceToken path string true The token used to externally identify the card.
authorizationHoldExternalReferenceId path string true The ID used to reference the authorization hold.
body body AuthorizationHoldAmountAdjustmentRequest true The request containing the necessary fields to increase the amount of an authorization hold.

Example responses

400 Response

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

Responses

Status Meaning Description Schema
102 Processing Your idempotent request was already submitted and is currently being processed, try again later. None
204 No Content The authorization hold was successfully increased. None
400 Bad Request A Validation error occurred ErrorResponse
401 Unauthorized UNAUTHORIZED ErrorResponse
403 Forbidden Forbidden ErrorResponse
404 Not Found Card or authorization hold not found. ErrorResponse

createCardTransaction

Code samples

# You can also use wget
curl -X POST https://localhost:8889/api/cards/{cardReferenceToken}/financialtransactions \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/vnd.mambu.v2+json' \
  -H 'Idempotency-Key: string'

POST https://localhost:8889/api/cards/{cardReferenceToken}/financialtransactions HTTP/1.1
Host: localhost:8889
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: 'https://localhost:8889/api/cards/{cardReferenceToken}/financialtransactions',
  method: 'post',

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

const request = require('node-fetch');
const inputBody = '{
  "externalReferenceId": "string",
  "advice": false,
  "externalAuthorizationReferenceId": "string",
  "cardAcceptor": {
    "zip": "string",
    "country": "string",
    "city": "string",
    "name": "string",
    "state": "string",
    "mcc": 0
  },
  "userTransactionTime": "string",
  "currencyCode": "string",
  "transactionChannelId": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/vnd.mambu.v2+json',
  'Idempotency-Key':'string'

};

fetch('https://localhost:8889/api/cards/{cardReferenceToken}/financialtransactions',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

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

result = RestClient.post 'https://localhost:8889/api/cards/{cardReferenceToken}/financialtransactions',
  params: {
  }, headers: headers

p JSON.parse(result)

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

r = requests.post('https://localhost:8889/api/cards/{cardReferenceToken}/financialtransactions', params={

}, headers = headers)

print r.json()

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

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://localhost:8889/api/cards/{cardReferenceToken}/financialtransactions", data)
    req.Header = headers

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

POST /cards/{cardReferenceToken}/financialtransactions

Creates a financial transaction corresponding to a given card.

Body parameter

{
  "externalReferenceId": "string",
  "advice": false,
  "externalAuthorizationReferenceId": "string",
  "cardAcceptor": {
    "zip": "string",
    "country": "string",
    "city": "string",
    "name": "string",
    "state": "string",
    "mcc": 0
  },
  "userTransactionTime": "string",
  "currencyCode": "string",
  "transactionChannelId": "string"
}

Parameters

Parameter In Type Required Description
Idempotency-Key header string false 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.
cardReferenceToken path string true The token used to externally identify the card.
body body CardTransactionInput true The financial transaction to be created.

Example responses

201 Response

{
  "externalReferenceId": "string",
  "amount": 0,
  "advice": false,
  "externalAuthorizationReferenceId": "string",
  "cardAcceptor": {
    "zip": "string",
    "country": "string",
    "city": "string",
    "name": "string",
    "state": "string",
    "mcc": 0
  },
  "encodedKey": "string",
  "userTransactionTime": "string",
  "currencyCode": "string",
  "transactionChannelId": "string",
  "cardToken": "string"
}

Responses

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

reverseCardWithdrawalTransaction

Code samples

# You can also use wget
curl -X POST https://localhost:8889/api/cards/{cardReferenceToken}/financialtransactions/{cardTransactionExternalReferenceId}:decrease \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/vnd.mambu.v2+json' \
  -H 'Idempotency-Key: string'

POST https://localhost:8889/api/cards/{cardReferenceToken}/financialtransactions/{cardTransactionExternalReferenceId}:decrease HTTP/1.1
Host: localhost:8889
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: 'https://localhost:8889/api/cards/{cardReferenceToken}/financialtransactions/{cardTransactionExternalReferenceId}:decrease',
  method: 'post',

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

const request = require('node-fetch');
const inputBody = '{
  "externalReferenceId": "string",
  "amount": 0,
  "currencyCode": "string",
  "transactionChannelId": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/vnd.mambu.v2+json',
  'Idempotency-Key':'string'

};

fetch('https://localhost:8889/api/cards/{cardReferenceToken}/financialtransactions/{cardTransactionExternalReferenceId}:decrease',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

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

result = RestClient.post 'https://localhost:8889/api/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('https://localhost:8889/api/cards/{cardReferenceToken}/financialtransactions/{cardTransactionExternalReferenceId}:decrease', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://localhost:8889/api/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", "https://localhost:8889/api/cards/{cardReferenceToken}/financialtransactions/{cardTransactionExternalReferenceId}:decrease", data)
    req.Header = headers

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

POST /cards/{cardReferenceToken}/financialtransactions/{cardTransactionExternalReferenceId}:decrease

Reverses a card withdrawal transaction.

Body parameter

{
  "externalReferenceId": "string",
  "amount": 0,
  "currencyCode": "string",
  "transactionChannelId": "string"
}

Parameters

Parameter In Type Required Description
Idempotency-Key header string false 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.
cardReferenceToken path string true The token used to externally identify the card.
cardTransactionExternalReferenceId path string true The external reference of a card transaction used to identify the card transaction.
body body CardTransactionReversal true The card withdrawal transaction to be reversed.

Example responses

400 Response

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

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 withdrawal reversal was successfully completed None
400 Bad Request A Validation error occurred ErrorResponse
401 Unauthorized UNAUTHORIZED ErrorResponse
403 Forbidden Forbidden ErrorResponse
404 Not Found Card not found. ErrorResponse

Centres

Allows retrieving centres which are being used by an organisation. A Centre is a common meeting area that credit officers and the individual and group clients go to.

getAll

Code samples

# You can also use wget
curl -X GET https://localhost:8889/api/centres \
  -H 'Accept: application/vnd.mambu.v2+json'

GET https://localhost:8889/api/centres HTTP/1.1
Host: localhost:8889

Accept: application/vnd.mambu.v2+json

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

};

$.ajax({
  url: 'https://localhost:8889/api/centres',
  method: 'get',

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

const request = require('node-fetch');

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

};

fetch('https://localhost:8889/api/centres',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

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

result = RestClient.get 'https://localhost:8889/api/centres',
  params: {
  }, headers: headers

p JSON.parse(result)

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

r = requests.get('https://localhost:8889/api/centres', params={

}, headers = headers)

print r.json()

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

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

    }

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

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

GET /centres

Allows retrieval of centres using various query parameters

Parameters

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

Enumerated Values

Parameter Value
paginationDetails ON
paginationDetails OFF
detailsLevel BASIC
detailsLevel FULL

Example responses

200 Response

[
  {
    "addresses": [
      {
        "country": "string",
        "parentKey": "string",
        "city": "string",
        "latitude": 0,
        "postcode": "string",
        "indexInList": 0,
        "encodedKey": "string",
        "region": "string",
        "line2": "string",
        "line1": "string",
        "longitude": 0
      }
    ],
    "notes": "string",
    "lastModifiedDate": "2016-09-06T13:37:50+03:00",
    "name": "string",
    "meetingDay": "string",
    "encodedKey": "string",
    "id": "string",
    "state": "ACTIVE",
    "creationDate": "2016-09-06T13:37:50+03:00",
    "assignedBranchKey": "string"
  }
]

Responses

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

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [Centre] false none none
» addresses [Address] false none The addresses of this centre
»» country string false none The country
»» parentKey string false read-only Address parent key, the object owning this address, client, centre, branch
»» city string false none The city for this address
»» latitude number false none The GPS latitude of this address in signed degrees format (DDD.dddd) with 6 decimal positions, ranging from -90 to +90
»» postcode string false none The post code
»» indexInList integer(int32) false none Index of this address in the list of addresses
»» encodedKey string false read-only Address encoded key, unique, generated
»» region string false none The region that is part of the address
»» line2 string false none The second line for the address, in case the first one doesn't fit the information, this is completely optional
»» line1 string false none The first line of the address
»» longitude number false none The GPS longitude of this address in signed degrees format (DDD.dddd) with 6 decimal positions, ranging from -180 to +180
» notes string false none Extra notes about this centre
» lastModifiedDate string(date-time) false none The last time the centre was modified
» name string false none Name of the centre
» meetingDay string false none Day of the week when repayments are collected, influences repayments schedule, upon update all repayments are update to this day of the week
» encodedKey string false read-only The encoded key of the entity, generated, globally unique
» id string false none Id of the centre, unique, can be generated and customized
» state string false none The state of the centre
» creationDate string(date-time) false none Date the centre was created
» assignedBranchKey string false none Encoded key of the branch this centre is assigned to

Enumerated Values

Property Value
state ACTIVE
state INACTIVE

Response Headers

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

getById

Code samples

# You can also use wget
curl -X GET https://localhost:8889/api/centres/{centreId} \
  -H 'Accept: application/vnd.mambu.v2+json'

GET https://localhost:8889/api/centres/{centreId} HTTP/1.1
Host: localhost:8889

Accept: application/vnd.mambu.v2+json

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

};

$.ajax({
  url: 'https://localhost:8889/api/centres/{centreId}',
  method: 'get',

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

const request = require('node-fetch');

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

};

fetch('https://localhost:8889/api/centres/{centreId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

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

result = RestClient.get 'https://localhost:8889/api/centres/{centreId}',
  params: {
  }, headers: headers

p JSON.parse(result)

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

r = requests.get('https://localhost:8889/api/centres/{centreId}', params={

}, headers = headers)

print r.json()

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

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://localhost:8889/api/centres/{centreId}", data)
    req.Header = headers

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

GET /centres/{centreId}

Allows retrieval of a single centre via id or encoded key

Parameters

Parameter In Type Required Description
centreId path string true The id or encoded key of the centre to be retrieved
detailsLevel query string false The level of details to retrieve, FULL means the full details of the object will be retrieved (custom fields, address, contact info or any other related object), BASIC will return only the first level elements of the object

Enumerated Values

Parameter Value
detailsLevel BASIC
detailsLevel FULL

Example responses

200 Response

{
  "addresses": [
    {
      "country": "string",
      "parentKey": "string",
      "city": "string",
      "latitude": 0,
      "postcode": "string",
      "indexInList": 0,
      "encodedKey": "string",
      "region": "string",
      "line2": "string",
      "line1": "string",
      "longitude": 0
    }
  ],
  "notes": "string",
  "lastModifiedDate": "2016-09-06T13:37:50+03:00",
  "name": "string",
  "meetingDay": "string",
  "encodedKey": "string",
  "id": "string",
  "state": "ACTIVE",
  "creationDate": "2016-09-06T13:37:50+03:00",
  "assignedBranchKey": "string"
}

Responses

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

Clients

Allows you to retrieve, create, update or delete clients. Clients may have associated information such as their address, identification documents or custom fields.

getAll

Code samples

# You can also use wget
curl -X GET https://localhost:8889/api/clients \
  -H 'Accept: application/vnd.mambu.v2+json'

GET https://localhost:8889/api/clients HTTP/1.1
Host: localhost:8889

Accept: application/vnd.mambu.v2+json

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

};

$.ajax({
  url: 'https://localhost:8889/api/clients',
  method: 'get',

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

const request = require('node-fetch');

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

};

fetch('https://localhost:8889/api/clients',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

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

result = RestClient.get 'https://localhost:8889/api/clients',
  params: {
  }, headers: headers

p JSON.parse(result)

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

r = requests.get('https://localhost:8889/api/clients', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://localhost:8889/api/clients");
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", "https://localhost:8889/api/clients", data)
    req.Header = headers

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

GET /clients

Allows retrieval of clients using various query parameters

Parameters

Parameter In Type Required Description
offset query integer(int32) false Pagination, index to start searching at when retrieving elements, used in combination with limit to paginate results
limit query integer(int32) false Pagination, the number of elements to retrieve, used in combination with offset to paginate results
paginationDetails query string false Flag specifying whether the pagination should be enabled or not. Please note that by default it is disabled (OFF), in order to improve the performance of the APIs
detailsLevel query string false The level of details to retrieve, FULL means the full details of the object will be retrieved (custom fields, address, contact info or any other related object), BASIC will return only the first level elements of the object
firstName query string false The first name, personal name, given name or forename of the client
lastName query string false The last name, surname or family name of the client
idNumber query string false The id number of the client's identification document
branchId query string false The branch id/key to search for
centreId query string false The centre id/key to search for
creditOfficerUsername query string false The user name of the credit officer
state query string false The state of the client to search for
birthDate query string(date) false The birth date of the client to search for
sortBy query string false The criteria based on which the records will be sorted. Expected format is field:order, eg sortBy = field1:ASC,field2:DESC.
Only the following fields can be used: firstName, lastName, creationDate, lastModifiedDate
Default sorting is done by lastModifiedDate:DESC

Enumerated Values

Parameter Value
paginationDetails ON
paginationDetails OFF
detailsLevel BASIC
detailsLevel FULL
state PENDING_APPROVAL
state INACTIVE
state ACTIVE
state EXITED
state BLACKLISTED
state REJECTED

Example responses

200 Response

[
  {
    "lastName": "string",
    "migrationEventKey": "string",
    "preferredLanguage": "ENGLISH",
    "addresses": [
      {
        "country": "string",
        "parentKey": "string",
        "city": "string",
        "latitude": 0,
        "postcode": "string",
        "indexInList": 0,
        "encodedKey": "string",
        "region": "string",
        "line2": "string",
        "line1": "string",
        "longitude": 0
      }
    ],
    "notes": "string",
    "gender": "MALE",
    "groupLoanCycle": 0,
    "portalSettings": {
      "encodedKey": "string",
      "portalState": "ENABLED",
      "lastLoggedInDate": "2016-09-06T13:37:50+03:00"
    },
    "assignedBranchKey": "string",
    "loanCycle": 0,
    "emailAddress": "string",
    "encodedKey": "string",
    "id": "string",
    "state": "PENDING_APPROVAL",
    "assignedUserKey": "string",
    "clientRoleKey": "string",
    "lastModifiedDate": "2016-09-06T13:37:50+03:00",
    "homePhone": "string",
    "creationDate": "2016-09-06T13:37:50+03:00",
    "birthDate": "1987-04-26",
    "assignedCentreKey": "string",
    "approvedDate": "2016-09-06T13:37:50+03:00",
    "firstName": "string",
    "idDocuments": [
      {
        "identificationDocumentTemplateKey": "string",
        "issuingAuthority": "string",
        "clientKey": "string",
        "documentType": "string",
        "indexInList": 0,
        "validUntil": "1987-04-26",
        "encodedKey": "string",
        "documentId": "string"
      }
    ],
    "profilePictureKey": "string",
    "profileSignatureKey": "string",
    "mobilePhone": "string",
    "closedDate": "2016-09-06T13:37:50+03:00",
    "middleName": "string",
    "activationDate": "2016-09-06T13:37:50+03:00"
  }
]

Responses

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

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [Client] false none none
» lastName string true none The last name, surname or family name of the client
» migrationEventKey string false read-only The migration event encoded key associated with this client.
» preferredLanguage string false none The client's language of use in Mambu
» addresses [Address] false none The addresses associated with this client information like street, city etc.
»» country string false none The country
»» parentKey string false read-only Address parent key, the object owning this address, client, centre, branch
»» city string false none The city for this address
»» latitude number false none The GPS latitude of this address in signed degrees format (DDD.dddd) with 6 decimal positions, ranging from -90 to +90
»» postcode string false none The post code
»» indexInList integer(int32) false none Index of this address in the list of addresses
»» encodedKey string false read-only Address encoded key, unique, generated
»» region string false none The region that is part of the address
»» line2 string false none The second line for the address, in case the first one doesn't fit the information, this is completely optional
»» line1 string false none The first line of the address
»» longitude number false none The GPS longitude of this address in signed degrees format (DDD.dddd) with 6 decimal positions, ranging from -180 to +180
» notes string false none Extra notes about this client
» gender string false none Gender of the person, male or female
» groupLoanCycle integer(int32) false read-only Number of paid and closed (with 'obligations met') accounts for this client's group, when the closing operation is reverted, this is reduced
» portalSettings PortalSettings false none Portal settings for an individual client
»» encodedKey string false read-only The encoded key of the entity, generated, globally unique
»» portalState string false none State of the client's portal preferences
»» lastLoggedInDate string(date-time) false none The last date the client logged in to the portal
» assignedBranchKey string false none Encoded key of the branch this client is assigned to
» loanCycle integer(int32) false read-only Number of paid and closed (with 'obligations met') accounts for this client, when the closing operation is reverted, this is reduced
» emailAddress string false none The client's email address
» encodedKey string false read-only The encoded key of the client, auto generated, unique
» id string false none The id of the client, can be generated and customized, unique
» state string false none The state of a client shows his workflow status, if he is waiting approval or is rejected or blacklisted
» assignedUserKey string false none Encoded key of the user this client is assigned to
» clientRoleKey string false none A role which describes the intended use of a client in the system
» lastModifiedDate string(date-time) false read-only The last date this client was modified
» homePhone string false none The client's home phone number
» creationDate string(date-time) false read-only The date this client was created
» birthDate string(date) false none The date when this client was born
» assignedCentreKey string false none Encoded key of the centre this client is assigned to
» approvedDate string(date-time) false read-only date when client was approved
» firstName string true none The first name, personal name, given name or forename of the client
» idDocuments [IdentificationDocument] false none The identification documents of this person
»» identificationDocumentTemplateKey string false none Encoded key of the template used for this document
»» issuingAuthority string false none Authority that issued the document, eg. Police
»» clientKey string false read-only The encoded key of the client that owns this document
»» documentType string true none The type of the document, Passport, Id card Drivers license, etc.
»» indexInList integer(int32) false none This document's index in the list of documents
»» validUntil string(date) false none Date when the validity of the document ends
»» encodedKey string false read-only The encoded key of the document, generated, unique
»» documentId string true none The id of the document
» profilePictureKey string false read-only Encoded key of this clients profile picture
» profileSignatureKey string false read-only Encoded key of the users profile signature
» mobilePhone string false none The client's mobile phone number
» closedDate string(date-time) false read-only date when client was closed
» middleName string false none The middle name of the client, if she/he has one
» activationDate string(date-time) false read-only The date when client was set as active for the first time

Enumerated Values

Property Value
preferredLanguage ENGLISH
preferredLanguage PORTUGESE
preferredLanguage SPANISH
preferredLanguage RUSSIAN
preferredLanguage FRENCH
preferredLanguage GEORGIAN
preferredLanguage CHINESE
preferredLanguage INDONESIAN
preferredLanguage ROMANIAN
preferredLanguage BURMESE
preferredLanguage PHRASE
gender MALE
gender FEMALE
portalState ENABLED
portalState DISABLED
state PENDING_APPROVAL
state INACTIVE
state ACTIVE
state EXITED
state BLACKLISTED
state REJECTED

Response Headers

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

create

Code samples

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

POST https://localhost:8889/api/clients HTTP/1.1
Host: localhost:8889
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: 'https://localhost:8889/api/clients',
  method: 'post',

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

const request = require('node-fetch');
const inputBody = '{
  "lastName": "string",
  "preferredLanguage": "ENGLISH",
  "addresses": [
    {
      "country": "string",
      "city": "string",
      "latitude": 0,
      "postcode": "string",
      "indexInList": 0,
      "region": "string",
      "line2": "string",
      "line1": "string",
      "longitude": 0
    }
  ],
  "notes": "string",
  "gender": "MALE",
  "portalSettings": {
    "portalState": "ENABLED",
    "lastLoggedInDate": "2016-09-06T13:37:50+03:00"
  },
  "assignedBranchKey": "string",
  "emailAddress": "string",
  "id": "string",
  "state": "PENDING_APPROVAL",
  "assignedUserKey": "string",
  "clientRoleKey": "string",
  "homePhone": "string",
  "birthDate": "1987-04-26",
  "assignedCentreKey": "string",
  "firstName": "string",
  "idDocuments": [
    {
      "identificationDocumentTemplateKey": "string",
      "issuingAuthority": "string",
      "documentType": "string",
      "indexInList": 0,
      "validUntil": "1987-04-26",
      "documentId": "string"
    }
  ],
  "mobilePhone": "string",
  "middleName": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/vnd.mambu.v2+json',
  'Idempotency-Key':'string'

};

fetch('https://localhost:8889/api/clients',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

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

result = RestClient.post 'https://localhost:8889/api/clients',
  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('https://localhost:8889/api/clients', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://localhost:8889/api/clients");
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", "https://localhost:8889/api/clients", data)
    req.Header = headers

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

POST /clients

Create a new client

Body parameter

{
  "lastName": "string",
  "preferredLanguage": "ENGLISH",
  "addresses": [
    {
      "country": "string",
      "city": "string",
      "latitude": 0,
      "postcode": "string",
      "indexInList": 0,
      "region": "string",
      "line2": "string",
      "line1": "string",
      "longitude": 0
    }
  ],
  "notes": "string",
  "gender": "MALE",
  "portalSettings": {
    "portalState": "ENABLED",
    "lastLoggedInDate": "2016-09-06T13:37:50+03:00"
  },
  "assignedBranchKey": "string",
  "emailAddress": "string",
  "id": "string",
  "state": "PENDING_APPROVAL",
  "assignedUserKey": "string",
  "clientRoleKey": "string",
  "homePhone": "string",
  "birthDate": "1987-04-26",
  "assignedCentreKey": "string",
  "firstName": "string",
  "idDocuments": [
    {
      "identificationDocumentTemplateKey": "string",
      "issuingAuthority": "string",
      "documentType": "string",
      "indexInList": 0,
      "validUntil": "1987-04-26",
      "documentId": "string"
    }
  ],
  "mobilePhone": "string",
  "middleName": "string"
}

Parameters

Parameter In Type Required Description
Idempotency-Key header string false 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.
body body Client true Client to be created

Example responses

201 Response

{
  "lastName": "string",
  "migrationEventKey": "string",
  "preferredLanguage": "ENGLISH",
  "addresses": [
    {
      "country": "string",
      "parentKey": "string",
      "city": "string",
      "latitude": 0,
      "postcode": "string",
      "indexInList": 0,
      "encodedKey": "string",
      "region": "string",
      "line2": "string",
      "line1": "string",
      "longitude": 0
    }
  ],
  "notes": "string",
  "gender": "MALE",
  "groupLoanCycle": 0,
  "portalSettings": {
    "encodedKey": "string",
    "portalState": "ENABLED",
    "lastLoggedInDate": "2016-09-06T13:37:50+03:00"
  },
  "assignedBranchKey": "string",
  "loanCycle": 0,
  "emailAddress": "string",
  "encodedKey": "string",
  "id": "string",
  "state": "PENDING_APPROVAL",
  "assignedUserKey": "string",
  "clientRoleKey": "string",
  "lastModifiedDate": "2016-09-06T13:37:50+03:00",
  "homePhone": "string",
  "creationDate": "2016-09-06T13:37:50+03:00",
  "birthDate": "1987-04-26",
  "assignedCentreKey": "string",
  "approvedDate": "2016-09-06T13:37:50+03:00",
  "firstName": "string",
  "idDocuments": [
    {
      "identificationDocumentTemplateKey": "string",
      "issuingAuthority": "string",
      "clientKey": "string",
      "documentType": "string",
      "indexInList": 0,
      "validUntil": "1987-04-26",
      "encodedKey": "string",
      "documentId": "string"
    }
  ],
  "profilePictureKey": "string",
  "profileSignatureKey": "string",
  "mobilePhone": "string",
  "closedDate": "2016-09-06T13:37:50+03:00",
  "middleName": "string",
  "activationDate": "2016-09-06T13:37:50+03:00"
}

Responses

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

getById

Code samples

# You can also use wget
curl -X GET https://localhost:8889/api/clients/{clientId} \
  -H 'Accept: application/vnd.mambu.v2+json'

GET https://localhost:8889/api/clients/{clientId} HTTP/1.1
Host: localhost:8889

Accept: application/vnd.mambu.v2+json

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

};

$.ajax({
  url: 'https://localhost:8889/api/clients/{clientId}',
  method: 'get',

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

const request = require('node-fetch');

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

};

fetch('https://localhost:8889/api/clients/{clientId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

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

result = RestClient.get 'https://localhost:8889/api/clients/{clientId}',
  params: {
  }, headers: headers

p JSON.parse(result)

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

r = requests.get('https://localhost:8889/api/clients/{clientId}', params={

}, headers = headers)

print r.json()

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

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://localhost:8889/api/clients/{clientId}", data)
    req.Header = headers

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

GET /clients/{clientId}

Allows retrieval of a single client via id or encoded key

Parameters

Parameter In Type Required Description
clientId path string true The id or encoded key of the client to be retrieved
detailsLevel query string false The level of details to retrieve, FULL means the full details of the object will be retrieved (custom fields, address, contact info or any other related object), BASIC will return only the first level elements of the object

Enumerated Values

Parameter Value
detailsLevel BASIC
detailsLevel FULL

Example responses

200 Response

{
  "lastName": "string",
  "migrationEventKey": "string",
  "preferredLanguage": "ENGLISH",
  "addresses": [
    {
      "country": "string",
      "parentKey": "string",
      "city": "string",
      "latitude": 0,
      "postcode": "string",
      "indexInList": 0,
      "encodedKey": "string",
      "region": "string",
      "line2": "string",
      "line1": "string",
      "longitude": 0
    }
  ],
  "notes": "string",
  "gender": "MALE",
  "groupLoanCycle": 0,
  "portalSettings": {
    "encodedKey": "string",
    "portalState": "ENABLED",
    "lastLoggedInDate": "2016-09-06T13:37:50+03:00"
  },
  "assignedBranchKey": "string",
  "loanCycle": 0,
  "emailAddress": "string",
  "encodedKey": "string",
  "id": "string",
  "state": "PENDING_APPROVAL",
  "assignedUserKey": "string",
  "clientRoleKey": "string",
  "lastModifiedDate": "2016-09-06T13:37:50+03:00",
  "homePhone": "string",
  "creationDate": "2016-09-06T13:37:50+03:00",
  "birthDate": "1987-04-26",
  "assignedCentreKey": "string",
  "approvedDate": "2016-09-06T13:37:50+03:00",
  "firstName": "string",
  "idDocuments": [
    {
      "identificationDocumentTemplateKey": "string",
      "issuingAuthority": "string",
      "clientKey": "string",
      "documentType": "string",
      "indexInList": 0,
      "validUntil": "1987-04-26",
      "encodedKey": "string",
      "documentId": "string"
    }
  ],
  "profilePictureKey": "string",
  "profileSignatureKey": "string",
  "mobilePhone": "string",
  "closedDate": "2016-09-06T13:37:50+03:00",
  "middleName": "string",
  "activationDate": "2016-09-06T13:37:50+03:00"
}

Responses

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

update

Code samples

# You can also use wget
curl -X PUT https://localhost:8889/api/clients/{clientId} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/vnd.mambu.v2+json'

PUT https://localhost:8889/api/clients/{clientId} HTTP/1.1
Host: localhost:8889
Content-Type: application/json
Accept: application/vnd.mambu.v2+json

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

};

$.ajax({
  url: 'https://localhost:8889/api/clients/{clientId}',
  method: 'put',

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

const request = require('node-fetch');
const inputBody = '{
  "lastName": "string",
  "preferredLanguage": "ENGLISH",
  "addresses": [
    {
      "country": "string",
      "city": "string",
      "latitude": 0,
      "postcode": "string",
      "indexInList": 0,
      "region": "string",
      "line2": "string",
      "line1": "string",
      "longitude": 0
    }
  ],
  "notes": "string",
  "gender": "MALE",
  "portalSettings": {
    "portalState": "ENABLED",
    "lastLoggedInDate": "2016-09-06T13:37:50+03:00"
  },
  "assignedBranchKey": "string",
  "emailAddress": "string",
  "id": "string",
  "state": "PENDING_APPROVAL",
  "assignedUserKey": "string",
  "clientRoleKey": "string",
  "homePhone": "string",
  "birthDate": "1987-04-26",
  "assignedCentreKey": "string",
  "firstName": "string",
  "idDocuments": [
    {
      "identificationDocumentTemplateKey": "string",
      "issuingAuthority": "string",
      "documentType": "string",
      "indexInList": 0,
      "validUntil": "1987-04-26",
      "documentId": "string"
    }
  ],
  "mobilePhone": "string",
  "middleName": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/vnd.mambu.v2+json'

};

fetch('https://localhost:8889/api/clients/{clientId}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

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

result = RestClient.put 'https://localhost:8889/api/clients/{clientId}',
  params: {
  }, headers: headers

p JSON.parse(result)

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

r = requests.put('https://localhost:8889/api/clients/{clientId}', params={

}, headers = headers)

print r.json()

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

package 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", "https://localhost:8889/api/clients/{clientId}", data)
    req.Header = headers

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

PUT /clients/{clientId}

Update an existing client

Body parameter

{
  "lastName": "string",
  "preferredLanguage": "ENGLISH",
  "addresses": [
    {
      "country": "string",
      "city": "string",
      "latitude": 0,
      "postcode": "string",
      "indexInList": 0,
      "region": "string",
      "line2": "string",
      "line1": "string",
      "longitude": 0
    }
  ],
  "notes": "string",
  "gender": "MALE",
  "portalSettings": {
    "portalState": "ENABLED",
    "lastLoggedInDate": "2016-09-06T13:37:50+03:00"
  },
  "assignedBranchKey": "string",
  "emailAddress": "string",
  "id": "string",
  "state": "PENDING_APPROVAL",
  "assignedUserKey": "string",
  "clientRoleKey": "string",
  "homePhone": "string",
  "birthDate": "1987-04-26",
  "assignedCentreKey": "string",
  "firstName": "string",
  "idDocuments": [
    {
      "identificationDocumentTemplateKey": "string",
      "issuingAuthority": "string",
      "documentType": "string",
      "indexInList": 0,
      "validUntil": "1987-04-26",
      "documentId": "string"
    }
  ],
  "mobilePhone": "string",
  "middleName": "string"
}

Parameters

Parameter In Type Required Description
clientId path string true The id or encoded key of the client to be updated
body body Client true Client to be updated

Example responses

200 Response

{
  "lastName": "string",
  "migrationEventKey": "string",
  "preferredLanguage": "ENGLISH",
  "addresses": [
    {
      "country": "string",
      "parentKey": "string",
      "city": "string",
      "latitude": 0,
      "postcode": "string",
      "indexInList": 0,
      "encodedKey": "string",
      "region": "string",
      "line2": "string",
      "line1": "string",
      "longitude": 0
    }
  ],
  "notes": "string",
  "gender": "MALE",
  "groupLoanCycle": 0,
  "portalSettings": {
    "encodedKey": "string",
    "portalState": "ENABLED",
    "lastLoggedInDate": "2016-09-06T13:37:50+03:00"
  },
  "assignedBranchKey": "string",
  "loanCycle": 0,
  "emailAddress": "string",
  "encodedKey": "string",
  "id": "string",
  "state": "PENDING_APPROVAL",
  "assignedUserKey": "string",
  "clientRoleKey": "string",
  "lastModifiedDate": "2016-09-06T13:37:50+03:00",
  "homePhone": "string",
  "creationDate": "2016-09-06T13:37:50+03:00",
  "birthDate": "1987-04-26",
  "assignedCentreKey": "string",
  "approvedDate": "2016-09-06T13:37:50+03:00",
  "firstName": "string",
  "idDocuments": [
    {
      "identificationDocumentTemplateKey": "string",
      "issuingAuthority": "string",
      "clientKey": "string",
      "documentType": "string",
      "indexInList": 0,
      "validUntil": "1987-04-26",
      "encodedKey": "string",
      "documentId": "string"
    }
  ],
  "profilePictureKey": "string",
  "profileSignatureKey": "string",
  "mobilePhone": "string",
  "closedDate": "2016-09-06T13:37:50+03:00",
  "middleName": "string",
  "activationDate": "2016-09-06T13:37:50+03:00"
}

Responses

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

delete

Code samples

# You can also use wget
curl -X DELETE https://localhost:8889/api/clients/{clientId} \
  -H 'Accept: application/vnd.mambu.v2+json'

DELETE https://localhost:8889/api/clients/{clientId} HTTP/1.1
Host: localhost:8889

Accept: application/vnd.mambu.v2+json

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

};

$.ajax({
  url: 'https://localhost:8889/api/clients/{clientId}',
  method: 'delete',

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

const request = require('node-fetch');

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

};

fetch('https://localhost:8889/api/clients/{clientId}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

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

result = RestClient.delete 'https://localhost:8889/api/clients/{clientId}',
  params: {
  }, headers: headers

p JSON.parse(result)

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

r = requests.delete('https://localhost:8889/api/clients/{clientId}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://localhost:8889/api/clients/{clientId}");
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", "https://localhost:8889/api/clients/{clientId}", data)
    req.Header = headers

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

DELETE /clients/{clientId}

Delete a client

Parameters

Parameter In Type Required Description
clientId path string true The id or encoded key of the client to be deleted

Example responses

400 Response

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

Responses

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

patch

Code samples

# You can also use wget
curl -X PATCH https://localhost:8889/api/clients/{clientId} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/vnd.mambu.v2+json'

PATCH https://localhost:8889/api/clients/{clientId} HTTP/1.1
Host: localhost:8889
Content-Type: application/json
Accept: application/vnd.mambu.v2+json

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

};

$.ajax({
  url: 'https://localhost:8889/api/clients/{clientId}',
  method: 'patch',

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

const request = require('node-fetch');
const inputBody = '[
  {
    "op": "ADD",
    "path": "string",
    "from": "string",
    "value": {}
  }
]';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/vnd.mambu.v2+json'

};

fetch('https://localhost:8889/api/clients/{clientId}',
{
  method: 'PATCH',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

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

result = RestClient.patch 'https://localhost:8889/api/clients/{clientId}',
  params: {
  }, headers: headers

p JSON.parse(result)

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

r = requests.patch('https://localhost:8889/api/clients/{clientId}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://localhost:8889/api/clients/{clientId}");
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"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PATCH", "https://localhost:8889/api/clients/{clientId}", data)
    req.Header = headers

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

PATCH /clients/{clientId}

Partially update an existing client

Body parameter

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

Parameters

Parameter In Type Required Description
clientId path string true The id or encoded key of the client to be updated
body body array[object] true Patch operations to be applied to a resource

Example responses

400 Response

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

Responses

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

Communications

Allows retrieval of communication messages, sending messages and resending the ones that failed.

send

Code samples

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

POST https://localhost:8889/api/communications/messages HTTP/1.1
Host: localhost:8889
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: 'https://localhost:8889/api/communications/messages',
  method: 'post',

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

const request = require('node-fetch');
const inputBody = '{
  "senderKey": "string",
  "sendDate": "2016-09-06T13:37:50+03:00",
  "numRetries": 0,
  "subject": "string",
  "loanAccountKey": "string",
  "destination": "string",
  "depositAccountKey": "string",
  "failureCause": "string",
  "creationDate": "2016-09-06T13:37:50+03:00",
  "type": "EMAIL",
  "body": "string",
  "referenceId": "string",
  "groupKey": "string",
  "userKey": "string",
  "repaymentKey": "string",
  "clientKey": "string",
  "failureReason": "MESSAGING_EXCEPTION",
  "encodedKey": "string",
  "state": "SENT",
  "event": "MANUAL",
  "templateKey": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/vnd.mambu.v2+json',
  'Idempotency-Key':'string'

};

fetch('https://localhost:8889/api/communications/messages',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

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

result = RestClient.post 'https://localhost:8889/api/communications/messages',
  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('https://localhost:8889/api/communications/messages', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://localhost:8889/api/communications/messages");
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", "https://localhost:8889/api/communications/messages", data)
    req.Header = headers

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

POST /communications/messages

Allows sending a new communication message. The message can be either SMS or Email.

Body parameter

{
  "senderKey": "string",
  "sendDate": "2016-09-06T13:37:50+03:00",
  "numRetries": 0,
  "subject": "string",
  "loanAccountKey": "string",
  "destination": "string",
  "depositAccountKey": "string",
  "failureCause": "string",
  "creationDate": "2016-09-06T13:37:50+03:00",
  "type": "EMAIL",
  "body": "string",
  "referenceId": "string",
  "groupKey": "string",
  "userKey": "string",
  "repaymentKey": "string",
  "clientKey": "string",
  "failureReason": "MESSAGING_EXCEPTION",
  "encodedKey": "string",
  "state": "SENT",
  "event": "MANUAL",
  "templateKey": "string"
}

Parameters

Parameter In Type Required Description
Idempotency-Key header string false 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.
body body CommunicationMessage true Communication message to be created

Example responses

201 Response

{
  "senderKey": "string",
  "sendDate": "2016-09-06T13:37:50+03:00",
  "numRetries": 0,
  "subject": "string",
  "loanAccountKey": "string",
  "destination": "string",
  "depositAccountKey": "string",
  "failureCause": "string",
  "creationDate": "2016-09-06T13:37:50+03:00",
  "type": "EMAIL",
  "body": "string",
  "referenceId": "string",
  "groupKey": "string",
  "userKey": "string",
  "repaymentKey": "string",
  "clientKey": "string",
  "failureReason": "MESSAGING_EXCEPTION",
  "encodedKey": "string",
  "state": "SENT",
  "event": "MANUAL",
  "templateKey": "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 Communication message sent CommunicationMessage
400 Bad Request A Validation error occurred ErrorResponse
401 Unauthorized UNAUTHORIZED ErrorResponse
403 Forbidden Forbidden ErrorResponse

getByEncodedKey

Code samples

# You can also use wget
curl -X GET https://localhost:8889/api/communications/messages/{encodedKey} \
  -H 'Accept: application/vnd.mambu.v2+json'

GET https://localhost:8889/api/communications/messages/{encodedKey} HTTP/1.1
Host: localhost:8889

Accept: application/vnd.mambu.v2+json

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

};

$.ajax({
  url: 'https://localhost:8889/api/communications/messages/{encodedKey}',
  method: 'get',

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

const request = require('node-fetch');

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

};

fetch('https://localhost:8889/api/communications/messages/{encodedKey}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

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

result = RestClient.get 'https://localhost:8889/api/communications/messages/{encodedKey}',
  params: {
  }, headers: headers

p JSON.parse(result)

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

r = requests.get('https://localhost:8889/api/communications/messages/{encodedKey}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://localhost:8889/api/communications/messages/{encodedKey}");
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", "https://localhost:8889/api/communications/messages/{encodedKey}", data)
    req.Header = headers

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

GET /communications/messages/{encodedKey}

Allows retrieval of a single communication message via encoded key

Parameters

Parameter In Type Required Description
encodedKey path string true The encoded key of the communication message to be retrieved
detailsLevel query string false The level of details to retrieve, FULL means the full details of the object will be retrieved (custom fields, address, contact info or any other related object), BASIC will return only the first level elements of the object

Enumerated Values

Parameter Value
detailsLevel BASIC
detailsLevel FULL

Example responses

200 Response

{
  "senderKey": "string",
  "sendDate": "2016-09-06T13:37:50+03:00",
  "numRetries": 0,
  "subject": "string",
  "loanAccountKey": "string",
  "destination": "string",
  "depositAccountKey": "string",
  "failureCause": "string",
  "creationDate": "2016-09-06T13:37:50+03:00",
  "type": "EMAIL",
  "body": "string",
  "referenceId": "string",
  "groupKey": "string",
  "userKey": "string",
  "repaymentKey": "string",
  "clientKey": "string",
  "failureReason": "MESSAGING_EXCEPTION",
  "encodedKey": "string",
  "state": "SENT",
  "event": "MANUAL",
  "templateKey": "string"
}

Responses

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

resend

Code samples

# You can also use wget
curl -X POST https://localhost:8889/api/communications/messages:resend \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/vnd.mambu.v2+json'

POST https://localhost:8889/api/communications/messages:resend HTTP/1.1
Host: localhost:8889
Content-Type: application/json
Accept: application/vnd.mambu.v2+json

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

};

$.ajax({
  url: 'https://localhost:8889/api/communications/messages:resend',
  method: 'post',

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

const request = require('node-fetch');
const inputBody = '{
  "messages": [
    {
      "senderKey": "string",
      "sendDate": "2016-09-06T13:37:50+03:00",
      "numRetries": 0,
      "subject": "string",
      "loanAccountKey": "string",
      "destination": "string",
      "depositAccountKey": "string",
      "failureCause": "string",
      "creationDate": "2016-09-06T13:37:50+03:00",
      "type": "EMAIL",
      "body": "string",
      "referenceId": "string",
      "groupKey": "string",
      "userKey": "string",
      "repaymentKey": "string",
      "clientKey": "string",
      "failureReason": "MESSAGING_EXCEPTION",
      "encodedKey": "string",
      "state": "SENT",
      "event": "MANUAL",
      "templateKey": "string"
    }
  ]
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/vnd.mambu.v2+json'

};

fetch('https://localhost:8889/api/communications/messages:resend',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

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

result = RestClient.post 'https://localhost:8889/api/communications/messages:resend',
  params: {
  }, headers: headers

p JSON.parse(result)

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

r = requests.post('https://localhost:8889/api/communications/messages:resend', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://localhost:8889/api/communications/messages:resend");
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", "https://localhost:8889/api/communications/messages:resend", data)
    req.Header = headers

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

POST /communications/messages:resend

Allows resending of one or multiple failed communication messages. The messages can be either SMS, Email or Webhook

Body parameter

{
  "messages": [
    {
      "senderKey": "string",
      "sendDate": "2016-09-06T13:37:50+03:00",
      "numRetries": 0,
      "subject": "string",
      "loanAccountKey": "string",
      "destination": "string",
      "depositAccountKey": "string",
      "failureCause": "string",
      "creationDate": "2016-09-06T13:37:50+03:00",
      "type": "EMAIL",
      "body": "string",
      "referenceId": "string",
      "groupKey": "string",
      "userKey": "string",
      "repaymentKey": "string",
      "clientKey": "string",
      "failureReason": "MESSAGING_EXCEPTION",
      "encodedKey": "string",
      "state": "SENT",
      "event": "MANUAL",
      "templateKey": "string"
    }
  ]
}

Parameters

Parameter In Type Required Description
body body CommunicationMessageAction true Allows specifying a list of failed communication messages to resend

Example responses

400 Response

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

Responses

Status Meaning Description Schema
202 Accepted The operation was accepted. You can check the status of each notification later via GET or SEARCH api None
400 Bad Request A Validation error occurred ErrorResponse
401 Unauthorized UNAUTHORIZED ErrorResponse
403 Forbidden Forbidden ErrorResponse
404 Not Found Communication message not found ErrorResponse

Code samples

# You can also use wget
curl -X POST https://localhost:8889/api/communications/messages:search \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/vnd.mambu.v2+json'

POST https://localhost:8889/api/communications/messages:search HTTP/1.1
Host: localhost:8889
Content-Type: application/json
Accept: application/vnd.mambu.v2+json

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

};

$.ajax({
  url: 'https://localhost:8889/api/communications/messages:search',
  method: 'post',

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

const request = require('node-fetch');
const inputBody = '[
  {
    "field": "encodedKey",
    "value": "string",
    "operator": "EQUALS",
    "secondValue": "string",
    "values": [
      "string"
    ]
  }
]';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/vnd.mambu.v2+json'

};

fetch('https://localhost:8889/api/communications/messages:search',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

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

result = RestClient.post 'https://localhost:8889/api/communications/messages:search',
  params: {
  }, headers: headers

p JSON.parse(result)

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

r = requests.post('https://localhost:8889/api/communications/messages:search', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://localhost:8889/api/communications/messages: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", "https://localhost:8889/api/communications/messages:search", data)
    req.Header = headers

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

POST /communications/messages:search

Client Directed Query. Allows searching communication messages by various criteria

Body parameter

[
  {
    "field": "encodedKey",
    "value": "string",
    "operator": "EQUALS",
    "secondValue": "string",
    "values": [
      "string"
    ]
  }
]

Parameters

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

Enumerated Values

Parameter Value
paginationDetails ON
paginationDetails OFF
detailsLevel BASIC
detailsLevel FULL

Example responses

200 Response

[
  {
    "senderKey": "string",
    "sendDate": "2016-09-06T13:37:50+03:00",
    "numRetries": 0,
    "subject": "string",
    "loanAccountKey": "string",
    "destination": "string",
    "depositAccountKey": "string",
    "failureCause": "string",
    "creationDate": "2016-09-06T13:37:50+03:00",
    "type": "EMAIL",
    "body": "string",
    "referenceId": "string",
    "groupKey": "string",
    "userKey": "string",
    "repaymentKey": "string",
    "clientKey": "string",
    "failureReason": "MESSAGING_EXCEPTION",
    "encodedKey": "string",
    "state": "SENT",
    "event": "MANUAL",
    "templateKey": "string"
  }
]

Responses

Status Meaning Description Schema
200 OK Result of communication message search Inline
400 Bad Request A Validation error occurred ErrorResponse
401 Unauthorized UNAUTHORIZED ErrorResponse
403 Forbidden Forbidden ErrorResponse

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [CommunicationMessage] false none none
» senderKey string false none The encoded key of the sender. If specified, it should be the encoded key of the current user
» sendDate string(date-time) false none The date the communication message was actually sent (as UTC)
» numRetries integer(int32) false none The number of retries to send the message
» subject string false none The subject of the message
» loanAccountKey string false none The loan account about which the message was sent
» destination string false none The destination (phone number or email address) this communication message was sent to
» depositAccountKey string false none The deposit account about which the message was sent
» failureCause string false none The failure code if the message failed to send
» creationDate string(date-time) false none The date the communication message was created (as UTC)
» type string false none The type of communication message
» body string false none The actual contents (body) of the message
» referenceId string false none The reference id of the communication message, generated by the SMS Dispatcher
» groupKey string false none The group the message was sent to
» userKey string false none The user the message was sent to
» repaymentKey string false none The repayment about which the message was sent
» clientKey string false none The client the message was sent to
» failureReason string false none The reason for the communication message failure
» encodedKey string false none The encoded key of the communication message, auto generated, unique
» state string false none The state of the message
» event string false none The event this message was sent for
» templateKey string false none The communication message template key

Enumerated Values

Property Value
type EMAIL
type SMS
type WEB_HOOK
type EVENT_STREAM
type TASK
failureReason MESSAGING_EXCEPTION
failureReason UNSUPPORTED_ENCODING_EXCEPTION
failureReason SMS_TOO_LONG
failureReason SMS_SERVICE_NOT_ENABLED
failureReason SMS_NOT_SENT
failureReason SMS_SERVICE_ERROR
failureReason SMS_CONNECTION_EXCEPTION
failureReason WEBHOOK_NOTIFICATIONS_DISABLED
failureReason INVALID_HTTP_RESPONSE
failureReason HTTP_ERROR_WHILE_SENDING
failureReason UNDEFINED_DESTINATION
failureReason OTHER
state SENT
state QUEUED
state QUEUED_FOR_STREAM
state WAITING
state FAILED
event MANUAL
event CLIENT_CREATED
event CLIENT_APPROVED
event GROUP_ACTIVITY
event GROUP_CREATED
event LOAN_CREATED
event CLIENT_REJECTED
event CLIENT_ACTIVITY
event LOAN_REPAYMENT
event LOAN_REPAYMENT_REVERSAL
event LOAN_APPROVAL
event LOAN_ACCOUNT_CLOSURE
event LOAN_ACCOUNT_WRITE_OFF
event LOAN_ACCOUNT_REJECTION
event LOAN_ACCOUNT_RESCHEDULED
event LOAN_ACCOUNT_REFINANCED
event REPAYMENT_REMINDER
event ACCOUNT_IN_ARREARS
event LOAN_DISBURSEMENT
event LOAN_DISBURSEMENT_REVERSAL
event LOAN_ACCOUNT_ACTIVITY
event LOAN_ANTICIPATED_DISBURSEMENT
event SAVINGS_CREATED
event SAVINGS_DEPOSIT
event SAVINGS_DEPOSIT_REVERSAL
event SAVINGS_APPROVAL
event SAVINGS_ACCOUNT_ACTIVATED
event SAVINGS_ACCOUNT_CLOSURE
event SAVINGS_ACCOUNT_REJECTION
event SAVINGS_WITHDRAWAL
event SAVINGS_WITHDRAWAL_REVERSAL
event SAVINGS_ACCOUNT_ACTIVITY
event PORTAL_ACTIVATED
event PORTAL_PASSWORD_RESET
event END_OF_DAY_PROCESSING_COMPLETED
event DATA_ACCESS_STATE_CHANGED
event CREDIT_ARRANGEMENT_CREATED
event CREDIT_ARRANGEMENT_CLOSED
event CREDIT_ARRANGEMENT_APPROVED
event CREDIT_ARRANGEMENT_REJECTED
event CREDIT_ARRANGEMENT_WITHDRAWN
event CREDIT_ARRANGEMENT_DELETED
event CREDIT_ARRANGEMENT_ACCOUNT_ADDED
event CREDIT_ARRANGEMENT_ACCOUNT_REMOVED

Response Headers

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

CreditArrangements

Allows you to retrieve, create, update and delete credit arrangements.

getAll

Code samples

# You can also use wget
curl -X GET https://localhost:8889/api/creditarrangements \
  -H 'Accept: application/vnd.mambu.v2+json'

GET https://localhost:8889/api/creditarrangements HTTP/1.1
Host: localhost:8889

Accept: application/vnd.mambu.v2+json

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

};

$.ajax({
  url: 'https://localhost:8889/api/creditarrangements',
  method: 'get',

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

const request = require('node-fetch');

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

};

fetch('https://localhost:8889/api/creditarrangements',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

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

result = RestClient.get 'https://localhost:8889/api/creditarrangements',
  params: {
  }, headers: headers

p JSON.parse(result)

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

r = requests.get('https://localhost:8889/api/creditarrangements', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://localhost:8889/api/creditarrangements");
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", "https://localhost:8889/api/creditarrangements", data)
    req.Header = headers

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

GET /creditarrangements

Allows retrieval of credit arrangements using various query parameters

Parameters

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

Enumerated Values

Parameter Value
paginationDetails ON
paginationDetails OFF
detailsLevel BASIC
detailsLevel FULL

Example responses

200 Response

[
  {
    "availableCreditAmount": 0,
    "amount": 0,
    "notes": "string",
    "lastModifiedDate": "2016-09-06T13:37:50+03:00",
    "holderKey": "string",
    "consumedCreditAmount": 0,
    "creationDate": "2016-09-06T13:37:50+03:00",
    "approvedDate": "2016-09-06T13:37:50+03:00",
    "subState": "PENDING_APPROVAL",
    "closedDate": "2016-09-06T13:37:50+03:00",
    "exposureLimitType": "APPROVED_AMOUNT",
    "encodedKey": "string",
    "expireDate": "2016-09-06T13:37:50+03:00",
    "id": "string",
    "state": "PENDING_APPROVAL",
    "holderType": "CLIENT",
    "startDate": "2016-09-06T13:37:50+03:00"
  }
]

Responses

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

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [CreditArrangement] false none none
» availableCreditAmount number false read-only The available amount of the credit arrangement
» amount number true none The maximum credit amount the client can be exposed to
» notes string false none The notes/description of credit arrangement
» lastModifiedDate string(date-time) false read-only The last date when credit arrangement was modified
» holderKey string false none The encodedKey of the client or group (a.k.a holder)
» consumedCreditAmount number false read-only The consumed amount of the credit arrangement (calculated as the difference between the amount and available amount
» creationDate string(date-time) false read-only The date when credit arrangement was created
» approvedDate string(date-time) false read-only The date when credit arrangement was approved
» subState string false read-only The substate of credit arrangement can be Withdrawn or Rejected when state is Closed
» closedDate string(date-time) false read-only The date when credit arrangement was closed
» exposureLimitType string false none The type of exposure limit calculation method used
» encodedKey string false read-only The encoded key of credit arrangement, auto generated, unique
» expireDate string(date-time) true none The date when credit arrangement expires
» id string false none The id of credit arrangement, can be generated and customized, unique
» state string false read-only The state of credit arrangement can be Pending Approval, Approved, Active or Closed
» holderType string true none The type of the line of credit holder (client or group)
» startDate string(date-time) true none The start date from which the credit arrangement becomes active

Enumerated Values

Property Value
subState PENDING_APPROVAL
subState APPROVED
subState ACTIVE
subState CLOSED
subState WITHDRAWN
subState REJECTED
exposureLimitType APPROVED_AMOUNT
exposureLimitType OUTSTANDING_AMOUNT
state PENDING_APPROVAL
state APPROVED
state ACTIVE
state CLOSED
state WITHDRAWN
state REJECTED
holderType CLIENT
holderType GROUP

Response Headers

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

create

Code samples

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

POST https://localhost:8889/api/creditarrangements HTTP/1.1
Host: localhost:8889
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: 'https://localhost:8889/api/creditarrangements',
  method: 'post',

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

const request = require('node-fetch');
const inputBody = '{
  "amount": 0,
  "notes": "string",
  "holderKey": "string",
  "exposureLimitType": "APPROVED_AMOUNT",
  "expireDate": "2016-09-06T13:37:50+03:00",
  "id": "string",
  "holderType": "CLIENT",
  "startDate": "2016-09-06T13:37:50+03:00"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/vnd.mambu.v2+json',
  'Idempotency-Key':'string'

};

fetch('https://localhost:8889/api/creditarrangements',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

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

result = RestClient.post 'https://localhost:8889/api/creditarrangements',
  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('https://localhost:8889/api/creditarrangements', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://localhost:8889/api/creditarrangements");
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", "https://localhost:8889/api/creditarrangements", data)
    req.Header = headers

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

POST /creditarrangements

Create a new credit arrangement

Body parameter

{
  "amount": 0,
  "notes": "string",
  "holderKey": "string",
  "exposureLimitType": "APPROVED_AMOUNT",
  "expireDate": "2016-09-06T13:37:50+03:00",
  "id": "string",
  "holderType": "CLIENT",
  "startDate": "2016-09-06T13:37:50+03:00"
}

Parameters

Parameter In Type Required Description
Idempotency-Key header string false 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.
body body CreditArrangement true Credit arrangement to be created

Example responses

201 Response

{
  "availableCreditAmount": 0,
  "amount": 0,
  "notes": "string",
  "lastModifiedDate": "2016-09-06T13:37:50+03:00",
  "holderKey": "string",
  "consumedCreditAmount": 0,
  "creationDate": "2016-09-06T13:37:50+03:00",
  "approvedDate": "2016-09-06T13:37:50+03:00",
  "subState": "PENDING_APPROVAL",
  "closedDate": "2016-09-06T13:37:50+03:00",
  "exposureLimitType": "APPROVED_AMOUNT",
  "encodedKey": "string",
  "expireDate": "2016-09-06T13:37:50+03:00",
  "id": "string",
  "state": "PENDING_APPROVAL",
  "holderType": "CLIENT",
  "startDate": "2016-09-06T13:37:50+03:00"
}

Responses

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

getById

Code samples

# You can also use wget
curl -X GET https://localhost:8889/api/creditarrangements/{creditArrangementId} \
  -H 'Accept: application/vnd.mambu.v2+json'

GET https://localhost:8889/api/creditarrangements/{creditArrangementId} HTTP/1.1
Host: localhost:8889

Accept: application/vnd.mambu.v2+json

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

};

$.ajax({
  url: 'https://localhost:8889/api/creditarrangements/{creditArrangementId}',
  method: 'get',

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

const request = require('node-fetch');

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

};

fetch('https://localhost:8889/api/creditarrangements/{creditArrangementId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

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

result = RestClient.get 'https://localhost:8889/api/creditarrangements/{creditArrangementId}',
  params: {
  }, headers: headers

p JSON.parse(result)

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

r = requests.get('https://localhost:8889/api/creditarrangements/{creditArrangementId}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://localhost:8889/api/creditarrangements/{creditArrangementId}");
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", "https://localhost:8889/api/creditarrangements/{creditArrangementId}", data)
    req.Header = headers

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

GET /creditarrangements/{creditArrangementId}

Allows retrieval of a single credit arrangement via id or encoded key

Parameters

Parameter In Type Required Description
creditArrangementId path string true The id or encoded key of the credit arrangement to be retrieved
detailsLevel query string false The level of details to retrieve, FULL means the full details of the object will be retrieved (custom fields, address, contact info or any other related object), BASIC will return only the first level elements of the object

Enumerated Values

Parameter Value
detailsLevel BASIC
detailsLevel FULL

Example responses

200 Response

{
  "availableCreditAmount": 0,
  "amount": 0,
  "notes": "string",
  "lastModifiedDate": "2016-09-06T13:37:50+03:00",
  "holderKey": "string",
  "consumedCreditAmount": 0,
  "creationDate": "2016-09-06T13:37:50+03:00",
  "approvedDate": "2016-09-06T13:37:50+03:00",
  "subState": "PENDING_APPROVAL",
  "closedDate": "2016-09-06T13:37:50+03:00",
  "exposureLimitType": "APPROVED_AMOUNT",
  "encodedKey": "string",
  "expireDate": "2016-09-06T13:37:50+03:00",
  "id": "string",
  "state": "PENDING_APPROVAL",
  "holderType": "CLIENT",
  "startDate": "2016-09-06T13:37:50+03:00"
}

Responses

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

update

Code samples

# You can also use wget
curl -X PUT https://localhost:8889/api/creditarrangements/{creditArrangementId} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/vnd.mambu.v2+json'

PUT https://localhost:8889/api/creditarrangements/{creditArrangementId} HTTP/1.1
Host: localhost:8889
Content-Type: application/json
Accept: application/vnd.mambu.v2+json

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

};

$.ajax({
  url: 'https://localhost:8889/api/creditarrangements/{creditArrangementId}',
  method: 'put',

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

const request = require('node-fetch');
const inputBody = '{
  "amount": 0,
  "notes": "string",
  "holderKey": "string",
  "exposureLimitType": "APPROVED_AMOUNT",
  "expireDate": "2016-09-06T13:37:50+03:00",
  "id": "string",
  "holderType": "CLIENT",
  "startDate": "2016-09-06T13:37:50+03:00"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/vnd.mambu.v2+json'

};

fetch('https://localhost:8889/api/creditarrangements/{creditArrangementId}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

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

result = RestClient.put 'https://localhost:8889/api/creditarrangements/{creditArrangementId}',
  params: {
  }, headers: headers

p JSON.parse(result)

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

r = requests.put('https://localhost:8889/api/creditarrangements/{creditArrangementId}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://localhost:8889/api/creditarrangements/{creditArrangementId}");
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", "https://localhost:8889/api/creditarrangements/{creditArrangementId}", data)
    req.Header = headers

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

PUT /creditarrangements/{creditArrangementId}

Update an existing credit arrangement

Body parameter

{
  "amount": 0,
  "notes": "string",
  "holderKey": "string",
  "exposureLimitType": "APPROVED_AMOUNT",
  "expireDate": "2016-09-06T13:37:50+03:00",
  "id": "string",
  "holderType": "CLIENT",
  "startDate": "2016-09-06T13:37:50+03:00"
}

Parameters

Parameter In Type Required Description
creditArrangementId path string true The id or encoded key of the credit arrangement to be updated
body body CreditArrangement true Credit arrangement to be updated

Example responses

200 Response

{
  "availableCreditAmount": 0,
  "amount": 0,
  "notes": "string",
  "lastModifiedDate": "2016-09-06T13:37:50+03:00",
  "holderKey": "string",
  "consumedCreditAmount": 0,
  "creationDate": "2016-09-06T13:37:50+03:00",
  "approvedDate": "2016-09-06T13:37:50+03:00",
  "subState": "PENDING_APPROVAL",
  "closedDate": "2016-09-06T13:37:50+03:00",
  "exposureLimitType": "APPROVED_AMOUNT",
  "encodedKey": "string",
  "expireDate": "2016-09-06T13:37:50+03:00",
  "id": "string",
  "state": "PENDING_APPROVAL",
  "holderType": "CLIENT",
  "startDate": "2016-09-06T13:37:50+03:00"
}

Responses

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

delete

Code samples

# You can also use wget
curl -X DELETE https://localhost:8889/api/creditarrangements/{creditArrangementId} \
  -H 'Accept: application/vnd.mambu.v2+json'

DELETE https://localhost:8889/api/creditarrangements/{creditArrangementId} HTTP/1.1
Host: localhost:8889

Accept: application/vnd.mambu.v2+json

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

};

$.ajax({
  url: 'https://localhost:8889/api/creditarrangements/{creditArrangementId}',
  method: 'delete',

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

const request = require('node-fetch');

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

};

fetch('https://localhost:8889/api/creditarrangements/{creditArrangementId}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

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

result = RestClient.delete 'https://localhost:8889/api/creditarrangements/{creditArrangementId}',
  params: {
  }, headers: headers

p JSON.parse(result)

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

r = requests.delete('https://localhost:8889/api/creditarrangements/{creditArrangementId}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://localhost:8889/api/creditarrangements/{creditArrangementId}");
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", "https://localhost:8889/api/creditarrangements/{creditArrangementId}", data)
    req.Header = headers

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

DELETE /creditarrangements/{creditArrangementId}

Delete a credit arrangement

Parameters

Parameter In Type Required Description
creditArrangementId path string true The id or encoded key of the credit arrangement to be deleted

Example responses

400 Response

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

Responses

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

patch

Code samples

# You can also use wget
curl -X PATCH https://localhost:8889/api/creditarrangements/{creditArrangementId} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/vnd.mambu.v2+json'

PATCH https://localhost:8889/api/creditarrangements/{creditArrangementId} HTTP/1.1
Host: localhost:8889
Content-Type: application/json
Accept: application/vnd.mambu.v2+json

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

};

$.ajax({
  url: 'https://localhost:8889/api/creditarrangements/{creditArrangementId}',
  method: 'patch',

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

const request = require('node-fetch');
const inputBody = '[
  {
    "op": "ADD",
    "path": "string",
    "from": "string",
    "value": {}
  }
]';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/vnd.mambu.v2+json'

};

fetch('https://localhost:8889/api/creditarrangements/{creditArrangementId}',
{
  method: 'PATCH',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

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

result = RestClient.patch 'https://localhost:8889/api/creditarrangements/{creditArrangementId}',
  params: {
  }, headers: headers

p JSON.parse(result)

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

r = requests.patch('https://localhost:8889/api/creditarrangements/{creditArrangementId}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://localhost:8889/api/creditarrangements/{creditArrangementId}");
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"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PATCH", "https://localhost:8889/api/creditarrangements/{creditArrangementId}", data)
    req.Header = headers

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

PATCH /creditarrangements/{creditArrangementId}

Partially update an existing credit arrangement

Body parameter

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

Parameters

Parameter In Type Required Description
creditArrangementId path string true The id or encoded key of the credit arrangement to be updated
body body array[object] true Patch operations to be applied to a resource

Example responses

400 Response

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

Responses

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

changeState

Code samples

# You can also use wget
curl -X POST https://localhost:8889/api/creditarrangements/{creditArrangementId}:changeState \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/vnd.mambu.v2+json'

POST https://localhost:8889/api/creditarrangements/{creditArrangementId}:changeState HTTP/1.1
Host: localhost:8889
Content-Type: application/json
Accept: application/vnd.mambu.v2+json

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

};

$.ajax({
  url: 'https://localhost:8889/api/creditarrangements/{creditArrangementId}:changeState',
  method: 'post',

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

const request = require('node-fetch');
const inputBody = '{
  "action": "APPROVE",
  "actionDetails": {
    "notes": "string"
  }
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/vnd.mambu.v2+json'

};

fetch('https://localhost:8889/api/creditarrangements/{creditArrangementId}:changeState',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

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

result = RestClient.post 'https://localhost:8889/api/creditarrangements/{creditArrangementId}:changeState',
  params: {
  }, headers: headers

p JSON.parse(result)

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

r = requests.post('https://localhost:8889/api/creditarrangements/{creditArrangementId}:changeState', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://localhost:8889/api/creditarrangements/{creditArrangementId}:changeState");
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", "https://localhost:8889/api/creditarrangements/{creditArrangementId}:changeState", data)
    req.Header = headers

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

POST /creditarrangements/{creditArrangementId}:changeState

Allows posting an action such as change credit arrangement state

Body parameter

{
  "action": "APPROVE",
  "actionDetails": {
    "notes": "string"
  }
}

Parameters

Parameter In Type Required Description
creditArrangementId path string true The id or encoded key of the credit arrangement to be updated
body body CreditArrangementAction true Allows specifying the action details for a credit arrangement

Example responses

200 Response

{
  "availableCreditAmount": 0,
  "amount": 0,
  "notes": "string",
  "lastModifiedDate": "2016-09-06T13:37:50+03:00",
  "holderKey": "string",
  "consumedCreditAmount": 0,
  "creationDate": "2016-09-06T13:37:50+03:00",
  "approvedDate": "2016-09-06T13:37:50+03:00",
  "subState": "PENDING_APPROVAL",
  "closedDate": "2016-09-06T13:37:50+03:00",
  "exposureLimitType": "APPROVED_AMOUNT",
  "encodedKey": "string",
  "expireDate": "2016-09-06T13:37:50+03:00",
  "id": "string",
  "state": "PENDING_APPROVAL",
  "holderType": "CLIENT",
  "startDate": "2016-09-06T13:37:50+03:00"
}

Responses

Status Meaning Description Schema
200 OK Credit arrangement action posted CreditArrangement
400 Bad Request A Validation error occurred ErrorResponse
401 Unauthorized UNAUTHORIZED ErrorResponse
403 Forbidden Forbidden ErrorResponse
404 Not Found Credit arrangement not found ErrorResponse

CustomFields

Allows retrieval of custom fields

getById

Code samples

# You can also use wget
curl -X GET https://localhost:8889/api/customfields/{customfieldId} \
  -H 'Accept: application/vnd.mambu.v2+json'

GET https://localhost:8889/api/customfields/{customfieldId} HTTP/1.1
Host: localhost:8889

Accept: application/vnd.mambu.v2+json

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

};

$.ajax({
  url: 'https://localhost:8889/api/customfields/{customfieldId}',
  method: 'get',

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

const request = require('node-fetch');

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

};

fetch('https://localhost:8889/api/customfields/{customfieldId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

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

result = RestClient.get 'https://localhost:8889/api/customfields/{customfieldId}',
  params: {
  }, headers: headers

p JSON.parse(result)

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

r = requests.get('https://localhost:8889/api/customfields/{customfieldId}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://localhost:8889/api/customfields/{customfieldId}");
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", "https://localhost:8889/api/customfields/{customfieldId}", data)
    req.Header = headers

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

GET /customfields/{customfieldId}

Allows retrieval of a single custom field via id or encoded key

Parameters

Parameter In Type Required Description
customfieldId path string true The id or encoded key of the custom field to be retrieved
detailsLevel query string false The level of details to retrieve, FULL means the full details of the object will be retrieved (custom fields, address, contact info or any other related object), BASIC will return only the first level elements of the object

Enumerated Values

Parameter Value
detailsLevel BASIC
detailsLevel FULL

Example responses

200 Response

{
  "displaySettings": {
    "description": "string",
    "fieldSize": "SHORT",
    "position": 0,
    "builtInId": "FIRST_NAME",
    "displayName": "string"
  },
  "lastModifiedDate": "2016-09-06T13:37:50+03:00",
  "usage": [
    {
      "default": false,
      "objectKey": "string",
      "required": false
    }
  ],
  "selectionOptions": [
    {
      "forSelectionKey": "string",
      "forValue": "string",
      "availableOptions": [
        {
          "score": 0,
          "selectionKey": "string",
          "value": "string"
        }
      ]
    }
  ],
  "editRights": {
    "allUsers": false,
    "roles": [
      "string"
    ]
  },
  "creationDate": "2016-09-06T13:37:50+03:00",
  "type": "FREE_TEXT",
  "viewRights": {
    "allUsers": false,
    "roles": [
      "string"
    ]
  },
  "valueValidationSettings": {
    "validationPattern": "string",
    "unique": false
  },
  "availableFor": "CLIENT",
  "dependentFieldKey": "string",
  "encodedKey": "string",
  "id": "string",
  "state": "ACTIVE"
}

Responses

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

CustomFieldSets

Allows retrieval of custom field sets

getAll

Code samples

# You can also use wget
curl -X GET https://localhost:8889/api/customfieldsets/{customFieldSetId}/customfields \
  -H 'Accept: application/vnd.mambu.v2+json'

GET https://localhost:8889/api/customfieldsets/{customFieldSetId}/customfields HTTP/1.1
Host: localhost:8889

Accept: application/vnd.mambu.v2+json

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

};

$.ajax({
  url: 'https://localhost:8889/api/customfieldsets/{customFieldSetId}/customfields',
  method: 'get',

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

const request = require('node-fetch');

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

};

fetch('https://localhost:8889/api/customfieldsets/{customFieldSetId}/customfields',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

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

result = RestClient.get 'https://localhost:8889/api/customfieldsets/{customFieldSetId}/customfields',
  params: {
  }, headers: headers

p JSON.parse(result)

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

r = requests.get('https://localhost:8889/api/customfieldsets/{customFieldSetId}/customfields', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://localhost:8889/api/customfieldsets/{customFieldSetId}/customfields");
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", "https://localhost:8889/api/customfieldsets/{customFieldSetId}/customfields", data)
    req.Header = headers

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

GET /customfieldsets/{customFieldSetId}/customfields

Allows retrieval of custom fields by custom field set key or id

Parameters

Parameter In Type Required Description
customFieldSetId path string true The encoded key or id of the custom field set used to retrieve all the custom fields of that set
offset query integer(int32) false Pagination, index to start searching at when retrieving elements, used in combination with limit to paginate results
limit query integer(int32) false Pagination, the number of elements to retrieve, used in combination with offset to paginate results
paginationDetails query string false Flag specifying whether the pagination should be enabled or not. Please note that by default it is disabled (OFF), in order to improve the performance of the APIs
detailsLevel query string false The level of details to retrieve, FULL means the full details of the object will be retrieved (custom fields, address, contact info or any other related object), BASIC will return only the first level elements of the object

Enumerated Values

Parameter Value
paginationDetails ON
paginationDetails OFF
detailsLevel BASIC
detailsLevel FULL

Example responses

200 Response

[
  {
    "displaySettings": {
      "description": "string",
      "fieldSize": "SHORT",
      "position": 0,
      "builtInId": "FIRST_NAME",
      "displayName": "string"
    },
    "lastModifiedDate": "2016-09-06T13:37:50+03:00",
    "usage": [
      {
        "default": false,
        "objectKey": "string",
        "required": false
      }
    ],
    "selectionOptions": [
      {
        "forSelectionKey": "string",
        "forValue": "string",
        "availableOptions": [
          {
            "score": 0,
            "selectionKey": "string",
            "value": "string"
          }
        ]
      }
    ],
    "editRights": {
      "allUsers": false,
      "roles": [
        "string"
      ]
    },
    "creationDate": "2016-09-06T13:37:50+03:00",
    "type": "FREE_TEXT",
    "viewRights": {
      "allUsers": false,
      "roles": [
        "string"
      ]
    },
    "valueValidationSettings": {
      "validationPattern": "string",
      "unique": false
    },
    "availableFor": "CLIENT",
    "dependentFieldKey": "string",
    "encodedKey": "string",
    "id": "string",
    "state": "ACTIVE"
  }
]

Responses

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

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [CustomFieldMeta] false none none
» displaySettings CustomFieldDisplaySettings false none Groups all fields related to a custom field's display settings
»» description string false none Free-text description of the field.
»» fieldSize string false none Field display size in the UI.
»» position integer(int32) false none Custom field position in the custom field set.
»» builtInId string false none Shows the original id of the built in custom field
»» displayName string false none User-defined name, displayed in the UI.
» lastModifiedDate string(date-time) false none Date at which the latest update was performed for this field
» usage [CustomFieldUsage] false none Information on what record types the custom field is available for.
»» default boolean false none Indicates whether the field is displayed by default on create/edit page for this record type.
»» objectKey string false none Indicates the key of the record type (eg client type)
»» required boolean false none Indicates whether the field is mandatory or not for this record type.
» selectionOptions [CustomFieldSelectionOption] false none Indicates that the field has predefined selections and only those can be used to populate it
»» forSelectionKey string false none Indicates the key for the value on the master field.
»» forValue string false none Indicates the value of the master field.
»» availableOptions [CustomFieldAvailableOption] false none List of values that can be used in the slave field based on current master selection.
»»» score number false none Selection score
»»» selectionKey string false none System-generated ID of the predefined value
»»» value string false none Predefined value name
»» editRights CustomFieldEditRights false none Settings that indicate the defined editing rights by role for the custom field
»»» allUsers boolean false none Indicates whether the field can be edited by all users or by roles
»»» roles [string] false none Lists the IDs of the roles that have edit rights for this field when it's not accessible by all users
»» creationDate string(date-time) false none Date at which the custom field was created
»» type string false none Supported input type
»» viewRights CustomFieldViewRights false none Settings that indicate the defined view rights by role for the custom field
»»» allUsers boolean false none Indicates whether the field can be viewed by all users or by roles
»»» roles [string] false none Lists the IDs of the roles that have view rights for this field when it's not accessible by all users
»» valueValidationSettings CustomFieldValueValidationSettings false none Settings for field input validation.
»»» validationPattern string false none Indicates if a validation is set in terms of expected character type/format
»»» unique boolean false none Indicates whether this field allows duplicate values or not
»» availableFor string false none Indicates with what object the custom field is associated
»» dependentFieldKey string false none Indicates the master field on which the dependency is based upon.
»» encodedKey string false read-only The encoded key of the entity, generated, globally unique
»» id string false none User-defined ID, globally unique.
»» state string false none Indicates whether the field is active or inactive

Enumerated Values

Property Value
fieldSize SHORT
fieldSize LONG
builtInId FIRST_NAME
builtInId MIDDLE_NAME
builtInId LAST_NAME
builtInId BIRTHDATE
builtInId GENDER
builtInId MOBILE_PHONE
builtInId HOME_PHONE
builtInId EMAIL_ADDRESS
type FREE_TEXT
type SELECTION
type NUMBER
type CHECKBOX
type DATE
type CLIENT_LINK
type GROUP_LINK
type USER_LINK
availableFor CLIENT
availableFor GROUP
availableFor CREDIT_ARRANGEMENT
availableFor LOAN_ACCOUNT
availableFor GUARANTOR
availableFor ASSET
availableFor DEPOSIT_ACCOUNT
availableFor TRANSACTION_CHANNEL
availableFor BRANCH
availableFor CENTRE
availableFor USER
state ACTIVE
state INACTIVE

Response Headers

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

DatabaseBackup

Allows you to trigger database backups and download them once they are ready

triggerBackup

Code samples

# You can also use wget
curl -X POST https://localhost:8889/api/database/backup \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/vnd.mambu.v2+json'

POST https://localhost:8889/api/database/backup HTTP/1.1
Host: localhost:8889
Content-Type: application/json
Accept: application/vnd.mambu.v2+json

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

};

$.ajax({
  url: 'https://localhost:8889/api/database/backup',
  method: 'post',

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

const request = require('node-fetch');
const inputBody = '{
  "callback": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/vnd.mambu.v2+json'

};

fetch('https://localhost:8889/api/database/backup',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

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

result = RestClient.post 'https://localhost:8889/api/database/backup',
  params: {
  }, headers: headers

p JSON.parse(result)

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

r = requests.post('https://localhost:8889/api/database/backup', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://localhost:8889/api/database/backup");
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", "https://localhost:8889/api/database/backup", data)
    req.Header = headers

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

POST /database/backup

Trigger database backup

Body parameter

{
  "callback": "string"
}

Parameters

Parameter In Type Required Description
body body TriggerDatabaseBackupRequest false Database backup request

Example responses

202 Response

{
  "state": "QUEUED"
}

Responses

Status Meaning Description Schema
202 Accepted Database backup triggered TriggerDatabaseBackupResponse
400 Bad Request A Validation error occurred ErrorResponse
401 Unauthorized UNAUTHORIZED ErrorResponse
403 Forbidden Forbidden ErrorResponse

downloadBackup

Code samples

# You can also use wget
curl -X GET https://localhost:8889/api/database/backup/{databaseBackupVersion} \
  -H 'Accept: application/vnd.mambu.v2+zip'

GET https://localhost:8889/api/database/backup/{databaseBackupVersion} HTTP/1.1
Host: localhost:8889

Accept: application/vnd.mambu.v2+zip

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

};

$.ajax({
  url: 'https://localhost:8889/api/database/backup/{databaseBackupVersion}',
  method: 'get',

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

const request = require('node-fetch');

const headers = {
  'Accept':'application/vnd.mambu.v2+zip'

};

fetch('https://localhost:8889/api/database/backup/{databaseBackupVersion}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

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

result = RestClient.get 'https://localhost:8889/api/database/backup/{databaseBackupVersion}',
  params: {
  }, headers: headers

p JSON.parse(result)

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

r = requests.get('https://localhost:8889/api/database/backup/{databaseBackupVersion}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://localhost:8889/api/database/backup/{databaseBackupVersion}");
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+zip"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://localhost:8889/api/database/backup/{databaseBackupVersion}", data)
    req.Header = headers

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

GET /database/backup/{databaseBackupVersion}

Download database backup

Parameters

Parameter In Type Required Description
databaseBackupVersion path string true Version of the database backup

Enumerated Values

Parameter Value
databaseBackupVersion LATEST

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK Database backup downloaded string
400 Bad Request A Validation error occurred ErrorResponse
401 Unauthorized UNAUTHORIZED ErrorResponse
403 Forbidden Forbidden ErrorResponse

Response Headers

Status Header Type Format Description
200 Content-Disposition string The format is - attachment; filename="{static_backup_file_name}.zip"
200 Last-Modified string date-time Start date from last completed backup process
200 Content-Length integer int32 The length of the request body

DepositProducts

Allows you to retrieve, create, update or delete deposit products.

create

Code samples

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

POST https://localhost:8889/api/depositproducts HTTP/1.1
Host: localhost:8889
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: 'https://localhost:8889/api/depositproducts',
  method: 'post',

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

const request = require('node-fetch');
const inputBody = '{
  "notes": "string",
  "lastModifiedDate": "2016-09-06T13:37:50+03:00",
  "availabilitySettings": {
    "branchSettings": {
      "forAllBranches": false,
      "availableProductBranches": [
        "string"
      ]
    },
    "availableFor": [
      "INDIVIDUALS"
    ]
  },
  "feesSettings": {
    "fees": [
      {
        "amount": 0,
        "accountingRules": [
          {
            "glAccountKey": "string",
            "financialResource": "PORTFOLIO_CONTROL"
          }
        ],
        "amountCalculationMethod": "FLAT",
        "name": "string",
        "feeApplication": "REQUIRED",
        "trigger": "MANUAL",
        "state": "ACTIVE",
        "creationDate": "2016-09-06T13:37:50+03:00",
        "applyDateMethod": "MONTHLY_FROM_ACTIVATION"
      }
    ],
    "allowArbitraryFees": false
  },
  "taxSettings": {
    "withholdingTaxEnabled": false
  },
  "offsetSettings": {
    "allowOffset": false
  },
  "creationDate": "2016-09-06T13:37:50+03:00",
  "type": "CURRENT_ACCOUNT",
  "creditArrangementSettings": {
    "creditArrangementRequirement": "OPTIONAL"
  },
  "currencySettings": {
    "currencies": [
      {
        "code": "AED"
      }
    ]
  },
  "maturitySettings": {
    "maturityPeriodUnit": "DAYS",
    "maturityPeriod": {
      "minValue": 0,
      "defaultValue": 0,
      "maxValue": 0
    }
  },
  "newAccountSettings": {
    "idGeneratorType": "INCREMENTAL_NUMBER",
    "idPattern": "string"
  },
  "interestSettings": {
    "interestRateSettings": {
      "interestRate": {
        "minValue": 0,
        "maxValue": 0,
        "defaultValue": 0
      },
      "interestRateSource": "FIXED_INTEREST_RATE",
      "indexSourceKey": "string",
      "interestRateTiers": [
        {
          "endingBalance": 0,
          "interestRate": 0,
          "endingDay": 0
        }
      ],
      "interestChargeFrequency": "ANNUALIZED",
      "accrueInterestAfterMaturity": false,
      "interestRateTerms": "FIXED",
      "interestChargeFrequencyCount": 0
    },
    "collectInterestWhenLocked": false,
    "interestCalculationBalance": "MINIMUM",
    "interestPaidIntoAccount": false,
    "maximumBalance": 0,
    "daysInYear": "ACTUAL_365_FIXED",
    "interestPaymentSettings": {
      "interestPaymentDates": [
        {
          "month": 0,
          "day": 0
        }
      ],
      "interestPaymentPoint": "FIRST_DAY_OF_MONTH"
    }
  },
  "accountingSettings": {
    "accountingMethod": "NONE",
    "accountingRules": [
      {
        "glAccountKey": "string",
        "financialResource": "PORTFOLIO_CONTROL"
      }
    ],
    "interestAccruedAccountingMethod": "NONE"
  },
  "name": "string",
  "id": "string",
  "state": "ACTIVE",
  "overdraftSettings": {
    "allowOverdraft": false,
    "allowTechnicalOverdraft": false,
    "maxOverdraftLimit": 0
  },
  "internalControls": {
    "dormancyPeriodDays": 0,
    "recommendedDepositAmount": 0,
    "openingBalance": {
      "minValue": 0,
      "maxValue": 0,
      "defaultValue": 0
    },
    "maxWithdrawalAmount": 0
  },
  "overdraftInterestSettings": {
    "interestRateSettings": {
      "interestRate": {
        "minValue": 0,
        "maxValue": 0,
        "defaultValue": 0
      },
      "interestRateReviewUnit": "DAYS",
      "interestRateSource": "FIXED_INTEREST_RATE",
      "interestRateReviewCount": 0,
      "indexSourceKey": "string",
      "interestRateTiers": [
        {
          "endingBalance": 0,
          "interestRate": 0
        }
      ],
      "interestChargeFrequency": "ANNUALIZED",
      "interestRateTerms": "FIXED",
      "interestChargeFrequencyCount": 0
    },
    "daysInYear": "ACTUAL_365_FIXED"
  }
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/vnd.mambu.v2+json',
  'Idempotency-Key':'string'

};

fetch('https://localhost:8889/api/depositproducts',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

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

result = RestClient.post 'https://localhost:8889/api/depositproducts',
  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('https://localhost:8889/api/depositproducts', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://localhost:8889/api/depositproducts");
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", "https://localhost:8889/api/depositproducts", data)
    req.Header = headers

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

POST /depositproducts

Create a new deposit product

Body parameter

{
  "notes": "string",
  "lastModifiedDate": "2016-09-06T13:37:50+03:00",
  "availabilitySettings": {
    "branchSettings": {
      "forAllBranches": false,
      "availableProductBranches": [
        "string"
      ]
    },
    "availableFor": [
      "INDIVIDUALS"
    ]
  },
  "feesSettings": {
    "fees": [
      {
        "amount": 0,
        "accountingRules": [
          {
            "glAccountKey": "string",
            "financialResource": "PORTFOLIO_CONTROL"
          }
        ],
        "amountCalculationMethod": "FLAT",
        "name": "string",
        "feeApplication": "REQUIRED",
        "trigger": "MANUAL",
        "state": "ACTIVE",
        "creationDate": "2016-09-06T13:37:50+03:00",
        "applyDateMethod": "MONTHLY_FROM_ACTIVATION"
      }
    ],
    "allowArbitraryFees": false
  },
  "taxSettings": {
    "withholdingTaxEnabled": false
  },
  "offsetSettings": {
    "allowOffset": false
  },
  "creationDate": "2016-09-06T13:37:50+03:00",
  "type": "CURRENT_ACCOUNT",
  "creditArrangementSettings": {
    "creditArrangementRequirement": "OPTIONAL"
  },
  "currencySettings": {
    "currencies": [
      {
        "code": "AED"
      }
    ]
  },
  "maturitySettings": {
    "maturityPeriodUnit": "DAYS",
    "maturityPeriod": {
      "minValue": 0,
      "defaultValue": 0,
      "maxValue": 0
    }
  },
  "newAccountSettings": {
    "idGeneratorType": "INCREMENTAL_NUMBER",
    "idPattern": "string"
  },
  "interestSettings": {
    "interestRateSettings": {
      "interestRate": {
        "minValue": 0,
        "maxValue": 0,
        "defaultValue": 0
      },
      "interestRateSource": "FIXED_INTEREST_RATE",
      "indexSourceKey": "string",
      "interestRateTiers": [
        {
          "endingBalance": 0,
          "interestRate": 0,
          "endingDay": 0
        }
      ],
      "interestChargeFrequency": "ANNUALIZED",
      "accrueInterestAfterMaturity": false,
      "interestRateTerms": "FIXED",
      "interestChargeFrequencyCount": 0
    },
    "collectInterestWhenLocked": false,
    "interestCalculationBalance": "MINIMUM",
    "interestPaidIntoAccount": false,
    "maximumBalance": 0,
    "daysInYear": "ACTUAL_365_FIXED",
    "interestPaymentSettings": {
      "interestPaymentDates": [
        {
          "month": 0,
          "day": 0
        }
      ],
      "interestPaymentPoint": "FIRST_DAY_OF_MONTH"
    }
  },
  "accountingSettings": {
    "accountingMethod": "NONE",
    "accountingRules": [
      {
        "glAccountKey": "string",
        "financialResource": "PORTFOLIO_CONTROL"
      }
    ],
    "interestAccruedAccountingMethod": "NONE"
  },
  "name": "string",
  "id": "string",
  "state": "ACTIVE",
  "overdraftSettings": {
    "allowOverdraft": false,
    "allowTechnicalOverdraft": false,
    "maxOverdraftLimit": 0
  },
  "internalControls": {
    "dormancyPeriodDays": 0,
    "recommendedDepositAmount": 0,
    "openingBalance": {
      "minValue": 0,
      "maxValue": 0,
      "defaultValue": 0
    },
    "maxWithdrawalAmount": 0
  },
  "overdraftInterestSettings": {
    "interestRateSettings": {
      "interestRate": {
        "minValue": 0,
        "maxValue": 0,
        "defaultValue": 0
      },
      "interestRateReviewUnit": "DAYS",
      "interestRateSource": "FIXED_INTEREST_RATE",
      "interestRateReviewCount": 0,
      "indexSourceKey": "string",
      "interestRateTiers": [
        {
          "endingBalance": 0,
          "interestRate": 0
        }
      ],
      "interestChargeFrequency": "ANNUALIZED",
      "interestRateTerms": "FIXED",
      "interestChargeFrequencyCount": 0
    },
    "daysInYear": "ACTUAL_365_FIXED"
  }
}

Parameters

Parameter In Type Required Description
Idempotency-Key header string false 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.
body body DepositProduct true Deposit product to be created

Example responses

201 Response

{
  "notes": "string",
  "lastModifiedDate": "2016-09-06T13:37:50+03:00",
  "availabilitySettings": {
    "branchSettings": {
      "forAllBranches": false,
      "availableProductBranches": [
        "string"
      ]
    },
    "availableFor": [
      "INDIVIDUALS"
    ]
  },
  "feesSettings": {
    "fees": [
      {
        "amount": 0,
        "accountingRules": [
          {
            "encodedKey": "string",
            "glAccountKey": "string",
            "financialResource": "PORTFOLIO_CONTROL"
          }
        ],
        "amountCalculationMethod": "FLAT",
        "name": "string",
        "feeApplication": "REQUIRED",
        "encodedKey": "string",
        "trigger": "MANUAL",
        "state": "ACTIVE",
        "creationDate": "2016-09-06T13:37:50+03:00",
        "applyDateMethod": "MONTHLY_FROM_ACTIVATION"
      }
    ],
    "allowArbitraryFees": false
  },
  "taxSettings": {
    "withholdingTaxEnabled": false
  },
  "offsetSettings": {
    "allowOffset": false
  },
  "creationDate": "2016-09-06T13:37:50+03:00",
  "type": "CURRENT_ACCOUNT",
  "creditArrangementSettings": {
    "creditArrangementRequirement": "OPTIONAL"
  },
  "currencySettings": {
    "currencies": [
      {
        "code": "AED"
      }
    ]
  },
  "maturitySettings": {
    "maturityPeriodUnit": "DAYS",
    "maturityPeriod": {
      "minValue": 0,
      "defaultValue": 0,
      "maxValue": 0
    }
  },
  "newAccountSettings": {
    "idGeneratorType": "INCREMENTAL_NUMBER",
    "idPattern": "string"
  },
  "interestSettings": {
    "interestRateSettings": {
      "interestRate": {
        "minValue": 0,
        "maxValue": 0,
        "defaultValue": 0
      },
      "interestRateSource": "FIXED_INTEREST_RATE",
      "indexSourceKey": "string",
      "interestRateTiers": [
        {
          "endingBalance": 0,
          "interestRate": 0,
          "encodedKey": "string",
          "endingDay": 0
        }
      ],
      "interestChargeFrequency": "ANNUALIZED",
      "accrueInterestAfterMaturity": false,
      "encodedKey": "string",
      "interestRateTerms": "FIXED",
      "interestChargeFrequencyCount": 0
    },
    "collectInterestWhenLocked": false,
    "interestCalculationBalance": "MINIMUM",
    "interestPaidIntoAccount": false,
    "maximumBalance": 0,
    "daysInYear": "ACTUAL_365_FIXED",
    "interestPaymentSettings": {
      "interestPaymentDates": [
        {
          "month": 0,
          "day": 0
        }
      ],
      "interestPaymentPoint": "FIRST_DAY_OF_MONTH"
    }
  },
  "accountingSettings": {
    "accountingMethod": "NONE",
    "accountingRules": [
      {
        "encodedKey": "string",
        "glAccountKey": "string",
        "financialResource": "PORTFOLIO_CONTROL"
      }
    ],
    "interestAccruedAccountingMethod": "NONE"
  },
  "name": "string",
  "encodedKey": "string",
  "id": "string",
  "state": "ACTIVE",
  "overdraftSettings": {
    "allowOverdraft": false,
    "allowTechnicalOverdraft": false,
    "maxOverdraftLimit": 0
  },
  "internalControls": {
    "dormancyPeriodDays": 0,
    "recommendedDepositAmount": 0,
    "openingBalance": {
      "minValue": 0,
      "maxValue": 0,
      "defaultValue": 0
    },
    "maxWithdrawalAmount": 0
  },
  "overdraftInterestSettings": {
    "interestRateSettings": {
      "interestRate": {
        "minValue": 0,
        "maxValue": 0,
        "defaultValue": 0
      },
      "interestRateReviewUnit": "DAYS",
      "interestRateSource": "FIXED_INTEREST_RATE",
      "interestRateReviewCount": 0,
      "indexSourceKey": "string",
      "interestRateTiers": [
        {
          "endingBalance": 0,
          "interestRate": 0,
          "encodedKey": "string"
        }
      ],
      "interestChargeFrequency": "ANNUALIZED",
      "interestRateTerms": "FIXED",
      "interestChargeFrequencyCount": 0
    },
    "daysInYear": "ACTUAL_365_FIXED"
  }
}

Responses

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

getById

Code samples

# You can also use wget
curl -X GET https://localhost:8889/api/depositproducts/{depositProductId} \
  -H 'Accept: application/vnd.mambu.v2+json'

GET https://localhost:8889/api/depositproducts/{depositProductId} HTTP/1.1
Host: localhost:8889

Accept: application/vnd.mambu.v2+json

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

};

$.ajax({
  url: 'https://localhost:8889/api/depositproducts/{depositProductId}',
  method: 'get',

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

const request = require('node-fetch');

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

};

fetch('https://localhost:8889/api/depositproducts/{depositProductId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

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

result = RestClient.get 'https://localhost:8889/api/depositproducts/{depositProductId}',
  params: {
  }, headers: headers

p JSON.parse(result)

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

r = requests.get('https://localhost:8889/api/depositproducts/{depositProductId}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://localhost:8889/api/depositproducts/{depositProductId}");
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", "https://localhost:8889/api/depositproducts/{depositProductId}", data)
    req.Header = headers

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

GET /depositproducts/{depositProductId}

Allows retrieval of a single deposit product via id or encoded key

Parameters

Parameter In Type Required Description
depositProductId path string true The id or encoded key of the deposit product to be retrieved
detailsLevel query string false The level of details to retrieve, FULL means the full details of the object will be retrieved (custom fields, address, contact info or any other related object), BASIC will return only the first level elements of the object

Enumerated Values

Parameter Value
detailsLevel BASIC
detailsLevel FULL

Example responses

200 Response

{
  "notes": "string",
  "lastModifiedDate": "2016-09-06T13:37:50+03:00",
  "availabilitySettings": {
    "branchSettings": {
      "forAllBranches": false,
      "availableProductBranches": [
        "string"
      ]
    },
    "availableFor": [
      "INDIVIDUALS"
    ]
  },
  "feesSettings": {
    "fees": [
      {
        "amount": 0,
        "accountingRules": [
          {
            "encodedKey": "string",
            "glAccountKey": "string",
            "financialResource": "PORTFOLIO_CONTROL"
          }
        ],
        "amountCalculationMethod": "FLAT",
        "name": "string",
        "feeApplication": "REQUIRED",
        "encodedKey": "string",
        "trigger": "MANUAL",
        "state": "ACTIVE",
        "creationDate": "2016-09-06T13:37:50+03:00",
        "applyDateMethod": "MONTHLY_FROM_ACTIVATION"
      }
    ],
    "allowArbitraryFees": false
  },
  "taxSettings": {
    "withholdingTaxEnabled": false
  },
  "offsetSettings": {
    "allowOffset": false
  },
  "creationDate": "2016-09-06T13:37:50+03:00",
  "type": "CURRENT_ACCOUNT",
  "creditArrangementSettings": {
    "creditArrangementRequirement": "OPTIONAL"
  },
  "currencySettings": {
    "currencies": [
      {
        "code": "AED"
      }
    ]
  },
  "maturitySettings": {
    "maturityPeriodUnit": "DAYS",
    "maturityPeriod": {
      "minValue": 0,
      "defaultValue": 0,
      "maxValue": 0
    }
  },
  "newAccountSettings": {
    "idGeneratorType": "INCREMENTAL_NUMBER",
    "idPattern": "string"
  },
  "interestSettings": {
    "interestRateSettings": {
      "interestRate": {
        "minValue": 0,
        "maxValue": 0,
        "defaultValue": 0
      },
      "interestRateSource": "FIXED_INTEREST_RATE",
      "indexSourceKey": "string",
      "interestRateTiers": [
        {
          "endingBalance": 0,
          "interestRate": 0,
          "encodedKey": "string",
          "endingDay": 0
        }
      ],
      "interestChargeFrequency": "ANNUALIZED",
      "accrueInterestAfterMaturity": false,
      "encodedKey": "string",
      "interestRateTerms": "FIXED",
      "interestChargeFrequencyCount": 0
    },
    "collectInterestWhenLocked": false,
    "interestCalculationBalance": "MINIMUM",
    "interestPaidIntoAccount": false,
    "maximumBalance": 0,
    "daysInYear": "ACTUAL_365_FIXED",
    "interestPaymentSettings": {
      "interestPaymentDates": [
        {
          "month": 0,
          "day": 0
        }
      ],
      "interestPaymentPoint": "FIRST_DAY_OF_MONTH"
    }
  },
  "accountingSettings": {
    "accountingMethod": "NONE",
    "accountingRules": [
      {
        "encodedKey": "string",
        "glAccountKey": "string",
        "financialResource": "PORTFOLIO_CONTROL"
      }
    ],
    "interestAccruedAccountingMethod": "NONE"
  },
  "name": "string",
  "encodedKey": "string",
  "id": "string",
  "state": "ACTIVE",
  "overdraftSettings": {
    "allowOverdraft": false,
    "allowTechnicalOverdraft": false,
    "maxOverdraftLimit": 0
  },
  "internalControls": {
    "dormancyPeriodDays": 0,
    "recommendedDepositAmount": 0,
    "openingBalance": {
      "minValue": 0,
      "maxValue": 0,
      "defaultValue": 0
    },
    "maxWithdrawalAmount": 0
  },
  "overdraftInterestSettings": {
    "interestRateSettings": {
      "interestRate": {
        "minValue": 0,
        "maxValue": 0,
        "defaultValue": 0
      },
      "interestRateReviewUnit": "DAYS",
      "interestRateSource": "FIXED_INTEREST_RATE",
      "interestRateReviewCount": 0,
      "indexSourceKey": "string",
      "interestRateTiers": [
        {
          "endingBalance": 0,
          "interestRate": 0,
          "encodedKey": "string"
        }
      ],
      "interestChargeFrequency": "ANNUALIZED",
      "interestRateTerms": "FIXED",
      "interestChargeFrequencyCount": 0
    },
    "daysInYear": "ACTUAL_365_FIXED"
  }
}

Responses

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

Update

Code samples

# You can also use wget
curl -X PUT https://localhost:8889/api/depositproducts/{depositProductId} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/vnd.mambu.v2+json'

PUT https://localhost:8889/api/depositproducts/{depositProductId} HTTP/1.1
Host: localhost:8889
Content-Type: application/json
Accept: application/vnd.mambu.v2+json

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

};

$.ajax({
  url: 'https://localhost:8889/api/depositproducts/{depositProductId}',
  method: 'put',

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

const request = require('node-fetch');
const inputBody = '{
  "notes": "string",
  "lastModifiedDate": "2016-09-06T13:37:50+03:00",
  "availabilitySettings": {
    "branchSettings": {
      "forAllBranches": false,
      "availableProductBranches": [
        "string"
      ]
    },
    "availableFor": [
      "INDIVIDUALS"
    ]
  },
  "feesSettings": {
    "fees": [
      {
        "amount": 0,
        "accountingRules": [
          {
            "glAccountKey": "string",
            "financialResource": "PORTFOLIO_CONTROL"
          }
        ],
        "amountCalculationMethod": "FLAT",
        "name": "string",
        "feeApplication": "REQUIRED",
        "trigger": "MANUAL",
        "state": "ACTIVE",
        "creationDate": "2016-09-06T13:37:50+03:00",
        "applyDateMethod": "MONTHLY_FROM_ACTIVATION"
      }
    ],
    "allowArbitraryFees": false
  },
  "taxSettings": {
    "withholdingTaxEnabled": false
  },
  "offsetSettings": {
    "allowOffset": false
  },
  "creationDate": "2016-09-06T13:37:50+03:00",
  "type": "CURRENT_ACCOUNT",
  "creditArrangementSettings": {
    "creditArrangementRequirement": "OPTIONAL"
  },
  "currencySettings": {
    "currencies": [
      {
        "code": "AED"
      }
    ]
  },
  "maturitySettings": {
    "maturityPeriodUnit": "DAYS",
    "maturityPeriod": {
      "minValue": 0,
      "defaultValue": 0,
      "maxValue": 0
    }
  },
  "newAccountSettings": {
    "idGeneratorType": "INCREMENTAL_NUMBER",
    "idPattern": "string"
  },
  "interestSettings": {
    "interestRateSettings": {
      "interestRate": {
        "minValue": 0,
        "maxValue": 0,
        "defaultValue": 0
      },
      "interestRateSource": "FIXED_INTEREST_RATE",
      "indexSourceKey": "string",
      "interestRateTiers": [
        {
          "endingBalance": 0,
          "interestRate": 0,
          "endingDay": 0
        }
      ],
      "interestChargeFrequency": "ANNUALIZED",
      "accrueInterestAfterMaturity": false,
      "interestRateTerms": "FIXED",
      "interestChargeFrequencyCount": 0
    },
    "collectInterestWhenLocked": false,
    "interestCalculationBalance": "MINIMUM",
    "interestPaidIntoAccount": false,
    "maximumBalance": 0,
    "daysInYear": "ACTUAL_365_FIXED",
    "interestPaymentSettings": {
      "interestPaymentDates": [
        {
          "month": 0,
          "day": 0
        }
      ],
      "interestPaymentPoint": "FIRST_DAY_OF_MONTH"
    }
  },
  "accountingSettings": {
    "accountingMethod": "NONE",
    "accountingRules": [
      {
        "glAccountKey": "string",
        "financialResource": "PORTFOLIO_CONTROL"
      }
    ],
    "interestAccruedAccountingMethod": "NONE"
  },
  "name": "string",
  "id": "string",
  "state": "ACTIVE",
  "overdraftSettings": {
    "allowOverdraft": false,
    "allowTechnicalOverdraft": false,
    "maxOverdraftLimit": 0
  },
  "internalControls": {
    "dormancyPeriodDays": 0,
    "recommendedDepositAmount": 0,
    "openingBalance": {
      "minValue": 0,
      "maxValue": 0,
      "defaultValue": 0
    },
    "maxWithdrawalAmount": 0
  },
  "overdraftInterestSettings": {
    "interestRateSettings": {
      "interestRate": {
        "minValue": 0,
        "maxValue": 0,
        "defaultValue": 0
      },
      "interestRateReviewUnit": "DAYS",
      "interestRateSource": "FIXED_INTEREST_RATE",
      "interestRateReviewCount": 0,
      "indexSourceKey": "string",
      "interestRateTiers": [
        {
          "endingBalance": 0,
          "interestRate": 0
        }
      ],
      "interestChargeFrequency": "ANNUALIZED",
      "interestRateTerms": "FIXED",
      "interestChargeFrequencyCount": 0
    },
    "daysInYear": "ACTUAL_365_FIXED"
  }
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/vnd.mambu.v2+json'

};

fetch('https://localhost:8889/api/depositproducts/{depositProductId}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

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

result = RestClient.put 'https://localhost:8889/api/depositproducts/{depositProductId}',
  params: {
  }, headers: headers

p JSON.parse(result)

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

r = requests.put('https://localhost:8889/api/depositproducts/{depositProductId}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://localhost:8889/api/depositproducts/{depositProductId}");
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", "https://localhost:8889/api/depositproducts/{depositProductId}", data)
    req.Header = headers

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

PUT /depositproducts/{depositProductId}

Update an existing deposit product

Body parameter

{
  "notes": "string",
  "lastModifiedDate": "2016-09-06T13:37:50+03:00",
  "availabilitySettings": {
    "branchSettings": {
      "forAllBranches": false,
      "availableProductBranches": [
        "string"
      ]
    },
    "availableFor": [
      "INDIVIDUALS"
    ]
  },
  "feesSettings": {
    "fees": [
      {
        "amount": 0,
        "accountingRules": [
          {
            "glAccountKey": "string",
            "financialResource": "PORTFOLIO_CONTROL"
          }
        ],
        "amountCalculationMethod": "FLAT",
        "name": "string",
        "feeApplication": "REQUIRED",
        "trigger": "MANUAL",
        "state": "ACTIVE",
        "creationDate": "2016-09-06T13:37:50+03:00",
        "applyDateMethod": "MONTHLY_FROM_ACTIVATION"
      }
    ],
    "allowArbitraryFees": false
  },
  "taxSettings": {
    "withholdingTaxEnabled": false
  },
  "offsetSettings": {
    "allowOffset": false
  },
  "creationDate": "2016-09-06T13:37:50+03:00",
  "type": "CURRENT_ACCOUNT",
  "creditArrangementSettings": {
    "creditArrangementRequirement": "OPTIONAL"
  },
  "currencySettings": {
    "currencies": [
      {
        "code": "AED"
      }
    ]
  },
  "maturitySettings": {
    "maturityPeriodUnit": "DAYS",
    "maturityPeriod": {
      "minValue": 0,
      "defaultValue": 0,
      "maxValue": 0
    }
  },
  "newAccountSettings": {
    "idGeneratorType": "INCREMENTAL_NUMBER",
    "idPattern": "string"
  },
  "interestSettings": {
    "interestRateSettings": {
      "interestRate": {
        "minValue": 0,
        "maxValue": 0,
        "defaultValue": 0
      },
      "interestRateSource": "FIXED_INTEREST_RATE",
      "indexSourceKey": "string",
      "interestRateTiers": [
        {
          "endingBalance": 0,
          "interestRate": 0,
          "endingDay": 0
        }
      ],
      "interestChargeFrequency": "ANNUALIZED",
      "accrueInterestAfterMaturity": false,
      "interestRateTerms": "FIXED",
      "interestChargeFrequencyCount": 0
    },
    "collectInterestWhenLocked": false,
    "interestCalculationBalance": "MINIMUM",
    "interestPaidIntoAccount": false,
    "maximumBalance": 0,
    "daysInYear": "ACTUAL_365_FIXED",
    "interestPaymentSettings": {
      "interestPaymentDates": [
        {
          "month": 0,
          "day": 0
        }
      ],
      "interestPaymentPoint": "FIRST_DAY_OF_MONTH"
    }
  },
  "accountingSettings": {
    "accountingMethod": "NONE",
    "accountingRules": [
      {
        "glAccountKey": "string",
        "financialResource": "PORTFOLIO_CONTROL"
      }
    ],
    "interestAccruedAccountingMethod": "NONE"
  },
  "name": "string",
  "id": "string",
  "state": "ACTIVE",
  "overdraftSettings": {
    "allowOverdraft": false,
    "allowTechnicalOverdraft": false,
    "maxOverdraftLimit": 0
  },
  "internalControls": {
    "dormancyPeriodDays": 0,
    "recommendedDepositAmount": 0,
    "openingBalance": {
      "minValue": 0,
      "maxValue": 0,
      "defaultValue": 0
    },
    "maxWithdrawalAmount": 0
  },
  "overdraftInterestSettings": {
    "interestRateSettings": {
      "interestRate": {
        "minValue": 0,
        "maxValue": 0,
        "defaultValue": 0
      },
      "interestRateReviewUnit": "DAYS",
      "interestRateSource": "FIXED_INTEREST_RATE",
      "interestRateReviewCount": 0,
      "indexSourceKey": "string",
      "interestRateTiers": [
        {
          "endingBalance": 0,
          "interestRate": 0
        }
      ],
      "interestChargeFrequency": "ANNUALIZED",
      "interestRateTerms": "FIXED",
      "interestChargeFrequencyCount": 0
    },
    "daysInYear": "ACTUAL_365_FIXED"
  }
}

Parameters

Parameter In Type Required Description
depositProductId path string true The id or encoded key of the deposit product to be updated
body body DepositProduct true Deposit product to be updated

Example responses

200 Response

{
  "notes": "string",
  "lastModifiedDate": "2016-09-06T13:37:50+03:00",
  "availabilitySettings": {
    "branchSettings": {
      "forAllBranches": false,
      "availableProductBranches": [
        "string"
      ]
    },
    "availableFor": [
      "INDIVIDUALS"
    ]
  },
  "feesSettings": {
    "fees": [
      {
        "amount": 0,
        "accountingRules": [
          {
            "encodedKey": "string",
            "glAccountKey": "string",
            "financialResource": "PORTFOLIO_CONTROL"
          }
        ],
        "amountCalculationMethod": "FLAT",
        "name": "string",
        "feeApplication": "REQUIRED",
        "encodedKey": "string",
        "trigger": "MANUAL",
        "state": "ACTIVE",
        "creationDate": "2016-09-06T13:37:50+03:00",
        "applyDateMethod": "MONTHLY_FROM_ACTIVATION"
      }
    ],
    "allowArbitraryFees": false
  },
  "taxSettings": {
    "withholdingTaxEnabled": false
  },
  "offsetSettings": {
    "allowOffset": false
  },
  "creationDate": "2016-09-06T13:37:50+03:00",
  "type": "CURRENT_ACCOUNT",
  "creditArrangementSettings": {
    "creditArrangementRequirement": "OPTIONAL"
  },
  "currencySettings": {
    "currencies": [
      {
        "code": "AED"
      }
    ]
  },
  "maturitySettings": {
    "maturityPeriodUnit": "DAYS",
    "maturityPeriod": {
      "minValue": 0,
      "defaultValue": 0,
      "maxValue": 0
    }
  },
  "newAccountSettings": {
    "idGeneratorType": "INCREMENTAL_NUMBER",
    "idPattern": "string"
  },
  "interestSettings": {
    "interestRateSettings": {
      "interestRate": {
        "minValue": 0,
        "maxValue": 0,
        "defaultValue": 0
      },
      "interestRateSource": "FIXED_INTEREST_RATE",
      "indexSourceKey": "string",
      "interestRateTiers": [
        {
          "endingBalance": 0,
          "interestRate": 0,
          "encodedKey": "string",
          "endingDay": 0
        }
      ],
      "interestChargeFrequency": "ANNUALIZED",
      "accrueInterestAfterMaturity": false,
      "encodedKey": "string",
      "interestRateTerms": "FIXED",
      "interestChargeFrequencyCount": 0
    },
    "collectInterestWhenLocked": false,
    "interestCalculationBalance": "MINIMUM",
    "interestPaidIntoAccount": false,
    "maximumBalance": 0,
    "daysInYear": "ACTUAL_365_FIXED",
    "interestPaymentSettings": {
      "interestPaymentDates": [
        {
          "month": 0,
          "day": 0
        }
      ],
      "interestPaymentPoint": "FIRST_DAY_OF_MONTH"
    }
  },
  "accountingSettings": {
    "accountingMethod": "NONE",
    "accountingRules": [
      {
        "encodedKey": "string",
        "glAccountKey": "string",
        "financialResource": "PORTFOLIO_CONTROL"
      }
    ],
    "interestAccruedAccountingMethod": "NONE"
  },
  "name": "string",
  "encodedKey": "string",
  "id": "string",
  "state": "ACTIVE",
  "overdraftSettings": {
    "allowOverdraft": false,
    "allowTechnicalOverdraft": false,
    "maxOverdraftLimit": 0
  },
  "internalControls": {
    "dormancyPeriodDays": 0,
    "recommendedDepositAmount": 0,
    "openingBalance": {
      "minValue": 0,
      "maxValue": 0,
      "defaultValue": 0
    },
    "maxWithdrawalAmount": 0
  },
  "overdraftInterestSettings": {
    "interestRateSettings": {
      "interestRate": {
        "minValue": 0,
        "maxValue": 0,
        "defaultValue": 0
      },
      "interestRateReviewUnit": "DAYS",
      "interestRateSource": "FIXED_INTEREST_RATE",
      "interestRateReviewCount": 0,
      "indexSourceKey": "string",
      "interestRateTiers": [
        {
          "endingBalance": 0,
          "interestRate": 0,
          "encodedKey": "string"
        }
      ],
      "interestChargeFrequency": "ANNUALIZED",
      "interestRateTerms": "FIXED",
      "interestChargeFrequencyCount": 0
    },
    "daysInYear": "ACTUAL_365_FIXED"
  }
}

Responses

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

delete

Code samples

# You can also use wget
curl -X DELETE https://localhost:8889/api/depositproducts/{depositProductId} \
  -H 'Accept: application/vnd.mambu.v2+json'

DELETE https://localhost:8889/api/depositproducts/{depositProductId} HTTP/1.1
Host: localhost:8889

Accept: application/vnd.mambu.v2+json

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

};

$.ajax({
  url: 'https://localhost:8889/api/depositproducts/{depositProductId}',
  method: 'delete',

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

const request = require('node-fetch');

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

};

fetch('https://localhost:8889/api/depositproducts/{depositProductId}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

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

result = RestClient.delete 'https://localhost:8889/api/depositproducts/{depositProductId}',
  params: {
  }, headers: headers

p JSON.parse(result)

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

r = requests.delete('https://localhost:8889/api/depositproducts/{depositProductId}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://localhost:8889/api/depositproducts/{depositProductId}");
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", "https://localhost:8889/api/depositproducts/{depositProductId}", data)
    req.Header = headers

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

DELETE /depositproducts/{depositProductId}

Delete a deposit product

Parameters

Parameter In Type Required Description
depositProductId path string true The id or encoded key of the deposit product to be deleted

Example responses

400 Response

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

Responses

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

patch

Code samples

# You can also use wget
curl -X PATCH https://localhost:8889/api/depositproducts/{depositProductId} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/vnd.mambu.v2+json'

PATCH https://localhost:8889/api/depositproducts/{depositProductId} HTTP/1.1
Host: localhost:8889
Content-Type: application/json
Accept: application/vnd.mambu.v2+json

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

};

$.ajax({
  url: 'https://localhost:8889/api/depositproducts/{depositProductId}',
  method: 'patch',

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

const request = require('node-fetch');
const inputBody = '[
  {
    "op": "ADD",
    "path": "string",
    "from": "string",
    "value": {}
  }
]';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/vnd.mambu.v2+json'

};

fetch('https://localhost:8889/api/depositproducts/{depositProductId}',
{
  method: 'PATCH',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

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

result = RestClient.patch 'https://localhost:8889/api/depositproducts/{depositProductId}',
  params: {
  }, headers: headers

p JSON.parse(result)

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

r = requests.patch('https://localhost:8889/api/depositproducts/{depositProductId}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://localhost:8889/api/depositproducts/{depositProductId}");
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"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PATCH", "https://localhost:8889/api/depositproducts/{depositProductId}", data)
    req.Header = headers

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

PATCH /depositproducts/{depositProductId}

Partially update an existing deposit product

Body parameter

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

Parameters

Parameter In Type Required Description
depositProductId path string true The id or encoded key of the deposit product to be updated
body body array[object] true Patch operations to be applied to a resource

Example responses

400 Response

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

Responses

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

batchUpdate

Code samples

# You can also use wget
curl -X POST https://localhost:8889/api/depositproducts/{depositProductId}:batchUpdate \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/vnd.mambu.v2+json'

POST https://localhost:8889/api/depositproducts/{depositProductId}:batchUpdate HTTP/1.1
Host: localhost:8889
Content-Type: application/json
Accept: application/vnd.mambu.v2+json

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

};

$.ajax({
  url: 'https://localhost:8889/api/depositproducts/{depositProductId}:batchUpdate',
  method: 'post',

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

const request = require('node-fetch');
const inputBody = '{
  "action": "UPDATE_INTEREST_SETTINGS"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/vnd.mambu.v2+json'

};

fetch('https://localhost:8889/api/depositproducts/{depositProductId}:batchUpdate',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

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

result = RestClient.post 'https://localhost:8889/api/depositproducts/{depositProductId}:batchUpdate',
  params: {
  }, headers: headers

p JSON.parse(result)