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

ParameterInTypeAbout
leiquerystring
domainquerystringThe company's own website, or a subdomain of it (group.example.com matches example.com).
namequerystringAn exact name, ISIN, or ticker with its exchange (DG.PA).
X-CorpLens-ReferenceheaderstringYour 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.

ParameterInTypeAbout
id requiredpathinteger
X-CorpLens-ReferenceheaderstringYour 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.

ParameterInTypeAbout
id requiredpathinteger
categoryquerystringe.g. COST
as_ofquerystringThe date the facts must be true at.
known_atquerystringWhat CorpLens knew on that day, ignoring anything published or corrected later. Defaults to today.
X-CorpLens-ReferenceheaderstringYour 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.

ParameterInTypeAbout
id requiredpathinteger
known_atquerystringWhat CorpLens knew on that day, ignoring anything published or corrected later. Defaults to today.
X-CorpLens-ReferenceheaderstringYour 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.

ParameterInTypeAbout
id requiredpathinteger
known_atquerystringWhat CorpLens had computed on that day; a row computed later is not shown, a row replaced later still is. Defaults to today.
X-CorpLens-ReferenceheaderstringYour 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.

ParameterInTypeAbout
id requiredpathinteger
typequerystring
rolequerystringCountries holding this role only.
known_atquerystringWhat CorpLens had computed on that day; a row computed later is not shown, a row replaced later still is. Defaults to today.
X-CorpLens-ReferenceheaderstringYour 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.

ParameterInTypeAbout
id requiredpathinteger
X-CorpLens-ReferenceheaderstringYour own label for the call (e.g. one of your clients); kept with the call.
allquerystring1: 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.

ParameterInTypeAbout
id requiredpathinteger
X-CorpLens-ReferenceheaderstringYour 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.

ParameterInTypeAbout
id requiredpathinteger
definitionquerystring
versionqueryinteger
known_atquerystringWhat CorpLens knew on that day, ignoring anything published or corrected later. Defaults to today.
X-CorpLens-ReferenceheaderstringYour 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.

ParameterInTypeAbout
id requiredpathinteger
X-CorpLens-ReferenceheaderstringYour 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.

ParameterInTypeAbout
X-CorpLens-ReferenceheaderstringYour own label for the call (e.g. one of your clients); kept with the call.

Request body (JSON)

company requiredstringName
question requiredstring
as_ofstring
known_atstring

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.

ParameterInTypeAbout
X-CorpLens-ReferenceheaderstringYour 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.

ParameterInTypeAbout
X-CorpLens-ReferenceheaderstringYour own label for the call (e.g. one of your clients); kept with the call.

Request body (JSON)

company requiredstring

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

ParameterInTypeAbout
id requiredpathinteger
X-CorpLens-ReferenceheaderstringYour 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

errorstring
detailstring
statusstring

Company

idinteger
namestring
legal_namestring
countrystring
leistring
websitestring
identifiersarray of object

DocumentRef

idinteger
titlestring
source_urlstring
publication_datestring or null

Evidence

idinteger or string
typestring
pageinteger or null
sectionstring or nullThe section
wherestring"p. 287", or the section path.
urlstringThe document
excerptstring
documentDocumentRef

Resolution

statusstring
methodstring
refstring or nullA stable reference for other systems, corplens:company:<id>.
companyobject
candidatesarray of objectFilled when AMBIGUOUS only.

Fact

idinteger
categorystring
fact_typestring
statementstring
statusstring
raw_valuestringThe value as the document writes it, in its language ("40", "deux"); empty when the fact has no value.
raw_unitstringIts unit as the document writes it ("milliards d’euros", "%").
normalized_valuenumber or string or null
normalized_unitstring
valid_fromstring or null
valid_untilstring or null
observed_atstring or null
validation_statusstring
confidencenumber or null
evidencearray of Evidence

Metric

idinteger
metricstring
period_startstring or null
period_endstring
fiscal_yearinteger or null
raw_valuestring
raw_unitstring
normalized_valuenumber or string or null
normalized_unitstring
xbrl_conceptstringThe public taxonomy concept the figure is tagged with.
observed_atstring or null
validation_statusstring
evidencearray of Evidence

Activity

idinteger
scope_kindstring
familystringA term of the closed taxonomy (AUTOMOTIVE, PHARMACEUTICALS…), or GOODS / SERVICES.
confidence_levelstring
spanstringThe verbatim words of the fact that support it.
taxonomy_versionstring
computed_atstring
superseded_atstring or null
source_factFact

Dependency

idinteger
typestring
entity_idstringISO country code, a vocabulary id (copper, suez_canal), or a supplier's slug.
entity_labelstring
criticalitystring
criticality_basisstring
confidence_levelstring
presence_onlybooleanA country where no role is supported by the facts: presence, not a dependency.
rolesarray of object
observed_atstringThe latest publication among its facts.
effective_fromstring or null
effective_untilstring or null
vocabulary_versionstring
validation_statusstring
computed_atstring
superseded_atstring or null
factsarray of Fact

Obligation

regulationstringThe text, versioned (fr-einvoicing-v1, eu-dora-v1).
obligationstring
statusstring
reasonstringWhy it is undetermined (closed list); for an IN_SCOPE row, CAPTIVE_REINSURANCE when the only regulated entities of a non-financial group are reinsurers.
categorystring
basisstringISSUER: 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_fromstring or null
sources_consultedarray of string
text_evidencearray of object
company_evidencearray of object
rules_versionstring
computed_atstring

Document

idinteger
titlestring
typestring
source_urlstring
publication_datestring or null
sourcestring
tierinteger
statusstring

Coverage

text_documents_countinteger
metrics_documents_countinteger
oldest_document_datestring or null
latest_document_datestring or null
fiscal_yearsarray of integer or string
sourcesarray of string
document_typesarray of string
meets_coverage_ruleboolean

SubjectCompany

idinteger
namestring

Claim

textstring
subject_companySubjectCompany
citationsarray of object
evidencearray of ClaimEvidence

ClaimEvidence

document_idinteger
titlestring
pageinteger or null
sectionstring or null
wherestring
urlstring
excerptstring
publication_datestring or null
source_urlstring
subject_idintegerThe company the document is about.
subject_namestring

Answer

answer_statusstring
answerstring
claimsarray of Claim
factsarray of Fact
metricsarray of Metric
evidencearray of Evidence
sourcesarray of DocumentRef
coverageCoverage
confidencenumber

ProfileMetric

metricstring
period_endstring
raw_valuestring
raw_unitstring
normalized_valuenumber or string or null
normalized_unitstring
observed_atstring or null
pageinteger or null
document_idinteger
subject_companySubjectCompany

Profile

companySubjectCompany
definitionobject
known_atstring
computed_atstring
computed_forstring
up_to_dateboolean
coverageCoverage
metricsarray of ProfileMetric
sectionsarray of object

PortfolioEntry

statusstring
companyCompany