{"_id":"5bee5752bdb8cc00557b10f9","project":"59f79e3c584eb200345ceafc","version":{"_id":"5ba178b00a916500030c6a21","project":"59f79e3c584eb200345ceafc","__v":24,"forked_from":"59f79e3c584eb200345ceaff","createdAt":"2015-09-17T03:47:20.956Z","releaseDate":"2015-09-17T03:47:20.956Z","categories":["5ba178b00a916500030c69a2","5ba178b00a916500030c69a3","5ba178b00a916500030c69a4","5ba178b00a916500030c69a5","5ba178b00a916500030c69a6","5ba178b00a916500030c69a7","5ba178b00a916500030c69a8","5ba178b00a916500030c69a9","5ba178b00a916500030c69aa","5ba178b00a916500030c69ab","5ba178b00a916500030c69ac","5afb6888212c690003ae3d3b","5ba178b00a916500030c69ad","5ba178b00a916500030c69ae","5ba2dcbc99f53f0003b97e2c","5babd73fa0ab3e0003ead030","5bb4038be7222e000334dd97","5bb55954478c1300031a44c2","5bb665a1607307000327c81e","5bb6f90229a7fb0003a0650d","5bb7f9bc29a7fb0003a07ac1","5bba58bd7ba7710003bd901d","5bba6dac7ba7710003bd908d","5bba6e257ba7710003bd9090","5bbac87810189c0003e619ea","5bbb9d02b5862c00036266b2","5bbbadb6219c3e000376c2de","5bc417751d1b0000182bf7f6","5bc59e3b2a5b4f0044db5b97","5bc7bbce2262cc0041f6eff2","5bce6a3580a7250031199f34","5bcfac2c4082510019f2d91b","5bcfac3757bed90030e45d68","5bcfac45d305bc0049941539","5bd2a43548bb6f00289c8fad","5bd3a42a026ebe001f66259e","5bd9d5afffe003005b02f97b","5becb7ee85c6b300557662b6"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"3.1.0","version":"3.1"},"category":{"_id":"5ba178b00a916500030c69ae","project":"59f79e3c584eb200345ceafc","version":"5ba178b00a916500030c6a21","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2018-09-16T22:26:26.400Z","from_sync":false,"order":15,"slug":"loans","title":"One-Time Loans"},"user":"5557e76e512c300d007730d1","__v":0,"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-11-16T05:36:18.598Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":1,"body":"Previewing a loan is a POST API call for the Node Resources.\n\nThis API call is just like applying for a one-time loan, but the the loan is not created. This API call should be used to generate a loan preview for the end user before the final loan is created.\n\n##Request\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"POST /v3.1/users/5c26721d877971006217fa5a/nodes HTTP/1.1\\nHost: https://uat-api.synapsefi.com\\nX-SP-USER-IP: 255.127.79.76\\nX-SP-USER: oauth_QqpLD7NBKOmjGR10ZHfvx2JYA6to58lUhnzIaPrF|e83cf6ddcf778e37bfe3d48fc78a6502062fc\\nContent-Type: application/json\\n{\\n  \\\"type\\\": \\\"LOAN-US\\\",\\n  \\\"preview_only\\\":true,\\n  \\\"info\\\": {\\n  \\t\\\"loan_type\\\":\\\"ONE-TIME\\\",\\n    \\\"nickname\\\":\\\"My Loan\\\",\\n    \\\"credit_limit\\\":{\\n    \\t\\\"amount\\\":40.10,\\n    \\t\\\"currency\\\":\\\"USD\\\"\\n    },\\n    \\\"interest\\\": {\\n    \\t\\\"apr\\\": 10,\\n    \\t\\\"cap\\\": 5\\n    },\\n    \\\"payment_node_id\\\":\\\"5c2e4b4c03dfb100680b858f\\\",\\n    \\\"disbursement_node_id\\\":\\\"5c2e4b4c03dfb100680b858f\\\",\\n    \\\"document_id\\\":\\\"2a4a5957a3a62aaac1a0dd0edcae96ea2cdee688ec6337b20745eed8869e3ac8\\\",\\n    \\\"schedule\\\":\\\"MONTHLY\\\",\\n    \\\"next_payment\\\":30,\\n    \\\"num_payments\\\":10\\n  },\\n  \\\"extra\\\":{\\n  \\t\\\"supp_id\\\":\\\"xx123c\\\"\\n  }\\n}\",\n      \"language\": \"http\"\n    },\n    {\n      \"code\": \"curl -X POST \\\\\\n  https://uat-api.synapsefi.com/v3.1/users/5c26721d877971006217fa5a/nodes \\\\\\n  -H 'Content-Type: application/json' \\\\\\n  -H 'X-SP-USER: oauth_QqpLD7NBKOmjGR10ZHfvx2JYA6to58lUhnzIaPrF|e83cf6ddcf778e37bfe3d48fc78a6502062fc' \\\\\\n  -H 'X-SP-USER-IP: 255.127.79.76' \\\\\\n  -d '{\\n  \\\"type\\\": \\\"LOAN-US\\\",\\n  \\\"preview_only\\\":true,\\n  \\\"info\\\": {\\n  \\t\\\"loan_type\\\":\\\"ONE-TIME\\\",\\n    \\\"nickname\\\":\\\"My Loan\\\",\\n    \\\"credit_limit\\\":{\\n    \\t\\\"amount\\\":40.10,\\n    \\t\\\"currency\\\":\\\"USD\\\"\\n    },\\n    \\\"interest\\\": {\\n    \\t\\\"apr\\\": 10,\\n    \\t\\\"cap\\\": 5\\n    },\\n    \\\"payment_node_id\\\":\\\"5c2e4b4c03dfb100680b858f\\\",\\n    \\\"disbursement_node_id\\\":\\\"5c2e4b4c03dfb100680b858f\\\",\\n    \\\"document_id\\\":\\\"2a4a5957a3a62aaac1a0dd0edcae96ea2cdee688ec6337b20745eed8869e3ac8\\\",\\n    \\\"schedule\\\":\\\"MONTHLY\\\",\\n    \\\"next_payment\\\":30,\\n    \\\"num_payments\\\":10\\n  },\\n  \\\"extra\\\":{\\n  \\t\\\"supp_id\\\":\\\"xx123c\\\"\\n  }\\n}'\",\n      \"language\": \"curl\"\n    }\n  ]\n}\n[/block]\n##Response\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n    \\\"error_code\\\": \\\"0\\\",\\n    \\\"http_code\\\": \\\"200\\\",\\n    \\\"limit\\\": 20,\\n    \\\"node_count\\\": 1,\\n    \\\"nodes\\\": [\\n        {\\n            \\\"_id\\\": \\\"PREVIEW\\\",\\n            \\\"_links\\\": {\\n                \\\"self\\\": {\\n                    \\\"href\\\": \\\"https://uat-api.synapsefi.com/v3.1/users/5c26721d877971006217fa5a/nodes/PREVIEW\\\"\\n                }\\n            },\\n            \\\"_v\\\": 2,\\n            \\\"allowed\\\": \\\"CREDIT\\\",\\n            \\\"client\\\": {\\n                \\\"id\\\": \\\"589acd9ecb3cd400fa75ac06\\\",\\n                \\\"name\\\": \\\"SynapseFI\\\"\\n            },\\n            \\\"extra\\\": {\\n                \\\"note\\\": null,\\n                \\\"supp_id\\\": \\\"xx123c\\\"\\n            },\\n            \\\"info\\\": {\\n                \\\"agreements\\\": [\\n                    {\\n                        \\\"type\\\": \\\"LOAN_AGREEMENT\\\",\\n                        \\\"url\\\": \\\"https://cdn.synapsepay.com/uploads/2019/01/03/k1xfaLEi0FRKMOtWTXjSe5rmzvP7DYbh3QVAgoHnUs4IyG0869.pdf\\\"\\n                    }\\n                ],\\n                \\\"balance\\\": {\\n                    \\\"amount\\\": 0,\\n                    \\\"currency\\\": \\\"USD\\\"\\n                },\\n                \\\"credit_limit\\\": {\\n                    \\\"amount\\\": 40.1,\\n                    \\\"currency\\\": \\\"USD\\\"\\n                },\\n                \\\"disbursement_node_id\\\": \\\"5c2e4b4c03dfb100680b858f\\\",\\n                \\\"document_id\\\": \\\"2a4a5957a3a62aaac1a0dd0edcae96ea2cdee688ec6337b20745eed8869e3ac8\\\",\\n                \\\"installment_amount\\\": 4.21,\\n                \\\"installments\\\": [\\n                    {\\n                        \\\"amount\\\": 4.21,\\n                        \\\"date\\\": 1549129843000\\n                    },\\n                    {\\n                        \\\"amount\\\": 4.21,\\n                        \\\"date\\\": 1551549043000\\n                    },\\n                    {\\n                        \\\"amount\\\": 4.21,\\n                        \\\"date\\\": 1554227443000\\n                    },\\n                    {\\n                        \\\"amount\\\": 4.21,\\n                        \\\"date\\\": 1556819443000\\n                    },\\n                    {\\n                        \\\"amount\\\": 4.21,\\n                        \\\"date\\\": 1559497843000\\n                    },\\n                    {\\n                        \\\"amount\\\": 4.21,\\n                        \\\"date\\\": 1562089843000\\n                    },\\n                    {\\n                        \\\"amount\\\": 4.21,\\n                        \\\"date\\\": 1564768243000\\n                    },\\n                    {\\n                        \\\"amount\\\": 4.21,\\n                        \\\"date\\\": 1567446643000\\n                    },\\n                    {\\n                        \\\"amount\\\": 4.21,\\n                        \\\"date\\\": 1570038643000\\n                    },\\n                    {\\n                        \\\"amount\\\": 4.21,\\n                        \\\"date\\\": 1572717043000\\n                    }\\n                ],\\n                \\\"interest\\\": {\\n                    \\\"accrued\\\": 0,\\n                    \\\"apr\\\": 10,\\n                    \\\"cap\\\": 2\\n                },\\n                \\\"loan_type\\\": \\\"ONE-TIME\\\",\\n                \\\"name_on_account\\\": \\\" \\\",\\n                \\\"next_payment\\\": 1549129843000,\\n                \\\"nickname\\\": \\\"My Loan\\\",\\n                \\\"num_payments\\\": 10,\\n                \\\"payment_node_id\\\": \\\"5c2e4b4c03dfb100680b858f\\\",\\n                \\\"schedule\\\": \\\"MONTHLY\\\"\\n            },\\n            \\\"is_active\\\": true,\\n            \\\"timeline\\\": [],\\n            \\\"type\\\": \\\"LOAN-US\\\",\\n            \\\"user_id\\\": \\\"5c26721d877971006217fa5a\\\"\\n        }\\n    ],\\n    \\\"page_count\\\": 1,\\n    \\\"success\\\": true\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Approved\"\n    },\n    {\n      \"code\": \"{\\n    \\\"error_code\\\": \\\"0\\\",\\n    \\\"http_code\\\": \\\"200\\\",\\n    \\\"limit\\\": 20,\\n    \\\"node_count\\\": 1,\\n    \\\"nodes\\\": [\\n        {\\n            \\\"_id\\\": \\\"PREVIEW\\\",\\n            \\\"_links\\\": {\\n                \\\"self\\\": {\\n                    \\\"href\\\": \\\"https://uat-api.synapsefi.com/v3.1/users/5c26721d877971006217fa5a/nodes/PREVIEW\\\"\\n                }\\n            },\\n            \\\"_v\\\": 2,\\n            \\\"allowed\\\": \\\"REJECTED\\\",\\n            \\\"client\\\": {\\n                \\\"id\\\": \\\"589acd9ecb3cd400fa75ac06\\\",\\n                \\\"name\\\": \\\"SynapseFI\\\"\\n            },\\n            \\\"extra\\\": {\\n                \\\"note\\\": \\\"The LOANTYPE amount requested is higher than what we can offer you. Your limit is 100.\\\",\\n                \\\"supp_id\\\": \\\"xx123c\\\"\\n            },\\n            \\\"info\\\": {\\n                \\\"agreements\\\": [\\n                    {\\n                        \\\"type\\\": \\\"ADVERSE_ACTION\\\",\\n                        \\\"url\\\": \\\"https://cdn.synapsepay.com/uploads/2019/01/03/ihEToBrDdLjeuVStqs40nRKPQ2lbWXYkOH0a9Iz7NMwx5ZGvcU.pdf\\\"\\n                    }\\n                ],\\n                \\\"balance\\\": {\\n                    \\\"amount\\\": 0,\\n                    \\\"currency\\\": \\\"USD\\\"\\n                },\\n                \\\"credit_limit\\\": {\\n                    \\\"amount\\\": 0,\\n                    \\\"currency\\\": \\\"USD\\\"\\n                },\\n                \\\"disbursement_node_id\\\": \\\"5c2e4b4c03dfb100680b858f\\\",\\n                \\\"document_id\\\": \\\"2a4a5957a3a62aaac1a0dd0edcae96ea2cdee688ec6337b20745eed8869e3ac8\\\",\\n                \\\"installment_amount\\\": 0,\\n                \\\"installments\\\": [],\\n                \\\"interest\\\": {\\n                    \\\"accrued\\\": 0,\\n                    \\\"apr\\\": 10,\\n                    \\\"cap\\\": 0.05\\n                },\\n                \\\"loan_type\\\": \\\"ONE-TIME\\\",\\n                \\\"name_on_account\\\": \\\" \\\",\\n                \\\"next_payment\\\": null,\\n                \\\"nickname\\\": \\\"My Loan\\\",\\n                \\\"num_payments\\\": 0,\\n                \\\"payment_node_id\\\": \\\"5c2e4b4c03dfb100680b858f\\\",\\n                \\\"schedule\\\": \\\"MONTHLY\\\"\\n            },\\n            \\\"is_active\\\": true,\\n            \\\"timeline\\\": [],\\n            \\\"type\\\": \\\"LOAN-US\\\",\\n            \\\"user_id\\\": \\\"5c26721d877971006217fa5a\\\"\\n        }\\n    ],\\n    \\\"page_count\\\": 1,\\n    \\\"success\\\": true\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Rejected\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"preview-a-one-time-loan","type":"basic","title":"Preview a One-Time Loan"}

Preview a One-Time Loan


Previewing a loan is a POST API call for the Node Resources. This API call is just like applying for a one-time loan, but the the loan is not created. This API call should be used to generate a loan preview for the end user before the final loan is created. ##Request [block:code] { "codes": [ { "code": "POST /v3.1/users/5c26721d877971006217fa5a/nodes HTTP/1.1\nHost: https://uat-api.synapsefi.com\nX-SP-USER-IP: 255.127.79.76\nX-SP-USER: oauth_QqpLD7NBKOmjGR10ZHfvx2JYA6to58lUhnzIaPrF|e83cf6ddcf778e37bfe3d48fc78a6502062fc\nContent-Type: application/json\n{\n \"type\": \"LOAN-US\",\n \"preview_only\":true,\n \"info\": {\n \t\"loan_type\":\"ONE-TIME\",\n \"nickname\":\"My Loan\",\n \"credit_limit\":{\n \t\"amount\":40.10,\n \t\"currency\":\"USD\"\n },\n \"interest\": {\n \t\"apr\": 10,\n \t\"cap\": 5\n },\n \"payment_node_id\":\"5c2e4b4c03dfb100680b858f\",\n \"disbursement_node_id\":\"5c2e4b4c03dfb100680b858f\",\n \"document_id\":\"2a4a5957a3a62aaac1a0dd0edcae96ea2cdee688ec6337b20745eed8869e3ac8\",\n \"schedule\":\"MONTHLY\",\n \"next_payment\":30,\n \"num_payments\":10\n },\n \"extra\":{\n \t\"supp_id\":\"xx123c\"\n }\n}", "language": "http" }, { "code": "curl -X POST \\\n https://uat-api.synapsefi.com/v3.1/users/5c26721d877971006217fa5a/nodes \\\n -H 'Content-Type: application/json' \\\n -H 'X-SP-USER: oauth_QqpLD7NBKOmjGR10ZHfvx2JYA6to58lUhnzIaPrF|e83cf6ddcf778e37bfe3d48fc78a6502062fc' \\\n -H 'X-SP-USER-IP: 255.127.79.76' \\\n -d '{\n \"type\": \"LOAN-US\",\n \"preview_only\":true,\n \"info\": {\n \t\"loan_type\":\"ONE-TIME\",\n \"nickname\":\"My Loan\",\n \"credit_limit\":{\n \t\"amount\":40.10,\n \t\"currency\":\"USD\"\n },\n \"interest\": {\n \t\"apr\": 10,\n \t\"cap\": 5\n },\n \"payment_node_id\":\"5c2e4b4c03dfb100680b858f\",\n \"disbursement_node_id\":\"5c2e4b4c03dfb100680b858f\",\n \"document_id\":\"2a4a5957a3a62aaac1a0dd0edcae96ea2cdee688ec6337b20745eed8869e3ac8\",\n \"schedule\":\"MONTHLY\",\n \"next_payment\":30,\n \"num_payments\":10\n },\n \"extra\":{\n \t\"supp_id\":\"xx123c\"\n }\n}'", "language": "curl" } ] } [/block] ##Response [block:code] { "codes": [ { "code": "{\n \"error_code\": \"0\",\n \"http_code\": \"200\",\n \"limit\": 20,\n \"node_count\": 1,\n \"nodes\": [\n {\n \"_id\": \"PREVIEW\",\n \"_links\": {\n \"self\": {\n \"href\": \"https://uat-api.synapsefi.com/v3.1/users/5c26721d877971006217fa5a/nodes/PREVIEW\"\n }\n },\n \"_v\": 2,\n \"allowed\": \"CREDIT\",\n \"client\": {\n \"id\": \"589acd9ecb3cd400fa75ac06\",\n \"name\": \"SynapseFI\"\n },\n \"extra\": {\n \"note\": null,\n \"supp_id\": \"xx123c\"\n },\n \"info\": {\n \"agreements\": [\n {\n \"type\": \"LOAN_AGREEMENT\",\n \"url\": \"https://cdn.synapsepay.com/uploads/2019/01/03/k1xfaLEi0FRKMOtWTXjSe5rmzvP7DYbh3QVAgoHnUs4IyG0869.pdf\"\n }\n ],\n \"balance\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n },\n \"credit_limit\": {\n \"amount\": 40.1,\n \"currency\": \"USD\"\n },\n \"disbursement_node_id\": \"5c2e4b4c03dfb100680b858f\",\n \"document_id\": \"2a4a5957a3a62aaac1a0dd0edcae96ea2cdee688ec6337b20745eed8869e3ac8\",\n \"installment_amount\": 4.21,\n \"installments\": [\n {\n \"amount\": 4.21,\n \"date\": 1549129843000\n },\n {\n \"amount\": 4.21,\n \"date\": 1551549043000\n },\n {\n \"amount\": 4.21,\n \"date\": 1554227443000\n },\n {\n \"amount\": 4.21,\n \"date\": 1556819443000\n },\n {\n \"amount\": 4.21,\n \"date\": 1559497843000\n },\n {\n \"amount\": 4.21,\n \"date\": 1562089843000\n },\n {\n \"amount\": 4.21,\n \"date\": 1564768243000\n },\n {\n \"amount\": 4.21,\n \"date\": 1567446643000\n },\n {\n \"amount\": 4.21,\n \"date\": 1570038643000\n },\n {\n \"amount\": 4.21,\n \"date\": 1572717043000\n }\n ],\n \"interest\": {\n \"accrued\": 0,\n \"apr\": 10,\n \"cap\": 2\n },\n \"loan_type\": \"ONE-TIME\",\n \"name_on_account\": \" \",\n \"next_payment\": 1549129843000,\n \"nickname\": \"My Loan\",\n \"num_payments\": 10,\n \"payment_node_id\": \"5c2e4b4c03dfb100680b858f\",\n \"schedule\": \"MONTHLY\"\n },\n \"is_active\": true,\n \"timeline\": [],\n \"type\": \"LOAN-US\",\n \"user_id\": \"5c26721d877971006217fa5a\"\n }\n ],\n \"page_count\": 1,\n \"success\": true\n}", "language": "json", "name": "Approved" }, { "code": "{\n \"error_code\": \"0\",\n \"http_code\": \"200\",\n \"limit\": 20,\n \"node_count\": 1,\n \"nodes\": [\n {\n \"_id\": \"PREVIEW\",\n \"_links\": {\n \"self\": {\n \"href\": \"https://uat-api.synapsefi.com/v3.1/users/5c26721d877971006217fa5a/nodes/PREVIEW\"\n }\n },\n \"_v\": 2,\n \"allowed\": \"REJECTED\",\n \"client\": {\n \"id\": \"589acd9ecb3cd400fa75ac06\",\n \"name\": \"SynapseFI\"\n },\n \"extra\": {\n \"note\": \"The LOANTYPE amount requested is higher than what we can offer you. Your limit is 100.\",\n \"supp_id\": \"xx123c\"\n },\n \"info\": {\n \"agreements\": [\n {\n \"type\": \"ADVERSE_ACTION\",\n \"url\": \"https://cdn.synapsepay.com/uploads/2019/01/03/ihEToBrDdLjeuVStqs40nRKPQ2lbWXYkOH0a9Iz7NMwx5ZGvcU.pdf\"\n }\n ],\n \"balance\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n },\n \"credit_limit\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n },\n \"disbursement_node_id\": \"5c2e4b4c03dfb100680b858f\",\n \"document_id\": \"2a4a5957a3a62aaac1a0dd0edcae96ea2cdee688ec6337b20745eed8869e3ac8\",\n \"installment_amount\": 0,\n \"installments\": [],\n \"interest\": {\n \"accrued\": 0,\n \"apr\": 10,\n \"cap\": 0.05\n },\n \"loan_type\": \"ONE-TIME\",\n \"name_on_account\": \" \",\n \"next_payment\": null,\n \"nickname\": \"My Loan\",\n \"num_payments\": 0,\n \"payment_node_id\": \"5c2e4b4c03dfb100680b858f\",\n \"schedule\": \"MONTHLY\"\n },\n \"is_active\": true,\n \"timeline\": [],\n \"type\": \"LOAN-US\",\n \"user_id\": \"5c26721d877971006217fa5a\"\n }\n ],\n \"page_count\": 1,\n \"success\": true\n}", "language": "json", "name": "Rejected" } ] } [/block]