Advertisement
Guest User

Untitled

a guest
Jul 24th, 2017
919
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.63 KB | None | 0 0
  1. **Request type:**
  2. * POST
  3.  
  4. **JSON request body:**
  5. * { "userNameAndSurname" : "" , "fourLetterMobicaShortcut" : "" , "userEmailAddress" : "" }
  6.  
  7. **Expected response:**
  8.  
  9. code: 200 OK
  10. - format:
  11.  
  12. `{
  13. "userID": "userID",
  14. "userNameAndSurname": "userNameAndSurname",
  15. "fourLetterMobicaShortcut": "fourLetterMobicaShortcut",
  16. "userEmailAddress": "userEmailAddress"
  17. }`
  18. - example:
  19.  
  20. `{
  21. "userID": "5971c458ca9da41aa484ff26",
  22. "userNameAndSurname": "Name Lastname",
  23. "fourLetterMobicaShortcut": "NALA",
  24. "userEmailAddress": "email.address@mobica.com"
  25. }`
  26.  
  27. code: 400 Bad Request
  28. - format:
  29.  
  30. `{
  31. "errors": [
  32. ""
  33. ]
  34. }`
  35.  
  36. - example:
  37.  
  38. `{
  39. "errors": [
  40. "Niepoprawny 4-cyfrowy skrot Mobicowy.",
  41. "Akceptowalne są tylko e-maile zarejestrowane w domenie mobica.com"
  42. ]
  43. }`
  44.  
  45.  
  46. All 400 Bad Requests errors:
  47. - "Niepoprawny 4-cyfrowy skrot Mobicowy."
  48. - If four letter Mobica shortcut doesn't have 4 characters.
  49. - "Imię i nazwisko nie może być puste."
  50. - If name and surname field is null, or someone entered less than 3 characters.
  51. - "Należy wprowadzić pełne imię i nazwisko."
  52. - If someone entered only name, or last name.
  53. - "Imie i nazwisko nie może być dłuższe niż 255 znaków."
  54. - If someone entered name, or last name with more than 255 characters.
  55. - "Pole e-mail nie może być puste."
  56. - If email field is null.
  57. - "Akceptowalne są tylko e-maile zarejestrowane w domenie mobica.com"
  58. - If someone entered e-mail without @mobica.com domain.
  59. - "E-mail nie może być dłuższy niż 100 znaków."
  60. - If someone entered e-mail with more than 255 characters.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement