Reports

Reports #

The sections below demonstrate how to solve common book keeping problems revolving around the Report resource.

Report Section Drilldown #

Problem #

You want to view the Accounts who’s balances constitutes the reported amount for the category in the section.

Solution #

Category Accounts #

You can view the breakdown of a Category’s balance by calling the Category Account endpoint with the same period (start and end dates) as that of the Report Resource.

Request #

curl --location --request GET 'https://api.microbooks.io/books/v1/category/1/accounts?start_date=2022-04-01&end=2022-04-30'
import requests

url = "https://api.microbooks.io/books/v1/category/1/accounts?start_date=2022-04-01&end=2022-04-30"
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/category/1/accounts?start_date=2022-04-01&end=2022-04-30',
    'headers': {'Authorization': 'Bearer <bearer_token>'},
    'body': '{}'
};
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/category/1/accounts?start_date=2022-04-01&end=2022-04-30', 
    [headers' => ['Authorization' => 'Bearer <bearer_token>']], 
    $body
);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
var client = new RestClient("https://api.microbooks.io/books/v1/category/1/accounts?start_date=2022-04-01&end=2022-04-30");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
var body = null;
request.AddParameter("text/plain", body,  ParameterType.RequestBody);
request.AddHeader("Authorization", "Bearer " + <bearer_token>);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

Cashflow Section Movement #

Problem #

You want to view the changes in the Accounts who’s balances constitutes the reported movement for the cash flow section.

Solution #

Account Movement #

You can view the breakdown of a cashflow section’s balance movement by calling the Account movement endpoint with the section and the same period (start and end dates) as that of the Report Resource.

Request #

curl --location --request GET 'https://api.microbooks.io/books/v1/account/movement?section=ASSETS&start_date=2022-04-01&end=2022-04-30'
import requests

url = "https://api.microbooks.io/books/v1/account/movement?section=ASSETS&start_date=2022-04-01&end=2022-04-30"
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/account/movement?section=ASSETS&start_date=2022-04-01&end=2022-04-30',
    'headers': {'Authorization': 'Bearer <bearer_token>'},
    'body': '{}'
};
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/account/movement?section=ASSETS&start_date=2022-04-01&end=2022-04-30', 
    [headers' => ['Authorization' => 'Bearer <bearer_token>']], 
    $body
);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
var client = new RestClient("https://api.microbooks.io/books/v1/account/movement?section=ASSETS&start_date=2022-04-01&end=2022-04-30");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
var body = null;
request.AddParameter("text/plain", body,  ParameterType.RequestBody);
request.AddHeader("Authorization", "Bearer " + <bearer_token>);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);