Asynchronous results
Asynchronous results are answers that Webmetic completes after your request.
Two Enrichment calls in the API work this way. For example, you send 300 domains from your trade show list to an Enrichment list. The API confirms at once with HTTP 202, and you collect the company data later.
So a 202 is neither an error nor a job with a job ID.
Asynchronous endpoints
Only two endpoints answer with 202, and both belong to Enrichment:
- Single lookup:
GET /enrichment/companyreturns the data of one company for a domain. - List:
POST /enrichment/lists/{list_id}/domainsadds domains to a list, which Webmetic then enriches.
All other endpoints answer at once with the result or an error, including the contact endpoints under /contacts/*.
Both calls need the Enrichment key, not the Visitor Intelligence key. New lists, new domains, and single lookups also need the trial, the Growth plan, or the Enterprise plan. Otherwise, the API answers with 403 and PLAN_REQUIRED.
Single lookup
If Webmetic already knows the domain, the API answers at once with 200 and "status": "found". Otherwise Webmetic starts the work and answers with 202:
HTTP/1.1 202 Accepted
Retry-After: 15
{"status": "processing", "domain": "beispiel.de", "retry_after_seconds": 15}Then repeat the same request after the number of seconds that retry_after_seconds or the Retry-After header gives. A repeated request doesn't start a second run for the same domain.
Keep asking until the API answers with 200 and found or with 404 and not_found. Here, a 404 means that the website could not be reached or had no usable data.
If Webmetic first has to read the website, it takes hours to a few days. The API doesn't end the single lookup on its own during that time. So give your client its own maximum wait and stop asking once it has passed.
For unknown domains we recommend a list, because there every row ends with a result.
curl -i "https://hub.webmetic.de/enrichment/company?domain=beispiel.de" \
-H "Authorization: wmtc_YOUR_API_KEY"List workflow
- 1Send domainsThe API answers with 202 and counts new, existing, and invalid domains.
- 2Webmetic enrichesEach new row starts as
pendingand moves toenriching. - 3Check progressYou fetch the list until
pending_rowsis 0. - 4Collect resultsYou load the rows as JSON or as a CSV file.
You create the list itself first with POST /enrichment/lists, and the API answers at once with 201. Then you send up to 5,000 domains per request:
curl -X POST "https://hub.webmetic.de/enrichment/lists/YOUR_LIST_ID/domains" \
-H "Authorization: wmtc_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"domains": ["beispiel.de", "muster-gmbh.de"]}'added counts the new rows, invalid the entries without a valid domain. skipped_existing counts domains that are already in the list, which Webmetic therefore doesn't enrich again.
GET /enrichment/lists/{list_id} shows the progress with three counters:
done_rows: rows with the statusdone.miss_rows: rows with the statusmiss.pending_rows: all other rows, sopendingandenriching.
Unlike the single lookup, the list endpoints don't name a polling interval. Because unknown domains take hours, infrequent checks are enough.
When pending_rows is 0, every row of the list is final. Then fetch /rows page by page with page and page_size. A page holds 10,000 rows by default and at most, and the response contains rows, total, and pagination.
The status filter takes one of the four status values, and total then counts only the matching rows. /export returns all rows at once as a CSV file.
curl "https://hub.webmetic.de/enrichment/lists/YOUR_LIST_ID" \
-H "Authorization: wmtc_YOUR_API_KEY"
curl "https://hub.webmetic.de/enrichment/lists/YOUR_LIST_ID/rows?status=done&page=1" \
-H "Authorization: wmtc_YOUR_API_KEY"Row status
Every row in a list has one of four status values. The dashboard shows the same rows with its own labels:
| Status | Meaning | In the dashboard |
|---|---|---|
pending | The row is waiting to be processed | Enriching |
enriching | Webmetic is enriching the row right now | Enriching |
done | Webmetic found data | Enriched |
miss | Webmetic found no usable data | Not found |
For all fields of a row, see Enrichment list.
done and miss are final. While Webmetic still has to read the website, a row can move from enriching back to pending.
- Partly filled: Because Webmetic writes the fields of a row one after another,
/rowsand/exportalso show half-filled rows before the end. - Empty fields: A
donerow can still have empty fields when Webmetic doesn't know a value. In/rowsthese fields appear asnull. - Dashboard: Lists from the API appear in the Enrichment tab, single lookups don't.
Credits and webhooks
Checking the status costs no credits, neither the repeated single lookup nor fetching the list, rows, or export.
Enrichment currently costs no credits. For details, see Credits in the API.
Webmetic sends no webhook event for Enrichment results, because Webhooks only report company visits to your website. So you check the progress of a list yourself.