Create a scoring attributes report
curl --request POST \
--url https://prod.truv.com/v1/scoring_attributes/reports \
--header 'Content-Type: application/json' \
--header 'X-Access-Client-Id: <api-key>' \
--header 'X-Access-Secret: <api-key>' \
--data '
{
"lender_reference": "appl-1234",
"customer_identifier": "cust-9999",
"purpose": "decisioning",
"cutoff_date": "2021-03-31",
"institutions": [
{
"identifier": "inst-9999",
"name": "Bank of America",
"data_source": "aggregation"
}
],
"accounts": [
{
"identifier": "acct-4567",
"institution_identifier": "inst-9999",
"type": "checking",
"balance_amount": 35.22,
"balance_date": "2021-03-31",
"autopay": true
}
],
"transactions": [
{
"identifier": "tran-2222",
"account_identifier": "acct-4567",
"post_date": "2021-03-03",
"amount": -100.03,
"status": "posted",
"description": "Local Merchant Purchase"
}
],
"loan_data_enabled": true
}
'import requests
url = "https://prod.truv.com/v1/scoring_attributes/reports"
payload = {
"lender_reference": "appl-1234",
"customer_identifier": "cust-9999",
"purpose": "decisioning",
"cutoff_date": "2021-03-31",
"institutions": [
{
"identifier": "inst-9999",
"name": "Bank of America",
"data_source": "aggregation"
}
],
"accounts": [
{
"identifier": "acct-4567",
"institution_identifier": "inst-9999",
"type": "checking",
"balance_amount": 35.22,
"balance_date": "2021-03-31",
"autopay": True
}
],
"transactions": [
{
"identifier": "tran-2222",
"account_identifier": "acct-4567",
"post_date": "2021-03-03",
"amount": -100.03,
"status": "posted",
"description": "Local Merchant Purchase"
}
],
"loan_data_enabled": True
}
headers = {
"X-Access-Client-Id": "<api-key>",
"X-Access-Secret": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Access-Client-Id': '<api-key>',
'X-Access-Secret': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
lender_reference: 'appl-1234',
customer_identifier: 'cust-9999',
purpose: 'decisioning',
cutoff_date: '2021-03-31',
institutions: [{identifier: 'inst-9999', name: 'Bank of America', data_source: 'aggregation'}],
accounts: [
{
identifier: 'acct-4567',
institution_identifier: 'inst-9999',
type: 'checking',
balance_amount: 35.22,
balance_date: '2021-03-31',
autopay: true
}
],
transactions: [
{
identifier: 'tran-2222',
account_identifier: 'acct-4567',
post_date: '2021-03-03',
amount: -100.03,
status: 'posted',
description: 'Local Merchant Purchase'
}
],
loan_data_enabled: true
})
};
fetch('https://prod.truv.com/v1/scoring_attributes/reports', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://prod.truv.com/v1/scoring_attributes/reports",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'lender_reference' => 'appl-1234',
'customer_identifier' => 'cust-9999',
'purpose' => 'decisioning',
'cutoff_date' => '2021-03-31',
'institutions' => [
[
'identifier' => 'inst-9999',
'name' => 'Bank of America',
'data_source' => 'aggregation'
]
],
'accounts' => [
[
'identifier' => 'acct-4567',
'institution_identifier' => 'inst-9999',
'type' => 'checking',
'balance_amount' => 35.22,
'balance_date' => '2021-03-31',
'autopay' => true
]
],
'transactions' => [
[
'identifier' => 'tran-2222',
'account_identifier' => 'acct-4567',
'post_date' => '2021-03-03',
'amount' => -100.03,
'status' => 'posted',
'description' => 'Local Merchant Purchase'
]
],
'loan_data_enabled' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Access-Client-Id: <api-key>",
"X-Access-Secret: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://prod.truv.com/v1/scoring_attributes/reports"
payload := strings.NewReader("{\n \"lender_reference\": \"appl-1234\",\n \"customer_identifier\": \"cust-9999\",\n \"purpose\": \"decisioning\",\n \"cutoff_date\": \"2021-03-31\",\n \"institutions\": [\n {\n \"identifier\": \"inst-9999\",\n \"name\": \"Bank of America\",\n \"data_source\": \"aggregation\"\n }\n ],\n \"accounts\": [\n {\n \"identifier\": \"acct-4567\",\n \"institution_identifier\": \"inst-9999\",\n \"type\": \"checking\",\n \"balance_amount\": 35.22,\n \"balance_date\": \"2021-03-31\",\n \"autopay\": true\n }\n ],\n \"transactions\": [\n {\n \"identifier\": \"tran-2222\",\n \"account_identifier\": \"acct-4567\",\n \"post_date\": \"2021-03-03\",\n \"amount\": -100.03,\n \"status\": \"posted\",\n \"description\": \"Local Merchant Purchase\"\n }\n ],\n \"loan_data_enabled\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Access-Client-Id", "<api-key>")
req.Header.Add("X-Access-Secret", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://prod.truv.com/v1/scoring_attributes/reports")
.header("X-Access-Client-Id", "<api-key>")
.header("X-Access-Secret", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"lender_reference\": \"appl-1234\",\n \"customer_identifier\": \"cust-9999\",\n \"purpose\": \"decisioning\",\n \"cutoff_date\": \"2021-03-31\",\n \"institutions\": [\n {\n \"identifier\": \"inst-9999\",\n \"name\": \"Bank of America\",\n \"data_source\": \"aggregation\"\n }\n ],\n \"accounts\": [\n {\n \"identifier\": \"acct-4567\",\n \"institution_identifier\": \"inst-9999\",\n \"type\": \"checking\",\n \"balance_amount\": 35.22,\n \"balance_date\": \"2021-03-31\",\n \"autopay\": true\n }\n ],\n \"transactions\": [\n {\n \"identifier\": \"tran-2222\",\n \"account_identifier\": \"acct-4567\",\n \"post_date\": \"2021-03-03\",\n \"amount\": -100.03,\n \"status\": \"posted\",\n \"description\": \"Local Merchant Purchase\"\n }\n ],\n \"loan_data_enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://prod.truv.com/v1/scoring_attributes/reports")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Access-Client-Id"] = '<api-key>'
request["X-Access-Secret"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"lender_reference\": \"appl-1234\",\n \"customer_identifier\": \"cust-9999\",\n \"purpose\": \"decisioning\",\n \"cutoff_date\": \"2021-03-31\",\n \"institutions\": [\n {\n \"identifier\": \"inst-9999\",\n \"name\": \"Bank of America\",\n \"data_source\": \"aggregation\"\n }\n ],\n \"accounts\": [\n {\n \"identifier\": \"acct-4567\",\n \"institution_identifier\": \"inst-9999\",\n \"type\": \"checking\",\n \"balance_amount\": 35.22,\n \"balance_date\": \"2021-03-31\",\n \"autopay\": true\n }\n ],\n \"transactions\": [\n {\n \"identifier\": \"tran-2222\",\n \"account_identifier\": \"acct-4567\",\n \"post_date\": \"2021-03-03\",\n \"amount\": -100.03,\n \"status\": \"posted\",\n \"description\": \"Local Merchant Purchase\"\n }\n ],\n \"loan_data_enabled\": true\n}"
response = http.request(request)
puts response.read_body{
"report_id": "<string>"
}{
"error": {
"code": "incorrect_parameters",
"message": "Incorrect request body json"
}
}{
"error": {
"code": "authentication_failed",
"message": "No such token"
}
}{
"error": {
"code": "not_authenticated",
"message": "Authentication credentials were not provided."
}
}Scoring Attributes Reports
Create a scoring attributes report
POST
/
v1
/
scoring_attributes
/
reports
Create a scoring attributes report
curl --request POST \
--url https://prod.truv.com/v1/scoring_attributes/reports \
--header 'Content-Type: application/json' \
--header 'X-Access-Client-Id: <api-key>' \
--header 'X-Access-Secret: <api-key>' \
--data '
{
"lender_reference": "appl-1234",
"customer_identifier": "cust-9999",
"purpose": "decisioning",
"cutoff_date": "2021-03-31",
"institutions": [
{
"identifier": "inst-9999",
"name": "Bank of America",
"data_source": "aggregation"
}
],
"accounts": [
{
"identifier": "acct-4567",
"institution_identifier": "inst-9999",
"type": "checking",
"balance_amount": 35.22,
"balance_date": "2021-03-31",
"autopay": true
}
],
"transactions": [
{
"identifier": "tran-2222",
"account_identifier": "acct-4567",
"post_date": "2021-03-03",
"amount": -100.03,
"status": "posted",
"description": "Local Merchant Purchase"
}
],
"loan_data_enabled": true
}
'import requests
url = "https://prod.truv.com/v1/scoring_attributes/reports"
payload = {
"lender_reference": "appl-1234",
"customer_identifier": "cust-9999",
"purpose": "decisioning",
"cutoff_date": "2021-03-31",
"institutions": [
{
"identifier": "inst-9999",
"name": "Bank of America",
"data_source": "aggregation"
}
],
"accounts": [
{
"identifier": "acct-4567",
"institution_identifier": "inst-9999",
"type": "checking",
"balance_amount": 35.22,
"balance_date": "2021-03-31",
"autopay": True
}
],
"transactions": [
{
"identifier": "tran-2222",
"account_identifier": "acct-4567",
"post_date": "2021-03-03",
"amount": -100.03,
"status": "posted",
"description": "Local Merchant Purchase"
}
],
"loan_data_enabled": True
}
headers = {
"X-Access-Client-Id": "<api-key>",
"X-Access-Secret": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Access-Client-Id': '<api-key>',
'X-Access-Secret': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
lender_reference: 'appl-1234',
customer_identifier: 'cust-9999',
purpose: 'decisioning',
cutoff_date: '2021-03-31',
institutions: [{identifier: 'inst-9999', name: 'Bank of America', data_source: 'aggregation'}],
accounts: [
{
identifier: 'acct-4567',
institution_identifier: 'inst-9999',
type: 'checking',
balance_amount: 35.22,
balance_date: '2021-03-31',
autopay: true
}
],
transactions: [
{
identifier: 'tran-2222',
account_identifier: 'acct-4567',
post_date: '2021-03-03',
amount: -100.03,
status: 'posted',
description: 'Local Merchant Purchase'
}
],
loan_data_enabled: true
})
};
fetch('https://prod.truv.com/v1/scoring_attributes/reports', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://prod.truv.com/v1/scoring_attributes/reports",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'lender_reference' => 'appl-1234',
'customer_identifier' => 'cust-9999',
'purpose' => 'decisioning',
'cutoff_date' => '2021-03-31',
'institutions' => [
[
'identifier' => 'inst-9999',
'name' => 'Bank of America',
'data_source' => 'aggregation'
]
],
'accounts' => [
[
'identifier' => 'acct-4567',
'institution_identifier' => 'inst-9999',
'type' => 'checking',
'balance_amount' => 35.22,
'balance_date' => '2021-03-31',
'autopay' => true
]
],
'transactions' => [
[
'identifier' => 'tran-2222',
'account_identifier' => 'acct-4567',
'post_date' => '2021-03-03',
'amount' => -100.03,
'status' => 'posted',
'description' => 'Local Merchant Purchase'
]
],
'loan_data_enabled' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Access-Client-Id: <api-key>",
"X-Access-Secret: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://prod.truv.com/v1/scoring_attributes/reports"
payload := strings.NewReader("{\n \"lender_reference\": \"appl-1234\",\n \"customer_identifier\": \"cust-9999\",\n \"purpose\": \"decisioning\",\n \"cutoff_date\": \"2021-03-31\",\n \"institutions\": [\n {\n \"identifier\": \"inst-9999\",\n \"name\": \"Bank of America\",\n \"data_source\": \"aggregation\"\n }\n ],\n \"accounts\": [\n {\n \"identifier\": \"acct-4567\",\n \"institution_identifier\": \"inst-9999\",\n \"type\": \"checking\",\n \"balance_amount\": 35.22,\n \"balance_date\": \"2021-03-31\",\n \"autopay\": true\n }\n ],\n \"transactions\": [\n {\n \"identifier\": \"tran-2222\",\n \"account_identifier\": \"acct-4567\",\n \"post_date\": \"2021-03-03\",\n \"amount\": -100.03,\n \"status\": \"posted\",\n \"description\": \"Local Merchant Purchase\"\n }\n ],\n \"loan_data_enabled\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Access-Client-Id", "<api-key>")
req.Header.Add("X-Access-Secret", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://prod.truv.com/v1/scoring_attributes/reports")
.header("X-Access-Client-Id", "<api-key>")
.header("X-Access-Secret", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"lender_reference\": \"appl-1234\",\n \"customer_identifier\": \"cust-9999\",\n \"purpose\": \"decisioning\",\n \"cutoff_date\": \"2021-03-31\",\n \"institutions\": [\n {\n \"identifier\": \"inst-9999\",\n \"name\": \"Bank of America\",\n \"data_source\": \"aggregation\"\n }\n ],\n \"accounts\": [\n {\n \"identifier\": \"acct-4567\",\n \"institution_identifier\": \"inst-9999\",\n \"type\": \"checking\",\n \"balance_amount\": 35.22,\n \"balance_date\": \"2021-03-31\",\n \"autopay\": true\n }\n ],\n \"transactions\": [\n {\n \"identifier\": \"tran-2222\",\n \"account_identifier\": \"acct-4567\",\n \"post_date\": \"2021-03-03\",\n \"amount\": -100.03,\n \"status\": \"posted\",\n \"description\": \"Local Merchant Purchase\"\n }\n ],\n \"loan_data_enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://prod.truv.com/v1/scoring_attributes/reports")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Access-Client-Id"] = '<api-key>'
request["X-Access-Secret"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"lender_reference\": \"appl-1234\",\n \"customer_identifier\": \"cust-9999\",\n \"purpose\": \"decisioning\",\n \"cutoff_date\": \"2021-03-31\",\n \"institutions\": [\n {\n \"identifier\": \"inst-9999\",\n \"name\": \"Bank of America\",\n \"data_source\": \"aggregation\"\n }\n ],\n \"accounts\": [\n {\n \"identifier\": \"acct-4567\",\n \"institution_identifier\": \"inst-9999\",\n \"type\": \"checking\",\n \"balance_amount\": 35.22,\n \"balance_date\": \"2021-03-31\",\n \"autopay\": true\n }\n ],\n \"transactions\": [\n {\n \"identifier\": \"tran-2222\",\n \"account_identifier\": \"acct-4567\",\n \"post_date\": \"2021-03-03\",\n \"amount\": -100.03,\n \"status\": \"posted\",\n \"description\": \"Local Merchant Purchase\"\n }\n ],\n \"loan_data_enabled\": true\n}"
response = http.request(request)
puts response.read_body{
"report_id": "<string>"
}{
"error": {
"code": "incorrect_parameters",
"message": "Incorrect request body json"
}
}{
"error": {
"code": "authentication_failed",
"message": "No such token"
}
}{
"error": {
"code": "not_authenticated",
"message": "Authentication credentials were not provided."
}
}Authorizations
Body
application/json
This field indicates the purpose of the report. Valid values are: ‘decisioning’ for FCRA credit decisioning, ‘verification’ for non-FCRA underwriting verifications and ‘analytics’ for retroactive reports used solely for analytical purposes.
Available options:
decisioning, verification, analytics Example:
"decisioning"
Was this page helpful?