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. Categories
  • Get Started
  • API
    • Clients
      • Auth
        • Register a new client
        • Login a client
        • Logout a client
      • Profile
        • Update client profile
        • Update client password
        • Get client details
        • Get all emprunts for a client
      • 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
      • Get a category by ID
        GET
      • Add a new category
        POST
      • Update a category
        PUT
      • Delete a category
        DELETE
  1. Categories

Get a category by ID

GET
https://gestion-bibliotique-pfe.netlify.app/api/categories/{id}
Maintainer:Nassim MZILI

@access Public#

Request

Path Params
id
string 
required
Example:
67b0cbe00aedf5b2883615b7

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/categories/67b0cbe00aedf5b2883615b7'

Responses

🟢200Success
application/json
Body
success
boolean 
required
message
string 
required
data
object 
required
categorie
object (Categorie) 
required
Example
{
  "success": true,
  "message": "Category fetched successfully!",
  "data": {
    "categorie": {
      "_id": "R7LFHgy1qYMN9IBzqRfqx",
      "nom": "Fantasy",
      "description": "DeBooks set in magical or imaginary worlds."
    }
  }
}
🟠404Record Not Found
🔴500Server Error
Previous
Get all categories
Next
Add a new category
Built with