curl --request POST \
--url https://prod.truv.com/v1/orders/{id}/employers/ \
--header 'Content-Type: application/json' \
--header 'X-Access-Client-Id: <api-key>' \
--header 'X-Access-Secret: <api-key>' \
--data '
{
"start_date": "2019-08-24",
"end_date": "2019-11-27",
"company_name": "Facebook Demo",
"company_domain": "facebook.com",
"company_logo": "https://cdn.truv.com/company_logos/facebook.svg",
"suborder_number": "133982343355",
"company_mapping_id": "self_employed"
}
'import requests
url = "https://prod.truv.com/v1/orders/{id}/employers/"
payload = {
"start_date": "2019-08-24",
"end_date": "2019-11-27",
"company_name": "Facebook Demo",
"company_domain": "facebook.com",
"company_logo": "https://cdn.truv.com/company_logos/facebook.svg",
"suborder_number": "133982343355",
"company_mapping_id": "self_employed"
}
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({
start_date: '2019-08-24',
end_date: '2019-11-27',
company_name: 'Facebook Demo',
company_domain: 'facebook.com',
company_logo: 'https://cdn.truv.com/company_logos/facebook.svg',
suborder_number: '133982343355',
company_mapping_id: 'self_employed'
})
};
fetch('https://prod.truv.com/v1/orders/{id}/employers/', 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/orders/{id}/employers/",
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([
'start_date' => '2019-08-24',
'end_date' => '2019-11-27',
'company_name' => 'Facebook Demo',
'company_domain' => 'facebook.com',
'company_logo' => 'https://cdn.truv.com/company_logos/facebook.svg',
'suborder_number' => '133982343355',
'company_mapping_id' => 'self_employed'
]),
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/orders/{id}/employers/"
payload := strings.NewReader("{\n \"start_date\": \"2019-08-24\",\n \"end_date\": \"2019-11-27\",\n \"company_name\": \"Facebook Demo\",\n \"company_domain\": \"facebook.com\",\n \"company_logo\": \"https://cdn.truv.com/company_logos/facebook.svg\",\n \"suborder_number\": \"133982343355\",\n \"company_mapping_id\": \"self_employed\"\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/orders/{id}/employers/")
.header("X-Access-Client-Id", "<api-key>")
.header("X-Access-Secret", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"start_date\": \"2019-08-24\",\n \"end_date\": \"2019-11-27\",\n \"company_name\": \"Facebook Demo\",\n \"company_domain\": \"facebook.com\",\n \"company_logo\": \"https://cdn.truv.com/company_logos/facebook.svg\",\n \"suborder_number\": \"133982343355\",\n \"company_mapping_id\": \"self_employed\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://prod.truv.com/v1/orders/{id}/employers/")
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 \"start_date\": \"2019-08-24\",\n \"end_date\": \"2019-11-27\",\n \"company_name\": \"Facebook Demo\",\n \"company_domain\": \"facebook.com\",\n \"company_logo\": \"https://cdn.truv.com/company_logos/facebook.svg\",\n \"suborder_number\": \"133982343355\",\n \"company_mapping_id\": \"self_employed\"\n}"
response = http.request(request)
puts response.read_body{
"id": "ad9f14440d624ec3b0f66e81e44518c7",
"status": "pending",
"created_at": "2021-04-21T22:12:59.346109Z",
"employments": [
{
"id": "24d7e80942ce4ad58a93f70ce4115f5c",
"profile": {
"first_name": "John",
"last_name": "Doe",
"id": "48427a36d43c4d5aa6324bc06c692456",
"created_at": "2022-06-07T15:00:00Z",
"updated_at": "2022-06-30T15:00:00Z",
"full_name": "John Doe",
"middle_initials": "K",
"email": "john.doe@example.com",
"ssn": "123456789",
"date_of_birth": "1992-03-03",
"home_address": {
"street": "1 Morgan Ave",
"city": "Los Angeles",
"state": "CA",
"zip": "90210",
"country": "US"
}
},
"company": {
"name": "Facebook Demo",
"address": {
"street": "1 Morgan Ave",
"city": "Los Angeles",
"state": "CA",
"zip": "90210",
"country": "US"
},
"phone": "6503087300",
"ein": "12-345678"
},
"income": "70000.00",
"income_unit": "YEARLY",
"pay_rate": "6500.00",
"pay_frequency": "M",
"statements": [
{
"pay_date": "2018-05-15",
"id": "24d7e80942ce4ad58a93f70ce4115f5c",
"check_number": "29205182",
"net_pay": "11500.32",
"net_pay_ytd": "31980.64",
"gross_pay": "13900.11",
"gross_pay_ytd": "49200.00",
"bonus": "100.00",
"commission": "12000.00",
"hours": "40.00",
"basis_of_pay": "S",
"period_start": "2018-05-01",
"period_end": "2018-05-15",
"regular": "1695.11",
"regular_ytd": "23000.00",
"other_pay_ytd": "700.00",
"bonus_ytd": "1000.00",
"commission_ytd": "24000.00",
"overtime": "45.00",
"overtime_ytd": "500.00",
"other_pay": "60.00",
"earnings": [
{
"name": "Regular",
"amount": "1935.77",
"category": "regular",
"rate": null,
"units": null
},
{
"name": "Overtime",
"amount": "60.58",
"category": "overtime",
"rate": "30.29",
"units": "2"
}
],
"earnings_ytd": [
{
"name": "Regular",
"amount": "1935.77",
"category": "regular",
"rate": null,
"units": null
},
{
"name": "Overtime",
"amount": "60.58",
"category": "overtime",
"rate": "30.29",
"units": "2"
}
],
"deductions": [
{
"name": "Social Security Tax",
"amount": "127.01",
"category": "socialsec"
},
{
"name": "VA State Income Tax",
"amount": "46.23",
"category": "state"
},
{
"name": "Medicare Tax",
"amount": "29.7",
"category": "medicare"
}
],
"deductions_ytd": [
{
"name": "Social Security Tax",
"amount": "127.01",
"category": "socialsec"
},
{
"name": "VA State Income Tax",
"amount": "46.23",
"category": "state"
},
{
"name": "Medicare Tax",
"amount": "29.7",
"category": "medicare"
}
],
"md5sum": "03639d6a6624f69a54a88ea90bd25e9d",
"file": "https://cdn.truv.com/paystub_sample.pdf",
"derived_fields": [
"basis_of_pay"
],
"missing_data_fields": [
"earnings_ytd"
]
}
],
"annual_income_summary": [
{
"id": "24d7e80942ce4ad58a93f70ce4115f5c",
"year": 2018,
"regular": "23000.00",
"bonus": "1000.00",
"commission": "24000.00",
"overtime": "500.00",
"other_pay": "700.00",
"net_pay": "31980.64",
"gross_pay": "49200.00"
}
],
"bank_accounts": [
{
"account_number": "1234567890",
"routing_number": "123456789",
"account_name": "My Bank",
"account_type": "C",
"deposit_type": "A",
"deposit_value": "200.00",
"bank_name": "TD Bank"
}
],
"w2s": [
{
"file": "https://cdn.truv.com/W2_sample.pdf",
"md5sum": "f65e30c39124ad707ac4b3aeaee923a7",
"year": 2020,
"wages": "900.50",
"federal_tax": "75.01",
"social_security_wages": "900.50",
"social_security_tax": "56.30",
"medicare_wages": "900.50",
"medicare_tax": "13.15",
"gross_pay": "18211.48"
}
],
"is_active": false,
"job_title": "PR associate",
"job_type": "F",
"start_date": "2018-01-01",
"original_hire_date": "2017-06-21",
"end_date": "2023-12-25",
"external_last_updated": "2023-12-25",
"dates_from_statements": false,
"derived_fields": [
"is_active"
],
"missing_data_fields": [
"w2s"
],
"manager_name": "Jenny McDouglas"
}
],
"product_type": "income",
"suborder_number": "133982343355",
"bridge_token": "e4100fccdae94691b4414c7306220c06",
"link_id": "e4100fccdae94691b4414c7306220c06",
"access_token": "e4100fccdae94691b4414c7306220c06",
"pdf_report": "https://cdn.truv.com/report.pdf",
"data_source": "payroll",
"provider": {
"id": "truv_api",
"name": "Sandbox Provider",
"logo_url": "https://cdn.truv.com/providers/truv-blue.svg"
},
"is_suspicious": true,
"start_date": "2019-08-24",
"end_date": "2019-11-27",
"company_name": "Facebook Demo",
"company_address": {
"street": "1 Hacker Way",
"city": "Menlo Park",
"state": "CA",
"zip": "94025"
},
"company_domain": "facebook.com",
"company_logo": "https://cdn.truv.com/company_logos/facebook.svg"
}{
"error": {
"code": "incorrect_parameters",
"message": "Incorrect request parameters",
"extra": {
"invalid-params": [
{
"field": "access_token",
"message": "This field is required."
}
]
}
}
}{
"error": {
"code": "authentication_failed",
"message": "No such token"
}
}{
"error": {
"code": "not_authenticated",
"message": "Authentication credentials were not provided."
}
}Add new employer to the existing order
The endpoint allows to add new employer to the existing order. The order should not be expired or canceled.
curl --request POST \
--url https://prod.truv.com/v1/orders/{id}/employers/ \
--header 'Content-Type: application/json' \
--header 'X-Access-Client-Id: <api-key>' \
--header 'X-Access-Secret: <api-key>' \
--data '
{
"start_date": "2019-08-24",
"end_date": "2019-11-27",
"company_name": "Facebook Demo",
"company_domain": "facebook.com",
"company_logo": "https://cdn.truv.com/company_logos/facebook.svg",
"suborder_number": "133982343355",
"company_mapping_id": "self_employed"
}
'import requests
url = "https://prod.truv.com/v1/orders/{id}/employers/"
payload = {
"start_date": "2019-08-24",
"end_date": "2019-11-27",
"company_name": "Facebook Demo",
"company_domain": "facebook.com",
"company_logo": "https://cdn.truv.com/company_logos/facebook.svg",
"suborder_number": "133982343355",
"company_mapping_id": "self_employed"
}
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({
start_date: '2019-08-24',
end_date: '2019-11-27',
company_name: 'Facebook Demo',
company_domain: 'facebook.com',
company_logo: 'https://cdn.truv.com/company_logos/facebook.svg',
suborder_number: '133982343355',
company_mapping_id: 'self_employed'
})
};
fetch('https://prod.truv.com/v1/orders/{id}/employers/', 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/orders/{id}/employers/",
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([
'start_date' => '2019-08-24',
'end_date' => '2019-11-27',
'company_name' => 'Facebook Demo',
'company_domain' => 'facebook.com',
'company_logo' => 'https://cdn.truv.com/company_logos/facebook.svg',
'suborder_number' => '133982343355',
'company_mapping_id' => 'self_employed'
]),
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/orders/{id}/employers/"
payload := strings.NewReader("{\n \"start_date\": \"2019-08-24\",\n \"end_date\": \"2019-11-27\",\n \"company_name\": \"Facebook Demo\",\n \"company_domain\": \"facebook.com\",\n \"company_logo\": \"https://cdn.truv.com/company_logos/facebook.svg\",\n \"suborder_number\": \"133982343355\",\n \"company_mapping_id\": \"self_employed\"\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/orders/{id}/employers/")
.header("X-Access-Client-Id", "<api-key>")
.header("X-Access-Secret", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"start_date\": \"2019-08-24\",\n \"end_date\": \"2019-11-27\",\n \"company_name\": \"Facebook Demo\",\n \"company_domain\": \"facebook.com\",\n \"company_logo\": \"https://cdn.truv.com/company_logos/facebook.svg\",\n \"suborder_number\": \"133982343355\",\n \"company_mapping_id\": \"self_employed\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://prod.truv.com/v1/orders/{id}/employers/")
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 \"start_date\": \"2019-08-24\",\n \"end_date\": \"2019-11-27\",\n \"company_name\": \"Facebook Demo\",\n \"company_domain\": \"facebook.com\",\n \"company_logo\": \"https://cdn.truv.com/company_logos/facebook.svg\",\n \"suborder_number\": \"133982343355\",\n \"company_mapping_id\": \"self_employed\"\n}"
response = http.request(request)
puts response.read_body{
"id": "ad9f14440d624ec3b0f66e81e44518c7",
"status": "pending",
"created_at": "2021-04-21T22:12:59.346109Z",
"employments": [
{
"id": "24d7e80942ce4ad58a93f70ce4115f5c",
"profile": {
"first_name": "John",
"last_name": "Doe",
"id": "48427a36d43c4d5aa6324bc06c692456",
"created_at": "2022-06-07T15:00:00Z",
"updated_at": "2022-06-30T15:00:00Z",
"full_name": "John Doe",
"middle_initials": "K",
"email": "john.doe@example.com",
"ssn": "123456789",
"date_of_birth": "1992-03-03",
"home_address": {
"street": "1 Morgan Ave",
"city": "Los Angeles",
"state": "CA",
"zip": "90210",
"country": "US"
}
},
"company": {
"name": "Facebook Demo",
"address": {
"street": "1 Morgan Ave",
"city": "Los Angeles",
"state": "CA",
"zip": "90210",
"country": "US"
},
"phone": "6503087300",
"ein": "12-345678"
},
"income": "70000.00",
"income_unit": "YEARLY",
"pay_rate": "6500.00",
"pay_frequency": "M",
"statements": [
{
"pay_date": "2018-05-15",
"id": "24d7e80942ce4ad58a93f70ce4115f5c",
"check_number": "29205182",
"net_pay": "11500.32",
"net_pay_ytd": "31980.64",
"gross_pay": "13900.11",
"gross_pay_ytd": "49200.00",
"bonus": "100.00",
"commission": "12000.00",
"hours": "40.00",
"basis_of_pay": "S",
"period_start": "2018-05-01",
"period_end": "2018-05-15",
"regular": "1695.11",
"regular_ytd": "23000.00",
"other_pay_ytd": "700.00",
"bonus_ytd": "1000.00",
"commission_ytd": "24000.00",
"overtime": "45.00",
"overtime_ytd": "500.00",
"other_pay": "60.00",
"earnings": [
{
"name": "Regular",
"amount": "1935.77",
"category": "regular",
"rate": null,
"units": null
},
{
"name": "Overtime",
"amount": "60.58",
"category": "overtime",
"rate": "30.29",
"units": "2"
}
],
"earnings_ytd": [
{
"name": "Regular",
"amount": "1935.77",
"category": "regular",
"rate": null,
"units": null
},
{
"name": "Overtime",
"amount": "60.58",
"category": "overtime",
"rate": "30.29",
"units": "2"
}
],
"deductions": [
{
"name": "Social Security Tax",
"amount": "127.01",
"category": "socialsec"
},
{
"name": "VA State Income Tax",
"amount": "46.23",
"category": "state"
},
{
"name": "Medicare Tax",
"amount": "29.7",
"category": "medicare"
}
],
"deductions_ytd": [
{
"name": "Social Security Tax",
"amount": "127.01",
"category": "socialsec"
},
{
"name": "VA State Income Tax",
"amount": "46.23",
"category": "state"
},
{
"name": "Medicare Tax",
"amount": "29.7",
"category": "medicare"
}
],
"md5sum": "03639d6a6624f69a54a88ea90bd25e9d",
"file": "https://cdn.truv.com/paystub_sample.pdf",
"derived_fields": [
"basis_of_pay"
],
"missing_data_fields": [
"earnings_ytd"
]
}
],
"annual_income_summary": [
{
"id": "24d7e80942ce4ad58a93f70ce4115f5c",
"year": 2018,
"regular": "23000.00",
"bonus": "1000.00",
"commission": "24000.00",
"overtime": "500.00",
"other_pay": "700.00",
"net_pay": "31980.64",
"gross_pay": "49200.00"
}
],
"bank_accounts": [
{
"account_number": "1234567890",
"routing_number": "123456789",
"account_name": "My Bank",
"account_type": "C",
"deposit_type": "A",
"deposit_value": "200.00",
"bank_name": "TD Bank"
}
],
"w2s": [
{
"file": "https://cdn.truv.com/W2_sample.pdf",
"md5sum": "f65e30c39124ad707ac4b3aeaee923a7",
"year": 2020,
"wages": "900.50",
"federal_tax": "75.01",
"social_security_wages": "900.50",
"social_security_tax": "56.30",
"medicare_wages": "900.50",
"medicare_tax": "13.15",
"gross_pay": "18211.48"
}
],
"is_active": false,
"job_title": "PR associate",
"job_type": "F",
"start_date": "2018-01-01",
"original_hire_date": "2017-06-21",
"end_date": "2023-12-25",
"external_last_updated": "2023-12-25",
"dates_from_statements": false,
"derived_fields": [
"is_active"
],
"missing_data_fields": [
"w2s"
],
"manager_name": "Jenny McDouglas"
}
],
"product_type": "income",
"suborder_number": "133982343355",
"bridge_token": "e4100fccdae94691b4414c7306220c06",
"link_id": "e4100fccdae94691b4414c7306220c06",
"access_token": "e4100fccdae94691b4414c7306220c06",
"pdf_report": "https://cdn.truv.com/report.pdf",
"data_source": "payroll",
"provider": {
"id": "truv_api",
"name": "Sandbox Provider",
"logo_url": "https://cdn.truv.com/providers/truv-blue.svg"
},
"is_suspicious": true,
"start_date": "2019-08-24",
"end_date": "2019-11-27",
"company_name": "Facebook Demo",
"company_address": {
"street": "1 Hacker Way",
"city": "Menlo Park",
"state": "CA",
"zip": "94025"
},
"company_domain": "facebook.com",
"company_logo": "https://cdn.truv.com/company_logos/facebook.svg"
}{
"error": {
"code": "incorrect_parameters",
"message": "Incorrect request parameters",
"extra": {
"invalid-params": [
{
"field": "access_token",
"message": "This field is required."
}
]
}
}
}{
"error": {
"code": "authentication_failed",
"message": "No such token"
}
}{
"error": {
"code": "not_authenticated",
"message": "Authentication credentials were not provided."
}
}Authorizations
Client ID
Client Access Key
Path Parameters
Order ID received from the POST request
Body
Job start date
"2019-08-24"
Job end date
"2019-11-27"
Company name
"Facebook Demo"
Company address
Show child attributes
Show child attributes
Company website domain
"facebook.com"
Company logo URL
"https://cdn.truv.com/company_logos/facebook.svg"
External ID
"133982343355"
Company mapping ID
"self_employed"
Response
Unique ID
"ad9f14440d624ec3b0f66e81e44518c7"
Order status
pending, sent, completed, error, canceled, expired, no_data, skipped "pending"
Date and time when order was created
"2021-04-21T22:12:59.346109Z"
List of employments
Show child attributes
Show child attributes
Type of the product.
income, employment, deposit_switch, pll "income"
External ID
"133982343355"
UUID value of bridge token
"e4100fccdae94691b4414c7306220c06"
Link ID for the connected account
"e4100fccdae94691b4414c7306220c06"
Access token to perform data refresh
"e4100fccdae94691b4414c7306220c06"
Verification report in PDF format
"https://cdn.truv.com/report.pdf"
Source of data: payroll - payroll provider parsing, docs - user uploaded documents, tax - tax documents, financial_accounts - bank data.
payroll, docs, tax, financial_accounts, null "payroll"
Payroll or insurance provider
Show child attributes
Show child attributes
Flag to indicate if the data from the source is suspicious. E.g. fraud detected in uploaded documents or SSN of the user does not match with the data
Employment start date
"2019-08-24"
Employment start date
"2019-11-27"
Company name
"Facebook Demo"
Company address
Show child attributes
Show child attributes
Company website domain
"facebook.com"
Company logo URL
"https://cdn.truv.com/company_logos/facebook.svg"
Was this page helpful?