Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1) Авторизация [POST] http://94.250.253.76:4000/api/v1/auth/sign-in
- Request body:
- {
- username: 'string',
- password: 'string'
- }
- Response body:
- {
- success: 'boolean',
- body: {
- user: {
- 'id': 'integer',
- 'username': 'string',
- 'email': 'string',
- 'first_name': 'string',
- 'middle_name': 'string',
- 'last_name': 'string',
- 'phone_number': 'string',
- 'role': 'string' // ('blocked', 'worker', 'admin')
- },
- token: 'string'
- }
- }
- 2) Регистрация [POST] http://94.250.253.76:4000/api/v1/auth/sign-up
- Request body:
- {
- username: 'string',
- password: 'string',
- first_name: 'string',
- last_name: 'string',
- phone_number: 'string'
- }
- Response body:
- {
- success: 'boolean'
- }
- 3) Список всех заявок [GET] http://94.250.253.76:4000/api/v1/bid
- Response body:
- {
- success: true,
- body: [
- {
- 'id': 'integer',
- 'user_id': 'integer',
- 'title': 'string',
- 'customers_name: 'string'',
- 'customers_phone: 'string'',
- 'customers_addres_title: 'string'',
- 'customers_addres_latitude: 'double'',
- 'customers_addres_longtitude': 'double',
- 'customers_district': 'string',
- 'comments': 'string',
- 'status': 'string', // ('active', 'in_progress', 'completed', 'canceled')
- 'created_at': 'integer',
- 'updated_at': 'integer'
- }
- ]
- }
- 4) Создание заявки [POST] http://94.250.253.76:4000/api/v1/bid
- Request body:
- {
- 'title': 'string',
- 'customers_name': 'string',
- 'customers_phone: 'string'',
- 'customers_addres_title: 'string'',
- 'customers_addres_latitude': 'string',
- 'customers_addres_longtitude': 'string',
- 'customers_district': 'string',
- 'comments': 'string'
- }
- Response body:
- {
- success: true,
- body: {
- 'id': 'integer',
- 'user_id': 'integer',
- 'title': 'string',
- 'customers_name: 'string'',
- 'customers_phone: 'string'',
- 'customers_addres_title: 'string'',
- 'customers_addres_latitude: 'double'',
- 'customers_addres_longtitude': 'double',
- 'customers_district': 'string',
- 'comments': 'string',
- 'status': 'string', // ('active', 'in_progress', 'completed', 'canceled')
- 'created_at': 'integer',
- 'updated_at': 'integer'
- }
- }
- 5) Обновление заявки [PATCH] http://94.250.253.76:4000/api/v1/bid/:id
- Request body:
- {
- 'title': 'string',
- 'customers_name': 'string',
- 'customers_phone: 'string'',
- 'customers_addres_title: 'string'',
- 'customers_addres_latitude': 'string',
- 'customers_addres_longtitude': 'string',
- 'customers_district': 'string',
- 'comments': 'string',
- 'status': 'string' // ('active', 'in_progress', 'completed', 'canceled')
- }
- Response body:
- {
- success: true,
- body: {
- 'id': 'integer',
- 'user_id': 'integer',
- 'title': 'string',
- 'customers_name: 'string'',
- 'customers_phone: 'string'',
- 'customers_addres_title: 'string'',
- 'customers_addres_latitude: 'double'',
- 'customers_addres_longtitude': 'double',
- 'customers_district': 'string',
- 'comments': 'string',
- 'status': 'string', // ('active', 'in_progress', 'completed', 'canceled')
- 'created_at': 'integer',
- 'updated_at': 'integer'
- }
- }
- 6) Удаление заявки [DELETE] http://94.250.253.76:4000/api/v1/bid/:id
- Response body:
- {
- success: true,
- body: {
- 'id': 'integer',
- 'user_id': 'integer',
- 'title': 'string',
- 'customers_name: 'string'',
- 'customers_phone: 'string'',
- 'customers_addres_title: 'string'',
- 'customers_addres_latitude: 'double'',
- 'customers_addres_longtitude': 'double',
- 'customers_district': 'string',
- 'comments': 'string',
- 'status': 'string', // ('active', 'in_progress', 'completed', 'canceled')
- 'created_at': 'integer',
- 'updated_at': 'integer'
- }
- }
- 7) Изменение статуса [PATCH] http://94.250.253.76:4000/api/v1/bid/change-status/:id
- Request body:
- {
- 'status': 'string' // ('active', 'in_progress', 'completed', 'canceled')
- }
- Response body:
- {
- success: true,
- body: {
- 'id': 'integer',
- 'user_id': 'integer',
- 'title': 'string',
- 'customers_name: 'string'',
- 'customers_phone: 'string'',
- 'customers_addres_title: 'string'',
- 'customers_addres_latitude: 'double'',
- 'customers_addres_longtitude': 'double',
- 'customers_district': 'string',
- 'comments': 'string',
- 'status': 'string', // ('active', 'in_progress', 'completed', 'canceled')
- 'created_at': 'integer',
- 'updated_at': 'integer'
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement