Fetch Account
curl --request GET \
--url https://carbonapistagingsecure.getcarbon.co/baas/api/v1/accounts/{account_number} \
--header 'apikey: <api-key>' \
--header 'x-carbon-key: <x-carbon-key>'const options = {
method: 'GET',
headers: {'x-carbon-key': '<x-carbon-key>', apikey: '<api-key>'}
};
fetch('https://carbonapistagingsecure.getcarbon.co/baas/api/v1/accounts/{account_number}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://carbonapistagingsecure.getcarbon.co/baas/api/v1/accounts/{account_number}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"apikey: <api-key>",
"x-carbon-key: <x-carbon-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}import requests
url = "https://carbonapistagingsecure.getcarbon.co/baas/api/v1/accounts/{account_number}"
headers = {
"x-carbon-key": "<x-carbon-key>",
"apikey": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)require 'uri'
require 'net/http'
url = URI("https://carbonapistagingsecure.getcarbon.co/baas/api/v1/accounts/{account_number}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-carbon-key"] = '<x-carbon-key>'
request["apikey"] = '<api-key>'
response = http.request(request)
puts response.read_bodypackage main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://carbonapistagingsecure.getcarbon.co/baas/api/v1/accounts/{account_number}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-carbon-key", "<x-carbon-key>")
req.Header.Add("apikey", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"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"
}
}Accounts
Get Account
Retrieve details of a specific account by account number.
GET
/
v1
/
accounts
/
{account_number}
Fetch Account
curl --request GET \
--url https://carbonapistagingsecure.getcarbon.co/baas/api/v1/accounts/{account_number} \
--header 'apikey: <api-key>' \
--header 'x-carbon-key: <x-carbon-key>'const options = {
method: 'GET',
headers: {'x-carbon-key': '<x-carbon-key>', apikey: '<api-key>'}
};
fetch('https://carbonapistagingsecure.getcarbon.co/baas/api/v1/accounts/{account_number}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://carbonapistagingsecure.getcarbon.co/baas/api/v1/accounts/{account_number}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"apikey: <api-key>",
"x-carbon-key: <x-carbon-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}import requests
url = "https://carbonapistagingsecure.getcarbon.co/baas/api/v1/accounts/{account_number}"
headers = {
"x-carbon-key": "<x-carbon-key>",
"apikey": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)require 'uri'
require 'net/http'
url = URI("https://carbonapistagingsecure.getcarbon.co/baas/api/v1/accounts/{account_number}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-carbon-key"] = '<x-carbon-key>'
request["apikey"] = '<api-key>'
response = http.request(request)
puts response.read_bodypackage main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://carbonapistagingsecure.getcarbon.co/baas/api/v1/accounts/{account_number}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-carbon-key", "<x-carbon-key>")
req.Header.Add("apikey", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"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 details of a specific account using the account number.Endpoint
GET /accounts/{accountId}
Parameters
accountId(path): The unique identifier of the account.
Response
{
"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"
}
}
⌘I