· 5 years ago · Nov 20, 2020, 03:06 PM
1components:
2 schemas:
3 admin_response403:
4 description: This endpoint requires admin rights
5 example: You've got no permission to access this page.
6 type: string
7 response200:
8 properties:
9 msg:
10 type: string
11 status:
12 type: string
13 type: object
14 response201:
15 properties:
16 access_token:
17 type: string
18 msg:
19 type: string
20 refresh_token:
21 type: string
22 status:
23 type: string
24 type: object
25 response400:
26 description: bad request
27 properties:
28 msg:
29 type: string
30 status:
31 type: string
32 type: object
33 securitySchemes:
34 bearerAuth:
35 bearerFormat: JWT
36 scheme: bearer
37 type: http
38info:
39 description: |2-
40
41 This is an Unlock documentation
42 Notes:
43 If a request contains Non-latin character, backend will return 400 error with 'non_latin_chars_in_request' message
44
45 title: Unlock documentation
46 version: 0.0.0
47openapi: 3.0.0
48paths:
49 '/api/admin/deal/{id}':
50 get:
51 description: ''
52 parameters:
53 - description: The deal ID
54 in: path
55 name: id
56 required: true
57 schema:
58 type: integer
59 responses:
60 '200':
61 content:
62 application/json:
63 schema:
64 properties:
65 data:
66 properties:
67 assets:
68 type: integer
69 dti_back:
70 format: float
71 type: number
72 dti_front:
73 format: float
74 type: number
75 exchange_rate:
76 format: float
77 nullable: true
78 type: number
79 fico:
80 type: integer
81 number_of_applicants:
82 type: integer
83 number_of_applications:
84 type: integer
85 occupancy:
86 type: string
87 pay_offs:
88 type: integer
89 post_origination_ultv:
90 format: float
91 nullable: true
92 type: number
93 property_address:
94 type: string
95 property_lien_count:
96 type: integer
97 property_valuation:
98 format: float
99 type: number
100 unlock_investment:
101 format: float
102 nullable: true
103 type: number
104 type: object
105 type: object
106 description: 'returns data according to https://jira.agilecode.io/browse/UNLCK-378'
107 '403':
108 $ref: '#/components/schemas/admin_response403'
109 summary: returns deal summary
110 tags:
111 - admin
112 /api/all_data:
113 post:
114 description: ''
115 responses:
116 '200':
117 content:
118 application/json:
119 schema:
120 properties:
121 data:
122 properties:
123 available_property_type:
124 items:
125 type: string
126 type: array
127 available_property_usage:
128 items:
129 type: string
130 type: array
131 estimations:
132 properties:
133 zillow:
134 type: integer
135 type: object
136 type: object
137 status:
138 type: string
139 type: object
140 description: 'returns [''zillow''] estimation'
141 '400':
142 $ref: '#/components/schemas/response400'
143 summary: 'returns data from [''zillow'']'
144 tags:
145 - all_data
146 /api/all_data/calculate:
147 post:
148 description: ''
149 responses:
150 '200':
151 content:
152 application/json:
153 schema:
154 properties:
155 data:
156 properties:
157 max_value:
158 type: integer
159 min_value:
160 type: integer
161 offers:
162 items:
163 properties:
164 offer:
165 type: integer
166 terms:
167 type: integer
168 type: object
169 type: array
170 type: object
171 status:
172 type: string
173 type: object
174 description: |-
175 successful calculation
176 warning may return if max offer exceeds 500000
177 warning = 'Sorry we can’t offer you an offer more than $500 000'
178 if offer_value was sent - a record is being created or updated in the Offer table
179 '400':
180 content:
181 application/json:
182 schema:
183 $ref: '#/components/schemas/response400'
184 description: |-
185 The offer cannot be calculated for the client
186 messages:
187 'ineligible fico' message means that the specified fico < 550 or > 850
188 'Minimum investment guideline reached' message means that with the specified data,
189 the minimum check is greater than the maximum offer (min_check_floor > max_ctv_wer)
190 'ULTV cap reached' message means that the specified Max CTV at Worst ER < ULTV cap
191 'TLTV cap reached' message means that the specified Max CTV at Worst ER <TLTV cap
192 'Share cap reached' message means that the specified Max CTV at Worst ER < Share cap
193 'Max check cap reached' message means that the specified Max CTV at Worst ER < Max Check cap
194 '425':
195 content:
196 application/json:
197 schema:
198 $ref: '#/components/schemas/response400'
199 description: |
200 Possible error messages:
201
202 credit_report_is_not_created_yet - returns when credit report is not in the base yet
203 security:
204 - bearerAuth: []
205 summary: calculate how much user can unlock (preliminary_offer)
206 tags:
207 - all_data
208 /api/all_data/calculate_offers:
209 post:
210 description: ''
211 responses:
212 '200':
213 content:
214 application/json:
215 schema:
216 properties:
217 data:
218 properties:
219 downside_offer:
220 properties:
221 matrix:
222 items:
223 properties:
224 ctv:
225 format: float
226 type: number
227 exchange_rate:
228 format: float
229 type: number
230 offer:
231 type: integer
232 share:
233 format: float
234 type: number
235 terms:
236 type: string
237 tltv:
238 format: float
239 type: number
240 ultv:
241 format: float
242 type: number
243 type: object
244 type: array
245 max_offer:
246 type: integer
247 min_check:
248 type: integer
249 warning:
250 type: string
251 type: object
252 offer:
253 properties:
254 matrix:
255 items:
256 properties:
257 ctv:
258 format: float
259 type: number
260 exchange_rate:
261 format: float
262 type: number
263 offer:
264 type: integer
265 share:
266 format: float
267 type: number
268 terms:
269 type: integer
270 tltv:
271 format: float
272 type: number
273 ultv:
274 format: float
275 type: number
276 type: object
277 type: array
278 max_offer:
279 type: integer
280 min_check:
281 type: integer
282 warning:
283 type: string
284 type: object
285 type: object
286 type: object
287 description: |-
288 successful calculation
289 warning may return if max offer exceeds 500000
290 warning = 'Sorry we can’t offer you an offer more than $500 000'
291 if offer_value was sent - a record is being created or updated in the Offer table
292 if only_current_offer was sent - only the current offer is calculated
293 '400':
294 content:
295 application/json:
296 schema:
297 $ref: '#/components/schemas/response400'
298 description: |
299 The offer cannot be calculated for the client
300
301 messages:
302
303 'ineligible fico' message means that the specified fico < 550 or > 850
304
305 'Minimum investment guideline reached' message means that with the specified data,
306
307 the minimum check is greater than the maximum offer (min_check_floor > max_ctv_wer)
308
309 'ULTV cap reached' message means that the specified Max CTV at Worst ER < ULTV cap
310
311 'TLTV cap reached' message means that the specified Max CTV at Worst ER <TLTV cap
312
313 'Share cap reached' message means that the specified Max CTV at Worst ER < Share cap
314
315 'Max check cap reached' message means that the specified Max CTV at Worst ER < Max Check cap
316 security:
317 - bearerAuth: []
318 summary: 'calculate how much user can unlock (req https://jira.agilecode.io/browse/UNLCK-416)'
319 tags:
320 - all_data
321 - outdated
322 /api/all_data/lock_current_offer:
323 post:
324 description: ''
325 responses:
326 '200':
327 content:
328 application/json:
329 schema:
330 properties:
331 status:
332 type: string
333 type: object
334 description: Offer locked
335 '400':
336 content:
337 application/json:
338 schema:
339 $ref: '#/components/schemas/response400'
340 description: |
341 possible error messages:
342
343 'application_not_found' application not found
344
345 'deal_not_found' deal application not found in application
346
347 'locked_offers_more_than_one' more than one locked offer found (offerA)
348 'no_locked_offers_found' no locked offers found (offerA)
349 'changed_offer_not_found' changed offerB with is_locked = False not found
350
351 This only preliminry flow (prelim_offer=true)
352 'unlocked_offers_more_than_one' more than one unlocked offer found (offerA)
353 'no_unlocked_offers_found' no unlocked offers found(offerA)
354 security:
355 - bearerAuth: []
356 summary: 'Endpoint for locking current offer according to flowchart in https://jira.agilecode.io/browse/UNLCK-365'
357 tags:
358 - all_data
359 /api/all_data/lock_downside_value:
360 post:
361 description: ''
362 responses:
363 '200':
364 content:
365 application/json:
366 schema:
367 properties:
368 status:
369 type: string
370 type: object
371 description: Downside value locked
372 '400':
373 content:
374 application/json:
375 schema:
376 $ref: '#/components/schemas/response400'
377 description: possible error message - 'application_not_found' application not found
378 security:
379 - bearerAuth: []
380 summary: 'Endpoint for locking downside value according to https://jira.agilecode.io/browse/UNLCK-365'
381 tags:
382 - all_data
383 /api/all_data/product_calculator:
384 post:
385 description: ''
386 responses:
387 '200':
388 content:
389 application/json:
390 schema:
391 properties:
392 data:
393 properties:
394 max_value:
395 type: integer
396 min_value:
397 type: integer
398 offers:
399 items:
400 properties:
401 ctv:
402 format: float
403 type: number
404 exchange_rate:
405 format: float
406 type: number
407 offer:
408 type: integer
409 share:
410 format: float
411 type: number
412 terms:
413 type: integer
414 tltv:
415 format: float
416 type: number
417 ultv:
418 format: float
419 type: number
420 type: object
421 type: array
422 type: object
423 status:
424 type: string
425 type: object
426 description: |-
427 successful calculation
428 warning may return if max offer exceeds 500000
429 warning = 'Sorry we can’t offer you an offer more than $500 000'
430 if offer_value was sent - a record is being created or updated in the Offer table
431 '400':
432 content:
433 application/json:
434 schema:
435 $ref: '#/components/schemas/response400'
436 description: |-
437 The offer cannot be calculated for the client
438 messages:
439 'ineligible fico' message means that the specified fico < 550 or > 850
440 'Minimum investment guideline reached' message means that with the specified data,
441 the minimum check is greater than the maximum offer (min_check_floor > max_ctv_wer)
442 'ULTV cap reached' message means that the specified Max CTV at Worst ER < ULTV cap
443 'TLTV cap reached' message means that the specified Max CTV at Worst ER <TLTV cap
444 'Share cap reached' message means that the specified Max CTV at Worst ER < Share cap
445 'Max check cap reached' message means that the specified Max CTV at Worst ER < Max Check cap
446 summary: calculate offers matrix for product calculator
447 tags:
448 - all_data
449 /api/all_data/unlock_current_offer:
450 post:
451 description: ''
452 responses:
453 '200':
454 content:
455 application/json:
456 schema:
457 properties:
458 status:
459 type: string
460 type: object
461 description: Offer unlocked
462 '400':
463 content:
464 application/json:
465 schema:
466 $ref: '#/components/schemas/response400'
467 description: |
468 possible error messages:
469
470 'application_not_found' application not found
471 'deal_not_found' deal application not found in application
472 'locked_offers_more_than_one' more than one locked offer found
473 'no_locked_offers_found' - no locked offers found (OfferA)
474
475 ONLY IF prelim_offer = TRUE
476 'unlocked_offers_more_than_one' - more than one unlocked offer found
477 'no_unlocked_offers_found' - no offers found
478 security:
479 - bearerAuth: []
480 summary: 'Endpoint for unlocking current offer according to flowchart in https://jira.agilecode.io/browse/UNLCK-365'
481 tags:
482 - all_data
483 /api/all_data/unlock_downside_value:
484 get:
485 description: ''
486 responses:
487 '200':
488 content:
489 application/json:
490 schema:
491 properties:
492 status:
493 type: string
494 type: object
495 description: Downside value unlocked
496 '400':
497 content:
498 application/json:
499 schema:
500 $ref: '#/components/schemas/response400'
501 description: possible error message - 'application_not_found' application not found
502 security:
503 - bearerAuth: []
504 summary: 'Endpoint for locking downside value according to https://jira.agilecode.io/browse/UNLCK-365'
505 tags:
506 - all_data
507 /api/application:
508 get:
509 description: ''
510 responses:
511 '200':
512 content:
513 application/json:
514 schema:
515 properties:
516 data:
517 properties:
518 application_fico:
519 type: integer
520 application_self_reported_fico:
521 type: integer
522 credit_report_fail_reason:
523 type: string
524 type: object
525 type: object
526 description: returns credit scores for current user
527 security:
528 - bearerAuth: []
529 summary: return application fico and errors
530 tags:
531 - application
532 - credit report
533 /api/application/credit_score:
534 post:
535 description: ''
536 responses:
537 '200':
538 content:
539 application/json:
540 schema:
541 properties:
542 status:
543 type: string
544 type: object
545 description: credit score recorded
546 '400':
547 content:
548 application/json:
549 schema:
550 $ref: '#/components/schemas/response400'
551 description: |
552 possible error messages
553 unknown_credit_score - credit_score not in 360, 550, 600, 620 or 700
554 security:
555 - bearerAuth: []
556 summary: write users credit score to database
557 tags:
558 - application
559 - credit report
560 '/api/auth/confirm-email/{code}':
561 get:
562 description: ''
563 parameters:
564 - description: 'string with uuid code, for example "12345678123456781234567812345678"'
565 in: path
566 name: code
567 required: true
568 schema:
569 type: string
570 responses:
571 '201':
572 content:
573 application/json:
574 schema:
575 $ref: '#/components/schemas/response201'
576 description: 'email confirmed and user logged in '
577 '400':
578 content:
579 application/json:
580 schema:
581 $ref: '#/components/schemas/response400'
582 description: |
583 possible error messages:
584 'Invalid code' - no entry with this UUID was found
585 'Code already used' - EmailConfirmed with this UUID was already use
586 'Code expired' - EmailConfirmed with this UUID not used in 24 hours
587 summary: email confirmation for user
588 tags:
589 - auth
590 /api/auth/forgot-password:
591 post:
592 description: ''
593 responses:
594 '200':
595 content:
596 application/json:
597 schema:
598 $ref: '#/components/schemas/response200'
599 description: email sent
600 '400':
601 content:
602 application/json:
603 schema:
604 $ref: '#/components/schemas/response400'
605 description: error
606 summary: send email to user with reset password link
607 tags:
608 - auth
609 /api/auth/login:
610 post:
611 description: ''
612 responses:
613 '201':
614 content:
615 application/json:
616 schema:
617 $ref: '#/components/schemas/response201'
618 description: logged in
619 '400':
620 content:
621 application/json:
622 schema:
623 $ref: '#/components/schemas/response400'
624 description: |
625 possible error messages:
626 Bad credentials: user not found or user hasn't password or input_password != current_password or user was deleted
627 summary: login user
628 tags:
629 - auth
630 /api/auth/logout:
631 post:
632 description: ''
633 responses:
634 '200':
635 content:
636 application/json:
637 schema:
638 $ref: '#/components/schemas/response200'
639 description: logout user
640 security:
641 - bearerAuth: []
642 summary: logout
643 tags:
644 - auth
645 /api/auth/refresh:
646 post:
647 description: ''
648 responses:
649 '201':
650 content:
651 application/json:
652 schema:
653 properties:
654 access_token:
655 type: string
656 refresh_token:
657 type: string
658 type: object
659 description: new access and refresh tokens
660 security:
661 - bearerAuth: []
662 summary: refresh token
663 tags:
664 - auth
665 /api/auth/reset-password:
666 post:
667 description: ''
668 responses:
669 '201':
670 content:
671 application/json:
672 schema:
673 $ref: '#/components/schemas/response201'
674 description: password reset and logged in with new credentials
675 '400':
676 content:
677 application/json:
678 schema:
679 $ref: '#/components/schemas/response400'
680 description: |
681 possible error messages:
682 code_not_found - if PasswordRecovery with this code not found
683 code_already_used - if this code was already used
684 code_expired - if 24h passed after code was generated
685 password_too_simple - if password is empty (not sure if it would ever happend)
686 password_do_not_match - if password != confirm_password
687 summary: reset user password using password recovery code
688 tags:
689 - auth
690 /api/auth/signup:
691 post:
692 description: ''
693 responses:
694 '201':
695 content:
696 application/json:
697 schema:
698 $ref: '#/components/schemas/response201'
699 description: User registered
700 '400':
701 content:
702 application/json:
703 schema:
704 $ref: '#/components/schemas/response400'
705 description: |
706 possible error messages:
707 wrong_property_type_or_usage - undefined property type or usage
708 user with this email already exists - user with given email found in database
709 password_too_simple - password not validate
710 summary: Signup user
711 tags:
712 - auth
713 /api/auth/ws-token:
714 get:
715 description: ''
716 responses:
717 '200':
718 content:
719 application/json:
720 schema:
721 properties:
722 status:
723 type: string
724 token:
725 type: string
726 type: object
727 description: password reset and logged in with new credentials
728 security:
729 - bearerAuth: []
730 summary: returns ws token
731 tags:
732 - auth
733 /api/google/autocomplete:
734 post:
735 description: ''
736 responses:
737 '200':
738 content:
739 application/json:
740 schema:
741 properties:
742 data:
743 items:
744 properties:
745 description:
746 type: string
747 structured_formatting:
748 properties:
749 main_test:
750 type: string
751 secondary_text:
752 type: string
753 type: object
754 terms:
755 items:
756 properties:
757 offset:
758 type: string
759 value:
760 type: string
761 type: object
762 type: array
763 type: object
764 type: array
765 status:
766 type: string
767 type: object
768 description: returns suggestions
769 '400':
770 content:
771 application/json:
772 schema:
773 $ref: '#/components/schemas/response400'
774 description: bad request
775 summary: returns suggestions according to user's input
776 tags:
777 - google
778 /api/google/place_details:
779 post:
780 description: ''
781 responses:
782 '200':
783 content:
784 application/json:
785 schema:
786 properties:
787 city:
788 type: string
789 state:
790 type: string
791 zip_code:
792 type: string
793 type: object
794 description: returns suggestions
795 '400':
796 content:
797 application/json:
798 schema:
799 $ref: '#/components/schemas/response400'
800 description: bad request
801 summary: returns place detail
802 tags:
803 - google
804 /api/google/streetview:
805 post:
806 description: ''
807 responses:
808 '200':
809 content:
810 application/json:
811 schema:
812 properties:
813 data:
814 properties:
815 img:
816 type: string
817 type: object
818 type: object
819 description: returns image base64 encoded
820 summary: returns mocked image
821 tags:
822 - google
823 /api/healthcheck:
824 get:
825 description: ''
826 responses:
827 '200':
828 content:
829 application/json:
830 schema:
831 properties:
832 data:
833 properties:
834 db:
835 type: string
836 redis:
837 type: string
838 type: object
839 instance_tag:
840 type: string
841 status:
842 type: string
843 type: object
844 description: Returns assets id if asset was created
845 '500':
846 content:
847 application/json:
848 schema:
849 properties:
850 data:
851 properties:
852 db:
853 type: string
854 redis:
855 type: string
856 type: object
857 status:
858 type: string
859 type: object
860 description: Returns when there are no connection to db or to redis
861 summary: Checking connection to db and redis
862 tags:
863 - healthcheck
864 /api/offer/confirm_prelim_offer:
865 post:
866 description: ''
867 responses:
868 '200':
869 content:
870 application/json:
871 schema:
872 properties:
873 status:
874 type: string
875 type: object
876 description: preliminary offer confirmed
877 '400':
878 content:
879 application/json:
880 schema:
881 $ref: '#/components/schemas/response400'
882 description: |
883 Possible error messages:
884
885 there_is_no_property_in_deal - return when no property was found
886 security:
887 - bearerAuth: []
888 summary: Endpoint for confirmation preliminary offer
889 tags:
890 - offer
891 /api/pipeline:
892 get:
893 description: ''
894 responses:
895 '200':
896 content:
897 application/json:
898 schema:
899 properties:
900 data:
901 items:
902 properties:
903 id:
904 type: integer
905 name:
906 type: string
907 private:
908 type: boolean
909 query:
910 type: string
911 type: object
912 type: array
913 status:
914 type: string
915 type: object
916 description: Pipelines information found
917 security:
918 - bearerAuth: []
919 summary: get pipelines information
920 tags:
921 - pipeline
922 '/api/pipeline/{id}':
923 get:
924 description: ''
925 parameters:
926 - description: The pipeline ID
927 in: path
928 name: id
929 required: true
930 schema:
931 type: integer
932 - description: Size of one page
933 in: query
934 name: page_size
935 required: true
936 schema:
937 type: integer
938 - description: Page number
939 in: query
940 name: page_number
941 required: true
942 schema:
943 type: integer
944 responses:
945 '200':
946 content:
947 application/json:
948 schema:
949 properties:
950 data:
951 properties:
952 columns:
953 items:
954 type: string
955 type: array
956 rows:
957 items:
958 items:
959 type: string
960 type: array
961 type: array
962 type: object
963 last_page:
964 type: boolean
965 status:
966 type: string
967 type: object
968 description: 'Query data found. WARNING: not only a string can be returned in the ''rows'' list'
969 '400':
970 content:
971 application/json:
972 schema:
973 $ref: '#/components/schemas/response400'
974 description: |
975 possible messages:
976 pipeline_not_found - pipeline with given id not found
977 query_execution_error - some errors while executing SQL query
978 security:
979 - bearerAuth: []
980 summary: get data for sql query with given id
981 tags:
982 - pipeline
983 /api/segment/track:
984 post:
985 description: 'possible event_id:<br/>''identify_8'': ''User loads page that requires user to be logged in''<br/>''track_7'': ''Credit Authorization Provided''<br/>''track_5'': ''Property Confirmed''<br/>''track_8'': ''Credit Requested''<br/>https://unlockfin.sharepoint.com/sites/UnlockDevTeam/_layouts/15/Doc.aspx?sourcedoc=%7B861469A2-7BFB-4B17-A619-1D7B00FC68AD%7D&file=Analytics%20Schema.xlsx&action=default&mobileredirect=true'
986 responses:
987 '200':
988 content:
989 application/json:
990 schema:
991 $ref: '#/components/schemas/response200'
992 description: ok
993 '400':
994 content:
995 application/json:
996 schema:
997 $ref: '#/components/schemas/response400'
998 description: |
999 possible error messages:
1000 wrong_event_id - if event_id not in [identify_8, track_7, track_5, track_8]
1001 no_auth_header - events with id [identify_8, track_7, track_8] requires auth headers
1002 summary: traсk segment event
1003 tags:
1004 - segment
1005 /api/user:
1006 delete:
1007 description: ''
1008 responses:
1009 '200':
1010 content:
1011 application/json:
1012 schema:
1013 properties:
1014 status:
1015 type: string
1016 type: object
1017 description: account deleted
1018 '400':
1019 content:
1020 application/json:
1021 schema:
1022 $ref: '#/components/schemas/response400'
1023 description: |
1024 possible error messages:
1025 The password is incorrect: the entered password doesn't match the current password
1026 security:
1027 - bearerAuth: []
1028 summary: delete user's account (set is_deleted=True)
1029 tags:
1030 - user
1031 get:
1032 description: 'NOTE: some fields are nullable, check the ''model'' tab<br/> Also, the "properties" field is added only if the user is a client'
1033 responses:
1034 '200':
1035 content:
1036 application/json:
1037 schema:
1038 properties:
1039 data:
1040 properties:
1041 assets:
1042 items:
1043 properties:
1044 asset_amount:
1045 format: float
1046 type: number
1047 asset_id:
1048 type: integer
1049 asset_type:
1050 type: string
1051 type: object
1052 type: array
1053 available_property_type:
1054 items:
1055 type: string
1056 type: array
1057 available_property_usage:
1058 items:
1059 type: string
1060 type: array
1061 current_step:
1062 nullable: true
1063 type: string
1064 date_of_birth:
1065 pattern: MM/DD/YYYY
1066 type: string
1067 email:
1068 type: string
1069 email_confirmed:
1070 type: boolean
1071 external_id:
1072 type: string
1073 first_name:
1074 nullable: true
1075 type: string
1076 last_name:
1077 nullable: true
1078 type: string
1079 marital_status:
1080 enum:
1081 - Unmarried
1082 - Married
1083 - Separated
1084 - Other
1085 nullable: true
1086 type: string
1087 phone:
1088 nullable: true
1089 type: string
1090 properties:
1091 items:
1092 properties:
1093 property_city:
1094 type: string
1095 property_deal_external_id:
1096 type: string
1097 property_full_address:
1098 type: string
1099 property_line1:
1100 type: string
1101 property_state:
1102 type: string
1103 property_type:
1104 type: string
1105 property_unit:
1106 nullable: true
1107 type: string
1108 property_usage:
1109 type: string
1110 property_zillow_valuation:
1111 format: float
1112 nullable: true
1113 type: number
1114 property_zip:
1115 type: string
1116 type: object
1117 type: array
1118 role:
1119 type: string
1120 ssn:
1121 nullable: true
1122 type: string
1123 type: object
1124 type: object
1125 description: users data
1126 '400':
1127 content:
1128 application/json:
1129 schema:
1130 $ref: '#/components/schemas/response400'
1131 description: error
1132 security:
1133 - bearerAuth: []
1134 summary: get user data
1135 tags:
1136 - client
1137 patch:
1138 description: ''
1139 responses:
1140 '200':
1141 content:
1142 application/json:
1143 schema:
1144 properties:
1145 status:
1146 type: string
1147 type: object
1148 description: password successfully changed
1149 '400':
1150 content:
1151 application/json:
1152 schema:
1153 $ref: '#/components/schemas/response400'
1154 description: |
1155 possible error messages:
1156 bad_credentials: current_password not found
1157 The current password is wrong: if old password user enter is not same as current
1158 New password is the same as the current password - no change: if old_password == new_password(requirement)
1159 security:
1160 - bearerAuth: []
1161 summary: change user password
1162 tags:
1163 - client
1164 post:
1165 description: ''
1166 responses:
1167 '200':
1168 content:
1169 application/json:
1170 schema:
1171 properties:
1172 status:
1173 type: string
1174 type: object
1175 description: Data successfully updated
1176 '400':
1177 content:
1178 application/json:
1179 schema:
1180 $ref: '#/components/schemas/response400'
1181 description: |
1182 possible error messages:
1183 cant_update_profile_credit_report_exists - if trying to update profile after crs request
1184 security:
1185 - bearerAuth: []
1186 summary: Update user information
1187 tags:
1188 - client
1189 /api/user/assets_information:
1190 post:
1191 description: ''
1192 responses:
1193 '200':
1194 content:
1195 application/json:
1196 schema:
1197 properties:
1198 data:
1199 properties:
1200 id:
1201 type: integer
1202 type: object
1203 status:
1204 type: string
1205 type: object
1206 description: Returns asset's id if asset was created
1207 '400':
1208 content:
1209 application/json:
1210 schema:
1211 $ref: '#/components/schemas/response400'
1212 description: |
1213 Possible error messages:
1214
1215 asset_does_not_exist - returns when incorrect asset id was passed
1216 security:
1217 - bearerAuth: []
1218 summary: 'filling Assets information page (req https://jira.agilecode.io/browse/UNLCK-363)'
1219 tags:
1220 - assets
1221 /api/user/change_email:
1222 post:
1223 description: ''
1224 responses:
1225 '200':
1226 content:
1227 application/json:
1228 schema:
1229 properties:
1230 status:
1231 type: string
1232 type: object
1233 description: email confirmation link sent
1234 '400':
1235 content:
1236 application/json:
1237 schema:
1238 properties:
1239 msg:
1240 type: string
1241 status:
1242 type: string
1243 type: object
1244 description: |
1245 possible error messages:
1246 This email is used in another account - if new email already used by someone
1247 security:
1248 - bearerAuth: []
1249 summary: change user email
1250 tags:
1251 - user
1252 /api/user/get_ops_users_info:
1253 get:
1254 description: ''
1255 responses:
1256 '200':
1257 content:
1258 application/json:
1259 schema:
1260 properties:
1261 data:
1262 properties:
1263 ops_users:
1264 items:
1265 properties:
1266 email:
1267 type: string
1268 first_name:
1269 type: string
1270 last_name:
1271 type: string
1272 phone:
1273 type: string
1274 type: object
1275 type: array
1276 type: object
1277 status:
1278 type: string
1279 type: object
1280 description: 'Returns first name, last name, email and phone of every Ops User related to Customer'
1281 '400':
1282 content:
1283 application/json:
1284 schema:
1285 $ref: '#/components/schemas/response400'
1286 description: |
1287 Possible error messages:
1288
1289 customer_has_no_application
1290 customer_has_no_deal
1291 security:
1292 - bearerAuth: []
1293 summary: return information about Ops Users
1294 tags:
1295 - user
1296 /api/user/get_tasks:
1297 get:
1298 description: ''
1299 responses:
1300 '200':
1301 content:
1302 application/json:
1303 schema:
1304 properties:
1305 data:
1306 properties:
1307 tasks:
1308 items:
1309 properties:
1310 id:
1311 type: integer
1312 name:
1313 type: string
1314 type:
1315 type: string
1316 type: object
1317 type: array
1318 type: object
1319 status:
1320 type: string
1321 type: object
1322 description: Returns list of active tradelines
1323 '400':
1324 content:
1325 application/json:
1326 schema:
1327 $ref: '#/components/schemas/response400'
1328 description: |
1329 Possible error messages:
1330
1331 user_has_no_application - return when no application was found
1332 security:
1333 - bearerAuth: []
1334 summary: 'returning all user''s tasks (req https://jira.agilecode.io/browse/UNLCK-364))'
1335 tags:
1336 - tasks
1337 /api/user/income_information:
1338 get:
1339 description: ''
1340 responses:
1341 '200':
1342 content:
1343 application/json:
1344 schema:
1345 properties:
1346 data:
1347 properties:
1348 annual_base_pay:
1349 nullable: true
1350 type: integer
1351 annual_total:
1352 nullable: true
1353 type: integer
1354 income_1ya:
1355 nullable: true
1356 type: integer
1357 income_2ya:
1358 nullable: true
1359 type: integer
1360 income_curr_y:
1361 nullable: true
1362 type: integer
1363 other_income:
1364 nullable: true
1365 type: integer
1366 retirement_income:
1367 nullable: true
1368 type: integer
1369 salary:
1370 nullable: true
1371 type: integer
1372 type: object
1373 type: object
1374 description: ok
1375 '400':
1376 content:
1377 application/json:
1378 schema:
1379 $ref: '#/components/schemas/response400'
1380 description: |-
1381 error
1382 messages:
1383 'no_application' - no Application object was found
1384 security:
1385 - bearerAuth: []
1386 summary: returns all exists income values
1387 tags:
1388 - client
1389 post:
1390 description: ''
1391 responses:
1392 '200':
1393 content:
1394 application/json:
1395 schema:
1396 $ref: '#/components/schemas/response200'
1397 description: ok
1398 '400':
1399 content:
1400 application/json:
1401 schema:
1402 $ref: '#/components/schemas/response400'
1403 description: |-
1404 error
1405 messages:
1406 'no_application' - no Application object was found with the specified id
1407 security:
1408 - bearerAuth: []
1409 summary: 'filling income info (req https://jira.agilecode.io/browse/UNLCK-362)'
1410 tags:
1411 - client
1412 /api/user/liabilities_information:
1413 get:
1414 description: NOTE balance is optional if not(trade_line.name == 'alimony' or trade_line.name == 'child_support')
1415 responses:
1416 '200':
1417 content:
1418 application/json:
1419 schema:
1420 properties:
1421 data:
1422 properties:
1423 preliminary_offer:
1424 type: integer
1425 trade_lines:
1426 items:
1427 properties:
1428 balance:
1429 format: float
1430 type: number
1431 id:
1432 type: integer
1433 name:
1434 type: string
1435 open_date:
1436 format: date-time
1437 type: string
1438 pay_off_amount:
1439 type: integer
1440 payment:
1441 format: float
1442 type: number
1443 required:
1444 - id
1445 - name
1446 - payment
1447 - open_date
1448 - pay_off_amount
1449 type: object
1450 type: array
1451 type: object
1452 status:
1453 type: string
1454 type: object
1455 description: Returns list of active tradelines
1456 '400':
1457 content:
1458 application/json:
1459 schema:
1460 $ref: '#/components/schemas/response400'
1461 description: |
1462 Possible error messages:
1463
1464 tradeline_does_not_exist - returns when incorrect tradeline id was passed
1465 user_has_no_credit_report - return when no credit_report was found
1466 summary: 'filling Liabilities information page (req https://jira.agilecode.io/browse/UNLCK-363)'
1467 tags:
1468 - liabilities
1469 post:
1470 description: '<br/>If endpoint is requested without params, it only returns all user''s tradelines.<br/><br/>If params "tradeline_id" and "amount_to_payoff" are passed, endpoint updates tradeline which id has been passed<br/>and returns tradelines.<br/><br/>If params "monthly_alimony" or "monthly_child_support" are passed, endpoint creates new tradelines and returns<br/>all user''s tradelines'
1471 responses:
1472 '201':
1473 description: tradeline created
1474 '400':
1475 content:
1476 application/json:
1477 schema:
1478 $ref: '#/components/schemas/response400'
1479 description: |
1480 Possible error messages:
1481
1482 tradeline_does_not_exist - returns when incorrect tradeline id was passed
1483 user_has_no_credit_report - return when no credit_report was found
1484 security:
1485 - bearerAuth: []
1486 summary: 'filling Liabilities information page (req https://jira.agilecode.io/browse/UNLCK-363)'
1487 tags:
1488 - liabilities
1489 /api/user/personal_info_1:
1490 post:
1491 description: '<br/>NOTE: last_name and first_name changed only if user has not any credit reports.<br/> phone and dob updated in any case'
1492 responses:
1493 '200':
1494 content:
1495 application/json:
1496 schema:
1497 $ref: '#/components/schemas/response200'
1498 description: ok
1499 '400':
1500 content:
1501 application/json:
1502 schema:
1503 $ref: '#/components/schemas/response400'
1504 description: |
1505 possible error messages:
1506 no errors returns now
1507 security:
1508 - bearerAuth: []
1509 summary: 'filling page 1 personal info (req https://jira.agilecode.io/browse/UNLCK-360)'
1510 tags:
1511 - client
1512 /api/user/personal_info_2:
1513 post:
1514 description: ''
1515 responses:
1516 '200':
1517 content:
1518 application/json:
1519 schema:
1520 $ref: '#/components/schemas/response200'
1521 description: ok
1522 '400':
1523 content:
1524 application/json:
1525 schema:
1526 $ref: '#/components/schemas/response400'
1527 description: |
1528 possible error messages:
1529 relationship_fields_passed - if property_title_held_individually FALSE then property_joint_title_relationship is required
1530 email_fields_passed - if property_joint_title_co_residence TRUE then email is required
1531 user_with_email_exists - if user with one of given emails already exists
1532 security:
1533 - bearerAuth: []
1534 summary: 'filling page 2 personal info (req https://jira.agilecode.io/browse/UNLCK-360)'
1535 tags:
1536 - client
1537 /api/user/personal_info_3:
1538 post:
1539 description: ''
1540 responses:
1541 '200':
1542 content:
1543 application/json:
1544 schema:
1545 $ref: '#/components/schemas/response200'
1546 description: ok
1547 '400':
1548 content:
1549 application/json:
1550 schema:
1551 $ref: '#/components/schemas/response400'
1552 description: |
1553 possible error messages:
1554 customer_with_this_email_not_found - no user with passed email
1555 customer_with_this_email_was_not_invited - user with this email was not invited by another user
1556 security:
1557 - bearerAuth: []
1558 summary: 'filling page 3 personal info (req https://jira.agilecode.io/browse/UNLCK-360)'
1559 tags:
1560 - client
1561 /api/user/resend_confirm_email:
1562 get:
1563 description: ''
1564 responses:
1565 '200':
1566 content:
1567 application/json:
1568 schema:
1569 properties:
1570 status:
1571 type: string
1572 type: object
1573 description: Email was sent
1574 security:
1575 - bearerAuth: []
1576 summary: endpoint for resending confirmation email
1577 tags:
1578 - client
1579 /api/user/update:
1580 patch:
1581 description: ''
1582 responses:
1583 '200':
1584 content:
1585 application/json:
1586 schema:
1587 properties:
1588 status:
1589 type: string
1590 type: object
1591 description: Data successfully updated
1592 '400':
1593 description: |
1594 possible error messages:
1595 cant_update_profile_credit_report_exists - if trying to update profile after crs request
1596 security:
1597 - bearerAuth: []
1598 summary: Update user information (patch)
1599 tags:
1600 - client
1601 /api/user/update_current_step:
1602 patch:
1603 description: ''
1604 responses:
1605 '200':
1606 content:
1607 application/json:
1608 schema:
1609 properties:
1610 status:
1611 type: string
1612 type: object
1613 description: Status updated successfully
1614 security:
1615 - bearerAuth: []
1616 summary: updating user's current step
1617 tags:
1618 - client
1619 '/api/user/upload_file/{file_type}':
1620 post:
1621 description: ''
1622 parameters:
1623 - description: |-
1624 possible file types:
1625 mortgage_statement
1626 most_recent_year_tax_returns
1627 year_prior_to_most_recent_tax_returns
1628 hazard_insurance
1629 identification
1630 proof_of_rent
1631 trust_documents
1632 benefits_letter
1633 in: path
1634 name: file_type
1635 required: true
1636 schema:
1637 type: string
1638 responses:
1639 '200':
1640 content:
1641 application/json:
1642 schema:
1643 properties:
1644 msg:
1645 type: string
1646 type: object
1647 description: File was uploaded
1648 '400':
1649 content:
1650 application/json:
1651 schema:
1652 $ref: '#/components/schemas/response400'
1653 description: |
1654 possible error messages
1655 no_application - customer has no application
1656 no_files_attached - file not attached to request
1657 bad_filename - file_type of extension is not supported
1658 already_uploaded - file of the current type is already uploaded
1659 '413':
1660 content:
1661 application/json:
1662 schema:
1663 $ref: '#/components/schemas/response400'
1664 description: uploaded file is too large
1665 security:
1666 - bearerAuth: []
1667 summary: endpoint for uploading file
1668 tags:
1669 - client
1670 /api/user_property:
1671 delete:
1672 description: ''
1673 responses:
1674 '200':
1675 content:
1676 application/json:
1677 schema:
1678 properties:
1679 status:
1680 type: string
1681 type: object
1682 description: deleted
1683 '400':
1684 content:
1685 application/json:
1686 schema:
1687 $ref: '#/components/schemas/response400'
1688 description: |
1689 possible error messages:
1690 prop_not_found - if reo property for current user not found
1691 security:
1692 - bearerAuth: []
1693 summary: delete customer property
1694 tags:
1695 - user_property
1696 /api/user_property/add_property:
1697 post:
1698 description: ''
1699 responses:
1700 '201':
1701 content:
1702 application/json:
1703 schema:
1704 properties:
1705 data:
1706 properties:
1707 id:
1708 type: integer
1709 type: object
1710 type: object
1711 description: property created
1712 '400':
1713 content:
1714 application/json:
1715 schema:
1716 $ref: '#/components/schemas/response400'
1717 description: |
1718 possible error messages:
1719 invalid_property_occupancy - if occupancy not in [second home, investment]
1720 not_enough_mailing_address_data - if not all field were passed
1721 security:
1722 - bearerAuth: []
1723 summary: create new property
1724 tags:
1725 - user_property
1726 /api/user_property/update_property_info:
1727 post:
1728 description: ''
1729 responses:
1730 '200':
1731 content:
1732 application/json:
1733 schema:
1734 $ref: '#/components/schemas/response200'
1735 description: ok
1736 '400':
1737 content:
1738 application/json:
1739 schema:
1740 $ref: '#/components/schemas/response400'
1741 description: |
1742 possible error messages:
1743 no_mailing_address: when property_type is 'mailing' and customer has no mailing addresses
1744 customer_has_no_application: when has no application
1745 no_credit_report: when there are no credit report in application
1746 no_property_found: when property_type is 'subject' and there are no SubjectProperty
1747 no_prop_id - whet property_type is reo and property_id not passed
1748 invalid_property_type - if property_type not in reo, mailing, subject
1749 wrong_tradeline_id - if existing tradeline id is incorrect
1750 some_mortgage_fields_missing - when not all fields for new tradeline are passed"
1751 security:
1752 - bearerAuth: []
1753 summary: update info about property
1754 tags:
1755 - user_property
1756 /api/user_property/user_property:
1757 get:
1758 description: ''
1759 responses:
1760 '200':
1761 content:
1762 application/json:
1763 schema:
1764 properties:
1765 data:
1766 properties:
1767 available_mortgages:
1768 items:
1769 properties:
1770 account_opened_on:
1771 pattern: MM/DD/YYYY
1772 type: string
1773 id:
1774 type: integer
1775 mortgage_balance:
1776 type: integer
1777 mortgage_company:
1778 type: string
1779 mortgage_payment:
1780 type: number
1781 type: object
1782 type: array
1783 other_properties:
1784 items:
1785 properties:
1786 created_at:
1787 pattern: MM/DD/YYYY
1788 type: string
1789 full_address:
1790 type: string
1791 id:
1792 type: integer
1793 mortgages:
1794 properties:
1795 account_opened_on:
1796 pattern: MM/DD/YYYY
1797 type: string
1798 created_at:
1799 description: 'example - 1601361023.268325 (equivalent for Sep 29 2020 09:30:23)'
1800 type: number
1801 lien_position:
1802 type: string
1803 mortgage_balance:
1804 type: integer
1805 mortgage_company:
1806 type: string
1807 mortgage_payment:
1808 type: number
1809 type: object
1810 name:
1811 type: string
1812 property_city:
1813 type: string
1814 property_line1:
1815 type: string
1816 property_occupancy:
1817 type: string
1818 property_state:
1819 type: string
1820 property_unit:
1821 nullable: true
1822 type: string
1823 property_zip:
1824 type: string
1825 type: object
1826 type: array
1827 subject_property:
1828 properties:
1829 created_at:
1830 pattern: MM/DD/YYYY
1831 type: string
1832 full_address:
1833 type: string
1834 mortgages:
1835 properties:
1836 account_opened_on:
1837 pattern: MM/DD/YYYY
1838 type: string
1839 lien_position:
1840 type: string
1841 mortgage_balance:
1842 type: integer
1843 mortgage_company:
1844 type: string
1845 mortgage_payment:
1846 type: number
1847 сreated_at:
1848 description: 'example - 1601361023.268325 (equivalent for Sep 29 2020 09:30:23)'
1849 type: number
1850 type: object
1851 property_city:
1852 type: string
1853 property_line1:
1854 type: string
1855 property_occupancy:
1856 type: string
1857 property_state:
1858 type: string
1859 property_title:
1860 type: string
1861 property_type:
1862 type: string
1863 property_unit:
1864 nullable: true
1865 type: string
1866 property_zip:
1867 type: string
1868 type: object
1869 type: object
1870 type: object
1871 description: get all user properties and mortgages
1872 security:
1873 - bearerAuth: []
1874 summary: get all user properties and mortgages
1875 tags:
1876 - user_property
1877 - mortgages
1878