[go: up one dir, main page]

GET managers/{id} – REST API

Retrieve a Manager: GET /managers/{id}

Retrieve a single manager by passing the manager’s email as an id.

Query Parameters

  • id: The email address of the manager.

JSON Result Details

  • first_name: Manager’s first name.
  • last_name: Manager’s last name.
  • email: Manager’s email, which is used to log in to manage Libib.
  • role: The managers role. owner, admin, manager, lender
<?php
$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.libib.com/managers/samgee@example.com",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_CONNECTTIMEOUT => 5,
  CURLOPT_TIMEOUT => 15,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  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);
}
{
    "first_name": "Samwise",
    "last_name": "Gamgee",
    "email": "samthewise@example.com",
    "role": "admin"
}
Updated on February 17, 2023
Was this article helpful?

Related Articles