Skip to main content

Akun

Deskripsi

Berikut adalah API untuk mendapatkan data Akun.

Base URL

https://sempoa.id/api/integration

GET /akun

ParameterWajibTipe DataCatatan
limitIntegerMembatasi jumlah data keluaran.
Default: 10
pageIntegerMenampilkan data pada halaman terpilih.
Default: 1

Penggunaan

// tanpa parameter
Http::withToken('token')
->get(__BASE_URL___ . '/akun');

// dengan parameter
Http::withToken('token')
->get(__BASE_URL___ . '/akun', [
'limit' => 50,
'page' => 2
]);

Contoh sukses

{
"status": 200,
"message": "Success",
"data": [
{
"kode": "10000",
"akun": "Asset",
"tipe": "Aset",
"level": 1,
"balance": "Debit",
"akun_induk": "-"
},
{
"kode": "31000",
"akun": "Laba Berjalan",
"tipe": "Modal",
"level": 1,
"balance": "Credit",
"akun_induk": "Equity"
},
// 8 data lainnya
]
}

GET /akun/:kode

ParameterWajibTipe DataCatatan
kodeStringKode akun

Penggunaan

// tanpa variabel
Http::withToken('token')
->get(__BASE_URL___ . '/akun/10000');

// dengan variabel
$kode = '10000';
Http::withToken('token')
->get(__BASE_URL___ . '/akun/' . $kode);

Contoh sukses

{
"status": 200,
"message": "Success",
"data": {
"kode": "10000",
"akun": "Aktiva",
"tipe": "Aset",
"level": 1,
"balance": "Debit",
"akun_induk": "-"
}
}

Contoh gagal

{
"status": 404,
"message": "Akun :kode tidak ditemukan."
}