Files
thijooree/docs/bmlapi/06-account-history.md
T
shihaam a8cd22cbe1
Auto Tag on Version Change / check-version (push) Failing after 13m32s
update docs
2026-06-13 21:30:12 +05:00

6.9 KiB

Account Transaction History

Fetch paginated transaction history for a CASA (savings/current) account.


Endpoint

GET https://www.bankofmaldives.com.mv/internetbanking/api/mobile/account/{accountId}/history/{page}
Path parameter Description
accountId Internal account ID (id field from dashboard)
page Page number, 1-based

Prerequisites


Request

Headers

Header Value
Authorization Bearer <access_token>
User-Agent bml-mobile-banking/348 ({manufacturer}; Android {version}; {model})
x-app-version 2.1.44.348
curl --request GET \
  --url 'https://www.bankofmaldives.com.mv/internetbanking/api/mobile/account/abc123def456/history/1' \
  --header 'Authorization: Bearer <access_token>' \
  --header 'User-Agent: bml-mobile-banking/348 ({manufacturer}; Android {version}; {model})' \
  --header 'x-app-version: 2.1.44.348'

Pagination

The API uses 1-based page numbering. The response includes totalPages — increment the page number until you reach or exceed it.

Page URL
First /api/mobile/account/{id}/history/1
Second /api/mobile/account/{id}/history/2
N-th /api/mobile/account/{id}/history/N

Stop when the current page number exceeds totalPages, or when the history array is empty.


Response

{
  "success": true,
  "payload": {
    "totalPages": 5,
    "history": [
      {
        "id": "TXN001",
        "bookingDate": "2026-05-16",
        "description": "Transfer Debit",
        "narrative1": "16-05-2026 15-10-25",
        "narrative2": "Mohamed Ali",
        "amount": -500.00,
        "currency": "MVR",
        "reference": "FT20260516123456"
      },
      {
        "id": "TXN002",
        "bookingDate": "2026-05-15",
        "description": "Transfer Credit",
        "narrative1": "15-05-2026 10-30-00",
        "narrative2": "Ahmed Hassan",
        "amount": 1000.00,
        "currency": "MVR",
        "reference": "FT20260515103000"
      },
      {
        "id": "TXN003",
        "bookingDate": "2026-05-14",
        "description": "Purchase",
        "narrative1": "14-05-2026 041500",
        "narrative2": "",
        "amount": -75.00,
        "currency": "MVR",
        "reference": ""
      }
    ]
  }
}

Response Fields

Top-level

Field Type Description
success bool true on success
payload.totalPages number Total number of pages
payload.history array List of transactions for this page

Transaction Object

Field Type Description
id string Transaction ID
bookingDate string Booking date (fallback date — prefer parsed narrative1 where available)
description string Transaction type — see table below
narrative1 string Encodes the precise timestamp; format depends on description
narrative2 string Counterparty name (for transfers); may be blank
amount number Amount — negative = debit, positive = credit
currency string ISO 4217 currency code
reference string Transfer reference number; blank for non-transfer entries

Transaction Descriptions

description Meaning
Transfer Debit Outgoing transfer
Transfer Credit Incoming transfer
Purchase Card purchase or point-of-sale transaction
Other Various bank-generated transaction types

Date Parsing from narrative1

The bookingDate field is date-only. For precise timestamps, parse narrative1:

Transfer Debit / Transfer Credit

Format: DD-MM-YYYY HH-mm-ss

"16-05-2026 15-10-25"  →  2026-05-16 15:10:25

Parse with SimpleDateFormat("dd-MM-yyyy HH-mm-ss").

Purchase

Format: DD-MM-YYYY HHmmSS (time is first 4 digits of the numeric suffix)

"14-05-2026 041500"  →  date: 14-05-2026, time part: "0415" → 04:15
→  2026-05-14 04:15:00

Parse: split on space → date part DD-MM-YYYY, time part take first 4 chars → HH:mm. Combine and parse with SimpleDateFormat("dd-MM-yyyy HH:mm:ss").

All other descriptions

Fall back to bookingDate as-is.


Amount Sign Convention

Sign Meaning
Positive (+) Credit — money received
Negative (-) Debit — money spent

Error Responses

HTTP Code Meaning
401 / 419 Access token expired — attempt token refresh

Pending History

Locked / pending amounts for a CASA account (e.g. unsettled card authorisations, holds). Returned as a flat list — no pagination.

Endpoint

GET https://www.bankofmaldives.com.mv/internetbanking/api/mobile/history/pending/{accountId}
Path parameter Description
accountId Internal account ID (id field from dashboard)

Headers

Header Value
Authorization Bearer <access_token>
User-Agent bml-mobile-banking/348 ({manufacturer}; Android {version}; {model})
x-app-version 2.1.44.348
curl --request GET \
  --url 'https://www.bankofmaldives.com.mv/internetbanking/api/mobile/history/pending/abc123def456' \
  --header 'Authorization: Bearer <access_token>' \
  --header 'User-Agent: bml-mobile-banking/348 ({manufacturer}; Android {version}; {model})' \
  --header 'x-app-version: 2.1.44.348'

Response

{
  "success": true,
  "payload": [
    {
      "LockedID": "L00012345",
      "FromDate": "2026-05-16",
      "LockedAmount": 75.00,
      "Description": "Card authorisation — Merchant Name"
    }
  ]
}

Response Fields

Field Type Description
success bool true on success
payload array List of pending entries (top-level array, not under payload.history)

Pending Entry

Field Type Description
LockedID string Unique ID for the pending entry
FromDate string Date the hold was placed
LockedAmount number Held amount — always a positive number on the wire; the client treats it as a debit by negating (BmlHistoryClient.kt:184)
Description string Free-form description (counterparty/merchant)

Amount sign: the server returns LockedAmount as a positive number with no debit/credit indicator. All pending entries are debits (funds reserved out of the available balance), so the client negates the value before display.

Currency: not returned by the server. The client assumes MVR.

Called from AccountHistoryFragment.kt:263 to populate the pending tab of the account history view.


 


← User Info     Next → Card Statement