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. Auth
  • Get Started
  • API
    • Clients
      • Auth
        • Register a new client
          POST
        • Login a client
          POST
        • Logout a client
          POST
      • 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 a category by ID
      • Add a new category
      • Update a category
      • Delete a category
  1. Auth

Register a new client

POST
https://gestion-bibliotique-pfe.netlify.app/api/clients/register
authauthentificationregistersign up
Maintainer:Nassim MZILI

@access Public#

Request

Body Params application/json
nom
string 
required
email
string 
required
password
string 
required
confirmPassword
string 
required
adresse
string 
optional
Example
{
  "nom": "Arnold Schimmel",
  "email": "Lula_Kertzmann54@hotmail.com",
  "password": "JvRHcIBYuaCpqBO34",
  "confirmPassword": "JvRHcIBYuaCpqBO34"
}

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 POST 'https://gestion-bibliotique-pfe.netlify.app/api/clients/register' \
--header 'Content-Type: application/json' \
--data-raw '{
    "nom": "Arnold Schimmel",
    "email": "Lula_Kertzmann54@hotmail.com",
    "password": "JvRHcIBYuaCpqBO34",
    "confirmPassword": "JvRHcIBYuaCpqBO34"
}'

Responses

🟢201Created
application/json
Body
success
boolean 
required
message
string 
required
data
object 
required
client
object 
required
token
string 
required
Example
{
  "success": true,
  "message": "registration successful!",
  "data": {
    "client": {
      "_id": "KSZxuuuhp78NvwzByCfoH",
      "nom": "Jimmy Pagac",
      "email": "Noah28@gmail.com",
      "adresse": "971 Tiara Junctions",
      "role": "admin"
    },
    "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3YjFjZmY2MWUzNTYzOGJlMTUyZGY1NyIsInJvbGUiOiJhZG1pbiIsImlhdCI6MTczOTcwNzg4MywiZXhwIjoxNzM5Nzk0MjgzfQ.c7NCQvGtFr57H3g_8MR7qLYTQq3prgStzO4jh6kDE20"
  }
}
🟠400Bad Request
🔴500Server Error
Previous
Get Started
Next
Login a client
Built with