Advertisement
Guest User

Untitled

a guest
Feb 12th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.64 KB | None | 0 0
  1. 1) Авторизация [POST] http://94.250.253.76:4000/api/v1/auth/sign-in
  2.  
  3. Request body:
  4. {
  5. username: 'string',
  6. password: 'string'
  7. }
  8.  
  9. Response body:
  10. {
  11. success: 'boolean',
  12. body: {
  13. user: {
  14. 'id': 'integer',
  15. 'username': 'string',
  16. 'email': 'string',
  17. 'first_name': 'string',
  18. 'middle_name': 'string',
  19. 'last_name': 'string',
  20. 'phone_number': 'string',
  21. 'role': 'string' // ('blocked', 'worker', 'admin')
  22. },
  23. token: 'string'
  24. }
  25. }
  26.  
  27.  
  28.  
  29. 2) Регистрация [POST] http://94.250.253.76:4000/api/v1/auth/sign-up
  30.  
  31. Request body:
  32. {
  33. username: 'string',
  34. password: 'string',
  35. first_name: 'string',
  36. last_name: 'string',
  37. phone_number: 'string'
  38. }
  39.  
  40. Response body:
  41. {
  42. success: 'boolean'
  43. }
  44.  
  45.  
  46.  
  47. 3) Список всех заявок [GET] http://94.250.253.76:4000/api/v1/bid
  48.  
  49. Response body:
  50. {
  51. success: true,
  52. body: [
  53. {
  54. 'id': 'integer',
  55. 'user_id': 'integer',
  56. 'title': 'string',
  57. 'customers_name: 'string'',
  58. 'customers_phone: 'string'',
  59. 'customers_addres_title: 'string'',
  60. 'customers_addres_latitude: 'double'',
  61. 'customers_addres_longtitude': 'double',
  62. 'customers_district': 'string',
  63. 'comments': 'string',
  64. 'status': 'string', // ('active', 'in_progress', 'completed', 'canceled')
  65. 'created_at': 'integer',
  66. 'updated_at': 'integer'
  67. }
  68. ]
  69. }
  70.  
  71.  
  72.  
  73. 4) Создание заявки [POST] http://94.250.253.76:4000/api/v1/bid
  74.  
  75. Request body:
  76. {
  77. 'title': 'string',
  78. 'customers_name': 'string',
  79. 'customers_phone: 'string'',
  80. 'customers_addres_title: 'string'',
  81. 'customers_addres_latitude': 'string',
  82. 'customers_addres_longtitude': 'string',
  83. 'customers_district': 'string',
  84. 'comments': 'string'
  85. }
  86.  
  87. Response body:
  88. {
  89. success: true,
  90. body: {
  91. 'id': 'integer',
  92. 'user_id': 'integer',
  93. 'title': 'string',
  94. 'customers_name: 'string'',
  95. 'customers_phone: 'string'',
  96. 'customers_addres_title: 'string'',
  97. 'customers_addres_latitude: 'double'',
  98. 'customers_addres_longtitude': 'double',
  99. 'customers_district': 'string',
  100. 'comments': 'string',
  101. 'status': 'string', // ('active', 'in_progress', 'completed', 'canceled')
  102. 'created_at': 'integer',
  103. 'updated_at': 'integer'
  104. }
  105. }
  106.  
  107.  
  108.  
  109. 5) Обновление заявки [PATCH] http://94.250.253.76:4000/api/v1/bid/:id
  110.  
  111. Request body:
  112. {
  113. 'title': 'string',
  114. 'customers_name': 'string',
  115. 'customers_phone: 'string'',
  116. 'customers_addres_title: 'string'',
  117. 'customers_addres_latitude': 'string',
  118. 'customers_addres_longtitude': 'string',
  119. 'customers_district': 'string',
  120. 'comments': 'string',
  121. 'status': 'string' // ('active', 'in_progress', 'completed', 'canceled')
  122. }
  123.  
  124. Response body:
  125. {
  126. success: true,
  127. body: {
  128. 'id': 'integer',
  129. 'user_id': 'integer',
  130. 'title': 'string',
  131. 'customers_name: 'string'',
  132. 'customers_phone: 'string'',
  133. 'customers_addres_title: 'string'',
  134. 'customers_addres_latitude: 'double'',
  135. 'customers_addres_longtitude': 'double',
  136. 'customers_district': 'string',
  137. 'comments': 'string',
  138. 'status': 'string', // ('active', 'in_progress', 'completed', 'canceled')
  139. 'created_at': 'integer',
  140. 'updated_at': 'integer'
  141. }
  142. }
  143.  
  144.  
  145.  
  146. 6) Удаление заявки [DELETE] http://94.250.253.76:4000/api/v1/bid/:id
  147.  
  148. Response body:
  149. {
  150. success: true,
  151. body: {
  152. 'id': 'integer',
  153. 'user_id': 'integer',
  154. 'title': 'string',
  155. 'customers_name: 'string'',
  156. 'customers_phone: 'string'',
  157. 'customers_addres_title: 'string'',
  158. 'customers_addres_latitude: 'double'',
  159. 'customers_addres_longtitude': 'double',
  160. 'customers_district': 'string',
  161. 'comments': 'string',
  162. 'status': 'string', // ('active', 'in_progress', 'completed', 'canceled')
  163. 'created_at': 'integer',
  164. 'updated_at': 'integer'
  165. }
  166. }
  167.  
  168.  
  169.  
  170. 7) Изменение статуса [PATCH] http://94.250.253.76:4000/api/v1/bid/change-status/:id
  171.  
  172. Request body:
  173. {
  174. 'status': 'string' // ('active', 'in_progress', 'completed', 'canceled')
  175. }
  176.  
  177. Response body:
  178. {
  179. success: true,
  180. body: {
  181. 'id': 'integer',
  182. 'user_id': 'integer',
  183. 'title': 'string',
  184. 'customers_name: 'string'',
  185. 'customers_phone: 'string'',
  186. 'customers_addres_title: 'string'',
  187. 'customers_addres_latitude: 'double'',
  188. 'customers_addres_longtitude': 'double',
  189. 'customers_district': 'string',
  190. 'comments': 'string',
  191. 'status': 'string', // ('active', 'in_progress', 'completed', 'canceled')
  192. 'created_at': 'integer',
  193. 'updated_at': 'integer'
  194. }
  195. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement