Look up an encounter by visit number
Resolves an EHR visit number to an encounter without EDFlow storing the number. A miss is `200` with `found: false`. Rate-limited (`lookup`) and audited without the identifier.
Resolves an EHR visit number to an encounter without EDFlow storing the number. A miss is 200 with found: false. Rate-limited (lookup) and audited without the identifier.
OAuth 2.0 client credentials. private_key_jwt (SMART Backend Services asymmetric) is recommended; client secrets need an IP allowlist or mTLS outside the sandbox.
In: header
Scope: encounters:read
Header Parameters
Overrides the app's pinned dated version for this request.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Visit numbers travel only in bodies, never in URLs; EDFlow hashes them and never stores the value.
Response Body
application/json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
curl -X POST "https://example.com/v1/encounters/lookup" \ -H "Content-Type: application/json" \ -d '{ "externalId": "SYN3000123456", "idSystem": "epic-csn", "site": "kb-main-ed" }'{ "encounter": { "arrivedAt": "2026-09-14T15:00:11.402Z", "departedAt": "2026-09-14T15:00:11.402Z", "departureKind": "home", "engagement": { "accessState": "open", "activatedAt": "2026-09-14T15:00:11.402Z", "activeDevices": -9007199254740991, "activeFamilyLinks": -9007199254740991, "cardIssuedAt": "2026-09-14T15:00:11.402Z" }, "externalRef": { "externalId": "string", "idSystem": "string" }, "feedStale": true, "id": "enc_k57a1x2m9q4t8v3w5x1y6z7a8b9c0d1e", "lastEventAt": "2026-09-14T15:00:11.402Z", "lifecycle": "active", "object": "encounter", "origin": "ehr", "requests": { "oldestOpenAt": "2026-09-14T15:00:11.402Z", "open": -9007199254740991, "urgentOpen": true }, "site": "kb-main-ed", "stage": "checked_in", "stageEnteredAt": "2026-09-14T15:00:11.402Z", "tasks": { "openActions": -9007199254740991, "toConfirm": -9007199254740991 }, "updatedAt": "2026-09-14T15:00:11.402Z", "version": -9007199254740991 }, "found": true, "object": "encounter_lookup"}