Genders
Last updated
<?php
const BASE_URL = 'https://integrate.d6plus.co.za/api/v1/adminplus/lookup/genders';
const API_USERNAME = getenv('API_USERNAME'); // Assuming you have these environment variables set
const API_PASSWORD = getenv('API_PASSWORD');
$curl = curl_init();
$options = [
CURLOPT_URL => BASE_URL,
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/adminplus/lookup/genders' \
--header 'HTTP-X-USERNAME: your_username' \
--header 'HTTP-X-PASSWORD: your_password'