Integrate
Integrate v1
Integrate v1
  • Getting Started
    • Authorisation & Activation
    • API URL
    • Versioning
    • Authentication
    • Response Status Codes
    • Rate Limiting
    • Errors and Bad Requests
  • Reference
    • Settings
      • Clients
        • Get Clients
        • Change Client Integration State
    • Administration+
      • Lookups
        • Ethnic Group(s)
        • Genders
        • Grade(s)
        • Language(s)
        • Marital Status(')
      • School
        • Get School Info
      • Learner
        • Get Learner(s)
        • Get Learner Absentees
        • Get Learner Discipline
      • Parent
        • Get Parent(s)
      • Staff Member
        • Get Staff Member(s)
    • Curriculum+
      • Learner
        • Get Learner Subjects
        • Get Learner Subjects Per Term
        • Get Learner Subject Marks
    • Finance+
      • Debt Management
        • Debtor Notes
          • Get Communication Type(s)
          • Get Note Type(s)
          • Get Note(s)
          • Create Note
          • Update Note
          • Delete Note
          • Get Promise To Pay(s)
          • Delete Promise To Pay
        • Age Analysis Report
        • Financial Transactions Report
        • Get Schools
        • Get School Debtors
        • Get Learner Parent Info
        • Get Transaction Type(s)
        • Get Transaction Category(s)
Powered by GitBook
On this page
  • Retrieve debtor financial transactions
  • Code Samples
  1. Reference
  2. Finance+
  3. Debt Management

Financial Transactions Report

Retrieve debtor financial transactions

GET https://integrate.d6plus.co.za/api/v1/finplus/debtmanagement/financialtransactions/{school_login_id}

This report provides a comprehensive view of transactions, offering the ability to group data by family/parent while also allowing for further breakdowns per learner using the per_learner parameter. When per_learner is specified, the family/parent object is extended to include learner-specific transaction details. The API supports flexible filtering options, such as date ranges, category IDs, debtor codes, learners, and accountable persons, enabling precise and targeted reporting. Additionally, the all_accounts parameter provides control over whether to include only active accounts or a complete financial history.

Path Parameters

Name
Type
Description

school_login_id*

Integer

The login ID of the school to retrieve data from

Headers

Name
Type
Description

HTTP-X-USERNAME*

String

As provided by d6

HTTP-X-PASSWORD*

String

As provided by d6

Query Parameters

Name
Type
Description

all_accounts

Boolean

Whether to include all accounts

per_learner

Boolean

Whether to include a break-down of transactions per learner

debtor_code

Integer

To filter on a specific Debtor Code

learner_id

Integer

To filter on a specific Learner ID

accountable_person_id

Integer

To filter on a specific Accountable Person ID

category_id

Integer

To filter on a specific Category ID

start_date

String

The start date for filtering transactions (format: YYYY-MM-DD)

end_date

String

The end date for filtering transactions (format: YYYY-MM-DD). The start_date is required when specifying an end date.

Response Examples

[
    {
        "debtor_code": "1001",
        "accountable_person_id": "40",
        "transactions": [
            {
                "category_id": null,
                "category_name": null,
                "transaction_date": "2024-04-01",
                "transaction_type_id": null,
                "transaction_type_name": null,
                "transaction_reference": null,
                "transaction_description": "Opening balance",
                "part_of_base_fee": null,
                "debit_amount": "17200.00",
                "credit_amount": "0.00",
                "accumulated_balance": "17200.00"
            },
            {
                "category_id": "1",
                "category_name": "School Fees",
                "transaction_date": "2024-04-01",
                "transaction_type_id": "14",
                "transaction_type_name": "Debtor Invoice",
                "transaction_reference": "663",
                "transaction_description": "Invoice - School Fees Jordan Smith - 00002 Apr2024",
                "part_of_base_fee": "1",
                "debit_amount": "2000.00",
                "credit_amount": "0.00",
                "accumulated_balance": "19200.00"
            },
            {
                "category_id": "6",
                "category_name": "Hostel Fees",
                "transaction_date": "2024-04-01",
                "transaction_type_id": "14",
                "transaction_type_name": "Debtor Invoice",
                "transaction_reference": "872",
                "transaction_description": "Invoice - Hostel Fees Jordan Smith - 00002 Apr2024",
                "part_of_base_fee": "0",
                "debit_amount": "1000.00",
                "credit_amount": "0.00",
                "accumulated_balance": "20200.00"
            },
            {
                "category_id": "1",
                "category_name": "School Fees",
                "transaction_date": "2024-05-01",
                "transaction_type_id": "14",
                "transaction_type_name": "Debtor Invoice",
                "transaction_reference": "682",
                "transaction_description": "Invoice - School Fees Jordan Smith - 00002 May2024",
                "part_of_base_fee": "1",
                "debit_amount": "2000.00",
                "credit_amount": "0.00",
                "accumulated_balance": "22700.00"
            },
            {
                "category_id": "6",
                "category_name": "Hostel Fees",
                "transaction_date": "2024-05-01",
                "transaction_type_id": "14",
                "transaction_type_name": "Debtor Invoice",
                "transaction_reference": "891",
                "transaction_description": "Invoice - Hostel Fees Jordan Smith - 00002 May2024",
                "part_of_base_fee": "0",
                "debit_amount": "1000.00",
                "credit_amount": "0.00",
                "accumulated_balance": "23700.00"
            }
        ]
    },
    {
        "debtor_code": "1002",
        "accountable_person_id": "3",
        "transactions": [
            {
                "category_id": null,
                "category_name": null,
                "transaction_date": "2024-04-01",
                "transaction_type_id": null,
                "transaction_type_name": null,
                "transaction_reference": null,
                "transaction_description": "Opening balance",
                "part_of_base_fee": null,
                "debit_amount": "21700.00",
                "credit_amount": "0.00",
                "accumulated_balance": "21700.00"
            },
            {
                "category_id": "1",
                "category_name": "School Fees",
                "transaction_date": "2024-04-01",
                "transaction_type_id": "14",
                "transaction_type_name": "Debtor Invoice",
                "transaction_reference": "662",
                "transaction_description": "Invoice - School Fees Nic Webster - 00001 Apr2024",
                "part_of_base_fee": "1",
                "debit_amount": "2000.00",
                "credit_amount": "0.00",
                "accumulated_balance": "23700.00"
            }
        ]
    }
]
[
    {
        "debtor_code": "1001",
        "accountable_person_id": "40",
        "learners": [
            {
                "learner_id": "1",
                "learner_first_name": "Jordan",
                "learner_last_name": "Smith",
                "transactions": [
                    {
                        "category_id": null,
                        "category_name": null,
                        "transaction_date": "2024-04-01",
                        "transaction_type_id": null,
                        "transaction_type_name": null,
                        "transaction_reference": null,
                        "transaction_description": "Opening balance",
                        "part_of_base_fee": null,
                        "debit_amount": "21700.00",
                        "credit_amount": "0.00",
                        "accumulated_balance": "21700.00"
                    },
                    {
                        "category_id": "1",
                        "category_name": "School Fees",
                        "transaction_date": "2024-04-01",
                        "transaction_type_id": "14",
                        "transaction_type_name": "Debtor Invoice",
                        "transaction_reference": "662",
                        "transaction_description": "Invoice - School Fees Jordan Smith - 00001 Apr2024",
                        "part_of_base_fee": "1",
                        "debit_amount": "2000.00",
                        "credit_amount": "0.00",
                        "accumulated_balance": "23700.00"
                    },
                    {
                        "category_id": "6",
                        "category_name": "Hostel Fees",
                        "transaction_date": "2024-04-01",
                        "transaction_type_id": "14",
                        "transaction_type_name": "Debtor Invoice",
                        "transaction_reference": "871",
                        "transaction_description": "Invoice - Hostel Fees Jordan Smith - 00001 Apr2024",
                        "part_of_base_fee": "0",
                        "debit_amount": "1000.00",
                        "credit_amount": "0.00",
                        "accumulated_balance": "24700.00"
                    },
                    {
                        "category_id": "1",
                        "category_name": "School Fees",
                        "transaction_date": "2024-05-01",
                        "transaction_type_id": "14",
                        "transaction_type_name": "Debtor Invoice",
                        "transaction_reference": "681",
                        "transaction_description": "Invoice - School Fees Jordan Smith - 00001 May2024",
                        "part_of_base_fee": "1",
                        "debit_amount": "2000.00",
                        "credit_amount": "0.00",
                        "accumulated_balance": "27200.00"
                    },
                    {
                        "category_id": "6",
                        "category_name": "Hostel Fees",
                        "transaction_date": "2024-05-01",
                        "transaction_type_id": "14",
                        "transaction_type_name": "Debtor Invoice",
                        "transaction_reference": "890",
                        "transaction_description": "Invoice - Hostel Fees Jordan Smith - 00001 May2024",
                        "part_of_base_fee": "0",
                        "debit_amount": "1000.00",
                        "credit_amount": "0.00",
                        "accumulated_balance": "28200.00"
                    }
                ]
            }
        ]
    },
    {
        "debtor_code": "1002",
        "accountable_person_id": "3",
        "learners": [
            {
                "learner_id": "3",
                "learner_first_name": "Nick",
                "learner_last_name": "Webster",
                "transactions": [
                    {
                        "category_id": null,
                        "category_name": null,
                        "transaction_date": "2024-04-01",
                        "transaction_type_id": null,
                        "transaction_type_name": null,
                        "transaction_reference": null,
                        "transaction_description": "Opening balance",
                        "part_of_base_fee": null,
                        "debit_amount": "17200.00",
                        "credit_amount": "0.00",
                        "accumulated_balance": "17200.00"
                    },
                    {
                        "category_id": "1",
                        "category_name": "School Fees",
                        "transaction_date": "2024-04-01",
                        "transaction_type_id": "14",
                        "transaction_type_name": "Debtor Invoice",
                        "transaction_reference": "663",
                        "transaction_description": "Invoice - School Fees Nick Webster - 00002 Apr2024",
                        "part_of_base_fee": "1",
                        "debit_amount": "2000.00",
                        "credit_amount": "0.00",
                        "accumulated_balance": "19200.00"
                    },
                    {
                        "category_id": "1",
                        "category_name": "School Fees",
                        "transaction_date": "2024-05-01",
                        "transaction_type_id": "14",
                        "transaction_type_name": "Debtor Invoice",
                        "transaction_reference": "682",
                        "transaction_description": "Invoice - School Fees Nick Webster - 00002 May2024",
                        "part_of_base_fee": "1",
                        "debit_amount": "2000.00",
                        "credit_amount": "0.00",
                        "accumulated_balance": "22700.00"
                    }
                ]
            }
        ]
    }
]
{
    "error": "Unauthorized",
    "error_description": "Client access not authorised"
}
{
    "error": "Integration not activated",
    "error_description": "Please activate the Finance+ API for this client before making this request"
}

Code Samples

<?php

const BASE_URL = 'https://integrate.d6plus.co.za/api/v1/finplus/debtmanagement/financialtransactions';
const SCHOOL_LOGIN_ID = '1000';
const PARAMS = [
    'per_learner' => 1, 
    'all_accounts' => 1
    ];
const API_USERNAME = getenv('API_USERNAME'); // Assuming you have these environment variables set
const API_PASSWORD = getenv('API_PASSWORD');

$curl = curl_init();

$query = http_build_query(PARAMS);

$options = [
    CURLOPT_URL => BASE_URL . '/' . SCHOOL_LOGIN_ID . '?' . $query,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_SSL_VERIFYPEER => true,
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => [
        "HTTP-X-USERNAME: " . API_USERNAME,
        "HTTP-X-PASSWORD: " . API_PASSWORD
    ],
];

curl_setopt_array($curl, $options);

$response = curl_exec($curl);

if (curl_errno($curl)) {
    throw new Exception('Curl error: ' . curl_error($curl));
}

curl_close($curl);

echo $response;
curl --location 'https://integrate.d6plus.co.za/api/v1/finplus/debtmanagement/financialtransactions/1000?per_learner=1&all_accounts=1' \
--header 'HTTP-X-USERNAME: your_username' \
--header 'HTTP-X-PASSWORD: your_password'
PreviousAge Analysis ReportNextGet Schools

Last updated 3 months ago