Integrate
Integrate v2
Integrate v2
  • Getting Started
    • 🀝Authorisation & Activation
    • πŸ”—API v2 URL
    • πŸ”’Versioning
    • πŸ”Authentication
    • 🟰Additional Headers
    • πŸ†—Response Status Codes
    • πŸ›‘Rate Limiting
    • ⁉️Errors and Bad Requests
    • πŸ“–Pagination
    • ⏭️Upgrading to v2
  • Reference
    • Settings
      • Client Integrations
        • Get Client Integrations
        • Change Client Integration State
    • 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 Record(s)
          • Delete Promise To Pay
        • Age Analysis Report
        • Financial Transactions Report
        • Get Schools
        • Get Accountable Person(s)
        • Get Learner(s)
        • Get Transaction Type(s)
        • Get Transaction Category(s)
Powered by GitBook
On this page
  • Path Parameters
  • Request Headers
  • Response Examples
  • Code Samples
  1. Reference
  2. Finance+
  3. Debt Management
  4. Debtor Notes

Get Note Type(s)

GET /v2/finplus/debtmanagement/debtornotes/notetypes (/{id})

This endpoint retrieves a list of available debtor note types.

Debtor Notes consist of three types: Internal Note, Text Note, and Promise to Pay Arrangement.

  1. Internal Note: As the name suggests, this is an internal record for the school. It allows staff to document conversations and interactions with debtors for reference.

  2. Text Note: Similar to an internal note, but with the distinction that it is typically printed on the debtor’s statement.

  3. Promise to Pay Arrangement: This represents a commitment from the debtor to make specific payments on agreed-upon dates. The system records these arrangements and provides reminders to the school for follow-ups.

By default, this endpoint returns a collection of records, wrapped in a data array. To retrieve a single record, provide its ID in the URL, which will return a single object instead of a collection.

Path Parameters

Name
Type
Description

{id}

Integer

Optionally provide the Note Type ID for retrieving a single record.

Request Headers

Name
Type
Description

HTTP-X-USERNAME*

String

As provided by d6

HTTP-X-PASSWORD*

String

As provided by d6

HTTP-X-SCHOOLID*

Integer

The unique identifier of the school for which the data is being queried.

Response Examples

Status: 200 OK

{
    "data": [
        {
            "id": 1,
            "name": "Text note"
        },
        {
            "id": 2,
            "name": "Promise to pay"
        },
        {
            "id": 3,
            "name": "Internal note"
        }
    ]
}

Description: When querying a specific note type ID

Status: 200 OK

{
    "id": 2,
    "name": "Promise to pay"
}

Description: The requested ID does not exist in the system.

Status: 404 Not Found

{
    "success": false,
    "message": "The note type does not exist"
}

Code Samples

<?php

// API Credentials
$api_username = 'your_username';
$api_password = 'your_password';
$school_id = 'the_school_id';

// Base API endpoint
define('BASE_URL', 'https://integrate.d6plus.co.za/api/v2/finplus/debtmanagement/debtornotes/notetypes');

// Optional: Set an ID to fetch a specific note type (or leave empty for all)
$id = '';

$url = BASE_URL;
if (!empty($id)) {
    $url .= '/' . $id;
}

// Initialize cURL
$curl = curl_init();

// Set cURL options
curl_setopt_array($curl, [
    CURLOPT_URL            => $url,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT        => 30,  // Set timeout to prevent hanging requests
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_HTTP_VERSION   => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST  => 'GET',
    CURLOPT_HTTPHEADER     => [
        "HTTP-X-USERNAME: $api_username",
        "HTTP-X-PASSWORD: $api_password",
        "HTTP-X-SCHOOLID: $school_id"
    ],
]);

// Execute request
$response = curl_exec($curl);

// Check for errors
$error = curl_error($curl);
if ($error) {
    curl_close($curl);
    throw new Exception("cURL Error: $error");
}

// Close cURL and output response
curl_close($curl);
echo $response;
curl --request GET 'https://integrate.d6plus.co.za/api/v2/finplus/debtmanagement/debtornotes/notetypes' \
     --header 'HTTP-X-USERNAME: your_username' \
     --header 'HTTP-X-PASSWORD: your_password' \
     --header 'HTTP-X-SCHOOLID: the_school_id'
PreviousGet Communication Type(s)NextGet Note(s)

Last updated 1 day ago