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 Communication Type(s)

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

This endpoint retrieves a list of available debtor note communication types, such as SMS, Email, Telephonic, and others. These types define the method used to communicate with debtors regarding their accounts.

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 Communication 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": "SMS"
        },
        {
            "id": 2,
            "name": "E-mail"
        },
        {
            "id": 3,
            "name": "Telephonic"
        },
        ...
    ]
}

Description: When querying a specific communication type ID

Status: 200 OK

{
    "id": 2,
    "name": "E-mail"
}

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/communicationtypes');

// Optional: Set an ID to fetch a specific communication 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 --location --request GET 'https://integrate.d6plus.co.za/api/v2/finplus/debtmanagement/debtornotes/communicationtypes' \
     --header 'HTTP-X-USERNAME: your_username' \
     --header 'HTTP-X-PASSWORD: your_password' \
     --header 'HTTP-X-SCHOOLID: the_school_id'
PreviousDebtor NotesNextGet Note Type(s)