Get Dashboard Accounting
curl --request GET \
--url https://staging-openapi.accountingplus.id/v1/dashboard/accountings \
--header 'A-Data: <api-key>' \
--header 'A-Signature: <api-key>' \
--header 'Authorization: Bearer <token>'import requests
url = "https://staging-openapi.accountingplus.id/v1/dashboard/accountings"
headers = {
"Authorization": "Bearer <token>",
"A-Signature": "<api-key>",
"A-Data": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
Authorization: 'Bearer <token>',
'A-Signature': '<api-key>',
'A-Data': '<api-key>'
}
};
fetch('https://staging-openapi.accountingplus.id/v1/dashboard/accountings', 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://staging-openapi.accountingplus.id/v1/dashboard/accountings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"A-Data: <api-key>",
"A-Signature: <api-key>",
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://staging-openapi.accountingplus.id/v1/dashboard/accountings"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("A-Signature", "<api-key>")
req.Header.Add("A-Data", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://staging-openapi.accountingplus.id/v1/dashboard/accountings")
.header("Authorization", "Bearer <token>")
.header("A-Signature", "<api-key>")
.header("A-Data", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging-openapi.accountingplus.id/v1/dashboard/accountings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
request["A-Signature"] = '<api-key>'
request["A-Data"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": "00",
"message": "success",
"data": {
"net_profit_margin": 79.37,
"percentage_not_profit_margin": 0.01,
"current_ratio": 675.18,
"percentage_current_ratio": 0.05
}
}Insight
Accounting
Retrieve data of dashboard accounting
GET
/
v1
/
dashboard
/
accountings
Get Dashboard Accounting
curl --request GET \
--url https://staging-openapi.accountingplus.id/v1/dashboard/accountings \
--header 'A-Data: <api-key>' \
--header 'A-Signature: <api-key>' \
--header 'Authorization: Bearer <token>'import requests
url = "https://staging-openapi.accountingplus.id/v1/dashboard/accountings"
headers = {
"Authorization": "Bearer <token>",
"A-Signature": "<api-key>",
"A-Data": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
Authorization: 'Bearer <token>',
'A-Signature': '<api-key>',
'A-Data': '<api-key>'
}
};
fetch('https://staging-openapi.accountingplus.id/v1/dashboard/accountings', 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://staging-openapi.accountingplus.id/v1/dashboard/accountings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"A-Data: <api-key>",
"A-Signature: <api-key>",
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://staging-openapi.accountingplus.id/v1/dashboard/accountings"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("A-Signature", "<api-key>")
req.Header.Add("A-Data", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://staging-openapi.accountingplus.id/v1/dashboard/accountings")
.header("Authorization", "Bearer <token>")
.header("A-Signature", "<api-key>")
.header("A-Data", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging-openapi.accountingplus.id/v1/dashboard/accountings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
request["A-Signature"] = '<api-key>'
request["A-Data"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": "00",
"message": "success",
"data": {
"net_profit_margin": 79.37,
"percentage_not_profit_margin": 0.01,
"current_ratio": 675.18,
"percentage_current_ratio": 0.05
}
}Plain Signature
path=/v1/dashboard/accountings&token=YOUR_TOKEN&email=john@gmail.com&tenant_id=841eaf97-c428-47d1-9f6d-c61cc9df7bee
Authorizations
Generate a JWT signed with the client_secret and include the client_id as a claim in its payload.
Generate the signature by creating an SHA256-HMAC hash from the plain signature above, using the signature_secret as the key. Then, Base64-encode the resulting hash and place the final value in the A-Signature header.
Include the email and tenant_id in the payload as Base64 encoded.
⌘I