Developer Center

GL Journal Entries API

Last Updated: Jul 31, 2017 09:37AM CEST

URL

/api/glaccount/{ACCOUNT_ID}/gljournalentries
/api/gljournalentries
/api/gljournalentries/search 

Description

Allows you to retrieve or post gl journal entries in the Mambu accounting system.

Methods

GET GL Journal Entries

Allows retrieving a list of journal entries filtered by GL account id, branch and within a given date range.

Parameters

from From (start) date to retrieve journal entries.Required
to To (end) date to retrieve the journal entries.Required
branchID The branch ID to filter accounts on.

Usage examples

//get all the journal entries for gl account 100001 within the given date range
GET /api/glaccounts/100001/gljournalentries?from=2012-06-01&to=2012-07-01

//get all the journal entries within the given date range
GET /api/gljournalentries?from=2012-06-01&to=2012-07-01
 
//get all the journal entries within the given date range for branch with id 2
GET /api/gljournalentries?from=2012-06-01&to=2012-07-01&branchID=2

Samples responses:

//response containing the journal entries (and their corresponding account details)
[
   {
      "encodedKey":"8a42711a4428c1f101442ab778ff0add",
      "entryID":3021,
      "creationDate":"2014-02-13T10:07:51+0000",
      "entryDate":"2014-02-13T00:00:00+0000",
      "transactionID":"281BUM86WV376",
      "accountKey": "8a17d0d84dbd8a73014dbdd9b7cf0420​",
      "productKey": "8a6c37aa4c20087a014c224058580465​",
      "productType": "LOAN",
      "amount":"3",
      "glAccount":{
         "encodedKey":"8a33ae49441c4fe101441c7157630374",
         "creationDate":"2014-02-10T15:36:33+0000",
         "lastModifiedDate":"2014-02-10T15:36:33+0000",
         "glCode":"11700",
         "type":"ASSET",
         "usage":"DETAIL",
         "name":"Interest Receivable",
         "activated":true,
         "allowManualJournalEntries":true
      },
      "type":"DEBIT",
      "userKey":"8a42711a4428c1f101442a50ba9807e4"
   },
   {
      "encodedKey":"8a42711a4428c1f101442ab778fe0adc",
      "entryID":3020,
      "creationDate":"2014-02-13T10:07:51+0000",
      "entryDate":"2014-02-13T00:00:00+0000",
      "transactionID":"281BUM86WV376",
      "amount":"3",
      "glAccount":{
         "encodedKey":"8a33ae49441c4fe101441c715743036a",
         "creationDate":"2014-02-10T15:36:33+0000",
         "lastModifiedDate":"2014-02-10T15:36:33+0000",
         "glCode":"11100",
         "type":"ASSET",
         "usage":"DETAIL",
         "name":"Cash on Hand",
         "activated":true,
         "allowManualJournalEntries":true
      },
      "type":"CREDIT",
      "userKey":"8a42711a4428c1f101442a50ba9807e4"
   },
   {
      "encodedKey":"8a42711a4428c1f101442ab6cb0e0ad9",
      "entryID":3019,
      "creationDate":"2014-02-13T10:07:06+0000",
      "entryDate":"2014-02-13T00:00:00+0000",
      "transactionID":"912RCS00HU811",
      "amount":"3",
      "glAccount":{
         "encodedKey":"8a33ae49441c4fe101441c7157630374",
         "creationDate":"2014-02-10T15:36:33+0000",
         "lastModifiedDate":"2014-02-10T15:36:33+0000",
         "glCode":"11700",
         "type":"ASSET",
         "usage":"DETAIL",
         "name":"Interest Receivable",
         "activated":true,
         "allowManualJournalEntries":true
      },
      "type":"CREDIT",
      "userKey":"8a42711a4428c1f101442a50ba9807e4",
      "reversalEntryKey":"8a42711a4428c1f101442ab778ff0add"
   },
   {
      "encodedKey":"8a42711a4428c1f101442ab6cb0c0ad8",
      "entryID":3018,
      "creationDate":"2014-02-13T10:07:06+0000",
      "entryDate":"2014-02-13T00:00:00+0000",
      "transactionID":"912RCS00HU811",
      "amount":"3",
      "glAccount":{
         "encodedKey":"8a33ae49441c4fe101441c715743036a",
         "creationDate":"2014-02-10T15:36:33+0000",
         "lastModifiedDate":"2014-02-10T15:36:33+0000",
         "glCode":"11100",
         "type":"ASSET",
         "usage":"DETAIL",
         "name":"Cash on Hand",
         "activated":true,
         "allowManualJournalEntries":true
      },
      "type":"DEBIT",
      "userKey":"8a42711a4428c1f101442a50ba9807e4",
      "reversalEntryKey":"8a42711a4428c1f101442ab778fe0adc"
   }
]

POST GL Journal Entries

Allows manually posting GL journal entries to any number of debit and credit accounts. Any number of journal entries may be posted with a given date and branch as long as the standard accounting rules apply. Any number of paramaters must be specified in the syntax of debitAccountX, debitAmountX and creditAccountX and creditAmountX where X is the posting account index. At least one debit and credit account must be specified.

Parameters

debitAccount[X] The code of the GL Account to post debit entry to.Required
debitAmount[X] The amount of the posting debit entry.Required
creditAccount[X] The code of the GL Account to post debit entry to.Required
creditAmount[X] The amount of the posting credit entry.Required
branchID The branch ID to post the journal entries to.
date The date of the posting of the journal entry. Required.
notes Any option GL Journale entries notes.
transactionID The unique transaction identifier. If missing is auto generated.

Usage examples


// post debit of 30 to to 100001 and credit of 30 to 100002 on 2010-02-03 for branch id 2
POST "branchId=2&date=2010-02-03&debitAccount1=100001&debitAmount1=30&creditAccount1=100002&creditAmount1=30" /api/gljournalentries

//post debit of 30 to to 100001 and credit of 25 to 100002 and credit of 5 to 100003 on 2010-02-03
POST "date=2010-02-03&debitAccount1=100001&debitAmount1=30&creditAccount1=100002&creditAmount1=25&creditAccount2=100003&creditAmount2=5"  /api/gljournalentries

//post debit of 30 to to 100001 and credit of 30 to 100002 on 2010-02-04 with transaction id MyCustomId1234
POST "date=2010-02-04&debitAccount1=100001&debitAmount1=30&creditAccount1=100002&creditAmount1=30&transactionID=MyCustomId1234" /api/gljournalentries

//response containing the debit created journal entries
[
  {
    "encodedKey": "4028804c5b23707e015b237d39580008",
    "entryID": 83,
    "creationDate": "2017-03-31T11:34:33+0300",
    "entryDate": "2010-02-04T00:00:00+0200",
    "transactionID": "MyCustomId1234",
    "amount": "30",
    "glAccount": {
      "encodedKey": "4028804c5b236580015b236580a20004",
      "creationDate": "2017-03-31T08:29:55+0300",
      "lastModifiedDate": "2017-03-31T08:29:55+0300",
      "glCode": "100001",
      "type": "ASSET",
      "usage": "DETAIL",
      "name": "Loan Product Portfolio",
      "activated": true,
      "description": "",
      "allowManualJournalEntries": true,
      "stripTrailingZeros": true
    },
    "type": "DEBIT",
    "userKey": "402880e55a942d20015a942d2e090007"
  },
  {
    "encodedKey": "4028804c5b23707e015b237d39580006",
    "entryID": 81,
    "creationDate": "2017-03-31T11:32:41+0300",
    "entryDate": "2010-02-03T00:00:00+0200",
    "transactionID": "838SQJ65JK527",
    "amount": "30",
    "glAccount": {
      "encodedKey": "4028804c5b236580015b236580a20004",
      "creationDate": "2017-03-31T08:29:55+0300",
      "lastModifiedDate": "2017-03-31T08:29:55+0300",
      "glCode": "100001",
      "type": "ASSET",
      "usage": "DETAIL",
      "name": "Loan Product Portfolio",
      "activated": true,
      "description": "",
      "allowManualJournalEntries": true,
      "stripTrailingZeros": true
    },
    "type": "DEBIT",
    "userKey": "402880e55a942d20015a942d2e090007"
  },
  {
    "encodedKey": "4028804c5b23707e015b23707ef70004",
    "entryID": 79,
    "creationDate": "2017-03-31T11:31:00+0300",
    "entryDate": "2010-02-03T00:00:00+0200",
    "transactionID": "912UMY10GF434",
    "amount": "30",
    "glAccount": {
      "encodedKey": "4028804c5b236580015b236580a20004",
      "creationDate": "2017-03-31T08:29:55+0300",
      "lastModifiedDate": "2017-03-31T08:29:55+0300",
      "glCode": "100001",
      "type": "ASSET",
      "usage": "DETAIL",
      "name": "Loan Product Portfolio",
      "activated": true,
      "description": "",
      "allowManualJournalEntries": true,
      "stripTrailingZeros": true
    },
    "type": "DEBIT",
    "userKey": "402880e55a942d20015a942d2e090007",
    "assignedBranchKey": "402880e55a943ac6015a943af1950017"
  },
...
]

POST Search

Allows to retrieve gl journal entries using dynamic custom filters.

Parameters

Parameter Value
filterConstraints A JSON array of constraints.
filterSelection The field on which the constraint will be applied. Available client filter selections can be found bellow.
filterElement The constraint operator. Available filter elements can be found bellow.
value The constraint value. Required for filter elements with one or two values.
secondValue The constraint second value. Required for filter elements with two values.
dataItemType The entity where the field on which to apply the constraint is located. If the field is located in the same entity with the entity being searched, this field is optional.

Available filter values

Filter Selection Parameter Data Type
PRODUCT_TYPE ENUM
GL_ACCOUNT_KEY KEY
USER_KEY KEY
ENCODED_KEY STRING
ENTRY_ID NUMBER
DATE DATE
CREATION_DATE DATE
TRANSACTION_ID STRING
GL_ACCOUNT_ID STRING
GL_ACCOUNT_TYPE ENUM
SOURCE ENUM
DEBIT MONEY
CREDIT MONEY

Available filter elements

Filter Element Number Of affected values Available for
EQUALS ONE_VALUE BIG_DECIMAL,BOOLEAN,LONG,MONEY,NUMBER,PERCENT,STRING,ENUM,KEY
MORE_THAN ONE_VALUE BIG_DECIMAL,NUMBER,MONEY
LESS_THAN ONE_VALUE BIG_DECIMAL,NUMBER,MONEY
BETWEEN TWO_VALUES BIG_DECIMAL,NUMBER,MONEY,DATE,DATE_UTC
ON ONE_VALUE DATE,DATE_UTC
AFTER ONE_VALUE DATE,DATE_UTC
BEFORE ONE_VALUE DATE,DATE_UTC
STARTS_WITH ONE_VALUE STRING
IN LIST ENUM,KEY
TODAY NO_VALUE DATE,DATE_UTC
THIS_WEEK NO_VALUE DATE,DATE_UTC
THIS_MONTH NO_VALUE DATE,DATE_UTC
THIS_YEAR NO_VALUE DATE,DATE_UTC
LAST_DAYS ONE_VALUE DATE,DATE_UTC
EMPTY NO_VALUE BIG_DECIMAL,LONG,MONEY,NUMBER,PERCENT,STRING,ENUM,KEY,DATE,DATE_UTC
NOT_EMPTY NO_VALUE BIG_DECIMAL,LONG,MONEY,NUMBER,PERCENT,STRING,ENUM,KEY,DATE,DATE_UTC

Usage examples

// get the journal entry with entry id 1, posted by the user with the encoded key 8a8080a254a9659b0154a965a69a0004
POST {
     "filterConstraints":[
        {
           "filterSelection":"USER_KEY",
           "filterElement":"EQUALS",
           "value":"8a8080a254a9659b0154a965a69a0004"
        },
        {
           "filterSelection":"ENTRY_ID",
           "filterElement":"EQUALS",
           "value":"1"
        }
    ]
} /api/gljournalentries/search

// Get the journal entries that were generated for the loan product with 'AGL' id
POST {
     "filterConstraints":[
        {
         "filterSelection":"PRODUCT_ID",
         "filterElement":"EQUALS",
         "dataItemType":"LOAN_TRANSACTION",
         "value":"AGL"
        }
    ]
} /api/gljournalentries/search

Response

A 200 OK response will be issued with an array of gl journal entries.
[
  {
    "encodedKey": "8a8080a254a9c0300154a9c192a8000d",
    "entryID": 1,
    "creationDate": "2016-05-13T10:55:16+0000",
    "entryDate": "2016-05-13T10:55:15+0000",
    "transactionID": "2",
    "accountKey": "8a8080a254a9c0300154a9c14fcb0001",
    "productKey": "8a8080a254a98efe0154a99adc4c0351",
    "productType": "LOAN",
    "amount": "76.35",
    "glAccount": {
      "encodedKey": "8a8080a254a98efe0154a99adda60405",
      "creationDate": "2016-05-13T10:12:59+0000",
      "lastModifiedDate": "2016-05-13T10:12:59+0000",
      "glCode": "11700",
      "type": "ASSET",
      "usage": "DETAIL",
      "name": "Interest Receivable",
      "activated": true,
      "allowManualJournalEntries": true,
      "stripTrailingZeros": true
    },
    "type": "DEBIT",
    "userKey": "8a8080a254a9659b0154a965a69a0004"
  }
]
support@mambu.com
https://cdn.desk.com/
false
desk
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete