> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tic.io/llms.txt
> Use this file to discover all available pages before exploring further.

# 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.

Max+ 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: `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 |

The answer is cached for four hours. When the risk model is temporarily unavailable the endpoint returns `503`.


## OpenAPI

````yaml get /companies/{id}/risk/timeline
openapi: 3.1.1
info:
  title: TIC Lens API
  description: "The TIC Lens API provides programmatic access to company, person, property, vehicle, and order data.\r\n\r\n## Authentication\r\n\r\nAll requests require an API key passed via the `x-api-key` header:\r\n\r\n```bash\r\ncurl -H \"x-api-key: YOUR_API_KEY\" https://lens-api.tic.io/companies/123\r\n```\r\n\r\nAPI keys are managed through the TIC Lens web application under **Settings → API Keys**.\r\n\r\n## Base URL\r\n\r\n| Environment | URL |\r\n|-------------|-----|\r\n| Production  | `https://lens-api.tic.io` |\r\n\r\n## Feature Access\r\n\r\nEndpoints are gated by your subscription plan. If your plan does not include a feature, the endpoint will return `403 Forbidden`.\r\n\r\n## Rate Limits\r\n\r\nRate limits are applied per API key. If you exceed the limit, requests will return `429 Too Many Requests`.\r\n\r\n## Response Format\r\n\r\nAll responses are JSON. Null values are omitted from responses.\r\n"
  version: v1
servers:
  - url: https://lens-api.tic.io
security:
  - ApiKey: []
tags:
  - name: Addresses
  - name: Bolagsverket
  - name: Brf
  - name: Companies
  - name: CompanyReports
  - name: Documents
  - name: FlightImages
  - name: Free
  - name: Orders
  - name: OrdersExports
  - name: PaymentControl
  - name: PaymentControlImport
  - name: Persons
  - name: Properties
  - name: PublicSearch
  - name: Screening
  - name: SearchAutocomplete
  - name: Sentinel
  - name: ServingPermits
  - name: Team
  - name: Teams
  - name: Vehicles
  - name: WatchList
paths:
  /companies/{id}/risk/timeline:
    get:
      tags:
        - Companies
      summary: Get the company risk timeline (v2)
      description: >-
        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.
      operationId: GetCompanyRiskTimeline
      parameters:
        - name: id
          in: path
          description: Internal company ID
          required: true
          schema:
            type: integer
            format: int32
        - name: monthsBack
          in: query
          description: Months before the as-of date, at most 60. Default 36.
          schema:
            type: integer
            format: int32
            default: 36
        - name: monthsForward
          in: query
          description: Months after the as-of date, at most 24. Default 12.
          schema:
            type: integer
            format: int32
            default: 12
        - name: step
          in: query
          description: Months between two scored points, 1 to 6. Default 1.
          schema:
            type: integer
            format: int32
            default: 1
        - name: asOf
          in: query
          description: The as-of date, YYYY-MM-DD. Default today.
          schema:
            type: string
      responses:
        '200':
          description: The company risk timeline
        '404':
          description: Company not found or not accessible
        '503':
          description: The risk service is not configured or not reachable
components:
  securitySchemes:
    ApiKey:
      type: apiKey
      name: x-api-key
      in: header

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.