From 9355a4751637df909f821910be56d3adacc6f1ed Mon Sep 17 00:00:00 2001 From: Hank Grabowski Date: Tue, 11 Dec 2018 17:27:45 -0500 Subject: [PATCH] Updated contacts with error codes Addresses Issue #30 --- _routes/contacts.md | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/_routes/contacts.md b/_routes/contacts.md index b7ce646..44d7df0 100644 --- a/_routes/contacts.md +++ b/_routes/contacts.md @@ -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 @@ -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 @@ -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