Reports

Conclusion: Reports #

The final piece of the quickstart journey is the generation of reports, which is the value obtained from using the service.

The Income Statement #

Arguably the most important report, the Income Statament summarizes the performance of the Entity during the selected period.

Request #

curl --location --request GET 'https://api.microbooks.io/books/v1/reports/income-statement' \
--header "Authorization: Bearer <bearer_token>" 
import requests

url = "https://api.microbooks.io/books/v1/reports/income-statement"
body = {}
headers = {"Authorization": "Bearer <bearer_token>"}
response = requests.request("GET", url, headers=headers, json=body)

print(response.text)
var request = require('request');

var options = {
    'method': 'GET',
    'url': 'https://api.microbooks.io/books/v1/reports/income-statement',
    'headers': {'Authorization': 'Bearer <bearer_token>'},
    'body': null
};
request(options, function (error, response) {
    if (error) throw new Error(error);
    console.log(response.body);
});
$client = new Client();
$body = null;
$request = new Request('GET', 'https://api.microbooks.io/books/v1/reports/income-statement', 
    [headers' => ['Authorization' => 'Bearer <bearer_token>']], 
    $body
);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
var client = new RestClient("https://api.microbooks.io/books/v1/reports/income-statement");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer " + <bearer_token>);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

Response #

{
    "status": "success",
    "income_statement": {
        "reportingPeriod": {
            "uuid": "65974363-3145-4296-89f9-91565a1ad8b2",
            "id": 1,
            "entity_id": 1,
            "period_count": 1,
            "status": "OPEN",
            "calendar_year": 2022,
            "closing_date": null
        },
        "balances": {
            "debit": 200,
            "credit": 200,
            "OPERATING_REVENUES": {
                "OPERATING_REVENUE": -200
            },
            "OPERATING_EXPENSES": {
                "OPERATING_EXPENSE": 100
            },
            "NON_OPERATING_EXPENSES": {
                "DIRECT_EXPENSE": 100
            }
        },
        "accounts": [...],
        "totals": {
            "OPERATING_REVENUES": -200,
            "OPERATING_EXPENSES": 100,
            "NON_OPERATING_EXPENSES": 100
        },
        "results": {
            "GROSS_PROFIT": 100,
            "TOTAL_REVENUE": 100,
            "NET_PROFIT": 0
        },
        "period": {
            "startDate": "2022-01-01 00:00:00",
            "endDate": "2022-11-24T19:12:26.000000Z"
        }
    }
}

The Balance Sheet #

The Balance Sheet gives a snapshot of the Entity’s financial heal at the end of the selected period.

Request #

curl --location --request GET 'https://api.microbooks.io/books/v1/reports/balance-sheet' \
--header "Authorization: Bearer <bearer_token>" 
import requests

url = "https://api.microbooks.io/books/v1/reports/balance-sheet"
body = {}
headers = {"Authorization": "Bearer <bearer_token>"}
response = requests.request("GET", url, headers=headers, json=body)

print(response.text)
var request = require('request');

var options = {
    'method': 'GET',
    'url': 'https://api.microbooks.io/books/v1/reports/balance-sheet',
    'headers': {'Authorization': 'Bearer <bearer_token>'},
    'body': null
};
request(options, function (error, response) {
    if (error) throw new Error(error);
    console.log(response.body);
});
$client = new Client();
$body = null;
$request = new Request('GET', 'https://api.microbooks.io/books/v1/reports/balance-sheet', 
    [headers' => ['Authorization' => 'Bearer <bearer_token>']], 
    $body
);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
var client = new RestClient("https://api.microbooks.io/books/v1/reports/balance-sheet");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer " + <bearer_token>);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

Response #

{
    "status": "success",
    "balance_Sheet": {
        "reportingPeriod": {
            "uuid": "65974363-3145-4296-89f9-91565a1ad8b2",
            "id": 1,
            "entity_id": 1,
            "period_count": 1,
            "status": "OPEN",
            "calendar_year": 2022,
            "closing_date": null
        },
        "balances": {
            "debit": 200,
            "credit": 200,
            "ASSETS": {
                "BANK": 100,
                "RECEIVABLE": 100
            },
            "LIABILITIES": {
                "PAYABLE": -100
            },
            "EQUITY": {
                "EQUITY": -100
            }
        },
        "accounts": {...},
        "totals": {
            "ASSETS": 200,
            "LIABILITIES": -100,
            "EQUITY": -100
        },
        "results": {
            "NET_ASSETS": 100,
            "TOTAL_EQUITY": 100
        },
        "period": {
            "endDate": "2022-01-01T00:00:00.000000Z",
            "startDate": "2022-01-01T00:00:00.000000Z"
        }
    }
}

The Cashflow Statement #

This report translates the movement of the balances of accounts in various sections of the Entity into the movent of the liquid (cash) asset balances.

Request #

curl --location --request GET 'https://api.microbooks.io/books/v1/reports/cashflow-statement' \
--header "Authorization: Bearer <bearer_token>" 
import requests

url = "https://api.microbooks.io/books/v1/reports/cashflow-statement"
body = {}
headers = {"Authorization": "Bearer <bearer_token>"}
response = requests.request("GET", url, headers=headers, json=body)

print(response.text)
var request = require('request');

var options = {
    'method': 'GET',
    'url': 'https://api.microbooks.io/books/v1/reports/cashflow-statement',
    'headers': {'Authorization': 'Bearer <bearer_token>'},
    'body': null
};
request(options, function (error, response) {
    if (error) throw new Error(error);
    console.log(response.body);
});
$client = new Client();
$body = null;
$request = new Request('GET', 'https://api.microbooks.io/books/v1/reports/cashflow-statement', 
    [headers' => ['Authorization' => 'Bearer <bearer_token>']], 
    $body
);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
var client = new RestClient("https://api.microbooks.io/books/v1/reports/cashflow-statement");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer " + <bearer_token>);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

Response #

{
    "status": "success",
    "cashflow_statement": {
        "reportingPeriod": {
            "uuid": "65974363-3145-4296-89f9-91565a1ad8b2",
            "id": 1,
            "entity_id": 1,
            "period_count": 1,
            "status": "OPEN",
            "calendar_year": 2022,
            "closing_date": null
        },
        "balances": {
            "PROVISIONS": 0,
            "RECEIVABLES": -60,
            "PAYABLES": 60,
            "TAXATION": -10,
            "CURRENT_ASSETS": 0,
            "CURRENT_LIABILITIES": 0,
            "NON_CURRENT_ASSETS": -100,
            "NON_CURRENT_LIABILITIES": 0,
            "EQUITY": 100,
            "PROFIT": 0,
            "NET_CASH_FLOW": -10,
            "START_CASH_BALANCE": 100
        },
        "results": {
            "OPERATIONS_CASH_FLOW": -10,
            "INVESTMENT_CASH_FLOW": -100,
            "FINANCING_CASH_FLOW": 100,
            "CASHBOOK_BALANCE": 90,
            "END_CASH_BALANCE": 90
        },
        "period": {
            "startDate": "2022-01-01T00:00:00.000000Z",
            "endDate": "2022-11-25T19:14:58.000000Z"
        }
    }
}

The Trial Balance #

The Trial Balance serves as a ‘Sanity Check’ to ensure that the Double Entry Rule has been followed in the recording of all transactions.

Tip
As the Double Entry Rule is enforced automatically by Transactions being posted, in case of an imbalance the most likely source is the Opening Balances. Take a look at the Opening Balance Sheet to ensure that the Balances posted net out to 0.

Request #

curl --location --request GET 'https://api.microbooks.io/books/v1/reports/trial-balance' \
--header "Authorization: Bearer <bearer_token>" 
import requests

url = "https://api.microbooks.io/books/v1/reports/trial-balance"
body = {}
headers = {"Authorization": "Bearer <bearer_token>"}
response = requests.request("GET", url, headers=headers, json=body)

print(response.text)
var request = require('request');

var options = {
    'method': 'GET',
    'url': 'https://api.microbooks.io/books/v1/reports/trial-balance',
    'headers': {'Authorization': 'Bearer <bearer_token>'},
    'body': null
};
request(options, function (error, response) {
    if (error) throw new Error(error);
    console.log(response.body);
});
$client = new Client();
$body = null;
$request = new Request('GET', 'https://api.microbooks.io/books/v1/reports/trial-balance', 
    [headers' => ['Authorization' => 'Bearer <bearer_token>']], 
    $body
);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
var client = new RestClient("https://api.microbooks.io/books/v1/reports/trial-balance");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer " + <bearer_token>);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

Response #

{
    "status": "success",
    "trial_balance": {
        "reportingPeriod": {
            "uuid": "65974363-3145-4296-89f9-91565a1ad8b2",
            "id": 1,
            "entity_id": 1,
            "period_count": 1,
            "status": "OPEN",
            "calendar_year": 2022,
            "closing_date": null
        },
        "balances": {
            "debit": 580,
            "credit": 580
        },
        "accounts": {...},
        "results": {
            "INCOME_STATEMENT": {
                "debit": 200,
                "credit": 200
            },
            "BALANCE_SHEET": {
                "debit": 380,
                "credit": 380
            }
        },
        "endDate": "2022-12-31T00:00:00.000000Z"
    }
}

For more details on the Reports endpoint check out the How To Guide page as well as the Postman API Reference.