Get the company risk timeline (v2)
curl --request GET \
--url https://lens-api.tic.io/companies/{id}/risk/timeline \
--header 'x-api-key: <api-key>'import requests
url = "https://lens-api.tic.io/companies/{id}/risk/timeline"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://lens-api.tic.io/companies/{id}/risk/timeline', 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://lens-api.tic.io/companies/{id}/risk/timeline",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://lens-api.tic.io/companies/{id}/risk/timeline"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://lens-api.tic.io/companies/{id}/risk/timeline")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://lens-api.tic.io/companies/{id}/risk/timeline")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_bodyCompanies
Get the company risk timeline (v2)
The company’s story: its events per month on ten rows, placed by the month they became public, and the model’s 12-month probability of bankruptcy at monthly as-of dates, each scored from what was knowable then, with the events that entered between two dates as the drivers of the step.
GET
/
companies
/
{id}
/
risk
/
timeline
Get the company risk timeline (v2)
curl --request GET \
--url https://lens-api.tic.io/companies/{id}/risk/timeline \
--header 'x-api-key: <api-key>'import requests
url = "https://lens-api.tic.io/companies/{id}/risk/timeline"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://lens-api.tic.io/companies/{id}/risk/timeline', 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://lens-api.tic.io/companies/{id}/risk/timeline",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://lens-api.tic.io/companies/{id}/risk/timeline"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://lens-api.tic.io/companies/{id}/risk/timeline")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://lens-api.tic.io/companies/{id}/risk/timeline")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_bodyMax+ tier
The company’s risk over time, as data for a chart: what happened to the company month by month, and the model’s 12-month probability of bankruptcy at each month, scored only from what was known on that date. It is the data behind the risk timeline in TIC LENS.
Months are counted from the as-of date:
The answer is cached for four hours. When the risk model is temporarily unavailable the endpoint returns
0 is the month of the as-of date, -1 the month before it. A company younger than the window starts at its first known month. Unlike most LENS endpoints, its field names are in snake_case.
Parameters
| Parameter | Default | Description |
|---|---|---|
monthsBack | 36 | Months before the as-of date, at most 60 |
monthsForward | 12 | Months after the as-of date, at most 24. With today as the as-of date nothing after it is scored: the path and the events end at month 0 |
step | 1 | Months between two scored points, 1 to 6 |
asOf | today | The as-of date, YYYY-MM-DD |
Response
| Field | Description |
|---|---|
company_id | The internal company ID |
as_of | The as-of date |
months_back, months_forward, step | The window as applied |
rows | The ten event rows, in the order they are shown, see below |
events | The events in the window, see below |
events_truncated | True when the window had more events than the response carries |
path | The scored points, oldest first, see below |
markers | Marked months, such as today, each with month, kind and a text in Swedish and English |
provenance | How the answer was produced: the model release (release), whether the earlier points were scored from what was known at the time (backcast), and timings |
Rows
row | Events |
|---|---|
board_owners_officers | Changes to the board, the CEO and the beneficial owners |
address_name_industry | Changes of name, purpose and industry code |
annual_report | Annual reports received, approved and registered |
findings_registry_cases | Registry cases, and findings and shortages in annual reports |
late_fees_surcharges | Late filing fees on tax returns |
payroll_corrected | Corrected payroll declarations |
tax_registration | Registrations for F-tax, VAT and as an employer |
enforcement_payment_orders | Payment orders: applied for, changed, dismissed or withdrawn |
board_gap_liquidation_order | Gaps in the board and orders to liquidate |
exit | How the company ended, such as bankruptcy or liquidation |
Events
| Field | Description |
|---|---|
month | The month the event became known, relative to the as-of date |
row | The row it belongs to |
kind | The event type, for example role.board_member, report.registered or payment_order.applied |
text | A short description in Swedish (sv) and English (en) |
happened | The day it happened |
known | The day it became public. The event is placed by this day, because only then could it affect the score |
attributes | Details for the event type, such as amounts, periods or codes |
Path
Each point is scored as of its own date, from the data that was known then, so a step in the path shows what changed the assessment at that time.| Field | Description |
|---|---|
as_of | The date the point is scored as of |
month | Its month, relative to the response’s as-of date |
pd_12m.p_pit | The probability (0-1) that the company goes bankrupt within 12 months, as TIC LENS shows it |
pd_12m.band90 | A 90 % interval around p_pit |
pd_12m.p_raw | The model’s output before calibration |
risk_class | 1 to 5, from the probability, see below |
score | The point as a score; higher means lower risk |
drivers | The kinds of the events that became known since the previous point: what moved the step |
risk_class | Probability within 12 months |
|---|---|
| 5 | below 0.3 % |
| 4 | 0.3 - 0.8 % |
| 3 | 0.8 - 2 % |
| 2 | 2 - 5 % |
| 1 | 5 % or more |
503.Authorizations
Path Parameters
Internal company ID
Query Parameters
Months before the as-of date, at most 60. Default 36.
Months after the as-of date, at most 24. Default 12.
Months between two scored points, 1 to 6. Default 1.
The as-of date, YYYY-MM-DD. Default today.
Response
The company risk timeline