Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Latest commit

 

History

History
81 lines (66 loc) · 1.4 KB

6.obtenir-reservation.md

File metadata and controls

81 lines (66 loc) · 1.4 KB

← Retour

Obtenir une réservation

En tant qu'utilisateur, je peux voir une de mes réservations.

Critères de succès

Voir la story "Créer une réservation".

Spécifications

Requête

Path

GET /reservations/<number>

Réponses

  • 200 OK: succès

    Body

    {
      number: string,
      date: string, // date without time
      time: {
        start: string, // time without timezone
        end: string // time without timezone
      },
      groupSize: number, // entier positif
      customer: {
        name: string,
        email: string,
        phoneNumber: string // 10 chiffres
      },
      restaurant: {
        id: string,
        name: string,
        capacity: number,
        hours: {
          open: string, // time without timezone
          close: string // time without timezone
        }
      }
    }
    Exemple
    {
      "number": "81hbhsd992h8s",
      "date": "2024-03-16",
      "time": {
        "start": "13:15:00",
        "end": "15:15:00",
      },
      "groupSize": 2,
      "customer": {
        "name": "John Deer",
        "email": "john.deer@gmail.com",
        "phoneNumber": "1234567890"
      },
      "restaurant": {
        "id": "983db20h98sad",
        "name": "La Botega",
        "capacity": 12,
        "hours": {
          "open": "11:00:00",
          "close": "19:30:00"
        }
      }
    }
  • 404 NOT FOUND: la réservation n'existe pas