Skip to content
Matthew Grossman edited this page Mar 22, 2016 · 7 revisions

State diagram

Reservations

POST /reservation

  • create new reservation with state reserved
  • remove loc from free list of closest free spot
  • add reservation id to corresponding spot

PUT /accept

  • change reservation to state accepted
  • add reservation to /users/active[Driver|Host]Reservations

PUT /occupied

  • change reservationt to state occupied
  • start occupied time for pricing purposes

PUT /finish

  • change reservation to state finished
  • remove entry from activeHostReservations
  • end occupied time for pricing purposes
  • readd loc to the free list
  • free up the spot

PUT /review

  • change reservation to state reviewed
  • remove entry from activeDriverReservations
  • add relevant review information to Spot

Spots

Clone this wiki locally