IDP Developer API: Document Data Extraction via REST, Webhooks & JSON
Data Alchemy exposes its Intelligent Document Processing (IDP) engine through a REST API, webhooks and SQL connectors. With this data extraction API you send invoices, delivery notes (DDT), orders or contracts and get back structured, validated JSON — 99.8% accuracy in about 3 seconds per document, ready to post into an ERP such as SAP, Zucchetti or TeamSystem. This page is the developer API documentation for engineers and system integrators: REST endpoints, webhooks, the output data schema and Zucchetti integration via API.
An IDP API that turns documents into structured data
The developer API is the programmatic side of Data Alchemy's Intelligent Document Processing platform. Instead of clicking through a web app, your systems submit documents over HTTP and receive validated, structured data in return — so you can embed invoice, DDT and order extraction directly into your own software, automate your accounts-payable pipeline, or feed any ERP or CRM with no manual re-keying.
Base URL and authentication
All requests use HTTPS against https://api.data-alchemy.ai/v1 and authenticate with a Bearer API key passed in the Authorization header. Keys are generated from the console and must be kept server-side, never exposed in the browser. Every response is UTF-8 JSON.
curl -X POST https://api.data-alchemy.ai/v1/documents \
-H "Authorization: Bearer $DATA_ALCHEMY_API_KEY" \
-H "Content-Type: multipart/form-data" \
-F "file=@fattura.pdf" \
-F "document_type=invoice"REST API reference: submit a document and read the data
The typical flow is asynchronous: you submit a document with a POST, receive an id and a processing status, then retrieve the result with a GET — or, better, let a webhook notify you when it completes. All endpoints are versioned under /v1.
/v1/documentsSubmit a document (PDF, XML, image) and start extraction. Returns an id and a status./v1/documents/{id}Retrieve the status and the extracted, validated data of a submitted document./v1/documentsList processed documents with filters by status, type and date range./v1/webhooksRegister an endpoint that will receive document.processed events in real time.{
"id": "doc_8a7f2c91",
"status": "processing",
"document_type": "invoice",
"created_at": "2026-06-04T09:12:33Z",
"webhook_url": "https://yourapp.example.com/hooks/data-alchemy"
}curl https://api.data-alchemy.ai/v1/documents/doc_8a7f2c91 \
-H "Authorization: Bearer $DATA_ALCHEMY_API_KEY"Webhooks: what they are and how they work
A webhook is an HTTP request that a service sends automatically to a URL you provide, the moment an event happens. It is the reverse of a normal API call: instead of you asking «is the document ready?», the service tells you as soon as it is. That is why a webhook is often described as a «reverse API» or an HTTP callback — the receiving application exposes a public endpoint and listens, while the service acts as the client.
In Data Alchemy it works like this: register a URL and you receive a POST to your endpoint as soon as a document has been processed, so you never poll. The payload contains the event, the document id, the confidence score and the extracted data following the output schema. Every request is signed with HMAC SHA-256 in the X-Data-Alchemy-Signature header so you can verify authenticity.
POST /hooks/data-alchemy (X-Data-Alchemy-Signature: sha256=...)
{
"event": "document.processed",
"id": "doc_8a7f2c91",
"status": "completed",
"confidence": 0.998,
"data": { /* schema di output — vedi sotto / see below */ }
}Webhooks vs polling: what's the difference?
With polling, your system repeatedly asks the API («is it ready yet?»), wasting calls until processing completes and adding a delay equal to your polling interval. With a webhook the notification fires the instant the document is ready: no empty calls, no artificial delay and far less load on both sides. Polling still makes a useful safety net — for example to catch up on a document if your endpoint was unreachable for a long stretch.
How to verify a webhook signature
Because your endpoint is public, anyone could POST to it. That is why every Data Alchemy webhook carries an X-Data-Alchemy-Signature header holding the HMAC SHA-256 of the raw request body, computed with your secret. Recompute the signature over the body you received and compare it with the header using a constant-time comparison: if they differ, drop the request. Always verify the signature before reading the payload.
import crypto from "node:crypto";
// Il body va letto grezzo: un JSON già parsato e riserializzato
// produrrebbe una firma diversa. / Read the raw body: a parsed and
// re-serialised JSON would produce a different signature.
function isFromDataAlchemy(rawBody, header, secret) {
const expected = crypto
.createHmac("sha256", secret)
.update(rawBody)
.digest("hex");
const received = header.replace("sha256=", "");
return crypto.timingSafeEqual(
Buffer.from(expected),
Buffer.from(received)
);
}Output data schema (JSON)
Every document returns typed, validated JSON: header (supplier, number, dates), line items, totals, taxes and the result of validation against your ERP master data. The structure is consistent across document types, so you write the mapping to your ERP only once.
{
"document_type": "invoice",
"header": {
"supplier": {
"name": "Rossi Forniture S.r.l.",
"vat_number": "IT01234567890"
},
"invoice_number": "2026/00417",
"issue_date": "2026-05-28",
"currency": "EUR"
},
"line_items": [
{
"sku": "ART-0042",
"description": "Cartone 30x20x15",
"quantity": 12,
"unit_price": 8.50,
"total": 102.00,
"vat_rate": 22
}
],
"totals": { "net": 102.00, "vat": 22.44, "gross": 124.44 },
"validation": { "status": "validated", "erp_match": true }
}- document_type
- Document type classified by the AI: invoice, delivery_note, order, contract, price_list.
- header
- Header data: supplier/customer details, VAT number, document number, dates and currency.
- line_items
- Array of lines: item code (SKU), description, quantity, unit price, total and VAT rate.
- totals
- Recomputed and re-checked totals: net amount (net), tax (vat) and document total (gross).
- validation
- Result of real-time validation against ERP master data, with an erp_match flag and any anomalies.
Rate limits, retries and error handling
Responses use standard HTTP status codes: 202 for a document accepted and processing, 200 when you retrieve the result, 401 for a missing or invalid API key, 422 for an unreadable document and 429 when you exceed the rate limit. Every error returns JSON with error.code and error.message.
On a 429 or any 5xx error, retry with exponential backoff so you don't pile pressure on a service that is already under load. Undelivered webhooks are retried automatically with increasing backoff, so no document.processed event is lost even if your endpoint stays unreachable for a few minutes.
202Document accepted and processing.200Result ready: extracted and validated data.401API key missing, expired or invalid.422Document unreadable or format unsupported.429Rate limit exceeded: retry with exponential backoff.HTTP/1.1 429 Too Many Requests
Retry-After: 30
{
"error": {
"code": "rate_limit_exceeded",
"message": "Too many requests. Retry after 30s."
}
}Four ways to integrate document extraction
REST API
Submit a document and retrieve its extracted, validated data as structured JSON, ready to map onto your ERP.
Webhooks
Event-driven async pipelines: Data Alchemy notifies your endpoint when processing completes, with no polling.
SQL connectors
Prefer database-level integration? Push extracted data straight into your system through direct SQL.
Email acquisition
Connect a Google Workspace or Microsoft 365 mailbox and let the AI ingest documents — zero-code integration.
Explore the platform behind the API
SAP, Zucchetti, TeamSystem
How extracted data is written into your management system via REST API, webhooks and SQL.
Learn more →Document extraction APIDocument extraction API overview
The product-level view of the IDP API: capabilities, integration flow and use cases.
Learn more →IDP platformFull IDP solution
Invoices, orders, contracts and price lists processed by the same AI platform.
Learn more →Frequently asked questions about the developer API
What is the Data Alchemy developer API?
It is the programmatic interface to Data Alchemy's Intelligent Document Processing (IDP) engine. Instead of using the web app, your systems submit documents — invoices, delivery notes (DDT), purchase orders, contracts, price lists — and receive back structured, validated data ready to write into your ERP or CRM.
Which integration methods are available?
Data Alchemy exposes a REST API and webhooks for event-driven workflows, plus direct SQL connectors for systems that prefer database-level integration. Documents can also be acquired automatically from a Google Workspace or Microsoft 365 mailbox, with no code at all.
What format does the extracted data come back in?
Extracted fields are returned as structured JSON — header data, line items, totals, taxes and document references — already validated against your ERP master data, so it can be mapped directly onto your system of record.
How do authentication and webhook security work?
Requests authenticate with a Bearer API key in the Authorization header over HTTPS. Outgoing webhooks are signed with HMAC SHA-256 in the X-Data-Alchemy-Signature header, so you can verify each notification genuinely comes from Data Alchemy before processing it.
How accurate and fast is the extraction?
Data Alchemy assigns a dedicated LLM to each document model (today Claude AI), reaching 99.8% accuracy in about 3 seconds per document, with no templates and no per-layout training.
Which ERPs can I write the data into?
The API is system-agnostic: native integrations exist for SAP, Zucchetti and TeamSystem, and the REST API, webhooks and SQL connectors let you push structured data into any other ERP, CRM or internal application.
What is a webhook?
A webhook is an HTTP request that a service sends automatically to a URL you provide, the moment an event happens — a kind of «reverse API». Instead of repeatedly asking the API whether a document is ready (polling), you register an endpoint and Data Alchemy sends you a POST with the extracted data the instant processing completes. Every webhook is signed with HMAC SHA-256 in the X-Data-Alchemy-Signature header, so you can verify it genuinely came from Data Alchemy before processing it.
Build with the developer API
Tell us about your use case and we'll set up API access and walk you through integration on your real documents — no commitment.
Request API access