Skip to main content
GET
/
ca
/
api
/
get_trial_balance
Get Trial Balance
curl --request GET \
  --url https://api.meetcampfire.com/ca/api/get_trial_balance \
  --header 'Authorization: <api-key>'
import requests

url = "https://api.meetcampfire.com/ca/api/get_trial_balance"

headers = {"Authorization": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: '<api-key>'}};

fetch('https://api.meetcampfire.com/ca/api/get_trial_balance', 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://api.meetcampfire.com/ca/api/get_trial_balance",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);

$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://api.meetcampfire.com/ca/api/get_trial_balance"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "<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://api.meetcampfire.com/ca/api/get_trial_balance")
.header("Authorization", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.meetcampfire.com/ca/api/get_trial_balance")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "trial_balance": {
    "accounts": [
      {
        "id": 2550,
        "name": "Accounts Payable",
        "number": "210000",
        "balances": {
          "2023-08-31": {
            "debits": 0,
            "credits": 123
          },
          "2023-09-30": {
            "debits": 0,
            "credits": 123
          }
        }
      },
      {
        "id": 2551,
        "name": "Credit Cards",
        "number": "220000",
        "balances": {
          "2023-08-31": {
            "debits": 1700.14,
            "credits": 0
          },
          "2023-09-30": {
            "debits": 1700.14,
            "credits": 0
          }
        }
      }
    ]
  },
  "start_date": "2023-10-01",
  "end_date": "2023-11-30"
}

Authorizations

Authorization
string
header
required

Token-based authentication with required prefix "Token"

Query Parameters

department
integer

Filter by department ID. Can be specified multiple times for multiple departments

end_date
string<date>

Latest date (inclusive) for which to retrieve data. Defaults to end of current month

entity
integer

Entity ID(s) to scope the report. Can be repeated (?entity=1&entity=2) or JSON array

entity_rollup
boolean
default:false

If true, includes all data of children entities in consolidation

group_by
string
start_date
string<date>

Earliest date (inclusive) for which to retrieve data. Defaults to six months ago

Response

200 - application/json
trial_balance
object
required
start_date
string<date>
required
end_date
string<date>
required
breakdown
object