Skip to main content

Company Submit

Description

When provided with a company name and company address, the Company Submit API will trigger the process to aggregate relevant data from multiple data sources. The output of the API is a unique Company Id which can be used later to retrieve the company data.

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.

Client Credentials

  • Your Bold Penguin project team will provide you with a unique Client ID and Client Secret per Bold Penguin environment.

  • Production credentials will be provided once the connection in the UAT environment is validated.

    Client ID: (Shared with the customer)

    Client Secret: (Shared with the customer)

    API Key: this will be shared separately via email

    Data Package ID: (Shared with the customer)

    Authentication URL:

  POST https://boldpenguin-auth-uat.beta.boldpenguin.com/auth/token?grant_type=client_credentials

Accessing the Authentication API

Step 1: Get 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": [
"::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
}
}
}

Note: kowalski is the sample tenant used above

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 Company Submit URL

POST https://api-smartdata.di-beta.boldpenguin.com/company/v1/company_submit

Pass the following variables as part of the request

Request ParametersComments
Authentication TokenThe token obtained in STEP 1
API Key(Shared with the Customer)
POST Request BodyThe body contains a JSON message which will have Company Name and Address attributes

Sample Company Submit Request

POST /company/v1/company_submit HTTP/1.1
Host: api-smartdata.di-beta.boldpenguin.com
x-api-key: M4jHKvQcVDaY1sDivJgEe6LIuqArhDin8XldfxoK
Authorization: Bearer MMav2m8jTZbbEK48o6CUM94K
Content-Type: application/json
Content-Length: 119
{
"company_name":"Red River Roofing & Construction, Inc.",
"address":"746 Enterprise Drive, Edmond, OK 73013"
}

Sample Company Submit Response

{
"tx_id": "kowalski-c723d830-5222-4c16-8a15-077e2b3d439b",
"tenant_id": "kowalski",
"user_id": "0794f7f7-043d-42ce-b3d8-34a2f41bc141",
"tx_start_time": "2021-05-13T14:27:40.447841+00:00",
"tx_end_time": "2021-05-13T14:27:42.345011+00:00",
"response_time_secs": 1.896377,
"seed_input": {
"company_name": "Red River Roofing & Construction, Inc.",
"address": "746 Enterprise Drive, Edmond, OK 73013"
},
"c_report_id": "CUS1187A2AAE214E4540",
"l_report_id": "LUS1187B3B8256746FC0"
}

Access the Data API

Step 3: Data Inquiry URL

GET https://api-smartdata.di-beta.boldpenguin.com/data/v1/{dp_id}/{report_id}

Pass the following variables as part of the request

Request ParametersComments
Authentication TokenThe token obtained in STEP 1
API Key(Shared with the Customer)
dp_id(Data Package Id shared with the Customer)
report_idThis Id is returned as part of the Company Submit response (c_report_id)

Sample Data Inquiry Request

GET /data/v1/kowalski-us-c0001/CUS1187A2AAE214E4540 HTTP/1.1
Host: api-smartdata.di-beta.boldpenguin.com
x-api-key: M4jHKvQcVDaY1sDivJgEe6LIuqArhDin8XldfxoK
Authorization: Bearer tVr29n7q19PWstA4KnF7vHE3
Note: Kowalski-us-c0001 is the sample dp_id used above

Sample Data Inquiry Response

{
"tx_id": "kowalski-8bd82aba-7d01-42d4-b851-b0bea1b41540",
"tenant_id": "kowalski",
"user_id": "cfacd9bb-88bf-4e1c-9d78-2221dee96da2",
"tx_start_time": "2021-05-13T20:51:52.362Z",
"tx_end_time": "2021-05-13T20:51:54.310Z",
"response_time_secs": 6.778006,
"seed_input": {
"company_name": "Red River Roofing & Construction, Inc.",
"address": "746 Enterprise Drive, Edmond, OK 73013"
},
"data_package_id": "kowalski-us-c0001",
"c_report_id": "CUS1187A2AAE214E4540",
"l_report_id": "LUS1187B3B8256746FC0",
"cleansed_input": {
"companyName": "RED RIVER ROOFING & CONSTRUCTION, INC.",
"website": "https://www.redriverroofing.com/",
"phoneNumber": "4053300025",
"confidence_score": 0.6,
"address": {
"streetAddr": "746 ENTERPRISE DR",
"city": "EDMOND",
"state": "OK",
"zipOrPostalCode": "73013",
"country": "US",
"geoPosition": {
"latitude": 35.6312866,
"longitude": -97.494186
}
},
"seedInput": {
"companyName": "Red River Roofing & Construction, Inc.",
"address": {
"streetAddr": "746 Enterprise Drive",
"city": "Edmond",
"state": "OK",
"zipOrPostalCode": "73013",
"country": ""
}
}
},
"data": {
"company_id": "CUS1187A2AAE214E4540",
"company_name": "RED RIVER ROOFING & CONSTRUCTION, INC.",
"dba_aka": [],
"contact_name": [],
"phone_number": "1-4053300025",
"website": "https://www.redriverroofing.com/",
"email_id": "",
"address": "746 Enterprise Dr",
"city": "Edmond",
"state": "OK",
"postal_code": "73013",
"fein": "",
"legal_entity_type": "",
"year_founded": "2000",
"year_in_business": 21,
"annual_revenue": "6657967",
"annual_payroll": "1163503.72",
"total_full_time_employees": "34",
"primary_naics_2012": [{
"code": "238160",
"desc": "Roofing Contractors"
}],
"secondary_naics_2012": [{
"code": "238170",
"desc": "Flashing contractors"
},{
"code": "238170",
"desc": "Siding contractors"
},{
"code": "238220",
"desc": "plumbing, heating, and air-conditioning contractors"
},{
"code": "236220",
"desc": "commercial and institutional building construction"
}],
"country": "US",
"company_description": [],
"ppp_loan_size": ""
},
"scores": {
"website": "86.21",
"year_founded": "72.84",
"year_in_business": "72.84",
"annual_revenue": "69.90",
"annual_payroll": "80.64",
"total_full_time_employees": "80.64",
"primary_naics_2012": "75.59"
}
}