Laporan Keuangan (Financial Statement)
laporan Keuangan (Financial Statement).
Fields will be dynamic corresponding to the given financial statement. Here are the supported document bases:
Balance Sheet Object
- Name
status
- Type
- string
- Description
Enum code indicating the status of the reading result.
SUCCESS
NO_FILE
FILE_INVALID_FORMAT
FAILED
- Name
reason
- Type
- string
- Description
A human-readable message providing more details about the reading result.
- Name
read
- Type
- object
- Description
Contains the readings for each field from the Financial Statement with Base Balance Sheet. Each field has either an object or an array of objects that includes
confidence
(in percentage),value
(the reading), andfield_info
(an array of field info objects).- Name
assets
- Type
- number
- Description
- Name
current_assets
- Type
- number
- Description
- Name
cash_and_cash_equivalents
- Type
- number
- Description
- Name
current_financial_assets
- Type
- number
- Description
- Name
receivables
- Type
- number
- Description
- Name
trade_receivables
- Type
- number
- Description
- Name
trade_receivables_third_parties
- Type
- number
- Description
- Name
trade_receivables_related_parties
- Type
- number
- Description
- Name
other_receivables
- Type
- number
- Description
- Name
other_receivables_third_parties
- Type
- number
- Description
- Name
other_receivables_related_parties
- Type
- number
- Description
- Name
inventories
- Type
- number
- Description
- Name
prepaid_expenses
- Type
- number
- Description
- Name
current_advances
- Type
- number
- Description
- Name
prepaid_taxes
- Type
- number
- Description
- Name
corporate_income_prepaid_taxes
- Type
- number
- Description
- Name
other_prepaid_taxes
- Type
- number
- Description
- Name
work_in_progress
- Type
- number
- Description
- Name
contract_assets
- Type
- number
- Description
- Name
other_current_assets
- Type
- number
- Description
- Name
non_current_assets
- Type
- number
- Description
- Name
non_current_receivables
- Type
- number
- Description
- Name
non_current_receivables_from_related_parties
- Type
- number
- Description
- Name
non_current_receivables_from_third_parties
- Type
- number
- Description
- Name
investments
- Type
- number
- Description
- Name
investment_in_associates
- Type
- number
- Description
- Name
investment_in_joint_ventures
- Type
- number
- Description
- Name
investments_using_equity
- Type
- number
- Description
- Name
other_investments
- Type
- number
- Description
- Name
fixed_assets
- Type
- number
- Description
- Name
properties_assets
- Type
- number
- Description
- Name
properties_assets_advances
- Type
- number
- Description
- Name
properties_assets_rights
- Type
- number
- Description
- Name
inventory_assets
- Type
- number
- Description
- Name
others_assets
- Type
- number
- Description
- Name
fixed_assets_depreciation
- Type
- number
- Description
- Name
properties_depreciation
- Type
- number
- Description
- Name
inventory_depreciation
- Type
- number
- Description
- Name
others_depreciation
- Type
- number
- Description
- Name
deferred_tax_assets
- Type
- number
- Description
- Name
deferred_vat_input
- Type
- number
- Description
- Name
goodwill
- Type
- number
- Description
- Name
intangible_assets_ex_goodwill
- Type
- number
- Description
- Name
other_non_current_non_financial_assets
- Type
- number
- Description
- Name
deposits
- Type
- number
- Description
- Name
claims_for_tax_refund
- Type
- number
- Description
- Name
liabilities_and_equities
- Type
- number
- Description
- Name
liabilities
- Type
- number
- Description
- Name
current_liabilities
- Type
- number
- Description
- Name
trade_payables
- Type
- number
- Description
- Name
trade_payabless_third_parties
- Type
- number
- Description
- Name
trade_payables_related_parties
- Type
- number
- Description
- Name
other_payables
- Type
- number
- Description
- Name
other_payabless_third_parties
- Type
- number
- Description
- Name
other_payables_related_parties
- Type
- number
- Description
- Name
other_current_financial_liabilities
- Type
- number
- Description
- Name
other_current_non_financial_liabilities
- Type
- number
- Description
- Name
short_term_loans
- Type
- number
- Description
- Name
current_accrued_expenses
- Type
- number
- Description
- Name
taxes_payables
- Type
- number
- Description
- Name
corporate_income_taxes_payable
- Type
- number
- Description
- Name
other_taxes_payables
- Type
- number
- Description
- Name
current_maturities_of_non_current_liabilities
- Type
- number
- Description
- Name
current_maturities_of_bank_loans
- Type
- number
- Description
- Name
current_maturities_of_secured_loans
- Type
- number
- Description
- Name
current_maturities_of_finance_lease_loans
- Type
- number
- Description
- Name
current_maturities_of_other_borrowings
- Type
- number
- Description
- Name
prepaid_income
- Type
- number
- Description
- Name
advance_payment_liabilities
- Type
- number
- Description
- Name
contract_liabilities
- Type
- number
- Description
- Name
liabilities_union_savings
- Type
- number
- Description
- Name
member_savings
- Type
- number
- Description
- Name
member_special_savings
- Type
- number
- Description
- Name
term_savings
- Type
- number
- Description
- Name
voluntary_savings
- Type
- number
- Description
- Name
non_current_liabilities
- Type
- number
- Description
- Name
deferred_tax_liabilities
- Type
- number
- Description
- Name
long_term_liabilities
- Type
- number
- Description
- Name
employee_benefits_liabilities
- Type
- number
- Description
- Name
long_term_bank_loans
- Type
- number
- Description
- Name
long_term_finance_lease_loans
- Type
- number
- Description
- Name
long_term_bonds_loans
- Type
- number
- Description
- Name
long_term_other_borrowings
- Type
- number
- Description
- Name
other_non_current_financial_liabilities
- Type
- number
- Description
- Name
other_non_current_non_financial_liabilities
- Type
- number
- Description
- Name
interest_bank_loan
- Type
- number
- Description
- Name
deferred_vat_output
- Type
- number
- Description
- Name
equities
- Type
- number
- Description
- Name
equity_union_savings
- Type
- number
- Description
- Name
special_savings
- Type
- number
- Description
- Name
principal_savings
- Type
- number
- Description
- Name
mandatory_savings
- Type
- number
- Description
- Name
reserves
- Type
- number
- Description
- Name
grant_funds
- Type
- number
- Description
- Name
equities_attributable
- Type
- number
- Description
- Name
common_stocks
- Type
- number
- Description
- Name
additional_paid_in_capital
- Type
- number
- Description
- Name
treasury_stocks
- Type
- number
- Description
- Name
other_components_of_equity
- Type
- number
- Description
- Name
retained_earnings
- Type
- number
- Description
- Name
appropriated_retained_earnings
- Type
- number
- Description
- Name
unappropriated_retained_earnings
- Type
- number
- Description
- Name
dividen
- Type
- number
- Description
- Name
non_controlling_interests
- Type
- number
- Description
- Name
current_profit_loss
- Type
- number
- Description
- Name
other_comprehensive_incomes
- Type
- number
- Description
Income Statement Object
- Name
status
- Type
- string
- Description
Enum code indicating the status of the reading result.
SUCCESS
NO_FILE
FILE_INVALID_FORMAT
FAILED
- Name
reason
- Type
- string
- Description
A human-readable message providing more details about the reading result.
- Name
read
- Type
- object
- Description
Contains the readings for each field from the Financial Statement with Base Income Statement. Each field has either an object or an array of objects that includes
confidence
(in percentage),value
(the reading), andfield_info
(an array of field info objects).- Name
total_revenue
- Type
- number
- Description
- Name
cost_of_sales_and_revenue
- Type
- number
- Description
- Name
total_gross_profit_loss
- Type
- number
- Description
- Name
operating_expenses
- Type
- number
- Description
- Name
selling_expense
- Type
- number
- Description
- Name
general_adm_expense
- Type
- number
- Description
- Name
salary_and_benefit
- Type
- number
- Description
- Name
transportation_expense
- Type
- number
- Description
- Name
office_utilities
- Type
- number
- Description
- Name
office_supplies
- Type
- number
- Description
- Name
rental
- Type
- number
- Description
- Name
depreciation_amortisation
- Type
- number
- Description
- Name
operating_profit_loss
- Type
- number
- Description
- Name
non_operating_income_expenses
- Type
- number
- Description
- Name
non_operating_income
- Type
- number
- Description
- Name
non_operating_expenses
- Type
- number
- Description
- Name
finance_income
- Type
- number
- Description
- Name
finance_cost
- Type
- number
- Description
- Name
forex
- Type
- number
- Description
- Name
income_other_comprehensive
- Type
- number
- Description
- Name
non_controlling_interest
- Type
- number
- Description
- Name
total_profit_before_tax
- Type
- number
- Description
- Name
tax_income_expenses
- Type
- number
- Description
- Name
total_profit_loss
- Type
- number
- Description
- Name
total_comprehensive_income
- Type
- number
- Description
- Name
earning_loss_per_share
- Type
- number
- Description
Read Financial Statement
Detects a valid Financial Statement image and returns the information as text.
Required parameter
- Name
image
- Type
- file (.png, .jpg, .jpeg, .tiff, .pdf)
- Description
The image file for the Financial Statement.
Sample Request
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Minimum Node 18. Save the code as 'index.mjs' and run it by executing 'node index.mjs'
import { readFileSync } from "fs";
const url = 'https://api.vision.glair.ai/ocr/v1/financial-statement';
const basicAuth = 'Basic ' + Buffer.from('USERNAME' + ':' + 'PASSWORD').toString('base64');
const apiKey = 'API_KEY';
const formData = new FormData();
formData.append('image', new Blob([readFileSync('/path/to/image/Financial-Statement.jpeg')]));
const config = {
method: 'POST',
headers: {
Authorization: basicAuth,
'x-api-key': apiKey,
},
body: formData,
};
const response = await fetch(url, config);
console.log(await response.json());
Sample Response - Base Balance Sheet
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
{
"status": "SUCCESS",
"reason": "File Successfully Read",
"read": {
"assets": [
{
"value": 1000000,
"confidence": 0.98,
"field_info": [
{
"field_info_type": "year",
"value": "2017"
},
{
"field_info_type": "parent",
"value": "balance_sheet"
}
]
},
{
"value": 1000000,
"confidence": 0.98,
"field_info": [
{
"field_info_type": "year",
"value": 2018
},
{
"field_info_type": "parent",
"value": "balance_sheet"
}
]
}
],
"current_assets":[
{
"value": 1000000,
"confidence": 0.98,
"field_info": [
{
"field_info_type": "year",
"value": "2017"
},
{
"field_info_type": "parent",
"value": "assets"
}
]
},
{
"value": 1000000,
"confidence": 0.98,
"field_info": [
{
"field_info_type": "year",
"value": 2018
},
{
"field_info_type": "parent",
"value": "assets"
}
]
}
],
"non_current_assets": [
{
"value": 1000000,
"confidence": 0.98,
"field_info": [...]
},
{
"value": 1000000,
"confidence": 0.98,
"field_info": [...]
}
],
"liabilities_and_equity": [...],
"liabilities": [...],
"current_liabilities": [...],
"non_current_liabilities": [...],
"equity": [...],
...
}
}
Sample Response - Base Income Statement
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
{
"status": "SUCCESS",
"reason": "File Successfully Read",
"read": {
"sales_revenue": [
{
"value": 1000000,
"confidence_text": 0.98,
"field_info": [
{
"field_info_type": "report_date",
"value": "2017"
},
{
"field_info_type": "parent",
"value": "income_statement"
}
]
},
{
"value": 2000000,
"confidence_text": 0.98,
"field_info": [
{
"subfield_type": "report_date",
"value": 2018
},
{
"subfield_type": "parent",
"value": "income_statement"
},
{
"subfield_type": "field_detail",
"value": "Mutasi masuk"
}
]
}
],
"profit_loss_amount":[
{
"value": 1000000,
"confidence_text": 0.98,
"field_info": [
{
"field_info_type": "report_date",
"value": "2017"
},
{
"subfield_type": "parent",
"value": "income_statement"
}
]
},
{
"value": 1000000,
"confidence_text": 0.98,
"field_info": [
{
"subfield_type": "report_date",
"value": 2018
},
{
"subfield_type": "parent",
"value": "income_statement"
}
]
}
],
"cost_of_sales_and_revenue": [
{
"value": 1000000,
"confidence": 0.98,
"field_info": [...]
},
{
"value": 1000000,
"confidence": 0.98,
"field_info": [...]
}
],
"gross_income": [...],
"selling_expense": [...],
"profit_loss_amount_before_tax": [...],
"tax_amount": [...],
"general_adm_expense": [...],
...
}
}
Request ID
An associated request identifier is generated for every request made to this endpoint.
This value can be found in the response headers under Request-Id
Responses
Various responses for this endpoint, in addition to general responses specified in Errors.
200 - OK
Request with readable Financial Statement image
Response
1
2
3
4
5
{
"status": "SUCCESS",
"reason": "File Successfully Read",
//...,
}
// TODO: no "Request with non Financial Statement File"?
400 - Bad Request
Request without form-data image
Response
1
2
3
4
5
{
"status": "NO_FILE",
"reason": "No file in request body",
//...,
}
415 - Unsupported Media Type
Request with non-image file format
Response
1
2
3
4
5
{
"status": "FILE_INVALID_FORMAT",
"reason": "Failed to process invalid file format. Please upload the correct file format",
//...,
}