Base URL : https://sahladelivery.com/resto/resto_api.php
Connexion d’un restaurant
Body JSON :
{
"email": "resto@mail.com",
"password": "motdepasse"
}
Réponse :
{
"message": "Connexion réussie",
"restaurant": {
"id": 1,
"nom": "Resto 1",
"tel": "0555000000",
"email": "resto@mail.com"
}
}
Récupérer tous les restaurants
Réponse :
[
{
"id": 1,
"nom": "Resto 1",
"tel": "0555000000",
"email": "resto@mail.com"
},
{
"id": 2,
"nom": "Resto 2",
"tel": "0555001111",
"email": "resto2@mail.com"
}
]
Récupérer un restaurant par son id
Réponse :
{
"id": 1,
"nom": "Resto 1",
"tel": "0555000000",
"email": "resto@mail.com"
}
Créer un nouveau restaurant
Body JSON :
{
"nom": "Resto 3",
"tel": "0555002222",
"email": "resto3@mail.com",
"password": "secret"
}
Réponse :
{
"message": "Restaurant créé avec succès",
"id": 3
}
Mettre à jour un restaurant existant
Body JSON :
{
"nom": "Resto 3 Modifié",
"tel": "0555003333"
}
Réponse :
{
"message": "Restaurant mis à jour"
}
Supprimer un restaurant
Réponse :
{
"message": "Restaurant supprimé"
}