# Synthetic validation API reference

Independent AI-assisted work sample; not client work or an assessment response.
Requires Node.js with native `fetch` for the HTTP tests (Node 18+).

Download `server.mjs`, `reconcile.mjs` and both test files into one folder.
Run `node tests.mjs` and `node http-tests.mjs`.
Run `node server.mjs` to expose the development service only on 127.0.0.1:8787.

POST /reconcile accepts JSON `{ "source": [...], "target": [...] }`.
Each row has record_id (string key), series_count (nonnegative integer) and status
(nonempty string). Responses include findings and a reconciliation indicator.
The reference returns 400 for malformed/invalid input, 404 for unknown paths,
405 for a wrong method, 413 above 128 KiB and 415 for a wrong content type.

The hosted web page uses the shared comparison code inside the browser.
It does not call this Node service. No live backend endpoint is deployed.
There is no production authentication, database, tenant isolation, rate limiting,
observability, data protection certification or clinical-data integration.
Use only synthetic data. Production work requires an agreed security design,
permission model, mapping, test environment and owner acceptance.
