Get Client Integrations
Last updated
[
"data": [
{
"school_id": 1000,
"school_name": "d6+ Primary School",
"admin_email_address": "support@d6plus.co.za",
"telephone_calling_code": "27",
"telephone_number": "0123334444",
"api_type_id": 8,
"api_type": "Admin+ API",
"activated_by_integrator": "No"
},
{
"school_id": 1000,
"school_name": "d6+ Primary School",
"admin_email_address": "support@d6plus.co.za",
"telephone_calling_code": "27",
"telephone_number": "0123334444",
"api_type_id": 9,
"api_type": "Curriculum+ API",
"activated_by_integrator": "Yes"
},
{
"school_id": 1001,
"school_name": "d6+ Secondary School",
"admin_email_address": "support@d6plus.co.za",
"telephone_calling_code": "27",
"telephone_number": "0123334444",
"api_type_id": 8,
"api_type": "Debt manager",
"activated_by_integrator": "Yes"
}
],
"meta": {
"limit": 10,
"max_allowed_limit": 50,
"next_cursor": "eyJpZCI6MjU0NiwiX2JhY2t3YXJkIjpmYWxzZX0"
}
]{
"success": false,
"message": "Validation Failed",
"validation_errors": {
"school_id": "The School id must be integer",
"api_type_id": "The Api type id must be integer",
"limit": "The Limit maximum is 50"
}
}<?php
// API Credentials
$api_username = 'your_username';
$api_password = 'your_password';
// Base API endpoint
define('BASE_URL', 'https://integrate.d6plus.co.za/api/v2/settings/clientintegrations');
// Query parameters (optional)
$query_params = [
'school_id' => 1000,
'api_type_id' => 8,
'limit' => 50,
'cursor' => 'eyJpZCI6MTY5NCwiX2JhY2t3YXJkIjpmYWxzZX0',
];
$url = BASE_URL;
if (!empty($query_params)) {
$url .= '?' . http_build_query($query_params);
}
// 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"
],
]);
// 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/settings/clientintegrations?school_id=1000&api_type_id=8&limit=50" \
--header "HTTP-X-USERNAME: your_username" \
--header "HTTP-X-PASSWORD: your_password"