Advertisement
Guest User

Untitled

a guest
Feb 19th, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1. ## Login [/login]
  2.  
  3. ### Login User -- DONE [POST]
  4.  
  5. + Request (application/json)
  6.  
  7. + Headers
  8.  
  9. Accept: application/json
  10.  
  11. + Attributes
  12.  
  13. + cardNumber: `123456` (string, required) - only numeric characters, exactly 6 characters
  14. + password: `secret` (string, required) - minimum 6 characters
  15.  
  16.  
  17. + Response 200 (application/json)
  18.  
  19. {
  20. "data": {
  21. "accessToken": "eyJ0eXAiOiJ
  22. }
  23. }
  24.  
  25. + Response 400 (application/json)
  26.  
  27. {
  28. "errors": {
  29. "userError": [
  30. "User doesnt exist for given card number"
  31. ],
  32. "credentialsError": [
  33. "Incorrect card number and password combination"
  34. ]
  35. }
  36. }
  37. + Response 422 (VALIDATION ERRORS)
  38.  
  39. {
  40. "message": "The given data was invalid.",
  41. "errors": {
  42. "cardNumber": [
  43. "The card number field is required."
  44. ],
  45. "password": [
  46. "The password field is required."
  47. ]
  48. }
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement