Skip to main content
POST
/
datasets
/
companies
/
{companyId}
/
credit-report
Credit Report
curl --request POST \
  --url https://api.tic.io/datasets/companies/{companyId}/credit-report \
  --header 'Content-Type: application/json-patch+json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "consentToPricing": true,
  "sendSMSToE164MobileNumber": "<string>",
  "sendEmailToEmailAddress": "jsmith@example.com"
}
'
import requests

url = "https://api.tic.io/datasets/companies/{companyId}/credit-report"

payload = {
"consentToPricing": True,
"sendSMSToE164MobileNumber": "<string>",
"sendEmailToEmailAddress": "jsmith@example.com"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json-patch+json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json-patch+json'},
body: JSON.stringify({
consentToPricing: true,
sendSMSToE164MobileNumber: '<string>',
sendEmailToEmailAddress: 'jsmith@example.com'
})
};

fetch('https://api.tic.io/datasets/companies/{companyId}/credit-report', 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://api.tic.io/datasets/companies/{companyId}/credit-report",
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([
'consentToPricing' => true,
'sendSMSToE164MobileNumber' => '<string>',
'sendEmailToEmailAddress' => 'jsmith@example.com'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json-patch+json",
"x-api-key: <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://api.tic.io/datasets/companies/{companyId}/credit-report"

payload := strings.NewReader("{\n \"consentToPricing\": true,\n \"sendSMSToE164MobileNumber\": \"<string>\",\n \"sendEmailToEmailAddress\": \"jsmith@example.com\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json-patch+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://api.tic.io/datasets/companies/{companyId}/credit-report")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json-patch+json")
.body("{\n \"consentToPricing\": true,\n \"sendSMSToE164MobileNumber\": \"<string>\",\n \"sendEmailToEmailAddress\": \"jsmith@example.com\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.tic.io/datasets/companies/{companyId}/credit-report")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json-patch+json'
request.body = "{\n \"consentToPricing\": true,\n \"sendSMSToE164MobileNumber\": \"<string>\",\n \"sendEmailToEmailAddress\": \"jsmith@example.com\"\n}"

response = http.request(request)
puts response.read_body
{
  "deliveryGuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "creditReportUrl": "<string>",
  "description": "<string>",
  "priceExclVat": 123
}
This endpoint will create a fully hosted credit report (time limited) for the given company and return the URL including incurred costs. You can post also a E.164 formatted mobile phone number and we will send a text message including the full credit report to the user Also you can add an e-mail address that will receive an e-mail containing the link to the report. Remember the model that you need to post needs at minimum contain ConsentToPricing set to true. Example:
{
  "consentToPricing": true,
  "sendSMSToE164MobileNumber": "+46xxxxxx",
  "sendEmailToEmailAddress": "some@email.tld"
}

iframe

You can embed the report into an iframe on your page.
<iframe
  src="<creditReportUrl>"
  title="<description>"
  frameborder="0"
  marginheight="0"
  marginwidth="0"
  width="100%"
  height="100%"
  scrolling="auto"
>
</iframe>

Authorizations

x-api-key
string
header
required

Path Parameters

companyId
integer<int32>
required

The company id

Body

The payload

sendSMSToE164MobileNumber
string | null
sendEmailToEmailAddress
string<email> | null

Response

200 - application/json

OK

deliveryGuid
string<uuid>
creditReportUrl
string | null
description
string | null
priceExclVat
number<double> | null