Upsert Customer
Creates or updates customer information along with the lead loan information. This endpoint should be used in real-time to report a new customer loan that has just been created by the LMS Lead Post into your management system.
Authorization OAuth 2.0
This request requires OAuth 2.0 authorization.
Header Parameters
Request Parameters
customer_id
stringrequiredThe LMS generated customer ID.
lead_loan
objectrequiredloan_id
stringrequiredThe LMS generated loan ID.
lead_id
integerrequiredThe Decision Cloud generated lead ID.
application_type
stringEnum:
NewReturningRefinancedloan_type
stringEnum:
PaydayInstallmentLine Of Creditloan_status
stringEnum:
PendingExpiredWithdrawnDeniedApprovedOriginatedReversedPast DueWritten OffCurrentPaid In Fullloan_amount
integerrequiredThe principal loan amount in cents.
funded_amount
integerThe amount in cents of cash that was actually supplied to the consumer.
first_payment_date
stringThe first payment due date. Must be a valid date in ISO 8601 format YYYY-MM-DD.
applied_at
stringrequiredThe datetime the application was submitted. Must be a valid date in ISO 8601 format YYYY-MM-DDTHH:mm:ssZ.
POST /api/v1/loan-performance/customers
curl --request POST \
"https://api.decisioncloud.me/api/v1/loan-performance/customers" \
--header "Authorization: Bearer {ACCESS_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"customer_id\": \"{CUSTOMER_ID}\",
\"lead_loan\": {
\"loan_id\": \"{LOAN_ID}\",
\"lead_id\": 1,
\"application_type\": \"New\",
\"loan_type\": \"Installment\",
\"loan_status\": \"Pending\",
\"loan_amount\": 75000,
\"funded_amount\": 35000,
\"first_payment_date\": \"2021-09-25\",
\"applied_at\": \"2021-09-25T04:01:57Z\"
}
}"const url = new URL(
"https://api.decisioncloud.me/api/v1/loan-performance/customers"
);
const headers = {
"Authorization": "Bearer {ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"customer_id": "{CUSTOMER_ID}",
"lead_loan": {
"loan_id": "{LOAN_ID}",
"lead_id": 1,
"application_type": "New",
"loan_type": "Installment",
"loan_status": "Pending",
"loan_amount": 75000,
"funded_amount": 35000,
"first_payment_date": "2021-09-25",
"applied_at": "2021-09-25T04:01:57Z"
}
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://api.decisioncloud.me/api/v1/loan-performance/customers',
[
'headers' => [
'Authorization' => 'Bearer {ACCESS_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'customer_id' => '{CUSTOMER_ID}',
'lead_loan' => [
'loan_id' => '{LOAN_ID}',
'lead_id' => 1,
'application_type' => 'New',
'loan_type' => 'Installment',
'loan_status' => 'Pending',
'loan_amount' => 75000,
'funded_amount' => 35000,
'first_payment_date' => '2021-09-25',
'applied_at' => '2021-09-25T04:01:57Z',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://api.decisioncloud.me/api/v1/loan-performance/customers'
payload = {
"customer_id": "{CUSTOMER_ID}",
"lead_loan": {
"loan_id": "{LOAN_ID}",
"lead_id": 1,
"application_type": "New",
"loan_type": "Installment",
"loan_status": "Pending",
"loan_amount": 75000,
"funded_amount": 35000,
"first_payment_date": "2021-09-25",
"applied_at": "2021-09-25T04:01:57Z"
}
}
headers = {
'Authorization': 'Bearer {ACCESS_TOKEN}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()nullnull