Enrichments
Research a company now, and follow it until it ends.
An enrichment asks every source about a company again and works out its record. Start one
with POST /v1/enrichments, by the company's domain or by its name.
curl -X POST https://api.hydrantapi.com/v1/enrichments \
-H "Authorization: Bearer $HYDRANT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"domain": "awetomaton.com", "wait_seconds": 30}'Waiting, polling or a webhook
wait_seconds(0 to 30) waits for the result before answering:200with the enrichment and itscompanyif it ends in time,202if not.- Polling:
GETthe enrichment'sstatus_url. While it runs you get itsstage, how far each source is, and anestimated_completion_at. Following an enrichment costs nothing. - A webhook: give a
webhook_url, and we post the enrichment to it when it ends. See webhooks.
Two requests for one company at once are two enrichments, each with its own id and webhook, sharing one piece of work.
By name
{"name": "Hvidbjerg Bank"} works too. A name that could be several companies ends with
name_ambiguous and the candidates it could be; ask again by one's domain. A name no
company goes by ends with name_not_found. Neither costs anything.
Retries
Send an Idempotency-Key header, 1 to 255 printable ASCII characters without spaces, unique
to the request. A retry with the same key gets the enrichment the first request started, running or
ended, and is charged once. The same key with a different body is a 409
idempotency_key_reused.
Refreshing some fields
{"domain": "…", "mode": "refresh", "fields": ["industry"]} asks again only the sources
that give those fields.
Batches
POST /v1/enrichments/batch with {"domains": [...]} starts an enrichment for each distinct
domain, up to 1,000, at 10 credits each. GET its status_url for the counts and a page of
its domains, or give a webhook_url for a batch.completed message.
Cost
An enrichment costs 10 credits when it's answered. If it ends without finding a company, the credits are given back.