Okra API endpoints for Accounts

Get account details

post /accounts/getAccountDetails

API endpoint to Get account details

A successful request will return a HTTP 200 status code

account

string

required

Account ID of a user

Response

ExamplesSchema

OK

{
  "status": "success",
  "message": "Account details successfully retrieved",
  "data": {
    "_id": "",
    "name": "BABA LAGBAJA OJONE",
    "nuban": "3558799023",
    "bank": {
      "_id": "5d6fe57a4099cc4b210bbeb2",
      "name": "First City Monument Bank",
      "slug": "first-city-monument-bank",
      "colors": {
        "primary": "#5C2682",
        "accent": "#5C2682",
        "bg": "#8737BC",
        "button": "#5C2682",
        "icon": "#5C2682"
      },
      "icon": "https://okra-images.s3.eu-west-3.amazonaws.com/First+City+Monument+Bank+Ltd+Logo+Color.svg",
      "inverted_logo": "",
      "v2_icon": "",
      "v2_logo": "",
      "status": true,
      "isMFA": false,
      "mfaType": "none",
      "corp": false
    },
    "type": "SALARY CURRNT A/C PREMIUM",
    "customer": "5f2e7ea783997820e41d00a6",
    "env": "production",
    "created_at": "2020-08-08T10:30:17.993Z",
    "last_updated": "2021-06-28T19:15:59.570Z",
    "__v": 0,
    "balance": "5f2e7eba9e5c6e823a13a989",
    "projects": [
      "5ff633889e64635f2629e015",
      "5ff62b99aea7a57a5c3baa01",
      "5ff633889e64635f2629df62",
      "5ff633889e64635f2629df84",
      "5ff633889e64635f2629e05c",
      "5ff633889e64635f2629e0a9",
      "5ff633889e64635f2629e04d",
      "5ff633889e64635f2629e1ef"
    ],
    "manual": true,
    "currency": "NGN"
  }
}

Get account by customer

post /accounts/getByCustomer

API endpoint to Get account by customer

A successful request will return a HTTP 200 status code

customer

string

required

The customer ID of the user.

Request

{
  "customer": "string"
}

Response

ExamplesSchema

OK

{
  "status": "success",
  "message": "Accounts retrieved successfully",
  "data": {
    "pagination": {
      "totalDocs": 1,
      "limit": 20,
      "hasPrevPage": false,
      "hasNextPage": false,
      "page": 1,
      "totalPages": 1,
      "pagingCounter": 1,
      "prevPage": null,
      "nextPage": null
    },
    "accounts": [
      {
        "_id": "1279f22572fe4f001e22042b",
        "manual": false,
        "owner": [
          "1da6358130a943486f33dced"
        ],
        "record": [
          "1279f21772fe4f001e22041b",
          "127ca226daa335001fcf8825",
          "12848c7ffb5ac3001e85cc76"
        ],
        "connected": [
          "1da6358130a943486f33dced"
        ],
        "projects": [
          "1ff62b99aea7a57a5c3baa01",
          "1312a300c9a5025268f61186",
          "106ddd326da15957e3c7bdd5"
        ],
        "name": "ICONIC LIVE SHOWBIZ PRODUCTIONS LT",
        "type": "CURRENT",
        "currency": "NGN",
        "env": "production-sandbox",
        "nuban": "1023659424",
        "bank": {
          "name": "Stanbic IBTC Bank",
          "slug": "stanbic-ibtc-bank",
          "logo": "https://okra-images.s3.eu-west-3.amazonaws.com/Stanbic+IBTC+Bank+Logo.svg",
          "icon": "https://okra-images.s3.eu-west-3.amazonaws.com/Stanbic+IBTC+Bank+Logo+Color.svg",
          "status": "healthy"
        },
        "customer": {
          "_id": "14a51342effdb2003a573482",
          "name": "ICONIC LIVE SHOWBIZ PRODUCTIO"
        },
        "created_at": "2022-05-10T05:03:33.726Z",
        "last_updated": "2023-09-25T07:50:56.902Z",
        "__v": 0,
        "balance": "127ca2381f0ef8173c7f95f5",
        "id": "1279f22572fe4f001e22042b"
      }
    ]
  }
}

Was this page helpful?