Archive Beneficiary
Archive User Beneficiary
Endpoint
PUT {{baseUrl}}/beneficiaries/{beneficiaryID}/archive
Description
This endpoint archives an existing beneficiary. The beneficiaryID
in the URL is the ID of the beneficiary to be archived.
Request
Headers
Authorization: Bearer YOUR_ACCESS_TOKEN
Content-Type: application/json
URL Parameters
Parameter
Type
Required
Description
beneficiaryID
string
Yes
The ID of the beneficiary to be archived
Request Body
The request body does not require any fields for this endpoint.
Example Request
<?php
$beneficiary_id = "1"; // Example beneficiary ID
$api_token = "YOUR_ACCESS_TOKEN";
$base_url = "{{baseUrl}}";
$url = "$base_url/beneficiaries/$beneficiary_id/archive";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
"Authorization: Bearer $api_token",
"Content-Type: application/json"
));
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
?>
Last updated