API docs · Reference
API reference
Every answer comes with its evidence: the document, the page or section, and the sentence it rests on. When the documents do not say, the API says so instead of guessing. A client reads the companies of its portfolio; companies are added to it with POST /portfolio. Every route answers 429 with a Retry-After header beyond 60 requests a minute per organization.
Base URL https://www.corplens.ai/api/v1 · version 1.0 · Download openapi.yaml
GET /companies/search
Find companies of your portfolio by name, ISIN, ticker or LEI.
| Parameter | In | Type | About |
|---|---|---|---|
q required | query | string | |
X-CorpLens-Reference | header | string | Your own label for the call (e.g. one of your clients); kept with the call. |
Responses
200- Matching companies.
401- Missing or revoked key.
402- No active plan, or a payment failed more than 7 days ago (read-only).
GET /companies/resolve
Which CorpLens company another system means, by exactly one of lei, domain or name. Never a guess - MATCHED, AMBIGUOUS (the candidates) or NOT_FOUND.
| Parameter | In | Type | About |
|---|---|---|---|
lei | query | string | |
domain | query | string | The company's own website, or a subdomain of it (group.example.com matches example.com). |
name | query | string | An exact name, ISIN, or ticker with its exchange (DG.PA). |
X-CorpLens-Reference | header | string | Your own label for the call (e.g. one of your clients); kept with the call. |
Responses
200- The resolution.
400- A malformed parameter.
401- Missing or revoked key.
402- No active plan, or a payment failed more than 7 days ago (read-only).
GET /companies/{id}
A company and its identifiers.
| Parameter | In | Type | About |
|---|---|---|---|
id required | path | integer | |
X-CorpLens-Reference | header | string | Your own label for the call (e.g. one of your clients); kept with the call. |
Responses
200- The company.
401- Missing or revoked key.
402- No active plan, or a payment failed more than 7 days ago (read-only).
404- Unknown, or not in your portfolio — the two are indistinguishable.
GET /companies/{id}/facts
The company's facts, each with its evidence.
| Parameter | In | Type | About |
|---|---|---|---|
id required | path | integer | |
category | query | string | e.g. COST |
as_of | query | string | The date the facts must be true at. |
known_at | query | string | What CorpLens knew on that day, ignoring anything published or corrected later. Defaults to today. |
X-CorpLens-Reference | header | string | Your own label for the call (e.g. one of your clients); kept with the call. |
Responses
200- Facts true at as_of, as known at known_at.
400- A malformed parameter.
401- Missing or revoked key.
402- No active plan, or a payment failed more than 7 days ago (read-only).
404- Unknown, or not in your portfolio — the two are indistinguishable.
GET /companies/{id}/financials
Reported figures by period, each with its source.
| Parameter | In | Type | About |
|---|---|---|---|
id required | path | integer | |
known_at | query | string | What CorpLens knew on that day, ignoring anything published or corrected later. Defaults to today. |
X-CorpLens-Reference | header | string | Your own label for the call (e.g. one of your clients); kept with the call. |
Responses
200- Reported figures.
400- A malformed parameter.
401- Missing or revoked key.
402- No active plan, or a payment failed more than 7 days ago (read-only).
404- Unknown, or not in your portfolio — the two are indistinguishable.
GET /companies/{id}/activities
What the company does — product families and economic kind (goods, services), each from one cited fact.
| Parameter | In | Type | About |
|---|---|---|---|
id required | path | integer | |
known_at | query | string | What CorpLens had computed on that day; a row computed later is not shown, a row replaced later still is. Defaults to today. |
X-CorpLens-Reference | header | string | Your own label for the call (e.g. one of your clients); kept with the call. |
Responses
200- Activities as computed by CorpLens on known_at.
400- A malformed parameter.
401- Missing or revoked key.
402- No active plan, or a payment failed more than 7 days ago (read-only).
404- Unknown, or not in your portfolio — the two are indistinguishable.
GET /companies/{id}/dependencies
What the company depends on — countries (with their roles), commodities, routes, named suppliers — each with the facts that say it.
| Parameter | In | Type | About |
|---|---|---|---|
id required | path | integer | |
type | query | string | |
role | query | string | Countries holding this role only. |
known_at | query | string | What CorpLens had computed on that day; a row computed later is not shown, a row replaced later still is. Defaults to today. |
X-CorpLens-Reference | header | string | Your own label for the call (e.g. one of your clients); kept with the call. |
Responses
200- Dependencies as computed by CorpLens on known_at.
400- A malformed parameter.
401- Missing or revoked key.
402- No active plan, or a payment failed more than 7 days ago (read-only).
404- Unknown, or not in your portfolio — the two are indistinguishable.
GET /companies/{id}/obligations
The regulations the company falls under (EU DORA, French e-invoicing), since when, each with the official text and the company's own proof.
| Parameter | In | Type | About |
|---|---|---|---|
id required | path | integer | |
X-CorpLens-Reference | header | string | Your own label for the call (e.g. one of your clients); kept with the call. |
all | query | string | 1: also the obligations not established (nothing found in the registers consulted). |
Responses
200- Obligations in scope, and undetermined ones with their reason.
401- Missing or revoked key.
402- No active plan, or a payment failed more than 7 days ago (read-only).
404- Unknown, or not in your portfolio — the two are indistinguishable.
GET /companies/{id}/documents
The official documents CorpLens has read for this company.
| Parameter | In | Type | About |
|---|---|---|---|
id required | path | integer | |
X-CorpLens-Reference | header | string | Your own label for the call (e.g. one of your clients); kept with the call. |
Responses
200- Documents, latest first.
401- Missing or revoked key.
402- No active plan, or a payment failed more than 7 days ago (read-only).
404- Unknown, or not in your portfolio — the two are indistinguishable.
GET /companies/{id}/profile
The account profile — strategy, cost programmes, technology, organisation, risks, procurement, M&A — every claim cited.
| Parameter | In | Type | About |
|---|---|---|---|
id required | path | integer | |
definition | query | string | |
version | query | integer | |
known_at | query | string | What CorpLens knew on that day, ignoring anything published or corrected later. Defaults to today. |
X-CorpLens-Reference | header | string | Your own label for the call (e.g. one of your clients); kept with the call. |
Responses
200- The profile.
400- A malformed parameter.
401- Missing or revoked key.
402- No active plan, or a payment failed more than 7 days ago (read-only).
404- Unknown company, or a profile not computed yet (status NOT_COMPUTED).
503- Temporarily unavailable; retry later.
GET /evidence/{id}
One piece of evidence — document, location and excerpt.
| Parameter | In | Type | About |
|---|---|---|---|
id required | path | integer | |
X-CorpLens-Reference | header | string | Your own label for the call (e.g. one of your clients); kept with the call. |
Responses
200- The evidence.
401- Missing or revoked key.
402- No active plan, or a payment failed more than 7 days ago (read-only).
404- Unknown, or not in your portfolio — the two are indistinguishable.
POST /ask
An answer to a question about one company of your portfolio, built only from its documents.
Counts one question against your plan, only when an answer is given.
| Parameter | In | Type | About |
|---|---|---|---|
X-CorpLens-Reference | header | string | Your own label for the call (e.g. one of your clients); kept with the call. |
Request body (JSON)
company required | string | Name |
question required | string | |
as_of | string | |
known_at | string |
Responses
200- An answer, or an explicit abstention.
400- A malformed parameter.
401- Missing or revoked key.
402- No active plan, or a payment failed more than 7 days ago (read-only).
404- Unknown, or not in your portfolio — the two are indistinguishable.
429- A limit is reached — the trial's monthly quota, the monthly ceiling beyond a paid plan, the organization's daily question spend, 10 questions a minute, or 2 questions at a time (these last two with a Retry-After header).
502- Temporarily unavailable; retry later.
503- Temporarily unavailable; retry later.
GET /portfolio
The companies you follow, each with its status.
| Parameter | In | Type | About |
|---|---|---|---|
X-CorpLens-Reference | header | string | Your own label for the call (e.g. one of your clients); kept with the call. |
Responses
200- Your portfolio.
401- Missing or revoked key.
402- No active plan, or a payment failed more than 7 days ago (read-only).
POST /portfolio
Add a company by name, ISIN or LEI.
READY when its content is available now; PREPARING otherwise — you are emailed (and your webhook called) when it is ready, usually within 24 hours. Counts one addition against your plan; NOT_AVAILABLE and AMBIGUOUS cost nothing.
| Parameter | In | Type | About |
|---|---|---|---|
X-CorpLens-Reference | header | string | Your own label for the call (e.g. one of your clients); kept with the call. |
Request body (JSON)
company required | string |
Responses
201- Added and ready.
202- Added; being prepared.
400- A malformed parameter.
401- Missing or revoked key.
402- No active plan, or a payment failed more than 7 days ago (read-only).
404- No official filing found for this company (NOT_AVAILABLE).
409- Several companies match (AMBIGUOUS) — add the one you mean by its LEI.
429- A limit is reached — the trial's monthly quota, the monthly ceiling beyond a paid plan, the organization's daily question spend, 10 questions a minute, or 2 questions at a time (these last two with a Retry-After header).
503- Temporarily unavailable; retry later.
DELETE /portfolio/{id}
Stop following a company (frees a portfolio slot; the month's addition stays spent).
| Parameter | In | Type | About |
|---|---|---|---|
id required | path | integer | |
X-CorpLens-Reference | header | string | Your own label for the call (e.g. one of your clients); kept with the call. |
Responses
204- Removed.
401- Missing or revoked key.
404- Unknown, or not in your portfolio — the two are indistinguishable.
GET /openapi.yaml
This contract. No key needed
Responses
200- The OpenAPI document.
Webhooks
company.ready
A company you added is ready.
Sent to the webhook URL of your organization (public https only). Verify X-CorpLens-Signature — "sha256=" followed by the hex HMAC-SHA256 of the raw body with your webhook secret — before trusting the call.
Schemas
Error
error | string | |
detail | string | |
status | string |
Company
id | integer | |
name | string | |
legal_name | string | |
country | string | |
lei | string | |
website | string | |
identifiers | array of object |
DocumentRef
id | integer | |
title | string | |
source_url | string | |
publication_date | string or null |
Evidence
id | integer or string | |
type | string | |
page | integer or null | |
section | string or null | The section |
where | string | "p. 287", or the section path. |
url | string | The document |
excerpt | string | |
document | DocumentRef |
Resolution
status | string | |
method | string | |
ref | string or null | A stable reference for other systems, corplens:company:<id>. |
company | object | |
candidates | array of object | Filled when AMBIGUOUS only. |
Fact
id | integer | |
category | string | |
fact_type | string | |
statement | string | |
status | string | |
raw_value | string | The value as the document writes it, in its language ("40", "deux"); empty when the fact has no value. |
raw_unit | string | Its unit as the document writes it ("milliards d’euros", "%"). |
normalized_value | number or string or null | |
normalized_unit | string | |
valid_from | string or null | |
valid_until | string or null | |
observed_at | string or null | |
validation_status | string | |
confidence | number or null | |
evidence | array of Evidence |
Metric
id | integer | |
metric | string | |
period_start | string or null | |
period_end | string | |
fiscal_year | integer or null | |
raw_value | string | |
raw_unit | string | |
normalized_value | number or string or null | |
normalized_unit | string | |
xbrl_concept | string | The public taxonomy concept the figure is tagged with. |
observed_at | string or null | |
validation_status | string | |
evidence | array of Evidence |
Activity
id | integer | |
scope_kind | string | |
family | string | A term of the closed taxonomy (AUTOMOTIVE, PHARMACEUTICALS…), or GOODS / SERVICES. |
confidence_level | string | |
span | string | The verbatim words of the fact that support it. |
taxonomy_version | string | |
computed_at | string | |
superseded_at | string or null | |
source_fact | Fact |
Dependency
id | integer | |
type | string | |
entity_id | string | ISO country code, a vocabulary id (copper, suez_canal), or a supplier's slug. |
entity_label | string | |
criticality | string | |
criticality_basis | string | |
confidence_level | string | |
presence_only | boolean | A country where no role is supported by the facts: presence, not a dependency. |
roles | array of object | |
observed_at | string | The latest publication among its facts. |
effective_from | string or null | |
effective_until | string or null | |
vocabulary_version | string | |
validation_status | string | |
computed_at | string | |
superseded_at | string or null | |
facts | array of Fact |
Obligation
regulation | string | The text, versioned (fr-einvoicing-v1, eu-dora-v1). |
obligation | string | |
status | string | |
reason | string | Why it is undetermined (closed list); for an IN_SCOPE row, CAPTIVE_REINSURANCE when the only regulated entities of a non-financial group are reinsurers. |
category | string | |
basis | string | ISSUER: the listed company itself. GROUP_ENTITY: an entity of its group (named in company_evidence). CONSOLIDATED_GROUP: decided on the group's consolidated accounts — the law assesses each French legal person, so this says the group is above the thresholds, not that each subsidiary is. |
valid_from | string or null | |
sources_consulted | array of string | |
text_evidence | array of object | |
company_evidence | array of object | |
rules_version | string | |
computed_at | string |
Document
id | integer | |
title | string | |
type | string | |
source_url | string | |
publication_date | string or null | |
source | string | |
tier | integer | |
status | string |
Coverage
text_documents_count | integer | |
metrics_documents_count | integer | |
oldest_document_date | string or null | |
latest_document_date | string or null | |
fiscal_years | array of integer or string | |
sources | array of string | |
document_types | array of string | |
meets_coverage_rule | boolean |
SubjectCompany
id | integer | |
name | string |
Claim
text | string | |
subject_company | SubjectCompany | |
citations | array of object | |
evidence | array of ClaimEvidence |
ClaimEvidence
document_id | integer | |
title | string | |
page | integer or null | |
section | string or null | |
where | string | |
url | string | |
excerpt | string | |
publication_date | string or null | |
source_url | string | |
subject_id | integer | The company the document is about. |
subject_name | string |
Answer
answer_status | string | |
answer | string | |
claims | array of Claim | |
facts | array of Fact | |
metrics | array of Metric | |
evidence | array of Evidence | |
sources | array of DocumentRef | |
coverage | Coverage | |
confidence | number |
ProfileMetric
metric | string | |
period_end | string | |
raw_value | string | |
raw_unit | string | |
normalized_value | number or string or null | |
normalized_unit | string | |
observed_at | string or null | |
page | integer or null | |
document_id | integer | |
subject_company | SubjectCompany |
Profile
company | SubjectCompany | |
definition | object | |
known_at | string | |
computed_at | string | |
computed_for | string | |
up_to_date | boolean | |
coverage | Coverage | |
metrics | array of ProfileMetric | |
sections | array of object |
PortfolioEntry
status | string | |
company | Company |
