Advertisement
Guest User

Untitled

a guest
Apr 27th, 2015
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. # Block a user
  2. ### [POST] `api/v1/block_users`
  3.  
  4. __Request Payload__
  5.  
  6. ```json
  7. { "user": {
  8. "phone_number": "9403674214"
  9. }
  10. }
  11. ```
  12.  
  13. __Success Response__ 200 OK
  14. ```json
  15. {
  16. "status": "User Blocked"
  17. }
  18. ```
  19.  
  20. # Unblock a user
  21. ### [Delete] `api/v1/block_users/:phone_number`
  22.  
  23. __Success Response__ 200 OK
  24. ```json
  25. {
  26. "status": "User Block Removed"
  27. }
  28. ```
  29.  
  30. # Blocked user list
  31. ### [GET] `api/v1/block_users`
  32.  
  33. __Success Response__ 200 OK
  34.  
  35. ```json
  36. {
  37. "blocked_users": [
  38. {
  39. "full_name": "Jason Osborne",
  40. "phone_number": "9725551212"
  41. },
  42. {
  43. "full_name": "Homer Simpson",
  44. "phone_number": "8179070975"
  45. }
  46. ]
  47. }
  48. ```
  49.  
  50. # Errors
  51.  
  52. __Unsuccessful Response__ 404 Not Found
  53. ```json
  54. {
  55. "errors": {
  56. "status": "404",
  57. "code": "404",
  58. "title": "Not Found",
  59. "detail": "Resource not found",
  60. "links": {
  61. "block_user":
  62. ["940367421"]
  63. }
  64. }
  65. }
  66. ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement