Delete an emprunt
DELETE
https://gestion-bibliotique-pfe.netlify.app/api/emprunts/{id}
Maintainer:Nassim MZILI
@access Admin
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request DELETE 'https://gestion-bibliotique-pfe.netlify.app/api/emprunts/67b54e2cbb49979f9658c5ed' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3YjFjZmY2MWUzNTYzOGJlMTUyZGY1NyIsInJvbGUiOiJhZG1pbiIsImlhdCI6MTczOTkzNDY3MCwiZXhwIjoxNzQwMDIxMDcwfQ.x-VeV6245fmwrCkuy1sw8951XQnpzLFlGEbHAAt1DZA'
Response Response Example
200 - Success
{
"success": true,
"message": "Emprunt deleted successfully!",
"data": {
"emprunt": {
"_id": "1lBe536Z6gPlBq3pSz5Yp",
"clientId": "vQU3-m1xS_Xro8gYVyrHj",
"livreId": "qFJPZSIodrrB4Y35cvovy",
"dateRetourPrevu": "2025-10-18T16:58:19.073Z",
"statut": "en retard",
"dateEmprunt": "2025-02-19T03:58:15.424Z",
"dateRetourEffectif": "2024-08-13T08:31:28.176Z"
}
}
}
Request
Path Params
id
string
required
Example:
67b54e2cbb49979f9658c5ed
Header Params
Authorization
string
required
Example:
Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3YjFjZmY2MWUzNTYzOGJlMTUyZGY1NyIsInJvbGUiOiJhZG1pbiIsImlhdCI6MTczOTkzNDY3MCwiZXhwIjoxNzQwMDIxMDcwfQ.x-VeV6245fmwrCkuy1sw8951XQnpzLFlGEbHAAt1DZA