POST /createLoan Create Loan
invokeProductFlow
CreateLoan
Create Lead
This API can be used to create "loan/lead" with "Lendingpad" partner.
In payload, user should provide:
- borrower/coborrower information
- loan information
- property information
- credit information
And relationship information between borrower/coborrower, loan, credit and property.
Example request payload:
Show the rest
{
"request_data": {
"people": [
{
"@id": "person_1",
"@type": "person",
"first_name": "borrower",
"last_name": "user1",
"email_address": "test1@staircase.co",
"phone_number": "1234567890"
},
{
"@id": "person_2",
"@type": "person",
"first_name": "coborrower",
"last_name": "user2",
"email_address": "test2@staircase.co",
"phone_number": "1234567891"
}
],
"loans": [
{
"@id": "loan_1",
"@type": "loan",
"loan_purpose": "purchase",
"loan_type": "conventional",
"occupancy": "primary_residence",
"appraisal_value": 100
"loan_amount": 1000
}
],
"properties": [
{
"@id": "property_1",
"@type": "property",
"full_address_txt": "full_address_txt",
"city_name": "city_name",
"state_name": "VA",
"postal_code": "postal_code",
"property_type": "Attached",
"unit": "1",
"purchase_price": 1000
}
],
"credits": [
{
"@id": "credit_1",
"@type": "credit",
"credit_identifier": "credit_identifier",
"credit_score": 799
}
],
"relationships": [
{
"@id": "relationship_1",
"@type": "finance_relation",
"has_person": "person_1",
"has_loan": "loan_1",
"has_property": "property_1",
"main_applicant": true
},
{
"@id": "relationship_2",
"@type": "finance_relation",
"has_person": "person_2",
"has_loan": "loan_1",
"has_property": "property_1",
"main_applicant": false
},
{
"@id": "relationship_3",
"@type": "person_credit",
"has_person": "person_1",
"has_credit": "credit_1"
}
]
}
}
You can retrieve this invocation status using this API.
Parameter product_name should be lendingpad-los and invocation_id parameter should be the invocation_id value in the product flow invocation response body.
Retrieve a Transaction's Collection
You can use this API to retrieve a transaction's collection.
When you retrieve response collection, you can see loan guid and loan identifier/number in Lendingpad ecosystem.
Example response collection:
{
"loans": [
{
"@id": "202bdccb-44cf-4aee-acf1-339d20d70213",
"@type": "loan",
"loan_identifier": "R001586"
}
]
}
Request
{
"request_data": {
"loans": [
{
"@id": "loan_id",
"@type": "loan",
"loan_purpose": "purchase",
"loan_type": "conventional",
"occupancy": "primary_residence",
"appraisal_value": 100,
"loan_amount": 1000
}
],
"people": [
{
"@id": "person_1",
"@type": "person",
"first_name": "borrower",
"last_name": "user1",
"email_address": "test1@staircase.co",
"phone_number": "1234567890"
},
{
"@id": "person_2",
"@type": "person",
"first_name": "coborrower",
"last_name": "user2",
"email_address": "test2@staircase.co",
"phone_number": "1234567891"
}
],
"properties": [
{
"@id": "property_1",
"@type": "property",
"full_address_txt": "full_address_txt",
"city_name": "city_name",
"state_name": "VA",
"postal_code": "postal_code",
"property_type": "Attached",
"purchase_price": 1000,
"unit": "1"
}
],
"relationships": [
{
"@id": "relationship_1",
"@type": "finance_relation",
"has_person": "person_1",
"has_loan": "loan_1",
"has_property": "property_1",
"main_applicant": true
},
{
"@id": "relationship_2",
"@type": "finance_relation",
"has_person": "person_2",
"has_loan": "loan_1",
"has_property": "property_1",
"main_applicant": false
}
]
}
} Response
Successfully started flow invocation.
{
"invocation_id": "01GY76GA0AKNMVTBS85EMYWN5E",
"transaction_id": "01GY76GA0AKNMVTBS85EMYWN5E",
"request_collection_id": "01GY76GA0AKNMVT9V85EMYWN5E",
"response_collection_id": "01GY76G9V6QN22ZVPFN77EFSP5"
} Request data failed validation
{
"message": "{'data': ['Missing data for required field.']}"
} 403 invalid error
{
"message": "Please check the key you used to call this service",
"url": "https://api.staircase.co/docs/api-reference/customer-account-manager-service.yml/paths/~1products~1refresh/post"
} Resource not found
<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n</body>\r\n</html>\r\n Parameters
1
| Parameter | Type | Example | Description |
|---|---|---|---|
x-api-key required | string header | xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | Environment API Key. |
Request bodyapplication/json
5 fields
application/json| Field | Type | Description |
|---|---|---|
transaction_id | string | Transaction ID used for invocation. |
request_collection_id | string | Request Collection ID. |
response_collection_id | string | Response Collection ID. |
callback_url | string (uri) | Callback URL. |
request_datarequired | object | Request JSON body. |
Response 201application/json
4 fields
201application/jsonSuccessfully started flow invocation.
| Field | Type | Description |
|---|---|---|
invocation_id | string | Invocation ID. |
transaction_id | string | Transaction ID. |
request_collection_id | string | Request collection ID. |
response_collection_id | string | Response collection ID. |
Response 400application/json
1 fields
400application/jsonRequest data failed validation
| Field | Type | Description |
|---|---|---|
message | one of | Message |
Response 403application/json
2 fields
403application/json403 invalid error
| Field | Type | Description |
|---|---|---|
message | string | Error message. |
url | string | Error additional URL. |
Response 404application/json
1 fields
404application/jsonResource not found
| Field | Type | Description |
|---|---|---|
message | string | Message |