Residence Router - adamstelle/abba GitHub Wiki

POST /api/residence

Description

this endpoint allows an authorized user to create a residence.

Expected Headers:

  • Content-Type: application/json
  • Authorization: Bearer <token>

Expected Body:

{ 
  "sqft": "300",
  "type": "apartment",
  "street": "100 first street", 
  "city": "seattle",
  "state": "WA",
  "zip": "12345",
  "address": "100 first street, seattle, WA 12345", not-required
}

GET /api/residence/:id

This route is what allows a user to return a residence in our app.

Expected Headers:

  • Content-Type: application/json
  • Authorization: Bearer <token>

Expected Body:

{ 
  "sqft": "300",
  "type": "condo",
  "street": "1234 Example Road",
  "city": "seattle",
  "state": "WA",
  "zip": "12345",
  "address": "100 first street, seattle, WA 12345",
}

DELETE /api/residence/:id

This route is what allows a user to delete a residence using residence-Id in our app.

Expected Headers:

  • Content-Type: application/json
  • Authorization: Bearer <token>

No PUT request

⚠️ **GitHub.com Fallback** ⚠️