Gestion de Bibliotique
Home
API
  • Client > Authentification
  • Client > Profile
  • Client > CRUD
  • Livres
  • Emprunts
  • Categories
Team
  • Nassim MZILI
  • Abderrahim El Ouali
Home
API
  • Client > Authentification
  • Client > Profile
  • Client > CRUD
  • Livres
  • Emprunts
  • Categories
Team
  • Nassim MZILI
  • Abderrahim El Ouali
GitHub
GitLab
  1. Profile
  • Get Started
  • API
    • Clients
      • Auth
        • Register a new client
        • Login a client
        • Logout a client
      • Profile
        • Update client profile
          PUT
        • Update client password
          PUT
        • Get client details
          GET
        • Get all emprunts for a client
          GET
      • CRUD (Admin)
        • Get all clients
        • Get a client by ID
        • Update a client
        • Delete a client
    • Livres
      • Get all books
      • Get a book by ID
      • Add a new book
      • Update a book
      • Delete a book
    • Emprunts
      • Create a new emprunt
      • Get emprunt by ID
      • Update an emprunt
      • Delete an emprunt
      • Get all emprunts
      • Get all emprunts for a specific client
      • Return a book
    • Categories
      • Get all categories
      • Get a category by ID
      • Add a new category
      • Update a category
      • Delete a category
  1. Profile

Get all emprunts for a client

GET
https://gestion-bibliotique-pfe.netlify.app/api/clients/emprunts
empruntsclient
Maintainer:Nassim MZILI

@access Client#

Request

Header Params
Authorization
string 
required
Example:
Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3YjFjZmY2MWUzNTYzOGJlMTUyZGY1NyIsInJvbGUiOiJhZG1pbiIsImlhdCI6MTczOTcxMTcwMiwiZXhwIjoxNzM5Nzk4MTAyfQ.EfmX3rKOQ-Dafn_kskStpd2Zlk7NK8Evz_ZCpLFm7x8

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://gestion-bibliotique-pfe.netlify.app/api/clients/emprunts' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3YjFjZmY2MWUzNTYzOGJlMTUyZGY1NyIsInJvbGUiOiJhZG1pbiIsImlhdCI6MTczOTcxMTcwMiwiZXhwIjoxNzM5Nzk4MTAyfQ.EfmX3rKOQ-Dafn_kskStpd2Zlk7NK8Evz_ZCpLFm7x8'

Responses

🟢200Success
application/json
Body
succes
boolean 
required
message
string 
required
data
object 
required
emprunts
array[object (Emprunt) {7}] 
required
Example
{
  "succes": true,
  "message": "Emprunts fetched successfully!",
  "data": {
    "emprunts": [
      {
        "_id": "VOLBbikE3HfSluVK4nNG6",
        "clientId": "61DhPA3MzieQvPt9wtBG_",
        "livreId": "xy6guvRfuF3MrhHLJzIZz",
        "dateRetourPrevu": "2025-03-19T19:59:33.603Z",
        "statut": "en cours",
        "dateEmprunt": "2025-02-16T21:37:03.856Z"
      },
      {
        "_id": "8zjHIvbjdwN0DMVFLhFsb",
        "clientId": "7Nlp28LmX1IJ9YG42htT2",
        "livreId": "cgUt0fTAeYC0R2QXax4qH",
        "dateRetourPrevu": "2025-07-09T19:01:32.566Z",
        "statut": "retourné",
        "dateEmprunt": "2025-02-16T21:37:03.857Z",
        "dateRetourEffectif": "2024-10-26T23:28:33.005Z"
      }
    ]
  }
}
🟠401Unauthorized
🟠404Record Not Found
🔴500Server Error
Previous
Get client details
Next
Get all clients
Built with