Marital Status(')

Get the list of available marital status'

GET https://integrate.d6plus.co.za/api/v1/adminplus/lookup/maritalstatus/{marital_status_id}

Use this endpoint to retrieve the list of available marital status' within the d6+ SAMS. The list is generic across all d6+ SAMS clients. By default all available marital status' are returned.

It is possible to retrieve the information for a single marital status by providing the optional marital_status_id query parameter.

Path Parameters

Headers

[
    {
        "id": "1",
        "name": "Divorced"
    },
    {
        "id": "2",
        "name": "Married"
    },
    {
        "id": "3",
        "name": "Single"
    },
    {
        "id": "4",
        "name": "Widowed"
    },
    {
        "id": "6",
        "name": "Separated"
    },
    {
        "id": "7",
        "name": "Common law marriage"
    }
]

Examples

<?php

const BASE_URL = 'https://integrate.d6plus.co.za/api/v1/adminplus/lookup/maritalstatus';
const MARITAL_STATUS_ID = '1';

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 . '/' . MARITAL_STATUS_ID,
    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;

Last updated