LedgerEntry
The LedgerEntry object
The LedgerEntry object looks like this in JSON:
{
"object": "ledger_entry",
"id": 19,
"transaction_id": 9,
"direction": "credit",
"account_id": 2,
"actor_type": "person",
"actor_id": 1,
"debit": 0,
"credit": 1234.56,
"invoice_item_id": null,
"fund_id": null,
"is_deposit": false,
"sandbox": true
}
| Attribute | Required | Data Type |
|---|---|---|
| id | Yes | int |
| transaction_id | Yes | int |
| direction | Yes | enum (debit, credit) |
| account_id | Yes | int |
| actor_type | Yes | enum (person, contact_org, asset, liability) |
| actor_id | Yes | int |
| debit | Yes | decimal |
| credit | Yes | decimal |
| invoice_item_id | No | int |
| fund_id | No | int |
| is_deposit | Yes | bool |
| sandbox | No | bool |
index
Example code to call this method:
curl "https://yourschool.populiweb.com/api2/ledgerentries" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_POPULI_API_KEY" \
-X GET
-d '{
"filter": {"0":{"logic":"ALL","fields":[{"name":"account","value":123,"positive":1}]}}
}' \
require 'httparty'
response = HTTParty.get(
'https://yourschool.populiweb.com/api2/ledgerentries',
headers: {
'Authorization' => 'Bearer YOUR_POPULI_API_KEY'
},
)
puts response.body
import requests
response = requests.get(
'https://yourschool.populiweb.com/api2/ledgerentries',
headers={
'Authorization': 'Bearer YOUR_POPULI_API_KEY'
},
)
print(response.json())
using Newtonsoft.Json;
using RestSharp;
var client = new RestClient();
var request = new RestRequest(new Uri("https://yourschool.populiweb.com/api2/ledgerentries"), Method.Get);
request.AddHeader("Authorization", "Bearer YOUR_POPULI_API_KEY");
var response = client.Execute(request);
var response_object = JsonConvert.DeserializeObject(response.Content);
Console.Write(response_object);
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://yourschool.populiweb.com/api2/ledgerentries');
curl_setopt($curl, CURLOPT_HTTPHEADER, ['Authorization: Bearer YOUR_POPULI_API_KEY']);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'GET');
$response = curl_exec($curl);
$response_decoded = json_decode($response);
var_dump($response_decoded);
Example response:
{
"object": "list",
"count": 0,
"results": 0,
"results_per_page": 200,
"pages": 0,
"page": 0,
"offset": 0,
"has_more": false,
"data": [],
"sandbox": true
}
Retrieves all LedgerEntry objects that match given filter conditions.
HTTP Request
GET /ledgerentries
Parameters
| Name | Required | Data Type | Description |
|---|---|---|---|
| filter | No | mixed | See available filter conditions |
| page | No | int | The page of results to return if more than 200 records are found. |
Expandable Properties
- transaction
- fund
- account
Filter Condition Parameters
These conditions can be used to narrow the results returned.
| Name | Type |
|---|---|
| time_period | date_period |
| account | financial_accounts |
| debit | decimal |
| credit | decimal |
| transaction_type | enum |
| disbursement_type | enum |
| term | object_id |
| degree | object id |
| program | object id |
| transaction_number | integer |
Permissions
One of the following roles is required to call this method:
- Financial Admin
- Financial Auditor
show
Example code to call this method:
curl "https://yourschool.populiweb.com/api2/ledgerentries/(ledgerentry)" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_POPULI_API_KEY" \
-X GET
require 'httparty'
response = HTTParty.get(
'https://yourschool.populiweb.com/api2/ledgerentries/(ledgerentry)',
headers: {
'Authorization' => 'Bearer YOUR_POPULI_API_KEY'
},
)
puts response.body
import requests
response = requests.get(
'https://yourschool.populiweb.com/api2/ledgerentries/(ledgerentry)',
headers={
'Authorization': 'Bearer YOUR_POPULI_API_KEY'
},
)
print(response.json())
using Newtonsoft.Json;
using RestSharp;
var client = new RestClient();
var request = new RestRequest(new Uri("https://yourschool.populiweb.com/api2/ledgerentries/(ledgerentry)"), Method.Get);
request.AddHeader("Authorization", "Bearer YOUR_POPULI_API_KEY");
var response = client.Execute(request);
var response_object = JsonConvert.DeserializeObject(response.Content);
Console.Write(response_object);
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://yourschool.populiweb.com/api2/ledgerentries/(ledgerentry)');
curl_setopt($curl, CURLOPT_HTTPHEADER, ['Authorization: Bearer YOUR_POPULI_API_KEY']);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'GET');
$response = curl_exec($curl);
$response_decoded = json_decode($response);
var_dump($response_decoded);
Example response:
{
"object": "ledger_entry",
"id": 19,
"transaction_id": 9,
"direction": "credit",
"account_id": 2,
"actor_type": "person",
"actor_id": 1,
"debit": 0,
"credit": 1234.56,
"invoice_item_id": null,
"fund_id": null,
"is_deposit": false,
"sandbox": true
}
Retrieves a specific LedgerEntry object.
HTTP Request
GET /ledgerentries/(ledgerentry)
Parameters
No additional parameters are needed beyond the ID of the object being requested that appears in the URL.
Expandable Properties
- transaction
- fund
- account
Permissions
One of the following roles is required to call this method:
- Financial Admin
- Financial Auditor