Smart Data Audit
Description
The Smart Data Audit API can be used to get detailed information about report data returned as part of the data inquiry response. The audit data can be retrieved using the report_id returned as part of the submit transaction. The Smart Data Audit API will return the details about every data element provisioned as part of the data package.
Authentication
- This endpoint requires an access token from the authentication endpoint in the same environment.
- Include it as a bearer token in an Authorization header for the request.
- Access tokens are valid for 12 hours.
Authentication URL:
POST https://boldpenguin-auth-uat.beta.boldpenguin.com/auth/token?grant_type=client_credentials
Accessing the Smart Data Audit API
Step 1: Get the auth token
- The first step is to obtain the auth token. You must submit the shared credentials as a basic authentication header.
- Combine your Client ID and Client Secret separated by a colon, (client_id:client_secret), then apply Base64 encoding.
Sample Authentication Request
POST /auth/token?grant_type=client_credentials HTTP/1.1
Host: boldpenguin-auth-uat.beta.boldpenguin.com
Authorization: Basic OXlXUHY5NTlqV1laWEsxSzVncmRKaW9MbnlYSll4U3Y6TkRVNFFwZ1BaUmFTS0F0elFuNkNOVDd5UkIyakd0ZkNINFVRRUNvblJtaGhKM0t6OE5IMkJBTkVCMkw5a2FOZg==
Cookie: XXXXXX
Sample Authentication Response
{
"access_token": "MMav2m8jTZbbEK48o6CUM94K",
"token_type": "bearer",
"expires_in": 43200,
"refresh_token": "vhKk1DALCT4MWFvvCENSgKmr",
"scope": "",
"uid": "a8ceaae5-7d8a-46b7-8d9a-c01c85edc8d3",
"info": {
"name": "SmartData Integrations Service Client",
"email": null,
"first_name": "SmartData Integrations",
"last_name": "Service Client"
},
"extra": {
"raw_info": {
"user_id": "cfacd9bb-88bf-4e1c-9d78-2221dee96da2",
"tenant_id": "1cfa5f74-2c13-490d-ace1-9dc5c7173d14",
"tenant_name": "kowalski",
"tenant_theme": "default",
"primary_user_group_id": "94a8e3fb-a0ae-41ad-838f-56217f28ac4e",
"user_group_ids": [
"94a8e3fb-a0ae-41ad-838f-56217f28ac4e"
],
"name": "SmartData Integrations Service Client",
"email": null,
"first_name": "SmartData Integrations",
"last_name": "Service Client",
"phone": null,
"permissions": [
"::audit/v1/report:post",
"::universal/v1/universal-submit:get",
"::universal/v1/universal-submit:post",
"::data/v1:get",
"::company/v1/quick_submit:post",
"::company/v1/company_submit:post"
],
"auth_uid": null,
"created_at": "2021-05-13T14:17:31.001Z",
"completed_steps": [],
"accepted_agreements": [],
"plan_sku": null,
"sub_status": null
}
}
}
Tokens expire after 12 hours, after which point you can use the refresh_token to refresh the token or request a new access token using the steps above.
Step 2: Access the Smart Data Audit API
Audit URL: Get the audit for all the data points as part of the data package
POST https://api-smartdata.di-beta.boldpenguin.com/audit/v1/report/triangulation
Pass the following variables as part of the request
Request Parameters | Comments |
---|---|
Authentication Token | The token obtained in STEP 1 |
API Key | (Shared with the Customer) |
POST Request Body | Data_package_id: (Shared with Customer) |
Report_id: | (Returned as part of the company submit response) |
Tenant_id: | (Shared with Customer) |
The response from the audit will contain the audit_response[ ] list which will have details for every data element in the data package. The following are the audit details for every data element.
Response Parameters | Comments |
---|---|
data_element_id | UniqueId for the data element |
data_element_name | The business name for the data element |
data_type | This is a meta data element that defines the value of the data element. |
The value of the field could be Standard | Triangulated / Derived |
destination_path | The json path in the response |
value | The triangulated value for the data element |
data_sources | The list of data sources which were crawled. The aggregate contains the data source names which returned the final value |
Sample Smart Data Audit API Request
POST /audit/v1/report/triangulation HTTP/1.1
Host: api-smartdata.di-beta.boldpenguin.com
x-api-key: S9sqzWJNY1M3ZUzQK99R6284DTRX9oPMQjYNbf10
Authorization: Bearer FQmkb4B1ZL2RriDqj9mK2WeN
Content-Type: application/json
Content-Length: 128
{
"data_package_id":"workfusion-us-c0001",
"report_id": "CUS1187A38519A08D967",
"tenant_id":"workfusion"
}
Sample Smart Data Audit Response
{
"tx_id": "workfusion-b64dc748-48ec-4862-b62d-cb034db39ddc",
"tx_time": "2021-09-16T18:35:56.734Z",
"data_package_id": "workfusion-us-c0001",
"report_id": "CUS1187A38519A08D967",
"status": "SUCCESS",
"audit_response": [
{
"data_element_id": "S-C000011",
"data_element_name": "State",
"data_type": "Triangulated",
"destination_path": "state",
"value": "PA",
"data_sources": [
"DNB",
"YP",
"SMD_SEED_DATA"
]
},
{
"data_element_id": "S-C000033",
"data_element_name": "Annual Revenue",
"data_type": "Triangulated",
"destination_path": "annual_revenue",
"value": "57815.0",
"score": "80.64",
"data_sources": [
"DNB"
]
},
{
"data_element_id": "S-C000010",
"data_element_name": "City",
"data_type": "Triangulated",
"destination_path": "city",
"value": "Macungie",
"data_sources": [
"DNB",
"SMD_SEED_DATA"
]
},
{
"data_element_id": "S-C000035",
"data_element_name": "Total Full Time Employees",
"data_type": "Triangulated",
"destination_path": "total_full_time_employees",
"value": "2",
"score": "80.64",
"data_sources": [
"DNB"
]
},
{
"data_element_id": "S-C000012",
"data_element_name": "Postal Code",
"data_type": "Triangulated",
"destination_path": "postal_code",
"value": "18062",
"data_sources": [
"DNB",
"YP",
"SMD_SEED_DATA"
]
},
{
"data_element_id": "S-C000034",
"data_element_name": "Annual Payroll",
"data_type": "Triangulated",
"destination_path": "annual_payroll",
"score": "80.64"
},
{
"data_element_id": "S-C000037",
"data_element_name": "Total Employees at this Location",
"data_type": "Standard",
"destination_path": "total_employees_at_this_location",
"value": "2",
"score": "80.64",
"data_sources": [
"DNB"
]
},
{
"data_element_id": "S-C000014",
"data_element_name": "DUNS #",
"data_type": "Triangulated",
"destination_path": "duns_number",
"value": "085677753",
"data_sources": [
"DNB"
]
},
{
"data_element_id": "S-C001049",
"data_element_name": "Parent Company Revenue ISO Currency Code",
"data_type": "Standard",
"destination_path": "parent_company_revenue_currency_code",
"value": "USD",
"data_sources": [
"DNB"
]
},
{
"data_element_id": "S-C000031",
"data_element_name": "Year Founded",
"data_type": "Triangulated",
"destination_path": "year_founded",
"value": "1989",
"score": "82.96",
"data_sources": [
"OPENCORPORATES"
]
},
{
"data_element_id": "S-C000019",
"data_element_name": "Primary NAICS Description(2017)",
"data_type": "Triangulated",
"destination_path": "primary_naics_2017[].desc",
"value": [
"general freight trucking, local"
],
"score": "75.59",
"data_sources": [
"DNB"
]
},
{
"data_element_id": "S-C000018",
"data_element_name": "Primary NAICS Code(2017)",
"data_type": "Triangulated",
"destination_path": "primary_naics_2017[].code",
"value": [
"484110"
],
"score": "75.59",
"data_sources": [
"DNB"
]
},
{
"data_element_id": "S-C000441",
"data_element_name": "Primary NAICS Code (2012)",
"data_type": "Triangulated",
"destination_path": "primary_naics_2012[].code",
"value": [
"484110"
],
"score": "75.59",
"data_sources": [
"DNB"
]
},
{
"data_element_id": "S-C001035",
"data_element_name": "Parent Company Revenue",
"data_type": "Standard",
"destination_path": "parent_company_revenue"
},
{
"data_element_id": "S-C000021",
"data_element_name": "Secondary NAICS Description(2017)",
"data_type": "Triangulated",
"destination_path": "secondary_naics_2017[].desc",
"value": [
"Storage Battery Manufacturing",
"Motor Home Manufacturing",
"Reinsurance Carriers"
],
"score": "",
"data_sources": []
},
{
"data_element_id": "S-C000442",
"data_element_name": "Primary NAICS Description (2012)",
"data_type": "Triangulated",
"destination_path": "primary_naics_2012[].desc",
"value": [
"General Freight Trucking, Local"
],
"score": "75.59",
"data_sources": [
"DNB"
]
},
{
"data_element_id": "S-C000001",
"data_element_name": "Company ID",
"data_type": "Standard",
"destination_path": "company_id",
"value": "CUS1187A38519A08D967",
"data_sources": [
"SMD_SEED_DATA"
]
},
{
"data_element_id": "S-C000004",
"data_element_name": "DBA/AKA",
"data_type": "Triangulated",
"destination_path": "dba_aka",
"value": [
"Crete Carrier Corp"
],
"data_sources": [
"YP"
]
},
{
"data_element_id": "S-C000003",
"data_element_name": "Company Name",
"data_type": "Standard",
"destination_path": "company_name",
"value": "Crete Carrier Corporation",
"data_sources": [
"SMD_SEED_DATA"
]
},
{
"data_element_id": "S-C000006",
"data_element_name": "Phone Number",
"data_type": "Triangulated",
"destination_path": "phone_number",
"value": "(610) 966-9996",
"data_sources": [
"YP"
]
},
{
"data_element_id": "S-C000443",
"data_element_name": "Secondary NAICS Code (2012)",
"data_type": "Triangulated",
"destination_path": "secondary_naics_2012[].code",
"value": [
"335911",
"336213",
"524130"
],
"score": "",
"data_sources": []
},
{
"data_element_id": "S-C000444",
"data_element_name": "Secondary NAICS Description (2012)",
"data_type": "Triangulated",
"destination_path": "secondary_naics_2012[].desc",
"value": [
"storage battery manufacturing",
"motor home manufacturing",
"reinsurance carriers"
],
"score": "",
"data_sources": []
},
{
"data_element_id": "S-C000020",
"data_element_name": "Secondary NAICS Code(2017)",
"data_type": "Triangulated",
"destination_path": "secondary_naics_2017[].code",
"value": [
"335911",
"336213",
"524130"
],
"score": "",
"data_sources": []
},
{
"data_element_id": "S-C000008",
"data_element_name": "Email ID",
"data_type": "Standard",
"destination_path": "email_id"
},
{
"data_element_id": "S-C000007",
"data_element_name": "Website",
"data_type": "Triangulated",
"destination_path": "website"
},
{
"data_element_id": "S-C000009",
"data_element_name": "Address",
"data_type": "Triangulated",
"destination_path": "address",
"value": "2619 Schoeneck Rd",
"data_sources": [
"DNB",
"SMD_SEED_DATA"
]
}
]
}
API Error/Status Codes
Generic HTTP Error Codes -200 Success -401 Unauthorized (verify client credentials and authorization header) -500 Internal server error