Skip to content

Commit

Permalink
Updated contacts with error codes
Browse files Browse the repository at this point in the history
Addresses Issue diaspora#30
  • Loading branch information
HankG committed Dec 11, 2018
1 parent d6745ac commit 9355a47
Showing 1 changed file with 28 additions and 1 deletion.
29 changes: 28 additions & 1 deletion _routes/contacts.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,24 @@ GET /api/v1/aspects/:aspect_id/contacts
]
~~~

### Errors

| Status code | Error reason |
| ----------- | ------------------------------------------ |
| 404 | Aspect with provided ID could not be found |


## Add a user to an aspect

### Request

~~~
POST /api/v1/aspects/:aspect_id/contacts/:person_guid
POST /api/v1/aspects/:aspect_id/contacts
~~~
~~~json
{
"person_guid": "f50ffc00b188013355e3705681972339"
}
~~~

### Response
Expand All @@ -47,6 +59,14 @@ POST /api/v1/aspects/:aspect_id/contacts/:person_guid
Status: 204 No Content
~~~

### Errors

| Status code | Error reason |
| ----------- | ------------------------------------------ |
| 404 | Aspect with provided ID could not be found |
| 422 | Failed to add user to aspect |


## Remove a user from an aspect

### Request
Expand All @@ -61,4 +81,11 @@ DELETE /api/v1/aspects/:aspect_id/contacts/:person_guid
Status: 204 No Content
~~~

### Errors

| Status code | Error reason |
| ----------- | ------------------------------------------ |
| 404 | Aspect with provided ID could not be found |
| 422 | Failed to remove user from aspect |

[aspects]: {{ site.baseurl }}/routes/aspects.html

0 comments on commit 9355a47

Please sign in to comment.