Restore a Patron: PATCH /patrons/{id}
Restores a previously deleted patron – available for 30 days after patron has been removed. If a patron email has been re-added as a new user, restore will not work for that patron.
Query Parameters
- id: A unique ID for the patron – parameter accepts either the barcode or email.
JSON Result Details
HTTP SUCCESS STATUS CODE: 200
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.libib.com/patrons/2020000000051",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_CONNECTTIMEOUT => 5,
CURLOPT_TIMEOUT => 15,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_HTTPHEADER =>> array(
"x-api-key: YOUR_API_KEY",
"x-api-user: YOUR_API_USER"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
$obj = json_decode($response);
}