Get emprunt by ID
GET
https://gestion-bibliotique-pfe.netlify.app/api/emprunts/{id}
Maintainer:Nassim MZILI
@access Client
only for the client who made the emprunt
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://gestion-bibliotique-pfe.netlify.app/api/emprunts/67b54e2cbb49979f9658c5ed' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3YjM5ODM0NTc1N2EyYTY4MWU5Njc4OSIsInJvbGUiOiJjbGllbnQiLCJpYXQiOjE3Mzk5MzUyNjIsImV4cCI6MTc0MDAyMTY2Mn0.E9iCD1yeA-Z5-4IMrB37-d9aDPL3cRiB1LlnmpxfPhI'
Response Response Example
200 - Success
{
"success": true,
"message": "Emprunt fetched successfully!",
"data": {
"emprunt": {
"_id": "L-ycrgi3WgPZugOzhcHIG",
"clientId": "s2uqZNPDIfZJ5ehv7Xnpc",
"livreId": "q4iwBOUp4qNBBoT17FgUN",
"dateRetourPrevu": "2025-09-07T13:06:24.933Z",
"statut": "en cours",
"dateEmprunt": "2025-02-19T03:27:42.689Z"
}
}
}
Request
Path Params
id
string
required
Example:
67b54e2cbb49979f9658c5ed
Header Params
Authorization
string
required
Example:
Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3YjM5ODM0NTc1N2EyYTY4MWU5Njc4OSIsInJvbGUiOiJjbGllbnQiLCJpYXQiOjE3Mzk5MzUyNjIsImV4cCI6MTc0MDAyMTY2Mn0.E9iCD1yeA-Z5-4IMrB37-d9aDPL3cRiB1LlnmpxfPhI