For AI agents: the documentation index is at /docs/mdmbox/llms.txt. A Markdown version of this page is available at /docs/mdmbox/api-reference.md or by requesting it with the Accept: text/markdown header.
MDMbox Docs

API reference

The full OpenAPI specification is available at /api/openapi.json. The interactive Swagger UI is at /api/docs.

The in-process mdm helpers supplied to server-side scripts are documented separately in the JavaScript algorithm API.

Infrastructure

MethodPathDescription
GET/healthzLiveness check
GET/readyzReadiness check
GET/api/docsSwagger UI
GET/api/openapi.jsonOpenAPI specification

Matching models

MethodPathDescription
GET/api/modelsList all models (optional ?resource=Patient)
POST/api/modelsCreate a model
GET/api/models/:idGet model by ID
PUT/api/models/:idUpdate model
DELETE/api/models/:idDelete model

These endpoints manage MatchingModel resources. Manage BulkMatchingModel resources through the Admin UI or the adjacent Aidbox FHIR API.

FHIR operations

$match

MethodPathDescription
POST/api/fhir/:resource/$matchMatch a resource (FHIR Parameters body)
POST/api/fhir/:resource/:id/$matchMatch existing resource by ID
POST/api/fhir/r4/:resource/$matchMatch a resource using the R4 operation implementation
POST/api/fhir/r4/:resource/:id/$matchMatch an existing resource by ID using the R4 operation implementation
POST/api/fhir/r6/:resource/$matchMatch a resource using the R6 operation implementation
POST/api/fhir/r6/:resource/:id/$matchMatch an existing resource by ID using the R6 operation implementation

The unversioned routes use the release selected by MDMBOX_DEFAULT_FHIR_RELEASE.

For body-based $match, MDMbox validates the input resource before running matching. If the resource declares meta.profile, the referenced profile must be available in the FHIR package registry and the resource must satisfy it. Validation failures return 422 Unprocessable Entity with an OperationOutcome.

See Find duplicates: $match.

Merge lifecycle

MethodPathDescription
POST/api/fhir/$merge/v2Compute and execute or preview a merge plan
POST/api/fhir/$unmerge/v2Reconstruct and reverse a merge from history
POST/api/fhir/$mergeExecute or preview a merge
POST/api/fhir/$unmergeReverse a previous merge from its merge Task

See Merge operation and Unmerge operation.

MethodPathDescription
POST/api/fhir/$linkExecute or preview a link plan
POST/api/fhir/$unlinkReverse a previous link from its link Task

See Link operation and Unlink operation.

$mark-not-a-match

MethodPathDescription
POST/api/fhir/$mark-not-a-matchRecord that two resources are not the same real-world entity

$referencing

MethodPathDescription
POST/api/fhir/:resource/:id/$referencingFind resources referencing a given resource

See Referencing operation.

Bulk matching

All bulk match endpoints are scoped to a BulkMatchingModel by ID.

MethodPathDescription
POST/api/bulk-match/:model-id/preparePrepare flat table (?force=true to recreate)
GET/api/bulk-match/:model-id/statusGet flat table preparation status
POST/api/bulk-match/:model-id/startStart bulk match job (body: {batchSize, workersCount})
POST/api/bulk-match/:model-id/stopStop job (?force=true for immediate cancellation)
POST/api/bulk-match/:model-id/continueResume a stopped job
POST/api/bulk-match/:model-id/archiveArchive a completed or stopped job
GET/api/bulk-match/:model-id/download/:job-idDownload results as CSV

See Bulk matching.

Admin UI

The admin interface is available at /admin. It provides:

  • /admin — model management (create, edit, delete MatchingModel and BulkMatchingModel)
  • /admin/bulk-match — bulk match pipeline (prepare, start, monitor, download, stop)

The Admin UI uses server-sent events for real-time updates. No separate frontend deployment is required.

Last updated: