Repository navigation
Chores API
All Chores API endpoints require authorisation to enable authorisation follow these steps
- Call the user Login endpoint
- retrieve the token from the response of the login
- add
"Bearer <jwt token>"to the Authorisation Header field - Send the Chores API request
| Parameters | Format |
|---|---|
| Id | integer |
| Title | string |
| Description | string |
| Assignee | int (user id) |
| DueDate | datetime string YYYY-MM-DDTHH::MM:SSZ |
| Completed | bool |
| Recurring | bool |
Method: POST
Description: Add a new chore to the flat, and assign a user to that chore
| Parameters | Format |
|---|---|
| Chore | Chore DTO |
Request Body example
{
"chore_id": 0,
"title": "dishes",
"description": "do the dishes and put them away",
"assignee": 22,
"due_date": "2020-03-16T04:25:50.783Z",
"completed": 0,
"recurring": 0
}
STATUS CODE: 200 OK Added chore successfully
STATUS CODE: 400 BAD REQUEST Assignee id does not exist
STATUS CODE: 401 UNAUTHORIZED User not logged in
Method: Get
Description: Returns a list of chores associated with the current flat
None
STATUS CODE: 200 OK Returned chores successfully
STATUS CODE: 400 BAD REQUEST User does not belong to a flat
STATUS CODE: 401 UNAUTHORIZED User not logged in
List of Chores DTO
Method: PUT
Description: Mark a chore as completed
| Parameters | Format |
|---|---|
| chore_id | integer |
STATUS CODE: 200 OK Chore marked as completed
STATUS CODE: 400 BAD REQUEST Chore id does not exist
STATUS CODE: 401 UNAUTHORIZED User not logged in
Method: DELETE
Description: Remove a chore
| Parameters | Format |
|---|---|
| chore_id | integer |
STATUS CODE: 200 OK Chore deleted
STATUS CODE: 400 BAD REQUEST Chore id does not exist
STATUS CODE: 401 UNAUTHORIZED User not logged in
- Home
- Data Model
- Architecture
- API Documentation
- Front End Documentation
- Testing
- Prototyping
- Other
- Contributing Guidelines and Etiquitte
- Labels
- License
- Admin