ronikuchan

Format Request dan Response

Jul 13th, 2020
298
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. AUTH
  2. 1. Register
  3. a. Request (JSON)
  4. {
  5. "email": "ronidt@yahoo.com",
  6. "no_tlp": "085712138987",
  7. "password": "roni123"
  8. }
  9.  
  10. b. Response (JSON)
  11. - Success
  12. {
  13. "success": true,
  14. "messages": "Register sukses",
  15. "data": {
  16. "no_tlp": "085712138987",
  17. "email": "ronidt@yahoo.com",
  18. "password": "$2y$10$.m3z55jQHIGqQauJrJdcy.sjGV4YVlobydNow6PbWKgkf0tgwqHoO",
  19. "status": "unverified",
  20. "status_mitra_delivery": "TA",
  21. "api_token": "",
  22. "email_otp": "Bbw1nGnh3FhCSHi1i2IuLgzrjDX3iSCR4CxXA8Vz",
  23. "updated_at": "2020-07-14T03:41:58.000000Z",
  24. "created_at": "2020-07-14T03:41:58.000000Z",
  25. "id": 24
  26. }
  27. }
  28. - Failed
  29. {
  30. "success": false,
  31. "messages": "Email sudah terdaftar, silahkan login dengan akun Anda",
  32. "data": {
  33. "_id": "5f0d29863fad0673ce186f96",
  34. "email": "ronidt@yahoo.com",
  35. "no_tlp": "085712138987",
  36. "status": "unverified",
  37. "status_mitra_delivery": "TA",
  38. "updated_at": "2020-07-14 10:41:58",
  39. "created_at": "2020-07-14 10:41:58",
  40. "role_ids": [
  41. "5f080febc19d8c01e909d01b"
  42. ]
  43. }
  44. }
  45.  
  46. 2. Login
  47. a. Request (JSON)
  48. {
  49. "email": "085712138987",
  50. "password": "roni123",
  51. "login": "mobile",
  52. "login_via":"mobile_delivery",
  53. "token": "mitra"
  54. }
  55.  
  56. b. Response (JSON)
  57. - Success
  58. {
  59. "success": true,
  60. "messages": "Sukses Login",
  61. "data": {
  62. "user": {
  63. "_id": "5f0d29863fad0673ce186f96",
  64. "email": "ronidt@yahoo.com",
  65. "no_tlp": "085712138987",
  66. "status": "unverified",
  67. "status_mitra_delivery": "TA",
  68. "updated_at": "2020-07-14 10:44:44",
  69. "created_at": "2020-07-14 10:41:58",
  70. "role_ids": [
  71. "5f080febc19d8c01e909d01b"
  72. ],
  73. "paket_perdana": true,
  74. "uang": 0,
  75. "address": []
  76. }
  77. }
  78. }
  79.  
  80. - Failed
  81. {
  82. "success": false,
  83. "messages": "User Id atau Password Salah",
  84. "data": null
  85. }
  86.  
  87. 3. UPDATE
  88. a. Request
  89. {
  90. "name": "roniYahooDotCom",
  91. "email": "ronidt@yahoo.com",
  92. "no_tlp": "085712138789",
  93. "rekening_atas_nama": "roniYahooCom",
  94. "no_rekening": "02345678901234567",
  95. "nama_bank": "BCA",
  96. "alamat": "Rt. 001/05,No. 42, Jl. Kemang Utara IX, RT.01,RW.05 Kel, RT.11/RW.4, Duren Tiga, Kec. Pancoran, Kota Jakarta Selatan, Daerah Khusus Ibukota Jakarta 12730, Indonesia",
  97. "coordinate": {
  98. "longitude": 106.82529129087925,
  99. "latitude": -6.25473902102103
  100. },
  101. "patokan_alamat": "Sdn Padurenan 4"
  102. }
  103.  
  104. b. Respone
  105. - Success
  106. {
  107. "success": true,
  108. "messages": "Update Account Success !",
  109. "data": {
  110. "success": true,
  111. "messages": "Update Account Success !",
  112. "data": {
  113. "_id": "5f0ea0b8ceea6a43563d5f36",
  114. "email": "ronidt@yahoo.com",
  115. "no_tlp": "085712138789",
  116. "status": "unverified",
  117. "status_mitra_delivery": "TA",
  118. "updated_at": "2020-07-15 15:19:51",
  119. "created_at": "2020-07-15 13:22:48",
  120. "role_ids": [
  121. "5f080febc19d8c01e909d01b"
  122. ],
  123. "paket_perdana": true,
  124. "uang": 0,
  125. "nama_bank": "BCA",
  126. "name": "roniYahooDotCom",
  127. "no_rekening": "02345678901234567",
  128. "rekening_atas_nama": "roniYahooCom"
  129. }
  130. }
  131. }
  132.  
  133. - Failed
  134. {
  135. "success": false,
  136. "messages": "Nomor Rekening data anda tidak lengkap"
  137. }
Add Comment
Please, Sign In to add comment