Legal ID
The legal-ID operations validate a company registration number (SIRET, SIREN, NZBN, ABN, CIK, ...) and, from a company name or website, look one up. A request names the registry through legal_id_type, or the registry is inferred from address.country.
Four dimensions are scored:
Completeness: whether an identifier is present, and whether the registry can be inferred from the country supplied.
Validity: whether the identifier follows the registry's structure and exists in the registry data Delpha holds for the supported countries.
Consistency: the input compared with its normalized version, applying the registry's format, padding and length rules.
Accuracy: whether the identifier matches contextual data such as the company name or address.
A validated identifier comes back as a normalized and enriched record carrying the company name, address, website and industry. When side fields are supplied, alternative registered entities are returned ranked, each with a confidence score. Coverage is exactly the legal_id_type enum; any other registry, or a country with no registry in that list, is refused with 422 unsupported_registry before any credit is reserved.
Submit an asynchronous job to find and validate a company's legal identifier (SIRET, SIREN, NZBN, ABN, CIK, ...): send legal_id to validate one or name to search for one, plus legal_id_type or address.country to select the registry. The identifier is a business registry number, never a personal identifier. Returns a job_id — pass it to getLegalIDResult to retrieve the normalized identifier, the resolved legal_id_type, and validity / accuracy scores.
Registry selection: the job targets one registry, resolved from either of two fields:
legal_id_type— the registry directly (e.g.FRA - SIRET,GBR - COMPANY REGISTRATION NUMBER), oraddress.country— the entity's country, from which the registry is inferred.
A call that provides neither is rejected with 400 (Either 'legal_id_type' or 'address.country' must be provided) — e.g. {name, website} alone fails. The remaining fields select the mode: legal_id runs validation and name runs search — a call with neither is rejected with 400; website is an optional search signal and does not select the registry.
Coverage: only the registries in the legal_id_type enum can be queried. A request naming any other registry, or a country that has no registry in that list, is refused with 422 unsupported_registry before any credit is reserved; the message lists the supported countries. That refusal depends only on the registry or country requested, so the same country returns it again whatever name or legal_id carries. An explicit legal_id_type takes precedence over address.country, so a supported registry with an unsupported country still runs.
The name or identifier you supply is matched against Delpha's company datalake and, when needed, the public registry of the selected country. A company found in a registry is added to the datalake.
A live-mode call reserves credits and creates a job record retained for 10 days; unless your team has set resolution retention to 0, the call and its result are also recorded in your team's resolution history for the window your team configured (up to 30 days on the free tier, 180 on a paid plan). Re-submitting the same input starts a new job and a new charge, unless the request carries an Idempotency-Key already used with the same body within the last 24 hours — that returns the original job_id and reserves nothing. Test-mode calls are answered from the published fixture table and reserve nothing — see the API documentation's Test mode section.
- : Access to the public API
OAuth 2.0 client-credentials flow (machine-to-machine). Token URL: https://secure.delpha.io/oauth2/token. The api/access scope is all-access: it grants every operation this document publishes. Per-use-case scoping, per-key credit ceilings and expiry are properties of an API key, not of this flow — use an API key when a credential must be restricted.
Payload to submit a new legal ID quality job.
Legal or trade name of the entity (e.g. Delpha).
nullExample: DelphaExisting business registry number to validate (e.g. SIRET 88052440000012) — never a personal identifier. Format is registry-specific; supply legal_id_type when the format is ambiguous.
nullExample: 88052440000012Registry the legal_id belongs to. Closed enum of the registries Delpha can query today (e.g. FRA - SIRET, USA - CIK); any other value is refused with 422 unsupported_registry before any credit is reserved. Required only when the same numeric format exists in multiple registries.
nullExample: FRA - SIRETPossible values: Entity website, as a URL or a bare domain (e.g. https://delpha.io/ or delpha.io).
nullExample: https://delpha.io/Accepted / still running — poll the result route with the returned job_id.
Validation error — the request body or query parameters were rejected.
Authentication failed — invalid or missing OAuth 2.0 token or API key.
Payment required — the team has insufficient credits.
Forbidden — the credential is valid but not allowed here: the API key's scopes do not cover this operation, or the operation is not routed in this environment (API Gateway then answers Missing Authentication Token).
Conflict — the Idempotency-Key was already used with a different request body (idempotency_key_reuse: a new key admits the new body, the original body replays the original job), or the original request with this key is still being processed (idempotency_in_progress: the same request answers with the original job once that one is admitted).
Unprocessable entity — the request is well-formed but cannot be processed: a documented size/shape bound was violated (validation_error), or a legal-ID request names a registry / country Delpha cannot query (unsupported_registry — refused before any credit is reserved; the message lists the supported countries).
Too many requests — one of two limits was exceeded. Your allowance for this operation in the current 60-second window: an Error body with code: rate_limited, Retry-After set to the seconds left in the window, and the quota headers with X-RateLimit-Remaining: 0; nothing is charged. Or the per-operation floor every caller of that operation shares: a GatewayError body with Retry-After: 1 and no quota headers, refused before the API sees the request.
Internal error.
Bad gateway — the upstream service returned an error.
# The same key with the same body replays the first 202, with no second charge.
IDEMPOTENCY_KEY=$(uuidgen)
curl -i -X POST "https://api.delpha.io/v1/legal-id" \
-H "Authorization: Bearer dlp_live_your_key_here" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $IDEMPOTENCY_KEY" \
--data '{"name":"Delpha","legal_id":"88052440000012","legal_id_type":"FRA - SIRET","address":{"city":"Paris","country":"France","postal_code":"75006","state":"Ile de France","street":"3 AVENUE VAVIN"},"website":"https://delpha.io/"}'{
"code": "ok",
"request_id": "c1a2b3d4-0000-4a5b-8c9d-ef0123456789",
"job_id": "21014abc65004d2781d2e0ef4c9fbb46",
"message": "Job submitted",
"status": "SUCCESS",
"status_code": 202
}Fetch the result of a previously submitted findAndValidateLegalID job by job_id. On success, the result payload contains the normalized legal identifier, the resolved legal_id_type (which registry it belongs to), the validity / accuracy scores, a match object with the enriched company record (account name, address, annual revenue, employee count, industry, formation date, company type, website) when a confident match is found, and a suggestions array of alternative company records each ranked by confidence.
Reading a result starts no work and adds no charge. The job's accounting is normally finalized when it completes. Reading a result can finalize outstanding accounting or refund the charge if the job failed, exceeded its time limit or produced no usable result, and may mark a timed-out job failed. Repeating the call never starts another job or charges again.
- : Access to the public API
OAuth 2.0 client-credentials flow (machine-to-machine). Token URL: https://secure.delpha.io/oauth2/token. The api/access scope is all-access: it grants every operation this document publishes. Per-use-case scoping, per-key credit ceilings and expiry are properties of an API key, not of this flow — use an API key when a credential must be restricted.
Opaque job identifier returned by findAndValidateLegalID.
{"value":"21014abc65004d2781d2e0ef4c9fbb46","summary":"Sample job ID"}Job succeeded — the result payload is populated.
Accepted / still running — poll the result route with the returned job_id.
Validation error — the request body or query parameters were rejected.
Authentication failed — invalid or missing OAuth 2.0 token or API key.
Forbidden — the credential is valid but not allowed here: the API key's scopes do not cover this operation, or the operation is not routed in this environment (API Gateway then answers Missing Authentication Token).
Not found — no job exists for this id, or it belongs to another team.
Conflict — the credit reservation expired before delivery; resubmit.
Too many requests — one of two limits was exceeded. Your allowance for this operation in the current 60-second window: an Error body with code: rate_limited, Retry-After set to the seconds left in the window, and the quota headers with X-RateLimit-Remaining: 0; nothing is charged. Or the per-operation floor every caller of that operation shares: a GatewayError body with Retry-After: 1 and no quota headers, refused before the API sees the request.
Internal error.
Service unavailable — a downstream dependency was unreachable.
Gateway timeout — the job exceeded its processing ceiling.
JOB_ID=job_id_from_the_202
curl -i "https://api.delpha.io/v1/legal-id/$JOB_ID" \
-H "Authorization: Bearer dlp_live_your_key_here"{
"code": "ok",
"request_id": "c1a2b3d4-0000-4a5b-8c9d-ef0123456789",
"message": "Job succeeded.",
"status": "SUCCESS",
"status_code": 200,
"result": {
"data_type": "legal_id",
"normalized_value": "88052440000012",
"label": "OK",
"legal_id_type": "FRA - SIRET",
"scores": {
"validity": 1,
"completeness": 1,
"accuracy": 1,
"consistency": 1
},
"match": {
"score": 1,
"account_name": "DELPHA",
"industry": {
"value": "5112",
"description": "Software Publishers",
"type": null
},
"website": {
"url": "https://delpha.io/"
},
"address": {
"place_name": "Wojo",
"street_number": "3",
"street": "AV VAVIN",
"full_street": "3 AV VAVIN",
"city": "PARIS 6",
"state": "",
"postal_code": "75006",
"country": "FRANCE",
"country_code": "FR",
"location": "3 AV VAVIN, PARIS 6, 75006, FRANCE"
},
"financials": {
"revenue": 62429000,
"operating_profit": -5490000,
"net_income": 20422000,
"equity": 752996000,
"currency": "NOK",
"fiscal_period": {
"start_date": "2025-01-01",
"end_date": "2025-12-31"
},
"revenue_range": "50-100"
},
"employees_nb": {
"value": null,
"min": 6,
"max": 9,
"range": "1-10"
},
"source": "https://annuaire-entreprises.data.gouv.fr/entreprise/88052440000012/",
"company_type": {
"value": "PME",
"legal_type": "SAS, société par actions simplifiée",
"legal_id_type_label": null,
"legal_type_code": "5710"
},
"date": {
"creation_date": "2020-03-11",
"closing_date": null,
"birth_date": null
},
"legal_id_type": "FRA - SIRET",
"legal_id": "88052440000012",
"headquarters_site": {
"company_name": "L'OREAL",
"legal_id": {
"value": "63201210000012",
"type": "FRA - SIRET"
}
},
"site_type": "headquarters",
"vat": "FR40632012100"
},
"suggestions": [
{
"score": 1,
"account_name": "DELPHA",
"industry": {
"value": "5112",
"description": "Software Publishers",
"type": null
},
"website": {
"url": "https://delpha.io/"
},
"address": {
"place_name": "Wojo",
"street_number": "3",
"street": "AV VAVIN",
"full_street": "3 AV VAVIN",
"city": "PARIS 6",
"state": "",
"postal_code": "75006",
"country": "FRANCE",
"country_code": "FR",
"location": "3 AV VAVIN, PARIS 6, 75006, FRANCE"
},
"financials": {
"revenue": 62429000,
"operating_profit": -5490000,
"net_income": 20422000,
"equity": 752996000,
"currency": "NOK",
"fiscal_period": {
"start_date": "2025-01-01",
"end_date": "2025-12-31"
},
"revenue_range": "50-100"
},
"employees_nb": {
"value": null,
"min": 6,
"max": 9,
"range": "1-10"
},
"source": "https://annuaire-entreprises.data.gouv.fr/entreprise/88052440000012/",
"company_type": {
"value": "PME",
"legal_type": "SAS, société par actions simplifiée",
"legal_id_type_label": null,
"legal_type_code": "5710"
},
"date": {
"creation_date": "2020-03-11",
"closing_date": null,
"birth_date": null
},
"legal_id_type": "FRA - SIRET",
"legal_id": "88052440000012",
"headquarters_site": {
"company_name": "L'OREAL",
"legal_id": {
"value": "63201210000012",
"type": "FRA - SIRET"
}
},
"site_type": "headquarters",
"vat": "FR40632012100"
}
]
},
"process_time": 0.123
}Submit 1..100 legal ID items for asynchronous batch processing as ONE job (never a per-item fan-out). Returns a job_id immediately (202); poll GET /v1/legal-id/batch/{job_id} for status and results. Each item follows LegalIDSubmitInput; see that component for its fields. It uses the runtime validation of POST /v1/legal-id. A payload with 0 items or more than 100 is rejected with 422. A batch in which ANY item names a registry (or a country with no registry) outside the legal_id_type enum is refused as a whole with 422 unsupported_registry before any credit is reserved; the message lists the offending item positions and the supported countries.
A live-mode call reserves credits and creates a job record retained for 10 days; unless your team has set resolution retention to 0, the call and its result are also recorded in your team's resolution history for the window your team configured (up to 30 days on the free tier, 180 on a paid plan). Re-submitting the same input starts a new job and a new charge, unless the request carries an Idempotency-Key already used with the same body within the last 24 hours — that returns the original job_id and reserves nothing. Test-mode calls are answered from the published fixture table and reserve nothing — see the API documentation's Test mode section.
- : Access to the public API
OAuth 2.0 client-credentials flow (machine-to-machine). Token URL: https://secure.delpha.io/oauth2/token. The api/access scope is all-access: it grants every operation this document publishes. Per-use-case scoping, per-key credit ceilings and expiry are properties of an API key, not of this flow — use an API key when a credential must be restricted.
Batch envelope for POST /v1/legal-id/batch: {"items": [...]} (1..100 items, 422 beyond). Each item follows LegalIDSubmitInput; see that component for its fields. It uses the runtime validation of POST /v1/legal-id.
Accepted / still running — poll the result route with the returned job_id.
Authentication failed — invalid or missing OAuth 2.0 token or API key.
Payment required — the team has insufficient credits.
Forbidden — the credential is valid but not allowed here: the API key's scopes do not cover this operation, or the operation is not routed in this environment (API Gateway then answers Missing Authentication Token).
Conflict — the Idempotency-Key was already used with a different request body (idempotency_key_reuse: a new key admits the new body, the original body replays the original job), or the original request with this key is still being processed (idempotency_in_progress: the same request answers with the original job once that one is admitted).
Unprocessable entity — the request is well-formed but cannot be processed: a documented size/shape bound was violated (validation_error), or a legal-ID request names a registry / country Delpha cannot query (unsupported_registry — refused before any credit is reserved; the message lists the supported countries).
Too many requests — one of two limits was exceeded. Your allowance for this operation in the current 60-second window: an Error body with code: rate_limited, Retry-After set to the seconds left in the window, and the quota headers with X-RateLimit-Remaining: 0; nothing is charged. Or the per-operation floor every caller of that operation shares: a GatewayError body with Retry-After: 1 and no quota headers, refused before the API sees the request.
Internal error.
Bad gateway — the upstream service returned an error.
# The same key with the same body replays the first 202, with no second charge.
IDEMPOTENCY_KEY=$(uuidgen)
curl -i -X POST "https://api.delpha.io/v1/legal-id/batch" \
-H "Authorization: Bearer dlp_live_your_key_here" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $IDEMPOTENCY_KEY" \
--data '{"items":[{"name":"Delpha","legal_id":"88052440000012","legal_id_type":"FRA - SIRET","address":{"city":"Paris","country":"France","postal_code":"75006","state":"Ile de France","street":"3 AVENUE VAVIN"},"website":"https://delpha.io/"}]}'{
"code": "ok",
"request_id": "c1a2b3d4-0000-4a5b-8c9d-ef0123456789",
"job_id": "21014abc65004d2781d2e0ef4c9fbb46",
"item_count": 100,
"message": "Batch submitted",
"status": "SUCCESS",
"status_code": 202
}Poll a batch of legal ID items submitted via POST /v1/legal-id/batch. 202 while running (with item_count/processed_count progress); 200 once SUCCEEDED (with counts, a presigned result_url, and result_data inlined when <=1MB); 409 if the credit reservation expired before delivery (resubmit); 500 if the job failed; 504 past the 24h ceiling.
Reading a result starts no work and adds no charge. The job's accounting is normally finalized when it completes. Reading a result can finalize outstanding accounting or refund the charge if the job failed, exceeded its time limit or produced no usable result, and may mark a timed-out job failed. Repeating the call never starts another job or charges again.
- : Access to the public API
OAuth 2.0 client-credentials flow (machine-to-machine). Token URL: https://secure.delpha.io/oauth2/token. The api/access scope is all-access: it grants every operation this document publishes. Per-use-case scoping, per-key credit ceilings and expiry are properties of an API key, not of this flow — use an API key when a credential must be restricted.
The unique identifier of the legal ID batch job.
{"value":"21014abc65004d2781d2e0ef4c9fbb46","summary":"Sample job ID"}Job succeeded — the result payload is populated.
Accepted / still running — poll the result route with the returned job_id.
Validation error — the request body or query parameters were rejected.
Authentication failed — invalid or missing OAuth 2.0 token or API key.
Forbidden — the credential is valid but not allowed here: the API key's scopes do not cover this operation, or the operation is not routed in this environment (API Gateway then answers Missing Authentication Token).
Not found — no job exists for this id, or it belongs to another team.
Conflict — the credit reservation expired before delivery; resubmit.
Too many requests — one of two limits was exceeded. Your allowance for this operation in the current 60-second window: an Error body with code: rate_limited, Retry-After set to the seconds left in the window, and the quota headers with X-RateLimit-Remaining: 0; nothing is charged. Or the per-operation floor every caller of that operation shares: a GatewayError body with Retry-After: 1 and no quota headers, refused before the API sees the request.
Internal error.
Service unavailable — a downstream dependency was unreachable.
Gateway timeout — the job exceeded its processing ceiling.
JOB_ID=job_id_from_the_202
curl -i "https://api.delpha.io/v1/legal-id/batch/$JOB_ID" \
-H "Authorization: Bearer dlp_live_your_key_here"{
"code": "ok",
"request_id": "c1a2b3d4-0000-4a5b-8c9d-ef0123456789",
"message": "97/100 items succeeded",
"status": "SUCCESS",
"status_code": 200,
"counts": {
"total": 100,
"succeeded": 97,
"failed": 3
},
"result_url": "https://delpha-api-batch.s3.amazonaws.com/batch-results/<job_id>.json?...",
"result_data": {
"job_id": "21014abc65004d2781d2e0ef4c9fbb46",
"usecase": "legal-id",
"counts": {
"total": 2,
"succeeded": 1,
"failed": 1
},
"items": [
{
"dispatch_key": {
"record_id": "21014abc65004d2781d2e0ef4c9fbb46#0"
},
"result": {
"data_type": "legal_id",
"normalized_value": "88052440000012",
"label": "OK",
"legal_id_type": "FRA - SIRET",
"scores": {
"validity": 1,
"completeness": 1,
"accuracy": 1,
"consistency": 1
},
"match": {
"score": 1,
"account_name": "DELPHA",
"industry": {
"value": "5112",
"description": "Software Publishers",
"type": null
},
"website": {
"url": "https://delpha.io/"
},
"address": {
"place_name": "Wojo",
"street_number": "3",
"street": "AV VAVIN",
"full_street": "3 AV VAVIN",
"city": "PARIS 6",
"state": "",
"postal_code": "75006",
"country": "FRANCE",
"country_code": "FR",
"location": "3 AV VAVIN, PARIS 6, 75006, FRANCE"
},
"financials": {
"revenue": 62429000,
"operating_profit": -5490000,
"net_income": 20422000,
"equity": 752996000,
"currency": "NOK",
"fiscal_period": {
"start_date": "2025-01-01",
"end_date": "2025-12-31"
},
"revenue_range": "50-100"
},
"employees_nb": {
"value": null,
"min": 6,
"max": 9,
"range": "1-10"
},
"source": "https://annuaire-entreprises.data.gouv.fr/entreprise/88052440000012/",
"company_type": {
"value": "PME",
"legal_type": "SAS, société par actions simplifiée",
"legal_id_type_label": null,
"legal_type_code": "5710"
},
"date": {
"creation_date": "2020-03-11",
"closing_date": null,
"birth_date": null
},
"legal_id_type": "FRA - SIRET",
"legal_id": "88052440000012",
"headquarters_site": {
"company_name": "L'OREAL",
"legal_id": {
"value": "63201210000012",
"type": "FRA - SIRET"
}
},
"site_type": "headquarters",
"vat": "FR40632012100"
},
"suggestions": [
{
"score": 1,
"account_name": "DELPHA",
"industry": {
"value": "5112",
"description": "Software Publishers",
"type": null
},
"website": {
"url": "https://delpha.io/"
},
"address": {
"place_name": "Wojo",
"street_number": "3",
"street": "AV VAVIN",
"full_street": "3 AV VAVIN",
"city": "PARIS 6",
"state": "",
"postal_code": "75006",
"country": "FRANCE",
"country_code": "FR",
"location": "3 AV VAVIN, PARIS 6, 75006, FRANCE"
},
"financials": {
"revenue": 62429000,
"operating_profit": -5490000,
"net_income": 20422000,
"equity": 752996000,
"currency": "NOK",
"fiscal_period": {
"start_date": "2025-01-01",
"end_date": "2025-12-31"
},
"revenue_range": "50-100"
},
"employees_nb": {
"value": null,
"min": 6,
"max": 9,
"range": "1-10"
},
"source": "https://annuaire-entreprises.data.gouv.fr/entreprise/88052440000012/",
"company_type": {
"value": "PME",
"legal_type": "SAS, société par actions simplifiée",
"legal_id_type_label": null,
"legal_type_code": "5710"
},
"date": {
"creation_date": "2020-03-11",
"closing_date": null,
"birth_date": null
},
"legal_id_type": "FRA - SIRET",
"legal_id": "88052440000012",
"headquarters_site": {
"company_name": "L'OREAL",
"legal_id": {
"value": "63201210000012",
"type": "FRA - SIRET"
}
},
"site_type": "headquarters",
"vat": "FR40632012100"
}
]
}
},
{
"dispatch_key": {
"record_id": "21014abc65004d2781d2e0ef4c9fbb46#1"
},
"error": "Processing failed for this item."
}
]
},
"item_count": null,
"processed_count": null,
"process_time": 12.3
}Last updated
Was this helpful?