GET
/
v1
/
accounts
curl --request GET \
  --url https://carbonapistagingsecure.getcarbon.co/baas/api/v1/accounts \
  --header 'apikey: <api-key>' \
  --header 'x-carbon-key: <x-carbon-key>'
{
  "status": "success",
  "message": "Account fetched successfully",
  "data": {
    "id": "3529237a-8ae1-4d63-a6ad-419fae3b9f5e",
    "account": {
      "bank_name": "CARBON",
      "bank_code": "565",
      "account_name": "Ola Ajayi",
      "account_number": "6009490194",
      "balance": 350833340,
      "available_balance": 350833340,
      "locked": false
    },
    "owner": {
      "id": "965c4bf7-e86b-45ca-b286-1ee6f32e991b",
      "first_name": "ola",
      "last_name": "ajayi",
      "email": "ola@yahoo.com",
      "phone": "08071000030"
    },
    "is_static": true,
    "mode": "sandbox",
    "created_at": "2024-02-28T01:01:29.000Z",
    "updated_at": "2024-02-28T01:01:29.000Z"
  }
}

Overview

This endpoint retrieves a list of accounts with pagination. It fetches a specified number of accounts per page, as per the provided page and limit parameters.

Request

Method: GET
URL: /v1/accounts

Parameters

NameInTypeRequiredDescription
x-carbon-keyHeaderstringYesAPI key for authentication.
pageQueryintegerNoPage number for pagination.
limitQueryintegerNoNumber of accounts per page.

Response

Status Code: 200 OK
Content-Type: application/json

Example Response

{
  "status": "success",
  "message": "Accounts fetched successfully",
  "data": [
    {
      "id": "3529237a-8ae1-4d63-a6ad-419fae3b9f5e",
      "account": {
        "bank_name": "CARBON",
        "account_name": "Ola Ajayi",
        "account_number": "6009490194",
        "balance": 350833340,
        "available_balance": 350833340,
        "locked": false
      },
      "owner": {
        "id": "965c4bf7-e86b-45ca-b286-1ee6f32e991b",
        "first_name": "Ola",
        "last_name": "Ajayi",
        "email": "ola@yahoo.com",
        "phone": "08071000030"
      },
      "is_static": true,
      "mode": "sandbox",
      "created_at": "2024-02-28T01:01:29.000Z",
      "updated_at": "2024-02-28T01:01:29.000Z"
    }
  ],
  "total": "1"
}

Authorizations

apikey
string
header
required

Provide your API key in the 'apikey' header.

Headers

x-carbon-key
string
required

Query Parameters

page
integer
limit
integer

Response

200 - application/json
OK

The response is of type object.