> For the complete documentation index, see [llms.txt](https://docs.welkinhealth.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.welkinhealth.com/api-reference/encounters.md).

# Encounters

The "Encounters" folder in the API collection houses a curated selection of API requests and endpoints that pertain to managing and tracking patient encounters. Encounters refer to the interactions, appointments, or medical events between healthcare professionals and patients. This folder organizes the necessary API calls for creating, retrieving, updating, and deleting encounter records, streamlining the testing and development of functionalities related to patient interactions within the API collection.

## Get all Encounter Records by user ID

> \### HTTP Request\
> \
> \*\*\*GET\*\*\* \`/{tenantName}/{instanceName}/users/{userId}/encounters\`\
> \
> in our example it would be:\
> \
> \*\*\*GET\*\*\* \`<https://api.live.welkincloud.io/gh/sb-demo/users/d6ea79ce-d3d6-4c2d-a27e-e4d1207f60f1/encounters\\`\\>
> \
> \*\*Responses\*\*\
> \
> \| Code | Description |\
> \| --- | --- |\
> \| 200 | OK |\
> \| 401 | Unauthorized |\
> \| 403 | Forbidden |\
> \| 404 | Not Found |

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"tags":[{"name":"Encounters","description":"The \"Encounters\" folder in the API collection houses a curated selection of API requests and endpoints that pertain to managing and tracking patient encounters. Encounters refer to the interactions, appointments, or medical events between healthcare professionals and patients. This folder organizes the necessary API calls for creating, retrieving, updating, and deleting encounter records, streamlining the testing and development of functionalities related to patient interactions within the API collection."}],"servers":[{"url":"https://api.live.welkincloud.io","description":"Welkin Health production API"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Bearer token obtained from `POST /{tenantName}/admin/api_clients/{clientName}`. Valid for 60 minutes."}},"parameters":{"TenantName":{"name":"tenantName","in":"path","required":true,"description":"Your organization (tenant) name, e.g. `acme-health`","schema":{"type":"string"}},"InstanceName":{"name":"instanceName","in":"path","required":true,"description":"Your environment name: `live`, `sandbox`, or a custom name","schema":{"type":"string"}},"UserId":{"name":"userId","in":"path","required":true,"description":"UUID of the user","schema":{"type":"string","format":"uuid"}}},"schemas":{"EncounterPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CdtRecord"}},"metaInfo":{"$ref":"#/components/schemas/PageMetaInfo"}}},"CdtRecord":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"patientId":{"type":"string","format":"uuid"},"cdtId":{"type":"string","format":"uuid"},"version":{"type":"integer"},"cdtName":{"type":"string"},"jsonBody":{"type":"object","additionalProperties":true,"description":"Fields defined by the CDT schema, plus system fields (id, created_at, created_by, etc)."}}},"PageMetaInfo":{"type":"object","properties":{"page":{"type":"integer"},"pageSize":{"type":"integer"},"totalElements":{"type":"integer"},"numberOfElements":{"type":"integer"}}}},"responses":{"BadRequest":{"description":"Bad request — the request could not be understood or was missing required parameters."},"Unauthorized":{"description":"Unauthorized — the Bearer token is missing, expired, or invalid."},"Forbidden":{"description":"Forbidden — the API client role does not have permission for this resource. Check the role and security policy in Admin."},"NotFound":{"description":"Not found — the requested resource does not exist."},"TooManyRequests":{"description":"Too many requests — rate limit exceeded. Implement exponential backoff."},"InternalError":{"description":"Internal server error."}}},"paths":{"/{tenantName}/{instanceName}/users/{userId}/encounters":{"get":{"summary":"Get all Encounter Records by user ID","tags":["Encounters"],"operationId":"Get_all_Encounter_Records_by_user_ID","parameters":[{"$ref":"#/components/parameters/TenantName"},{"$ref":"#/components/parameters/InstanceName"},{"$ref":"#/components/parameters/UserId"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":0,"minimum":0},"description":"Pagination: page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","default":20},"description":"Pagination: page size"},{"name":"sort","in":"query","required":false,"schema":{"type":"string"},"description":"Sort field with sorting order(asc or desc) after coma"},{"name":"statuses","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"}},"description":"Encounter status. Available statuses: DRAFT,OPEN,ACTIVE,FINALIZED"},{"name":"withCareTeam","in":"query","required":false,"schema":{"type":"boolean"},"description":"If true, return only encounter thats belong to the patients in the user care team (default: true)"}],"responses":{"200":{"description":"Paginated encounter records","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EncounterPage"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"}},"description":"### HTTP Request\n\n***GET*** `/{tenantName}/{instanceName}/users/{userId}/encounters`\n\nin our example it would be:\n\n***GET*** `https://api.live.welkincloud.io/gh/sb-demo/users/d6ea79ce-d3d6-4c2d-a27e-e4d1207f60f1/encounters`\n\n**Responses**\n\n| Code | Description |\n| --- | --- |\n| 200 | OK |\n| 401 | Unauthorized |\n| 403 | Forbidden |\n| 404 | Not Found |"}}}}
```

## Get all Encounter Records by patient ID

> \### HTTP Request\
> \
> \*\*\*GET\*\*\* \`/{tenantName}/{instanceName}/patients/{patientId}/encounters\`\
> \
> in our example it would be:\
> \
> \*\*\*GET\*\*\* \`<https://api.live.welkincloud.io/gh/sb-demo/patients/d6ea79ce-d3d6-4c2d-a27e-e4d1207f60f1/encounters\\`\\>
> \
> \*\*Responses\*\*\
> \
> \| Code | Description |\
> \| --- | --- |\
> \| 200 | OK |\
> \| 401 | Unauthorized |\
> \| 403 | Forbidden |\
> \| 404 | Not Found |

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"tags":[{"name":"Encounters","description":"The \"Encounters\" folder in the API collection houses a curated selection of API requests and endpoints that pertain to managing and tracking patient encounters. Encounters refer to the interactions, appointments, or medical events between healthcare professionals and patients. This folder organizes the necessary API calls for creating, retrieving, updating, and deleting encounter records, streamlining the testing and development of functionalities related to patient interactions within the API collection."}],"servers":[{"url":"https://api.live.welkincloud.io","description":"Welkin Health production API"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Bearer token obtained from `POST /{tenantName}/admin/api_clients/{clientName}`. Valid for 60 minutes."}},"parameters":{"TenantName":{"name":"tenantName","in":"path","required":true,"description":"Your organization (tenant) name, e.g. `acme-health`","schema":{"type":"string"}},"InstanceName":{"name":"instanceName","in":"path","required":true,"description":"Your environment name: `live`, `sandbox`, or a custom name","schema":{"type":"string"}},"PatientId":{"name":"patientId","in":"path","required":true,"description":"UUID of the patient record","schema":{"type":"string","format":"uuid"}}},"schemas":{"EncounterPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CdtRecord"}},"metaInfo":{"$ref":"#/components/schemas/PageMetaInfo"}}},"CdtRecord":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"patientId":{"type":"string","format":"uuid"},"cdtId":{"type":"string","format":"uuid"},"version":{"type":"integer"},"cdtName":{"type":"string"},"jsonBody":{"type":"object","additionalProperties":true,"description":"Fields defined by the CDT schema, plus system fields (id, created_at, created_by, etc)."}}},"PageMetaInfo":{"type":"object","properties":{"page":{"type":"integer"},"pageSize":{"type":"integer"},"totalElements":{"type":"integer"},"numberOfElements":{"type":"integer"}}}},"responses":{"BadRequest":{"description":"Bad request — the request could not be understood or was missing required parameters."},"Unauthorized":{"description":"Unauthorized — the Bearer token is missing, expired, or invalid."},"Forbidden":{"description":"Forbidden — the API client role does not have permission for this resource. Check the role and security policy in Admin."},"NotFound":{"description":"Not found — the requested resource does not exist."},"TooManyRequests":{"description":"Too many requests — rate limit exceeded. Implement exponential backoff."},"InternalError":{"description":"Internal server error."}}},"paths":{"/{tenantName}/{instanceName}/patients/{patientId}/encounters":{"get":{"summary":"Get all Encounter Records by patient ID","tags":["Encounters"],"operationId":"Get_all_Encounter_Records_by_patient_ID","parameters":[{"$ref":"#/components/parameters/TenantName"},{"$ref":"#/components/parameters/InstanceName"},{"$ref":"#/components/parameters/PatientId"},{"name":"statuses","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"}},"description":"Encounter status. Available statuses: DRAFT,OPEN,ACTIVE,FINALIZED"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":0,"minimum":0},"description":"Pagination: page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","default":20},"description":"Pagination: page size"},{"name":"sort","in":"query","required":false,"schema":{"type":"string"},"description":"Sort field with sorting order(asc or desc) after coma"},{"name":"onlyWithCalendarEvent","in":"query","required":false,"schema":{"type":"boolean"},"description":"Exclude all information not related to calendar event, except encounter record"}],"responses":{"200":{"description":"Paginated encounter records","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EncounterPage"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"}},"description":"### HTTP Request\n\n***GET*** `/{tenantName}/{instanceName}/patients/{patientId}/encounters`\n\nin our example it would be:\n\n***GET*** `https://api.live.welkincloud.io/gh/sb-demo/patients/d6ea79ce-d3d6-4c2d-a27e-e4d1207f60f1/encounters`\n\n**Responses**\n\n| Code | Description |\n| --- | --- |\n| 200 | OK |\n| 401 | Unauthorized |\n| 403 | Forbidden |\n| 404 | Not Found |"}}}}
```

## Create an Encounter for Patient

> This endpoint allows you to create a new encounter record for a specific patient.\
> \
> \`{{url}}/{{tenantName}}/{{instanceName}}/patients/{{patientId}}/encounters\`\
> \
> Some information about the \<u>parameter location\</u>:\
> \
> For creating encounters via API this parameter is \*\*a string\*\*.\
> \
> After creating an encounter via API, on the UI this string is displayed depending on the eventMode:\
> \
> \\- \_IN-PERSON\_: Тhe location value is displayed as text that can be copied.\
> \
> \\- \_CALL\_: You need to enter the patient number, and then the location value is displayed as a link, when clicked on, it opens the call drover in the patient's commcenter. The link will be displayed as an encounter location if the patient has a primary phone number specified\
> \
> \\- \_VIDEO\_: the location value is displayed as an external link. The link must be fully specified\
> \
> To fill in the \<u>billing\</u> information, the responsibleParty parameters and information about services should be passed into the body of the request.  \
> \_\*\*responsibleParty\*\*\_ ('Billing Type' on UI) can take values:\
> \
> \- SELF\_PAY\
> &#x20;   \
> \- INSURANCE\
> &#x20;   \
> \
> In the \_\*\*visitServices\*\*\_ block you should pass all the services that should be attached to this encounter.\
> \
> \- \*\*name\*\* - the name of the service, which is specified in the designer\
> &#x20;   \
> \- \*\*preVisitCost\*\* ('Co-pay' on UI) and \*\*serviceCost\*\* ('Fee' on UI) - payment amount, it is specified in cents.\
> &#x20;   \
> \- \*\*modifiers\*\* - list of modifiers for this service, the names are specified in the designer. Service can be without modifiers\
> &#x20;   \
> \
> \*\*HTTP Response Codes:\*\*\
> \
> \- 201: Successfully created the encounter for the patient\
> &#x20;   \
> \- 400: Bad request - the request could not be understood or was missing required parameters\
> &#x20;   \
> \- 500: Internal server error - something went wrong on the server

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"tags":[{"name":"Encounters","description":"The \"Encounters\" folder in the API collection houses a curated selection of API requests and endpoints that pertain to managing and tracking patient encounters. Encounters refer to the interactions, appointments, or medical events between healthcare professionals and patients. This folder organizes the necessary API calls for creating, retrieving, updating, and deleting encounter records, streamlining the testing and development of functionalities related to patient interactions within the API collection."}],"servers":[{"url":"https://api.live.welkincloud.io","description":"Welkin Health production API"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Bearer token obtained from `POST /{tenantName}/admin/api_clients/{clientName}`. Valid for 60 minutes."}},"parameters":{"TenantName":{"name":"tenantName","in":"path","required":true,"description":"Your organization (tenant) name, e.g. `acme-health`","schema":{"type":"string"}},"InstanceName":{"name":"instanceName","in":"path","required":true,"description":"Your environment name: `live`, `sandbox`, or a custom name","schema":{"type":"string"}},"PatientId":{"name":"patientId","in":"path","required":true,"description":"UUID of the patient record","schema":{"type":"string","format":"uuid"}}},"schemas":{"CdtRecord":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"patientId":{"type":"string","format":"uuid"},"cdtId":{"type":"string","format":"uuid"},"version":{"type":"integer"},"cdtName":{"type":"string"},"jsonBody":{"type":"object","additionalProperties":true,"description":"Fields defined by the CDT schema, plus system fields (id, created_at, created_by, etc)."}}},"EncounterRequest":{"type":"object","required":["title"],"properties":{"calendarEventId":{"type":"string","format":"uuid","nullable":true},"title":{"type":"string"},"description":{"type":"string","nullable":true},"instruction":{"type":"string","nullable":true},"color":{"type":"string","nullable":true},"status":{"$ref":"#/components/schemas/EncounterStatus","default":"DRAFT"},"templateName":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"patientInfo":{"$ref":"#/components/schemas/EncounterPatientInfo"},"timezone":{"type":"string","nullable":true},"responsibleParty":{"$ref":"#/components/schemas/ResponsibleParty"},"visitServices":{"type":"array","items":{"$ref":"#/components/schemas/EncounterVisitService"}},"encounterPaymentInfo":{"$ref":"#/components/schemas/EncounterPaymentInfo"},"location":{"type":"string","nullable":true},"currentScheduledAppointment":{"type":"object","additionalProperties":true,"nullable":true,"description":"Calendar event object — see the Calendar API section for its shape."}}},"EncounterStatus":{"type":"string","enum":["DRAFT","OPEN","CANCELED","CANCELLED","FINALIZED"]},"EncounterPatientInfo":{"type":"object","properties":{"patientId":{"type":"string","format":"uuid"},"firstName":{"type":"string"},"lastName":{"type":"string"}}},"ResponsibleParty":{"type":"string","enum":["SELF_PAY","INSURANCE","UNKNOWN"],"deprecated":true},"EncounterVisitService":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"quantity":{"type":"number","default":1},"serviceCost":{"type":"integer","nullable":true,"description":"Cost in cents"},"cancellationFee":{"type":"integer","nullable":true,"description":"Cost in cents"},"preVisitCost":{"type":"integer","nullable":true,"description":"Cost in cents"},"modifiers":{"type":"array","items":{"type":"string"}}}},"EncounterPaymentInfo":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/EncounterPaymentStatus"},"amountDue":{"type":"integer","nullable":true,"description":"Cost in cents"},"lastUpdatedAt":{"type":"integer","nullable":true,"description":"Epoch millis"}}},"EncounterPaymentStatus":{"type":"string","enum":["NO_PAYMENT_DUE","PAID","PAYMENT_DUE","PAYMENT_OVERDUE","CREDIT_BALANCE"]}},"responses":{"BadRequest":{"description":"Bad request — the request could not be understood or was missing required parameters."},"Unauthorized":{"description":"Unauthorized — the Bearer token is missing, expired, or invalid."},"Forbidden":{"description":"Forbidden — the API client role does not have permission for this resource. Check the role and security policy in Admin."},"NotFound":{"description":"Not found — the requested resource does not exist."},"TooManyRequests":{"description":"Too many requests — rate limit exceeded. Implement exponential backoff."},"InternalError":{"description":"Internal server error."}}},"paths":{"/{tenantName}/{instanceName}/patients/{patientId}/encounters":{"post":{"summary":"Create an Encounter for Patient","tags":["Encounters"],"operationId":"Create_an_Encounter_for_Patient","parameters":[{"$ref":"#/components/parameters/TenantName"},{"$ref":"#/components/parameters/InstanceName"},{"$ref":"#/components/parameters/PatientId"}],"responses":{"201":{"description":"Created encounter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CdtRecord"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"}},"description":"This endpoint allows you to create a new encounter record for a specific patient.\n\n`{{url}}/{{tenantName}}/{{instanceName}}/patients/{{patientId}}/encounters`\n\nSome information about the <u>parameter location</u>:\n\nFor creating encounters via API this parameter is **a string**.\n\nAfter creating an encounter via API, on the UI this string is displayed depending on the eventMode:\n\n\\- _IN-PERSON_: Тhe location value is displayed as text that can be copied.\n\n\\- _CALL_: You need to enter the patient number, and then the location value is displayed as a link, when clicked on, it opens the call drover in the patient's commcenter. The link will be displayed as an encounter location if the patient has a primary phone number specified\n\n\\- _VIDEO_: the location value is displayed as an external link. The link must be fully specified\n\nTo fill in the <u>billing</u> information, the responsibleParty parameters and information about services should be passed into the body of the request.  \n_**responsibleParty**_ ('Billing Type' on UI) can take values:\n\n- SELF_PAY\n    \n- INSURANCE\n    \n\nIn the _**visitServices**_ block you should pass all the services that should be attached to this encounter.\n\n- **name** - the name of the service, which is specified in the designer\n    \n- **preVisitCost** ('Co-pay' on UI) and **serviceCost** ('Fee' on UI) - payment amount, it is specified in cents.\n    \n- **modifiers** - list of modifiers for this service, the names are specified in the designer. Service can be without modifiers\n    \n\n**HTTP Response Codes:**\n\n- 201: Successfully created the encounter for the patient\n    \n- 400: Bad request - the request could not be understood or was missing required parameters\n    \n- 500: Internal server error - something went wrong on the server","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EncounterRequest"}}}}}}}}
```

## Get all Encounter Records by client\_id from JWT Token (work for users and api\_clients tokens)

> \### HTTP Request\
> \
> For receiving this list as an API client need to set param \`withCareTeam=false.\`  \
> Example: {{ url }} / {{ tenantName }} / {{ instanceName }} /encounters\*\*?withCareTeam=false\*\*\
> \
> \_\*\*GET\*\*\_ \`/{tenantName}/{instanceName}/encounters\`\
> \
> in our example it would be:\
> \
> \_\*\*GET\*\*\_ \`<https://api.live.welkincloud.io/gh/sb-demo/encounters\\`\\>
> \
> \*\*Responses\*\*\
> \
> \| Code | Description |\
> \| --- | --- |\
> \| 200 | OK |\
> \| 401 | Unauthorized |\
> \| 403 | Forbidden |\
> \| 404 | Not Found |

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"tags":[{"name":"Encounters","description":"The \"Encounters\" folder in the API collection houses a curated selection of API requests and endpoints that pertain to managing and tracking patient encounters. Encounters refer to the interactions, appointments, or medical events between healthcare professionals and patients. This folder organizes the necessary API calls for creating, retrieving, updating, and deleting encounter records, streamlining the testing and development of functionalities related to patient interactions within the API collection."}],"servers":[{"url":"https://api.live.welkincloud.io","description":"Welkin Health production API"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Bearer token obtained from `POST /{tenantName}/admin/api_clients/{clientName}`. Valid for 60 minutes."}},"parameters":{"TenantName":{"name":"tenantName","in":"path","required":true,"description":"Your organization (tenant) name, e.g. `acme-health`","schema":{"type":"string"}},"InstanceName":{"name":"instanceName","in":"path","required":true,"description":"Your environment name: `live`, `sandbox`, or a custom name","schema":{"type":"string"}},"Page":{"name":"page","in":"query","required":false,"description":"Zero-based page number","schema":{"type":"integer","default":0,"minimum":0}},"Size":{"name":"size","in":"query","required":false,"description":"Number of results per page","schema":{"type":"integer","default":20,"minimum":1,"maximum":1000}},"Sort":{"name":"sort","in":"query","required":false,"description":"Sort field and direction, e.g. `lastName,asc` or `createdAt,desc`","schema":{"type":"string"}}},"schemas":{"EncounterPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CdtRecord"}},"metaInfo":{"$ref":"#/components/schemas/PageMetaInfo"}}},"CdtRecord":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"patientId":{"type":"string","format":"uuid"},"cdtId":{"type":"string","format":"uuid"},"version":{"type":"integer"},"cdtName":{"type":"string"},"jsonBody":{"type":"object","additionalProperties":true,"description":"Fields defined by the CDT schema, plus system fields (id, created_at, created_by, etc)."}}},"PageMetaInfo":{"type":"object","properties":{"page":{"type":"integer"},"pageSize":{"type":"integer"},"totalElements":{"type":"integer"},"numberOfElements":{"type":"integer"}}}},"responses":{"BadRequest":{"description":"Bad request — the request could not be understood or was missing required parameters."},"Unauthorized":{"description":"Unauthorized — the Bearer token is missing, expired, or invalid."},"Forbidden":{"description":"Forbidden — the API client role does not have permission for this resource. Check the role and security policy in Admin."},"NotFound":{"description":"Not found — the requested resource does not exist."},"TooManyRequests":{"description":"Too many requests — rate limit exceeded. Implement exponential backoff."},"InternalError":{"description":"Internal server error."}}},"paths":{"/{tenantName}/{instanceName}/encounters":{"get":{"summary":"Get all Encounter Records by client_id from JWT Token (work for users and api_clients tokens)","tags":["Encounters"],"operationId":"Get_all_Encounter_Records_by_client_id_from_JWT_Token_work_for_users_and_api_clients_tokens","parameters":[{"$ref":"#/components/parameters/TenantName"},{"$ref":"#/components/parameters/InstanceName"},{"$ref":"#/components/parameters/Page"},{"$ref":"#/components/parameters/Size"},{"$ref":"#/components/parameters/Sort"},{"name":"statuses","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"}},"description":"Encounter status. Available statuses: DRAFT,OPEN,ACTIVE,FINALIZED"}],"responses":{"200":{"description":"Paginated encounter records for the current API client","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EncounterPage"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"}},"description":"### HTTP Request\n\nFor receiving this list as an API client need to set param `withCareTeam=false.`  \nExample: {{ url }} / {{ tenantName }} / {{ instanceName }} /encounters**?withCareTeam=false**\n\n_**GET**_ `/{tenantName}/{instanceName}/encounters`\n\nin our example it would be:\n\n_**GET**_ `https://api.live.welkincloud.io/gh/sb-demo/encounters`\n\n**Responses**\n\n| Code | Description |\n| --- | --- |\n| 200 | OK |\n| 401 | Unauthorized |\n| 403 | Forbidden |\n| 404 | Not Found |"}}}}
```

## Get all Encounter Records with related data by client\_id from JWT Token (work for users and api\_clients tokens)

> \### HTTP Request\
> \
> \*\*\*GET\*\*\* \`/{tenantName}/{instanceName}/full-encounters\`\
> \
> in our example it would be:\
> \
> \*\*\*GET\*\*\* \`<https://api.live.welkincloud.io/gh/sb-demo/full-encounters\\`\\>
> \
> \*\*Responses\*\*\
> \
> \| Code | Description |\
> \| --- | --- |\
> \| 200 | OK |\
> \| 401 | Unauthorized |\
> \| 403 | Forbidden |\
> \| 404 | Not Found |

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"tags":[{"name":"Encounters","description":"The \"Encounters\" folder in the API collection houses a curated selection of API requests and endpoints that pertain to managing and tracking patient encounters. Encounters refer to the interactions, appointments, or medical events between healthcare professionals and patients. This folder organizes the necessary API calls for creating, retrieving, updating, and deleting encounter records, streamlining the testing and development of functionalities related to patient interactions within the API collection."}],"servers":[{"url":"https://api.live.welkincloud.io","description":"Welkin Health production API"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Bearer token obtained from `POST /{tenantName}/admin/api_clients/{clientName}`. Valid for 60 minutes."}},"parameters":{"TenantName":{"name":"tenantName","in":"path","required":true,"description":"Your organization (tenant) name, e.g. `acme-health`","schema":{"type":"string"}},"InstanceName":{"name":"instanceName","in":"path","required":true,"description":"Your environment name: `live`, `sandbox`, or a custom name","schema":{"type":"string"}}},"schemas":{"FullEncounterPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/FullEncounter"}},"metaInfo":{"$ref":"#/components/schemas/PageMetaInfo"}}},"FullEncounter":{"type":"object","properties":{"encounter":{"$ref":"#/components/schemas/CdtRecord"},"disposition":{"$ref":"#/components/schemas/CdtRecord","nullable":true},"calendarEvent":{"type":"object","additionalProperties":true,"nullable":true},"userRelatedToCalendarEvent":{"type":"object","additionalProperties":true,"nullable":true},"assessmentLinks":{"type":"array","items":{"$ref":"#/components/schemas/CdtRecord"}},"comments":{"type":"array","items":{"$ref":"#/components/schemas/EncounterComment"}}}},"CdtRecord":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"patientId":{"type":"string","format":"uuid"},"cdtId":{"type":"string","format":"uuid"},"version":{"type":"integer"},"cdtName":{"type":"string"},"jsonBody":{"type":"object","additionalProperties":true,"description":"Fields defined by the CDT schema, plus system fields (id, created_at, created_by, etc)."}}},"EncounterComment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"createdByName":{"type":"string"},"updatedByName":{"type":"string"},"encounterId":{"type":"string","format":"uuid"},"text":{"type":"string"}}},"PageMetaInfo":{"type":"object","properties":{"page":{"type":"integer"},"pageSize":{"type":"integer"},"totalElements":{"type":"integer"},"numberOfElements":{"type":"integer"}}}},"responses":{"BadRequest":{"description":"Bad request — the request could not be understood or was missing required parameters."},"Unauthorized":{"description":"Unauthorized — the Bearer token is missing, expired, or invalid."},"Forbidden":{"description":"Forbidden — the API client role does not have permission for this resource. Check the role and security policy in Admin."},"NotFound":{"description":"Not found — the requested resource does not exist."},"TooManyRequests":{"description":"Too many requests — rate limit exceeded. Implement exponential backoff."},"InternalError":{"description":"Internal server error."}}},"paths":{"/{tenantName}/{instanceName}/full-encounters":{"get":{"summary":"Get all Encounter Records with related data by client_id from JWT Token (work for users and api_clients tokens)","tags":["Encounters"],"operationId":"Get_all_Encounter_Records_with_related_data_by_client_id_from_JWT_Token_work_for_users_and_api_clients_tokens","parameters":[{"$ref":"#/components/parameters/TenantName"},{"$ref":"#/components/parameters/InstanceName"},{"name":"filters","in":"query","required":false,"schema":{"type":"string"}},{"name":"createdBy","in":"query","required":false,"schema":{"type":"string"}},{"name":"onlyWithCalendarEvent","in":"query","required":false,"schema":{"type":"boolean"},"description":"Exclude all information not related to calendar event, except encounter record"},{"name":"statuses","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"}},"description":"Encounter status. Available statuses: DRAFT,OPEN,ACTIVE,FINALIZED"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":0,"minimum":0},"description":"Pagination: page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","default":20},"description":"Pagination: page size"},{"name":"sort","in":"query","required":false,"schema":{"type":"string"},"description":"Sort field with sorting order(asc or desc) after coma"}],"responses":{"200":{"description":"Paginated full encounter records","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FullEncounterPage"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"}},"description":"### HTTP Request\n\n***GET*** `/{tenantName}/{instanceName}/full-encounters`\n\nin our example it would be:\n\n***GET*** `https://api.live.welkincloud.io/gh/sb-demo/full-encounters`\n\n**Responses**\n\n| Code | Description |\n| --- | --- |\n| 200 | OK |\n| 401 | Unauthorized |\n| 403 | Forbidden |\n| 404 | Not Found |"}}}}
```

## Get all Encounter Records with related data by patient ID

> Get all encounter records with related data by patient id\
> \
> \### HTTP Request\
> \
> \*\*\*GET\*\*\* \`/{tenantName}/{instanceName}/patients/{patientId}/full-encounters\`\
> \
> in our example it would be:\
> \
> \*\*\*GET\*\*\* \`<https://api.live.welkincloud.io/gh/sb-demo/patients/08632f11-cb33-4b5b-aece-aaa360f9f747/full-encounters\\`\\>
> \
> \*\*Responses\*\*\
> \
> \| Code | Description |\
> \| --- | --- |\
> \| 200 | OK |\
> \| 401 | Unauthorized |\
> \| 403 | Forbidden |\
> \| 404 | Not Found |

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"tags":[{"name":"Encounters","description":"The \"Encounters\" folder in the API collection houses a curated selection of API requests and endpoints that pertain to managing and tracking patient encounters. Encounters refer to the interactions, appointments, or medical events between healthcare professionals and patients. This folder organizes the necessary API calls for creating, retrieving, updating, and deleting encounter records, streamlining the testing and development of functionalities related to patient interactions within the API collection."}],"servers":[{"url":"https://api.live.welkincloud.io","description":"Welkin Health production API"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Bearer token obtained from `POST /{tenantName}/admin/api_clients/{clientName}`. Valid for 60 minutes."}},"parameters":{"TenantName":{"name":"tenantName","in":"path","required":true,"description":"Your organization (tenant) name, e.g. `acme-health`","schema":{"type":"string"}},"InstanceName":{"name":"instanceName","in":"path","required":true,"description":"Your environment name: `live`, `sandbox`, or a custom name","schema":{"type":"string"}},"PatientId":{"name":"patientId","in":"path","required":true,"description":"UUID of the patient record","schema":{"type":"string","format":"uuid"}}},"schemas":{"FullEncounterPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/FullEncounter"}},"metaInfo":{"$ref":"#/components/schemas/PageMetaInfo"}}},"FullEncounter":{"type":"object","properties":{"encounter":{"$ref":"#/components/schemas/CdtRecord"},"disposition":{"$ref":"#/components/schemas/CdtRecord","nullable":true},"calendarEvent":{"type":"object","additionalProperties":true,"nullable":true},"userRelatedToCalendarEvent":{"type":"object","additionalProperties":true,"nullable":true},"assessmentLinks":{"type":"array","items":{"$ref":"#/components/schemas/CdtRecord"}},"comments":{"type":"array","items":{"$ref":"#/components/schemas/EncounterComment"}}}},"CdtRecord":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"patientId":{"type":"string","format":"uuid"},"cdtId":{"type":"string","format":"uuid"},"version":{"type":"integer"},"cdtName":{"type":"string"},"jsonBody":{"type":"object","additionalProperties":true,"description":"Fields defined by the CDT schema, plus system fields (id, created_at, created_by, etc)."}}},"EncounterComment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"createdByName":{"type":"string"},"updatedByName":{"type":"string"},"encounterId":{"type":"string","format":"uuid"},"text":{"type":"string"}}},"PageMetaInfo":{"type":"object","properties":{"page":{"type":"integer"},"pageSize":{"type":"integer"},"totalElements":{"type":"integer"},"numberOfElements":{"type":"integer"}}}},"responses":{"BadRequest":{"description":"Bad request — the request could not be understood or was missing required parameters."},"Unauthorized":{"description":"Unauthorized — the Bearer token is missing, expired, or invalid."},"Forbidden":{"description":"Forbidden — the API client role does not have permission for this resource. Check the role and security policy in Admin."},"NotFound":{"description":"Not found — the requested resource does not exist."},"TooManyRequests":{"description":"Too many requests — rate limit exceeded. Implement exponential backoff."},"InternalError":{"description":"Internal server error."}}},"paths":{"/{tenantName}/{instanceName}/patients/{patientId}/full-encounters":{"get":{"summary":"Get all Encounter Records with related data by patient ID","tags":["Encounters"],"operationId":"Get_all_Encounter_Records_with_related_data_by_patient_ID","parameters":[{"$ref":"#/components/parameters/TenantName"},{"$ref":"#/components/parameters/InstanceName"},{"$ref":"#/components/parameters/PatientId"},{"name":"statuses","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"}},"description":"Encounter status. Available statuses: DRAFT,OPEN,ACTIVE,FINALIZED"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":0,"minimum":0},"description":"Pagination: page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","default":20},"description":"Pagination: page size"},{"name":"sort","in":"query","required":false,"schema":{"type":"string"},"description":"Sort field with sorting order(asc or desc) after coma"},{"name":"sortByCalendar","in":"query","required":false,"schema":{"type":"string"},"description":"ASC,DESC"},{"name":"onlyWithCalendarEvent","in":"query","required":false,"schema":{"type":"boolean"},"description":"Exclude all information not related to calendar event, except encounter record"}],"responses":{"200":{"description":"Paginated full encounter records","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FullEncounterPage"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"}},"description":"Get all encounter records with related data by patient id\n\n### HTTP Request\n\n***GET*** `/{tenantName}/{instanceName}/patients/{patientId}/full-encounters`\n\nin our example it would be:\n\n***GET*** `https://api.live.welkincloud.io/gh/sb-demo/patients/08632f11-cb33-4b5b-aece-aaa360f9f747/full-encounters`\n\n**Responses**\n\n| Code | Description |\n| --- | --- |\n| 200 | OK |\n| 401 | Unauthorized |\n| 403 | Forbidden |\n| 404 | Not Found |"}}}}
```

## Get all Encounter Records with related data by user ID

> \### HTTP Request\
> \
> \*\*\*GET\*\*\* \`/{tenantName}/{instanceName}/users/{userId}/full-encounters\`\
> \
> in our example it would be:\
> \
> \*\*\*GET\*\*\* \`<https://api.live.welkincloud.io/gh/sb-demo/users/f5b84d92-7989-45f4-bb5f-d85336c8e4b6/full-encounters\\`\\>
> \
> \*\*Responses\*\*\
> \
> \| Code | Description |\
> \| --- | --- |\
> \| 200 | OK |\
> \| 401 | Unauthorized |\
> \| 403 | Forbidden |\
> \| 404 | Not Found |

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"tags":[{"name":"Encounters","description":"The \"Encounters\" folder in the API collection houses a curated selection of API requests and endpoints that pertain to managing and tracking patient encounters. Encounters refer to the interactions, appointments, or medical events between healthcare professionals and patients. This folder organizes the necessary API calls for creating, retrieving, updating, and deleting encounter records, streamlining the testing and development of functionalities related to patient interactions within the API collection."}],"servers":[{"url":"https://api.live.welkincloud.io","description":"Welkin Health production API"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Bearer token obtained from `POST /{tenantName}/admin/api_clients/{clientName}`. Valid for 60 minutes."}},"parameters":{"TenantName":{"name":"tenantName","in":"path","required":true,"description":"Your organization (tenant) name, e.g. `acme-health`","schema":{"type":"string"}},"InstanceName":{"name":"instanceName","in":"path","required":true,"description":"Your environment name: `live`, `sandbox`, or a custom name","schema":{"type":"string"}},"UserId":{"name":"userId","in":"path","required":true,"description":"UUID of the user","schema":{"type":"string","format":"uuid"}}},"schemas":{"FullEncounterPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/FullEncounter"}},"metaInfo":{"$ref":"#/components/schemas/PageMetaInfo"}}},"FullEncounter":{"type":"object","properties":{"encounter":{"$ref":"#/components/schemas/CdtRecord"},"disposition":{"$ref":"#/components/schemas/CdtRecord","nullable":true},"calendarEvent":{"type":"object","additionalProperties":true,"nullable":true},"userRelatedToCalendarEvent":{"type":"object","additionalProperties":true,"nullable":true},"assessmentLinks":{"type":"array","items":{"$ref":"#/components/schemas/CdtRecord"}},"comments":{"type":"array","items":{"$ref":"#/components/schemas/EncounterComment"}}}},"CdtRecord":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"patientId":{"type":"string","format":"uuid"},"cdtId":{"type":"string","format":"uuid"},"version":{"type":"integer"},"cdtName":{"type":"string"},"jsonBody":{"type":"object","additionalProperties":true,"description":"Fields defined by the CDT schema, plus system fields (id, created_at, created_by, etc)."}}},"EncounterComment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"createdByName":{"type":"string"},"updatedByName":{"type":"string"},"encounterId":{"type":"string","format":"uuid"},"text":{"type":"string"}}},"PageMetaInfo":{"type":"object","properties":{"page":{"type":"integer"},"pageSize":{"type":"integer"},"totalElements":{"type":"integer"},"numberOfElements":{"type":"integer"}}}},"responses":{"BadRequest":{"description":"Bad request — the request could not be understood or was missing required parameters."},"Unauthorized":{"description":"Unauthorized — the Bearer token is missing, expired, or invalid."},"Forbidden":{"description":"Forbidden — the API client role does not have permission for this resource. Check the role and security policy in Admin."},"NotFound":{"description":"Not found — the requested resource does not exist."},"TooManyRequests":{"description":"Too many requests — rate limit exceeded. Implement exponential backoff."},"InternalError":{"description":"Internal server error."}}},"paths":{"/{tenantName}/{instanceName}/users/{userId}/full-encounters":{"get":{"summary":"Get all Encounter Records with related data by user ID","tags":["Encounters"],"operationId":"Get_all_Encounter_Records_with_related_data_by_user_ID","parameters":[{"$ref":"#/components/parameters/TenantName"},{"$ref":"#/components/parameters/InstanceName"},{"$ref":"#/components/parameters/UserId"},{"name":"filters","in":"query","required":false,"schema":{"type":"string"}},{"name":"onlyWithCalendarEvent","in":"query","required":false,"schema":{"type":"boolean"},"description":"Exclude all information not related to calendar event, except encounter record"},{"name":"calendarEventFrom","in":"query","required":false,"schema":{"type":"string"}},{"name":"calendarEventTo","in":"query","required":false,"schema":{"type":"string"}},{"name":"createdBy","in":"query","required":false,"schema":{"type":"string"}},{"name":"withCareTeam","in":"query","required":false,"schema":{"type":"boolean"},"description":"If true, return only encounter thats belong to the patients in the user care team (default: true)"},{"name":"statuses","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"}},"description":"Encounter status. Available statuses: DRAFT,OPEN,ACTIVE,FINALIZED"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":0,"minimum":0},"description":"Pagination: page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","default":20},"description":"Pagination: page size"},{"name":"sort","in":"query","required":false,"schema":{"type":"string"},"description":"Sort field with sorting order(asc or desc) after coma"}],"responses":{"200":{"description":"Paginated full encounter records","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FullEncounterPage"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"}},"description":"### HTTP Request\n\n***GET*** `/{tenantName}/{instanceName}/users/{userId}/full-encounters`\n\nin our example it would be:\n\n***GET*** `https://api.live.welkincloud.io/gh/sb-demo/users/f5b84d92-7989-45f4-bb5f-d85336c8e4b6/full-encounters`\n\n**Responses**\n\n| Code | Description |\n| --- | --- |\n| 200 | OK |\n| 401 | Unauthorized |\n| 403 | Forbidden |\n| 404 | Not Found |"}}}}
```

## Get Encounter Record by a patient ID and Encounter ID

> \### HTTP Request\
> \
> \_\*\*GET\*\*\_ \`/{tenantName}/{instanceName}/patients/{patientId}/encounters/{encounterId}\`\
> \
> in our example it would be:\
> \
> \_\*\*GET\*\*\_ \`<https://api.live.welkincloud.io/gh/sb-demo/patients/d6ea79ce-d3d6-4c2d-a27e-e4d1207f60f1/encounters/336ae731-c674-4b85-941a-ef3b37d93b82\\`\\>
> \
> \*\*Responses\*\*\
> \
> The encounter information will come as a response. The startDateTime (endDateTime) and the same variables will be displayed for the encaunter, but for local time localStartDateTime (localEndDateTime).\
> \
> \- startDateTime/endDateTime - start and end times in UTCs\
> &#x20;   \
> \- localStartDateTime/localEndDateTime - information about the local time for the user who is requesting the information (When information is requested using an API request, the request is made from under the API client, it has no timezone and therefore the information is displayed in the UTC).\
> &#x20;   \
> \
> \| Code | Description |\
> \| --- | --- |\
> \| 200 | OK |\
> \| 401 | Unauthorized |\
> \| 403 | Forbidden |\
> \| 404 | Not Found |

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"tags":[{"name":"Encounters","description":"The \"Encounters\" folder in the API collection houses a curated selection of API requests and endpoints that pertain to managing and tracking patient encounters. Encounters refer to the interactions, appointments, or medical events between healthcare professionals and patients. This folder organizes the necessary API calls for creating, retrieving, updating, and deleting encounter records, streamlining the testing and development of functionalities related to patient interactions within the API collection."}],"servers":[{"url":"https://api.live.welkincloud.io","description":"Welkin Health production API"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Bearer token obtained from `POST /{tenantName}/admin/api_clients/{clientName}`. Valid for 60 minutes."}},"parameters":{"TenantName":{"name":"tenantName","in":"path","required":true,"description":"Your organization (tenant) name, e.g. `acme-health`","schema":{"type":"string"}},"InstanceName":{"name":"instanceName","in":"path","required":true,"description":"Your environment name: `live`, `sandbox`, or a custom name","schema":{"type":"string"}},"PatientId":{"name":"patientId","in":"path","required":true,"description":"UUID of the patient record","schema":{"type":"string","format":"uuid"}},"EncounterId":{"name":"encounterId","in":"path","required":true,"description":"UUID of the encounter","schema":{"type":"string","format":"uuid"}}},"schemas":{"CdtRecord":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"patientId":{"type":"string","format":"uuid"},"cdtId":{"type":"string","format":"uuid"},"version":{"type":"integer"},"cdtName":{"type":"string"},"jsonBody":{"type":"object","additionalProperties":true,"description":"Fields defined by the CDT schema, plus system fields (id, created_at, created_by, etc)."}}}},"responses":{"BadRequest":{"description":"Bad request — the request could not be understood or was missing required parameters."},"Unauthorized":{"description":"Unauthorized — the Bearer token is missing, expired, or invalid."},"Forbidden":{"description":"Forbidden — the API client role does not have permission for this resource. Check the role and security policy in Admin."},"NotFound":{"description":"Not found — the requested resource does not exist."},"TooManyRequests":{"description":"Too many requests — rate limit exceeded. Implement exponential backoff."},"InternalError":{"description":"Internal server error."}}},"paths":{"/{tenantName}/{instanceName}/patients/{patientId}/encounters/{encounterId}":{"get":{"summary":"Get Encounter Record by a patient ID and Encounter ID","tags":["Encounters"],"operationId":"Get_Encounter_Record_by_a_patient_ID_and_Encounter_ID","parameters":[{"$ref":"#/components/parameters/TenantName"},{"$ref":"#/components/parameters/InstanceName"},{"$ref":"#/components/parameters/PatientId"},{"$ref":"#/components/parameters/EncounterId"}],"responses":{"200":{"description":"Encounter record","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CdtRecord"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"}},"description":"### HTTP Request\n\n_**GET**_ `/{tenantName}/{instanceName}/patients/{patientId}/encounters/{encounterId}`\n\nin our example it would be:\n\n_**GET**_ `https://api.live.welkincloud.io/gh/sb-demo/patients/d6ea79ce-d3d6-4c2d-a27e-e4d1207f60f1/encounters/336ae731-c674-4b85-941a-ef3b37d93b82`\n\n**Responses**\n\nThe encounter information will come as a response. The startDateTime (endDateTime) and the same variables will be displayed for the encaunter, but for local time localStartDateTime (localEndDateTime).\n\n- startDateTime/endDateTime - start and end times in UTCs\n    \n- localStartDateTime/localEndDateTime - information about the local time for the user who is requesting the information (When information is requested using an API request, the request is made from under the API client, it has no timezone and therefore the information is displayed in the UTC).\n    \n\n| Code | Description |\n| --- | --- |\n| 200 | OK |\n| 401 | Unauthorized |\n| 403 | Forbidden |\n| 404 | Not Found |"}}}}
```

## Update Encounter Record by Encounter ID

> \### HTTP Request\
> \
> Please, fill only that fields that you want to update.\
> \
> Correspondence of Encounter statuses for the GUI:\
> \
> DRAFT - Planned on UI  \
> OPEN - In Progress on UI  \
> CANCELLED - Cancelled on UI  \
> FINALIZED - Completed on UI\
> \
> \_\*\*PATCH\*\*\_ \`/{tenantName}/{instanceName}/patients/{patientId}/encounters/{encounterId}\`\
> \
> in our example it would be:\
> \
> \_\*\*PATCH\*\*\_ \`<https://api.live.welkincloud.io/gh/sb-demo/patients/620ef7f0-2ba9-48e1-8e0f-a47f40890bf4/encounters/b30355dd-ff65-4ae3-aab7-a1bdd0fddd79\\`\\>
> \
> \*\*Responses\*\*\
> \
> \| Code | Description |\
> \| --- | --- |\
> \| 200 | OK |\
> \| 401 | Unauthorized |\
> \| 403 | Forbidden |\
> \| 404 | Not Found |

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"tags":[{"name":"Encounters","description":"The \"Encounters\" folder in the API collection houses a curated selection of API requests and endpoints that pertain to managing and tracking patient encounters. Encounters refer to the interactions, appointments, or medical events between healthcare professionals and patients. This folder organizes the necessary API calls for creating, retrieving, updating, and deleting encounter records, streamlining the testing and development of functionalities related to patient interactions within the API collection."}],"servers":[{"url":"https://api.live.welkincloud.io","description":"Welkin Health production API"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Bearer token obtained from `POST /{tenantName}/admin/api_clients/{clientName}`. Valid for 60 minutes."}},"parameters":{"TenantName":{"name":"tenantName","in":"path","required":true,"description":"Your organization (tenant) name, e.g. `acme-health`","schema":{"type":"string"}},"InstanceName":{"name":"instanceName","in":"path","required":true,"description":"Your environment name: `live`, `sandbox`, or a custom name","schema":{"type":"string"}},"PatientId":{"name":"patientId","in":"path","required":true,"description":"UUID of the patient record","schema":{"type":"string","format":"uuid"}},"EncounterId":{"name":"encounterId","in":"path","required":true,"description":"UUID of the encounter","schema":{"type":"string","format":"uuid"}}},"schemas":{"CdtRecord":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"patientId":{"type":"string","format":"uuid"},"cdtId":{"type":"string","format":"uuid"},"version":{"type":"integer"},"cdtName":{"type":"string"},"jsonBody":{"type":"object","additionalProperties":true,"description":"Fields defined by the CDT schema, plus system fields (id, created_at, created_by, etc)."}}},"EncounterUpdateRequest":{"type":"object","description":"Partial update — all fields optional.","properties":{"calendarEventId":{"type":"string","format":"uuid","nullable":true},"title":{"type":"string"},"description":{"type":"string","nullable":true},"status":{"$ref":"#/components/schemas/EncounterStatus"},"notes":{"type":"string","nullable":true},"responsibleParty":{"$ref":"#/components/schemas/ResponsibleParty"},"location":{"type":"string","nullable":true},"visitServices":{"type":"array","items":{"$ref":"#/components/schemas/EncounterVisitService"}},"currentScheduledAppointment":{"type":"object","additionalProperties":true,"nullable":true}}},"EncounterStatus":{"type":"string","enum":["DRAFT","OPEN","CANCELED","CANCELLED","FINALIZED"]},"ResponsibleParty":{"type":"string","enum":["SELF_PAY","INSURANCE","UNKNOWN"],"deprecated":true},"EncounterVisitService":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"quantity":{"type":"number","default":1},"serviceCost":{"type":"integer","nullable":true,"description":"Cost in cents"},"cancellationFee":{"type":"integer","nullable":true,"description":"Cost in cents"},"preVisitCost":{"type":"integer","nullable":true,"description":"Cost in cents"},"modifiers":{"type":"array","items":{"type":"string"}}}}},"responses":{"BadRequest":{"description":"Bad request — the request could not be understood or was missing required parameters."},"Unauthorized":{"description":"Unauthorized — the Bearer token is missing, expired, or invalid."},"Forbidden":{"description":"Forbidden — the API client role does not have permission for this resource. Check the role and security policy in Admin."},"NotFound":{"description":"Not found — the requested resource does not exist."},"TooManyRequests":{"description":"Too many requests — rate limit exceeded. Implement exponential backoff."},"InternalError":{"description":"Internal server error."}}},"paths":{"/{tenantName}/{instanceName}/patients/{patientId}/encounters/{encounterId}":{"patch":{"summary":"Update Encounter Record by Encounter ID","tags":["Encounters"],"operationId":"Update_Encounter_Record_by_Encounter_ID","parameters":[{"$ref":"#/components/parameters/TenantName"},{"$ref":"#/components/parameters/InstanceName"},{"$ref":"#/components/parameters/PatientId"},{"$ref":"#/components/parameters/EncounterId"}],"responses":{"200":{"description":"Updated encounter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CdtRecord"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"}},"description":"### HTTP Request\n\nPlease, fill only that fields that you want to update.\n\nCorrespondence of Encounter statuses for the GUI:\n\nDRAFT - Planned on UI  \nOPEN - In Progress on UI  \nCANCELLED - Cancelled on UI  \nFINALIZED - Completed on UI\n\n_**PATCH**_ `/{tenantName}/{instanceName}/patients/{patientId}/encounters/{encounterId}`\n\nin our example it would be:\n\n_**PATCH**_ `https://api.live.welkincloud.io/gh/sb-demo/patients/620ef7f0-2ba9-48e1-8e0f-a47f40890bf4/encounters/b30355dd-ff65-4ae3-aab7-a1bdd0fddd79`\n\n**Responses**\n\n| Code | Description |\n| --- | --- |\n| 200 | OK |\n| 401 | Unauthorized |\n| 403 | Forbidden |\n| 404 | Not Found |","requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EncounterUpdateRequest"}}}}}}}}
```

## Get Encounter Record with all related data by a patient ID and encounter ID

> \### HTTP Request\
> \
> \_\*\*GET\*\*\_ \`/{tenantName}/{instanceName}/patients/{patientId}/full-encounters/{encounterId}\`\
> \
> in our example it would be:\
> \
> \_\*\*GET\*\*\_ \`<https://api.live.welkincloud.io/gh/sb-demo/patients/08632f11-cb33-4b5b-aece-aaa360f9f747/full-encounters/7d72c423-48bc-4fc6-aa35-72a6cdd0c4ca\\`\\>
> \
> \*\*Responses\*\*\
> \
> The encounter information will come as a response. The startDateTime (endDateTime) and the same variables will be displayed for the encaunter, but for local time localStartDateTime (localEndDateTime).\
> \
> \- startDateTime/endDateTime - start and end times in UTCs\
> &#x20;   \
> \- localStartDateTime/localEndDateTime - information about the local time for the user who is requesting the information (When information is requested using an API request, the request is made from under the API client, it has no timezone and therefore the information is displayed in the UTC).\
> &#x20;   \
> \
> Translated with DeepL.com (free version)\
> \
> \| Code | Description |\
> \| --- | --- |\
> \| 200 | OK |\
> \| 401 | Unauthorized |\
> \| 403 | Forbidden |\
> \| 404 | Not Found |

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"tags":[{"name":"Encounters","description":"The \"Encounters\" folder in the API collection houses a curated selection of API requests and endpoints that pertain to managing and tracking patient encounters. Encounters refer to the interactions, appointments, or medical events between healthcare professionals and patients. This folder organizes the necessary API calls for creating, retrieving, updating, and deleting encounter records, streamlining the testing and development of functionalities related to patient interactions within the API collection."}],"servers":[{"url":"https://api.live.welkincloud.io","description":"Welkin Health production API"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Bearer token obtained from `POST /{tenantName}/admin/api_clients/{clientName}`. Valid for 60 minutes."}},"parameters":{"TenantName":{"name":"tenantName","in":"path","required":true,"description":"Your organization (tenant) name, e.g. `acme-health`","schema":{"type":"string"}},"InstanceName":{"name":"instanceName","in":"path","required":true,"description":"Your environment name: `live`, `sandbox`, or a custom name","schema":{"type":"string"}},"PatientId":{"name":"patientId","in":"path","required":true,"description":"UUID of the patient record","schema":{"type":"string","format":"uuid"}},"EncounterId":{"name":"encounterId","in":"path","required":true,"description":"UUID of the encounter","schema":{"type":"string","format":"uuid"}}},"schemas":{"FullEncounter":{"type":"object","properties":{"encounter":{"$ref":"#/components/schemas/CdtRecord"},"disposition":{"$ref":"#/components/schemas/CdtRecord","nullable":true},"calendarEvent":{"type":"object","additionalProperties":true,"nullable":true},"userRelatedToCalendarEvent":{"type":"object","additionalProperties":true,"nullable":true},"assessmentLinks":{"type":"array","items":{"$ref":"#/components/schemas/CdtRecord"}},"comments":{"type":"array","items":{"$ref":"#/components/schemas/EncounterComment"}}}},"CdtRecord":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"patientId":{"type":"string","format":"uuid"},"cdtId":{"type":"string","format":"uuid"},"version":{"type":"integer"},"cdtName":{"type":"string"},"jsonBody":{"type":"object","additionalProperties":true,"description":"Fields defined by the CDT schema, plus system fields (id, created_at, created_by, etc)."}}},"EncounterComment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"createdByName":{"type":"string"},"updatedByName":{"type":"string"},"encounterId":{"type":"string","format":"uuid"},"text":{"type":"string"}}}},"responses":{"BadRequest":{"description":"Bad request — the request could not be understood or was missing required parameters."},"Unauthorized":{"description":"Unauthorized — the Bearer token is missing, expired, or invalid."},"Forbidden":{"description":"Forbidden — the API client role does not have permission for this resource. Check the role and security policy in Admin."},"NotFound":{"description":"Not found — the requested resource does not exist."},"TooManyRequests":{"description":"Too many requests — rate limit exceeded. Implement exponential backoff."},"InternalError":{"description":"Internal server error."}}},"paths":{"/{tenantName}/{instanceName}/patients/{patientId}/full-encounters/{encounterId}":{"get":{"summary":"Get Encounter Record with all related data by a patient ID and encounter ID","tags":["Encounters"],"operationId":"Get_Encounter_Record_with_all_related_data_by_a_patient_ID_and_encounter_ID","parameters":[{"$ref":"#/components/parameters/TenantName"},{"$ref":"#/components/parameters/InstanceName"},{"$ref":"#/components/parameters/PatientId"},{"$ref":"#/components/parameters/EncounterId"}],"responses":{"200":{"description":"Full encounter record","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FullEncounter"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"}},"description":"### HTTP Request\n\n_**GET**_ `/{tenantName}/{instanceName}/patients/{patientId}/full-encounters/{encounterId}`\n\nin our example it would be:\n\n_**GET**_ `https://api.live.welkincloud.io/gh/sb-demo/patients/08632f11-cb33-4b5b-aece-aaa360f9f747/full-encounters/7d72c423-48bc-4fc6-aa35-72a6cdd0c4ca`\n\n**Responses**\n\nThe encounter information will come as a response. The startDateTime (endDateTime) and the same variables will be displayed for the encaunter, but for local time localStartDateTime (localEndDateTime).\n\n- startDateTime/endDateTime - start and end times in UTCs\n    \n- localStartDateTime/localEndDateTime - information about the local time for the user who is requesting the information (When information is requested using an API request, the request is made from under the API client, it has no timezone and therefore the information is displayed in the UTC).\n    \n\nTranslated with DeepL.com (free version)\n\n| Code | Description |\n| --- | --- |\n| 200 | OK |\n| 401 | Unauthorized |\n| 403 | Forbidden |\n| 404 | Not Found |"}}}}
```

## Get all Assessment links by encounter ID

> \### HTTP Request\
> \
> \*\*\*GET\*\*\* \`/{tenantName}/{instanceName}/patients/{patientId}/encounters/{encounterId}/assessments\`\
> \
> in our example it would be:\
> \
> \*\*\*GET\*\*\* \`<https://api.live.welkincloud.io/gh/sb-demo/patients/d6ea79ce-d3d6-4c2d-a27e-e4d1207f60f1/encounters/336ae731-c674-4b85-941a-ef3b37d93b82/assessments\\`\\>
> \
> \*\*Responses\*\*\
> \
> \| Code | Description |\
> \| --- | --- |\
> \| 200 | OK |\
> \| 401 | Unauthorized |\
> \| 403 | Forbidden |\
> \| 404 | Not Found |

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"tags":[{"name":"Encounters","description":"The \"Encounters\" folder in the API collection houses a curated selection of API requests and endpoints that pertain to managing and tracking patient encounters. Encounters refer to the interactions, appointments, or medical events between healthcare professionals and patients. This folder organizes the necessary API calls for creating, retrieving, updating, and deleting encounter records, streamlining the testing and development of functionalities related to patient interactions within the API collection."}],"servers":[{"url":"https://api.live.welkincloud.io","description":"Welkin Health production API"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Bearer token obtained from `POST /{tenantName}/admin/api_clients/{clientName}`. Valid for 60 minutes."}},"parameters":{"TenantName":{"name":"tenantName","in":"path","required":true,"description":"Your organization (tenant) name, e.g. `acme-health`","schema":{"type":"string"}},"InstanceName":{"name":"instanceName","in":"path","required":true,"description":"Your environment name: `live`, `sandbox`, or a custom name","schema":{"type":"string"}},"PatientId":{"name":"patientId","in":"path","required":true,"description":"UUID of the patient record","schema":{"type":"string","format":"uuid"}},"EncounterId":{"name":"encounterId","in":"path","required":true,"description":"UUID of the encounter","schema":{"type":"string","format":"uuid"}}},"schemas":{"CdtRecord":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"patientId":{"type":"string","format":"uuid"},"cdtId":{"type":"string","format":"uuid"},"version":{"type":"integer"},"cdtName":{"type":"string"},"jsonBody":{"type":"object","additionalProperties":true,"description":"Fields defined by the CDT schema, plus system fields (id, created_at, created_by, etc)."}}}},"responses":{"BadRequest":{"description":"Bad request — the request could not be understood or was missing required parameters."},"Unauthorized":{"description":"Unauthorized — the Bearer token is missing, expired, or invalid."},"Forbidden":{"description":"Forbidden — the API client role does not have permission for this resource. Check the role and security policy in Admin."},"NotFound":{"description":"Not found — the requested resource does not exist."},"TooManyRequests":{"description":"Too many requests — rate limit exceeded. Implement exponential backoff."},"InternalError":{"description":"Internal server error."}}},"paths":{"/{tenantName}/{instanceName}/patients/{patientId}/encounters/{encounterId}/assessments":{"get":{"summary":"Get all Assessment links by encounter ID","tags":["Encounters"],"operationId":"Get_all_Assessment_links_by_encounter_ID","parameters":[{"$ref":"#/components/parameters/TenantName"},{"$ref":"#/components/parameters/InstanceName"},{"$ref":"#/components/parameters/PatientId"},{"$ref":"#/components/parameters/EncounterId"},{"name":"relation","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Assessment links for this encounter","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CdtRecord"}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"}},"description":"### HTTP Request\n\n***GET*** `/{tenantName}/{instanceName}/patients/{patientId}/encounters/{encounterId}/assessments`\n\nin our example it would be:\n\n***GET*** `https://api.live.welkincloud.io/gh/sb-demo/patients/d6ea79ce-d3d6-4c2d-a27e-e4d1207f60f1/encounters/336ae731-c674-4b85-941a-ef3b37d93b82/assessments`\n\n**Responses**\n\n| Code | Description |\n| --- | --- |\n| 200 | OK |\n| 401 | Unauthorized |\n| 403 | Forbidden |\n| 404 | Not Found |"}}}}
```

## Create an Assessment link for encounter

> \### HTTP Request\
> \
> \*\*\*POST\*\*\* \`/{tenantName}/{instanceName}/patients/{patientId}/encounters/{encounterId}/assessments\`\
> \
> in our example it would be:\
> \
> \*\*\*POST\*\*\* \`<https://api.live.welkincloud.io/gh/sb-demo/patients/d6ea79ce-d3d6-4c2d-a27e-e4d1207f60f1/encounters/336ae731-c674-4b85-941a-ef3b37d93b82/assessments\\`\\>
> \
> \*\*Responses\*\*\
> \
> \| Code | Description |\
> \| --- | --- |\
> \| 201 | Created |\
> \| 401 | Unauthorized |\
> \| 403 | Forbidden |\
> \| 404 | Not Found |

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"tags":[{"name":"Encounters","description":"The \"Encounters\" folder in the API collection houses a curated selection of API requests and endpoints that pertain to managing and tracking patient encounters. Encounters refer to the interactions, appointments, or medical events between healthcare professionals and patients. This folder organizes the necessary API calls for creating, retrieving, updating, and deleting encounter records, streamlining the testing and development of functionalities related to patient interactions within the API collection."}],"servers":[{"url":"https://api.live.welkincloud.io","description":"Welkin Health production API"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Bearer token obtained from `POST /{tenantName}/admin/api_clients/{clientName}`. Valid for 60 minutes."}},"parameters":{"TenantName":{"name":"tenantName","in":"path","required":true,"description":"Your organization (tenant) name, e.g. `acme-health`","schema":{"type":"string"}},"InstanceName":{"name":"instanceName","in":"path","required":true,"description":"Your environment name: `live`, `sandbox`, or a custom name","schema":{"type":"string"}},"PatientId":{"name":"patientId","in":"path","required":true,"description":"UUID of the patient record","schema":{"type":"string","format":"uuid"}},"EncounterId":{"name":"encounterId","in":"path","required":true,"description":"UUID of the encounter","schema":{"type":"string","format":"uuid"}}},"schemas":{"CdtRecord":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"patientId":{"type":"string","format":"uuid"},"cdtId":{"type":"string","format":"uuid"},"version":{"type":"integer"},"cdtName":{"type":"string"},"jsonBody":{"type":"object","additionalProperties":true,"description":"Fields defined by the CDT schema, plus system fields (id, created_at, created_by, etc)."}}},"EncounterAssessmentRequest":{"type":"object","required":["assessmentName"],"properties":{"assessmentName":{"type":"string"},"assessmentTitle":{"type":"string","nullable":true},"assessmentRecordId":{"type":"string","format":"uuid","nullable":true}}}},"responses":{"BadRequest":{"description":"Bad request — the request could not be understood or was missing required parameters."},"Unauthorized":{"description":"Unauthorized — the Bearer token is missing, expired, or invalid."},"Forbidden":{"description":"Forbidden — the API client role does not have permission for this resource. Check the role and security policy in Admin."},"NotFound":{"description":"Not found — the requested resource does not exist."},"TooManyRequests":{"description":"Too many requests — rate limit exceeded. Implement exponential backoff."},"InternalError":{"description":"Internal server error."}}},"paths":{"/{tenantName}/{instanceName}/patients/{patientId}/encounters/{encounterId}/assessments":{"post":{"summary":"Create an Assessment link for encounter","tags":["Encounters"],"operationId":"Create_an_Assessment_link_for_encounter","parameters":[{"$ref":"#/components/parameters/TenantName"},{"$ref":"#/components/parameters/InstanceName"},{"$ref":"#/components/parameters/PatientId"},{"$ref":"#/components/parameters/EncounterId"}],"responses":{"201":{"description":"Created assessment link","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CdtRecord"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"}},"description":"### HTTP Request\n\n***POST*** `/{tenantName}/{instanceName}/patients/{patientId}/encounters/{encounterId}/assessments`\n\nin our example it would be:\n\n***POST*** `https://api.live.welkincloud.io/gh/sb-demo/patients/d6ea79ce-d3d6-4c2d-a27e-e4d1207f60f1/encounters/336ae731-c674-4b85-941a-ef3b37d93b82/assessments`\n\n**Responses**\n\n| Code | Description |\n| --- | --- |\n| 201 | Created |\n| 401 | Unauthorized |\n| 403 | Forbidden |\n| 404 | Not Found |","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EncounterAssessmentRequest"}}}}}}}}
```

## Get Assessment link by encounter ID and assessment link ID

> \### HTTP Request\
> \
> \*\*\*GET\*\*\* \`/{tenantName}/{instanceName}/patients/{patientId}/encounters/{encounterId}/assessments/{encounterAssessmentId}\`\
> \
> in our example it would be:\
> \
> \*\*\*GET\*\*\* \`<https://api.live.welkincloud.io/gh/sb-demo/patients/d6ea79ce-d3d6-4c2d-a27e-e4d1207f60f1/encounters/336ae731-c674-4b85-941a-ef3b37d93b82/assessments/0e692ed3-b250-42ee-a17b-f65e69efcc07\\`\\>
> \
> \*\*Responses\*\*\
> \
> \| Code | Description |\
> \| --- | --- |\
> \| 200 | OK |\
> \| 401 | Unauthorized |\
> \| 403 | Forbidden |\
> \| 404 | Not Found |

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"tags":[{"name":"Encounters","description":"The \"Encounters\" folder in the API collection houses a curated selection of API requests and endpoints that pertain to managing and tracking patient encounters. Encounters refer to the interactions, appointments, or medical events between healthcare professionals and patients. This folder organizes the necessary API calls for creating, retrieving, updating, and deleting encounter records, streamlining the testing and development of functionalities related to patient interactions within the API collection."}],"servers":[{"url":"https://api.live.welkincloud.io","description":"Welkin Health production API"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Bearer token obtained from `POST /{tenantName}/admin/api_clients/{clientName}`. Valid for 60 minutes."}},"parameters":{"TenantName":{"name":"tenantName","in":"path","required":true,"description":"Your organization (tenant) name, e.g. `acme-health`","schema":{"type":"string"}},"InstanceName":{"name":"instanceName","in":"path","required":true,"description":"Your environment name: `live`, `sandbox`, or a custom name","schema":{"type":"string"}},"PatientId":{"name":"patientId","in":"path","required":true,"description":"UUID of the patient record","schema":{"type":"string","format":"uuid"}},"EncounterId":{"name":"encounterId","in":"path","required":true,"description":"UUID of the encounter","schema":{"type":"string","format":"uuid"}}},"schemas":{"CdtRecord":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"patientId":{"type":"string","format":"uuid"},"cdtId":{"type":"string","format":"uuid"},"version":{"type":"integer"},"cdtName":{"type":"string"},"jsonBody":{"type":"object","additionalProperties":true,"description":"Fields defined by the CDT schema, plus system fields (id, created_at, created_by, etc)."}}}},"responses":{"BadRequest":{"description":"Bad request — the request could not be understood or was missing required parameters."},"Unauthorized":{"description":"Unauthorized — the Bearer token is missing, expired, or invalid."},"Forbidden":{"description":"Forbidden — the API client role does not have permission for this resource. Check the role and security policy in Admin."},"NotFound":{"description":"Not found — the requested resource does not exist."},"TooManyRequests":{"description":"Too many requests — rate limit exceeded. Implement exponential backoff."},"InternalError":{"description":"Internal server error."}}},"paths":{"/{tenantName}/{instanceName}/patients/{patientId}/encounters/{encounterId}/assessments/{encounterAssessmentId}":{"get":{"summary":"Get Assessment link by encounter ID and assessment link ID","tags":["Encounters"],"operationId":"Get_Assessment_link_by_encounter_ID_and_assessment_link_ID","parameters":[{"$ref":"#/components/parameters/TenantName"},{"$ref":"#/components/parameters/InstanceName"},{"$ref":"#/components/parameters/PatientId"},{"$ref":"#/components/parameters/EncounterId"},{"name":"encounterAssessmentId","in":"path","required":true,"description":"`encounterAssessmentId` path parameter","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Assessment link","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CdtRecord"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"}},"description":"### HTTP Request\n\n***GET*** `/{tenantName}/{instanceName}/patients/{patientId}/encounters/{encounterId}/assessments/{encounterAssessmentId}`\n\nin our example it would be:\n\n***GET*** `https://api.live.welkincloud.io/gh/sb-demo/patients/d6ea79ce-d3d6-4c2d-a27e-e4d1207f60f1/encounters/336ae731-c674-4b85-941a-ef3b37d93b82/assessments/0e692ed3-b250-42ee-a17b-f65e69efcc07`\n\n**Responses**\n\n| Code | Description |\n| --- | --- |\n| 200 | OK |\n| 401 | Unauthorized |\n| 403 | Forbidden |\n| 404 | Not Found |"}}}}
```

## Delete Assessment link for encounter by assessment link ID

> \### HTTP Request\
> \
> \*\*\*DELETE\*\*\* \`/{tenantName}/{instanceName}/patients/{patientId}/encounters/{encounterId}/assessments/{encounterAssessmentId}\`\
> \
> in our example it would be:\
> \
> \*\*\*DELETE\*\*\* \`<https://api.live.welkincloud.io/gh/sb-demo/patients/d6ea79ce-d3d6-4c2d-a27e-e4d1207f60f1/encounters/336ae731-c674-4b85-941a-ef3b37d93b82/assessments/0e692ed3-b250-42ee-a17b-f65e69efcc07\\`\\>
> \
> \*\*Responses\*\*\
> \
> \| Code | Description |\
> \| --- | --- |\
> \| 200 | OK |\
> \| 401 | Unauthorized |\
> \| 403 | Forbidden |\
> \| 404 | Not Found |

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"tags":[{"name":"Encounters","description":"The \"Encounters\" folder in the API collection houses a curated selection of API requests and endpoints that pertain to managing and tracking patient encounters. Encounters refer to the interactions, appointments, or medical events between healthcare professionals and patients. This folder organizes the necessary API calls for creating, retrieving, updating, and deleting encounter records, streamlining the testing and development of functionalities related to patient interactions within the API collection."}],"servers":[{"url":"https://api.live.welkincloud.io","description":"Welkin Health production API"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Bearer token obtained from `POST /{tenantName}/admin/api_clients/{clientName}`. Valid for 60 minutes."}},"parameters":{"TenantName":{"name":"tenantName","in":"path","required":true,"description":"Your organization (tenant) name, e.g. `acme-health`","schema":{"type":"string"}},"InstanceName":{"name":"instanceName","in":"path","required":true,"description":"Your environment name: `live`, `sandbox`, or a custom name","schema":{"type":"string"}},"PatientId":{"name":"patientId","in":"path","required":true,"description":"UUID of the patient record","schema":{"type":"string","format":"uuid"}},"EncounterId":{"name":"encounterId","in":"path","required":true,"description":"UUID of the encounter","schema":{"type":"string","format":"uuid"}}},"responses":{"BadRequest":{"description":"Bad request — the request could not be understood or was missing required parameters."},"Unauthorized":{"description":"Unauthorized — the Bearer token is missing, expired, or invalid."},"Forbidden":{"description":"Forbidden — the API client role does not have permission for this resource. Check the role and security policy in Admin."},"NotFound":{"description":"Not found — the requested resource does not exist."},"TooManyRequests":{"description":"Too many requests — rate limit exceeded. Implement exponential backoff."},"InternalError":{"description":"Internal server error."}}},"paths":{"/{tenantName}/{instanceName}/patients/{patientId}/encounters/{encounterId}/assessments/{encounterAssessmentId}":{"delete":{"summary":"Delete Assessment link for encounter by assessment link ID","tags":["Encounters"],"operationId":"Delete_Assessment_link_for_encounter_by_assessment_link_ID","parameters":[{"$ref":"#/components/parameters/TenantName"},{"$ref":"#/components/parameters/InstanceName"},{"$ref":"#/components/parameters/PatientId"},{"$ref":"#/components/parameters/EncounterId"},{"name":"encounterAssessmentId","in":"path","required":true,"description":"`encounterAssessmentId` path parameter","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Assessment link deleted"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"}},"description":"### HTTP Request\n\n***DELETE*** `/{tenantName}/{instanceName}/patients/{patientId}/encounters/{encounterId}/assessments/{encounterAssessmentId}`\n\nin our example it would be:\n\n***DELETE*** `https://api.live.welkincloud.io/gh/sb-demo/patients/d6ea79ce-d3d6-4c2d-a27e-e4d1207f60f1/encounters/336ae731-c674-4b85-941a-ef3b37d93b82/assessments/0e692ed3-b250-42ee-a17b-f65e69efcc07`\n\n**Responses**\n\n| Code | Description |\n| --- | --- |\n| 200 | OK |\n| 401 | Unauthorized |\n| 403 | Forbidden |\n| 404 | Not Found |"}}}}
```

## Update Assessment link for encounter by assessment link ID

> \### HTTP Request\
> \
> \*\*\*PATCH\*\*\* \`/{tenantName}/{instanceName}/patients/{patientId}/encounters/{encounterId}/assessments/{encounterAssessmentId}\`\
> \
> in our example it would be:\
> \
> \*\*\*PATCH\*\*\* \`<https://api.live.welkincloud.io/gh/sb-demo/patients/d6ea79ce-d3d6-4c2d-a27e-e4d1207f60f1/encounters/336ae731-c674-4b85-941a-ef3b37d93b82/assessments/0e692ed3-b250-42ee-a17b-f65e69efcc07\\`\\>
> \
> \*\*Responses\*\*\
> \
> \| Code | Description |\
> \| --- | --- |\
> \| 200 | OK |\
> \| 401 | Unauthorized |\
> \| 403 | Forbidden |\
> \| 404 | Not Found |

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"tags":[{"name":"Encounters","description":"The \"Encounters\" folder in the API collection houses a curated selection of API requests and endpoints that pertain to managing and tracking patient encounters. Encounters refer to the interactions, appointments, or medical events between healthcare professionals and patients. This folder organizes the necessary API calls for creating, retrieving, updating, and deleting encounter records, streamlining the testing and development of functionalities related to patient interactions within the API collection."}],"servers":[{"url":"https://api.live.welkincloud.io","description":"Welkin Health production API"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Bearer token obtained from `POST /{tenantName}/admin/api_clients/{clientName}`. Valid for 60 minutes."}},"parameters":{"TenantName":{"name":"tenantName","in":"path","required":true,"description":"Your organization (tenant) name, e.g. `acme-health`","schema":{"type":"string"}},"InstanceName":{"name":"instanceName","in":"path","required":true,"description":"Your environment name: `live`, `sandbox`, or a custom name","schema":{"type":"string"}},"PatientId":{"name":"patientId","in":"path","required":true,"description":"UUID of the patient record","schema":{"type":"string","format":"uuid"}},"EncounterId":{"name":"encounterId","in":"path","required":true,"description":"UUID of the encounter","schema":{"type":"string","format":"uuid"}}},"schemas":{"CdtRecord":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"patientId":{"type":"string","format":"uuid"},"cdtId":{"type":"string","format":"uuid"},"version":{"type":"integer"},"cdtName":{"type":"string"},"jsonBody":{"type":"object","additionalProperties":true,"description":"Fields defined by the CDT schema, plus system fields (id, created_at, created_by, etc)."}}},"EncounterAssessmentUpdateRequest":{"type":"object","required":["assessmentRecordId"],"properties":{"assessmentRecordId":{"type":"string","format":"uuid"}}}},"responses":{"BadRequest":{"description":"Bad request — the request could not be understood or was missing required parameters."},"Unauthorized":{"description":"Unauthorized — the Bearer token is missing, expired, or invalid."},"Forbidden":{"description":"Forbidden — the API client role does not have permission for this resource. Check the role and security policy in Admin."},"NotFound":{"description":"Not found — the requested resource does not exist."},"TooManyRequests":{"description":"Too many requests — rate limit exceeded. Implement exponential backoff."},"InternalError":{"description":"Internal server error."}}},"paths":{"/{tenantName}/{instanceName}/patients/{patientId}/encounters/{encounterId}/assessments/{encounterAssessmentId}":{"patch":{"summary":"Update Assessment link for encounter by assessment link ID","tags":["Encounters"],"operationId":"Update_Assessment_link_for_encounter_by_assessment_link_ID","parameters":[{"$ref":"#/components/parameters/TenantName"},{"$ref":"#/components/parameters/InstanceName"},{"$ref":"#/components/parameters/PatientId"},{"$ref":"#/components/parameters/EncounterId"},{"name":"encounterAssessmentId","in":"path","required":true,"description":"`encounterAssessmentId` path parameter","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Updated assessment link","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CdtRecord"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"}},"description":"### HTTP Request\n\n***PATCH*** `/{tenantName}/{instanceName}/patients/{patientId}/encounters/{encounterId}/assessments/{encounterAssessmentId}`\n\nin our example it would be:\n\n***PATCH*** `https://api.live.welkincloud.io/gh/sb-demo/patients/d6ea79ce-d3d6-4c2d-a27e-e4d1207f60f1/encounters/336ae731-c674-4b85-941a-ef3b37d93b82/assessments/0e692ed3-b250-42ee-a17b-f65e69efcc07`\n\n**Responses**\n\n| Code | Description |\n| --- | --- |\n| 200 | OK |\n| 401 | Unauthorized |\n| 403 | Forbidden |\n| 404 | Not Found |","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EncounterAssessmentUpdateRequest"}}}}}}}}
```

## Get Disposition for encounter

> \### HTTP Request\
> \
> \*\*\*GET\*\*\* \`/{tenantName}/{instanceName}/patients/{patientId}/encounters/{encounterId}/disposition\`\
> \
> in our example it would be:\
> \
> \*\*\*GET\*\*\* \`<https://api.live.welkincloud.io/gh/sb-demo/patients/d6ea79ce-d3d6-4c2d-a27e-e4d1207f60f1/encounters/336ae731-c674-4b85-941a-ef3b37d93b82/disposition\\`\\>
> \
> \*\*Responses\*\*\
> \
> \| Code | Description |\
> \| --- | --- |\
> \| 200 | OK |\
> \| 401 | Unauthorized |\
> \| 403 | Forbidden |\
> \| 404 | Not Found |

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"tags":[{"name":"Encounters","description":"The \"Encounters\" folder in the API collection houses a curated selection of API requests and endpoints that pertain to managing and tracking patient encounters. Encounters refer to the interactions, appointments, or medical events between healthcare professionals and patients. This folder organizes the necessary API calls for creating, retrieving, updating, and deleting encounter records, streamlining the testing and development of functionalities related to patient interactions within the API collection."}],"servers":[{"url":"https://api.live.welkincloud.io","description":"Welkin Health production API"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Bearer token obtained from `POST /{tenantName}/admin/api_clients/{clientName}`. Valid for 60 minutes."}},"parameters":{"TenantName":{"name":"tenantName","in":"path","required":true,"description":"Your organization (tenant) name, e.g. `acme-health`","schema":{"type":"string"}},"InstanceName":{"name":"instanceName","in":"path","required":true,"description":"Your environment name: `live`, `sandbox`, or a custom name","schema":{"type":"string"}},"PatientId":{"name":"patientId","in":"path","required":true,"description":"UUID of the patient record","schema":{"type":"string","format":"uuid"}},"EncounterId":{"name":"encounterId","in":"path","required":true,"description":"UUID of the encounter","schema":{"type":"string","format":"uuid"}}},"schemas":{"CdtRecord":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"patientId":{"type":"string","format":"uuid"},"cdtId":{"type":"string","format":"uuid"},"version":{"type":"integer"},"cdtName":{"type":"string"},"jsonBody":{"type":"object","additionalProperties":true,"description":"Fields defined by the CDT schema, plus system fields (id, created_at, created_by, etc)."}}}},"responses":{"BadRequest":{"description":"Bad request — the request could not be understood or was missing required parameters."},"Unauthorized":{"description":"Unauthorized — the Bearer token is missing, expired, or invalid."},"Forbidden":{"description":"Forbidden — the API client role does not have permission for this resource. Check the role and security policy in Admin."},"NotFound":{"description":"Not found — the requested resource does not exist."},"TooManyRequests":{"description":"Too many requests — rate limit exceeded. Implement exponential backoff."},"InternalError":{"description":"Internal server error."}}},"paths":{"/{tenantName}/{instanceName}/patients/{patientId}/encounters/{encounterId}/disposition":{"get":{"summary":"Get Disposition for encounter","tags":["Encounters"],"operationId":"Get_Disposition_for_encounter","parameters":[{"$ref":"#/components/parameters/TenantName"},{"$ref":"#/components/parameters/InstanceName"},{"$ref":"#/components/parameters/PatientId"},{"$ref":"#/components/parameters/EncounterId"}],"responses":{"200":{"description":"Disposition record","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CdtRecord"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"}},"description":"### HTTP Request\n\n***GET*** `/{tenantName}/{instanceName}/patients/{patientId}/encounters/{encounterId}/disposition`\n\nin our example it would be:\n\n***GET*** `https://api.live.welkincloud.io/gh/sb-demo/patients/d6ea79ce-d3d6-4c2d-a27e-e4d1207f60f1/encounters/336ae731-c674-4b85-941a-ef3b37d93b82/disposition`\n\n**Responses**\n\n| Code | Description |\n| --- | --- |\n| 200 | OK |\n| 401 | Unauthorized |\n| 403 | Forbidden |\n| 404 | Not Found |"}}}}
```

## Update Disposition for encounter

> \### HTTP Request\
> \
> \*\*\*PATCH\*\*\* \`/{tenantName}/{instanceName}/patients/{patientId}/encounters/{encounterId}/disposition\`\
> \
> in our example it would be:\
> \
> \*\*\*PATCH\*\*\* \`<https://api.live.welkincloud.io/gh/sb-demo/patients/d6ea79ce-d3d6-4c2d-a27e-e4d1207f60f1/encounters/336ae731-c674-4b85-941a-ef3b37d93b82/disposition\\`\\>
> \
> \*\*Responses\*\*\
> \
> \| Code | Description |\
> \| --- | --- |\
> \| 200 | OK |\
> \| 401 | Unauthorized |\
> \| 403 | Forbidden |\
> \| 404 | Not Found |

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"tags":[{"name":"Encounters","description":"The \"Encounters\" folder in the API collection houses a curated selection of API requests and endpoints that pertain to managing and tracking patient encounters. Encounters refer to the interactions, appointments, or medical events between healthcare professionals and patients. This folder organizes the necessary API calls for creating, retrieving, updating, and deleting encounter records, streamlining the testing and development of functionalities related to patient interactions within the API collection."}],"servers":[{"url":"https://api.live.welkincloud.io","description":"Welkin Health production API"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Bearer token obtained from `POST /{tenantName}/admin/api_clients/{clientName}`. Valid for 60 minutes."}},"parameters":{"TenantName":{"name":"tenantName","in":"path","required":true,"description":"Your organization (tenant) name, e.g. `acme-health`","schema":{"type":"string"}},"InstanceName":{"name":"instanceName","in":"path","required":true,"description":"Your environment name: `live`, `sandbox`, or a custom name","schema":{"type":"string"}},"PatientId":{"name":"patientId","in":"path","required":true,"description":"UUID of the patient record","schema":{"type":"string","format":"uuid"}},"EncounterId":{"name":"encounterId","in":"path","required":true,"description":"UUID of the encounter","schema":{"type":"string","format":"uuid"}}},"schemas":{"CdtRecord":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"patientId":{"type":"string","format":"uuid"},"cdtId":{"type":"string","format":"uuid"},"version":{"type":"integer"},"cdtName":{"type":"string"},"jsonBody":{"type":"object","additionalProperties":true,"description":"Fields defined by the CDT schema, plus system fields (id, created_at, created_by, etc)."}}}},"responses":{"BadRequest":{"description":"Bad request — the request could not be understood or was missing required parameters."},"Unauthorized":{"description":"Unauthorized — the Bearer token is missing, expired, or invalid."},"Forbidden":{"description":"Forbidden — the API client role does not have permission for this resource. Check the role and security policy in Admin."},"NotFound":{"description":"Not found — the requested resource does not exist."},"TooManyRequests":{"description":"Too many requests — rate limit exceeded. Implement exponential backoff."},"InternalError":{"description":"Internal server error."}}},"paths":{"/{tenantName}/{instanceName}/patients/{patientId}/encounters/{encounterId}/disposition":{"patch":{"summary":"Update Disposition for encounter","tags":["Encounters"],"operationId":"Update_Disposition_for_encounter","parameters":[{"$ref":"#/components/parameters/TenantName"},{"$ref":"#/components/parameters/InstanceName"},{"$ref":"#/components/parameters/PatientId"},{"$ref":"#/components/parameters/EncounterId"}],"responses":{"200":{"description":"Updated disposition record","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CdtRecord"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"}},"description":"### HTTP Request\n\n***PATCH*** `/{tenantName}/{instanceName}/patients/{patientId}/encounters/{encounterId}/disposition`\n\nin our example it would be:\n\n***PATCH*** `https://api.live.welkincloud.io/gh/sb-demo/patients/d6ea79ce-d3d6-4c2d-a27e-e4d1207f60f1/encounters/336ae731-c674-4b85-941a-ef3b37d93b82/disposition`\n\n**Responses**\n\n| Code | Description |\n| --- | --- |\n| 200 | OK |\n| 401 | Unauthorized |\n| 403 | Forbidden |\n| 404 | Not Found |","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Field values as defined by the disposition CDT formation — there is no fixed schema."}}}}}}}}
```

## Get Disposition Formation

> Request to Get current encounter billing formation:\
> \
> \### HTTP Request\
> \
> \*\*\*GET\*\*\* \`/{tenantName}/{instanceName}/formations/{version}/encounter-disposition\`\
> \
> in our example it would be:\
> \
> \*\*\*GET\*\*\* \`<https://api.live.welkincloud.io/gh/sb-demo/formations/current/encounter-disposition\\`\\>
> \
> \*\*Responses\*\*\
> \
> \| Code | Description |\
> \| --- | --- |\
> \| 200 | OK |\
> \| 401 | Unauthorized |\
> \| 403 | Forbidden |\
> \| 404 | Not Found |

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"tags":[{"name":"Encounters","description":"The \"Encounters\" folder in the API collection houses a curated selection of API requests and endpoints that pertain to managing and tracking patient encounters. Encounters refer to the interactions, appointments, or medical events between healthcare professionals and patients. This folder organizes the necessary API calls for creating, retrieving, updating, and deleting encounter records, streamlining the testing and development of functionalities related to patient interactions within the API collection."}],"servers":[{"url":"https://api.live.welkincloud.io","description":"Welkin Health production API"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Bearer token obtained from `POST /{tenantName}/admin/api_clients/{clientName}`. Valid for 60 minutes."}},"parameters":{"TenantName":{"name":"tenantName","in":"path","required":true,"description":"Your organization (tenant) name, e.g. `acme-health`","schema":{"type":"string"}},"InstanceName":{"name":"instanceName","in":"path","required":true,"description":"Your environment name: `live`, `sandbox`, or a custom name","schema":{"type":"string"}}},"schemas":{"Cdt":{"type":"object","required":["name","fields"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","pattern":"^[a-z0-9\\-_]+$"},"title":{"type":"string"},"label":{"type":"string"},"version":{"type":"integer"},"internal":{"type":"boolean"},"readable":{"type":"boolean","default":true},"updatable":{"type":"boolean","default":true},"type":{"$ref":"#/components/schemas/DtType"},"relation":{"$ref":"#/components/schemas/CdtRelation"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/DtField"}}}},"DtType":{"type":"string","enum":["SINGLE_RECORD","MULTI_RECORD"]},"CdtRelation":{"type":"string","enum":["COMMON","PATIENT_INFO","PATIENT","PATIENT_GOAL","ENCOUNTER","ENCOUNTER_DISPOSITION","ENCOUNTER_ASSESSMENT","ASSESSMENT","ASSESSMENT_SCORING","ASSESSMENT_CONSENT","ASSESSMENT_RESULTS_FILE","ASSESSMENT_GROUP","DOCUMENT_SUMMARY","DOCUMENT_TYPE","BILLING_CLAIMS_STATUS","INVOICE","SUPERBILL"]},"DtField":{"type":"object","required":["name","type","meta"],"properties":{"name":{"type":"string","pattern":"^[a-z0-9\\-_]+$"},"type":{"$ref":"#/components/schemas/FieldTypeEnum"},"formula":{"type":"string","nullable":true},"dictionary":{"type":"object","nullable":true,"properties":{"name":{"type":"string"},"field":{"type":"string"}}},"profileDataType":{"type":"object","nullable":true,"properties":{"name":{"type":"string"},"fields":{"type":"array","items":{"type":"string"}}}},"customDataType":{"type":"object","nullable":true,"properties":{"name":{"type":"string"},"fields":{"type":"array","items":{"type":"string"}}}},"customFieldType":{"type":"string","nullable":true},"editable":{"type":"boolean","default":true},"searchable":{"type":"boolean"},"bulkEdit":{"type":"boolean"},"phi":{"type":"boolean"},"disable":{"type":"boolean","description":"JSON key for the \"disabled\" field."},"injectedSource":{"type":"boolean"},"displayType":{"$ref":"#/components/schemas/DtFieldDisplayType"},"valueType":{"$ref":"#/components/schemas/DtFieldValueType"},"meta":{"$ref":"#/components/schemas/DtFieldMeta"},"mask":{"$ref":"#/components/schemas/FieldMask"},"richTextEnabled":{"type":"boolean"}}},"FieldTypeEnum":{"type":"string","enum":["TEXT","TEXTAREA","PASSWORD","EMAIL","INTEGER","FLOAT","PERCENT","RADIO","CHECKBOX","SELECT","CHOICE","DATE","TIME","DATETIME","FILE","IMAGE","URL","PHONE","UUID","SSN","ADDRESS","LOCATION","FORMULA","OBJECT","SIGNATURE"]},"DtFieldDisplayType":{"type":"string","enum":["CHECKBOX","RADIO","SELECT"]},"DtFieldValueType":{"type":"string","enum":["STRING","INTEGER","FLOAT","OBJECT"]},"DtFieldMeta":{"type":"object","properties":{"label":{"type":"string"},"minLength":{"type":"integer","nullable":true},"maxLength":{"type":"integer","nullable":true},"minValue":{"type":"string","nullable":true},"maxValue":{"type":"string","nullable":true},"fileTypes":{"type":"array","items":{"type":"string"}},"maxFiles":{"type":"integer","nullable":true},"maxTotalFileSize":{"type":"integer","nullable":true,"description":"Bytes"},"required":{"type":"boolean","nullable":true},"options":{"type":"array","items":{"$ref":"#/components/schemas/OptionItem"}},"multiple":{"type":"boolean","nullable":true},"patterns":{"type":"array","items":{"type":"string","enum":["NUMBERS_ONLY","LETTERS_ONLY"]}}}},"OptionItem":{"type":"object","properties":{"label":{"type":"string"},"value":{},"refCdtName":{"type":"string","nullable":true}}},"FieldMask":{"type":"object","properties":{"symbol":{"type":"string","minLength":1,"maxLength":1,"default":"*"},"startPosition":{"type":"integer","minimum":1},"endPosition":{"type":"integer","nullable":true}}}},"responses":{"BadRequest":{"description":"Bad request — the request could not be understood or was missing required parameters."},"Unauthorized":{"description":"Unauthorized — the Bearer token is missing, expired, or invalid."},"Forbidden":{"description":"Forbidden — the API client role does not have permission for this resource. Check the role and security policy in Admin."},"NotFound":{"description":"Not found — the requested resource does not exist."},"TooManyRequests":{"description":"Too many requests — rate limit exceeded. Implement exponential backoff."},"InternalError":{"description":"Internal server error."}}},"paths":{"/{tenantName}/{instanceName}/formations/current/encounter-disposition":{"get":{"summary":"Get Disposition Formation","tags":["Encounters"],"operationId":"Get_Disposition_Formation","parameters":[{"$ref":"#/components/parameters/TenantName"},{"$ref":"#/components/parameters/InstanceName"}],"responses":{"200":{"description":"Disposition CDT formation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cdt"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"}},"description":"Request to Get current encounter billing formation:\n\n### HTTP Request\n\n***GET*** `/{tenantName}/{instanceName}/formations/{version}/encounter-disposition`\n\nin our example it would be:\n\n***GET*** `https://api.live.welkincloud.io/gh/sb-demo/formations/current/encounter-disposition`\n\n**Responses**\n\n| Code | Description |\n| --- | --- |\n| 200 | OK |\n| 401 | Unauthorized |\n| 403 | Forbidden |\n| 404 | Not Found |"}}}}
```

## Get all Encounter Templates

> Request to Get all encounter templates with filter.\
> \
> \### HTTP Request\
> \
> \*\*\*GET\*\*\* \`/{tenantName}/{instanceName}/formations/{version}/encounters\`\
> \
> in our example it would be:\
> \
> \*\*\*GET\*\*\* \`<https://api.live.welkincloud.io/gh/sb-demo/formations/current/encounters\\`\\>
> \
> \*\*Responses\*\*\
> \
> \| Code | Description |\
> \| --- | --- |\
> \| 200 | OK |\
> \| 401 | Unauthorized |\
> \| 403 | Forbidden |\
> \| 404 | Not Found |

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"tags":[{"name":"Encounters","description":"The \"Encounters\" folder in the API collection houses a curated selection of API requests and endpoints that pertain to managing and tracking patient encounters. Encounters refer to the interactions, appointments, or medical events between healthcare professionals and patients. This folder organizes the necessary API calls for creating, retrieving, updating, and deleting encounter records, streamlining the testing and development of functionalities related to patient interactions within the API collection."}],"servers":[{"url":"https://api.live.welkincloud.io","description":"Welkin Health production API"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Bearer token obtained from `POST /{tenantName}/admin/api_clients/{clientName}`. Valid for 60 minutes."}},"parameters":{"TenantName":{"name":"tenantName","in":"path","required":true,"description":"Your organization (tenant) name, e.g. `acme-health`","schema":{"type":"string"}},"InstanceName":{"name":"instanceName","in":"path","required":true,"description":"Your environment name: `live`, `sandbox`, or a custom name","schema":{"type":"string"}},"Version":{"name":"version","in":"path","required":true,"description":"Formation version identifier (e.g. `current`, `draft`, or a version number)","schema":{"type":"string"}}},"schemas":{"EncounterTemplate":{"type":"object","required":["name","deliveryMethod"],"properties":{"id":{"type":"string","format":"uuid","readOnly":true},"name":{"type":"string","pattern":"^[a-z0-9\\-_]+$"},"title":{"type":"string"},"encounterDescription":{"type":"string","nullable":true},"encounterInstruction":{"type":"string","nullable":true},"encounterColor":{"type":"string","nullable":true},"type":{"type":"string","nullable":true},"deliveryMethod":{"type":"string"},"defaultDuration":{"type":"integer","nullable":true,"description":"Minutes"},"acuityAppointmentTypeId":{"type":"string","nullable":true},"responsibleParty":{"$ref":"#/components/schemas/ResponsibleParty"},"locationPdtSource":{"type":"object","nullable":true,"properties":{"name":{"type":"string"},"fields":{"type":"array","items":{"type":"string"}}}},"predefinedLocation":{"type":"string","nullable":true},"assessmentNames":{"type":"array","items":{"type":"string"}},"visitServices":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"modifiers":{"type":"array","items":{"type":"string"}}}}}}},"ResponsibleParty":{"type":"string","enum":["SELF_PAY","INSURANCE","UNKNOWN"],"deprecated":true}},"responses":{"BadRequest":{"description":"Bad request — the request could not be understood or was missing required parameters."},"Unauthorized":{"description":"Unauthorized — the Bearer token is missing, expired, or invalid."},"Forbidden":{"description":"Forbidden — the API client role does not have permission for this resource. Check the role and security policy in Admin."},"NotFound":{"description":"Not found — the requested resource does not exist."},"TooManyRequests":{"description":"Too many requests — rate limit exceeded. Implement exponential backoff."},"InternalError":{"description":"Internal server error."}}},"paths":{"/{tenantName}/{instanceName}/formations/{version}/encounters":{"get":{"summary":"Get all Encounter Templates","tags":["Encounters"],"operationId":"Get_all_Encounter_Templates","parameters":[{"$ref":"#/components/parameters/TenantName"},{"$ref":"#/components/parameters/InstanceName"},{"$ref":"#/components/parameters/Version"},{"name":"search","in":"query","required":false,"schema":{"type":"string"},"description":"name or type"}],"responses":{"200":{"description":"List of encounter templates","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EncounterTemplate"}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"}},"description":"Request to Get all encounter templates with filter.\n\n### HTTP Request\n\n***GET*** `/{tenantName}/{instanceName}/formations/{version}/encounters`\n\nin our example it would be:\n\n***GET*** `https://api.live.welkincloud.io/gh/sb-demo/formations/current/encounters`\n\n**Responses**\n\n| Code | Description |\n| --- | --- |\n| 200 | OK |\n| 401 | Unauthorized |\n| 403 | Forbidden |\n| 404 | Not Found |"}}}}
```

## Get Encounter Template by name

> Request to Get one encounter template by name.\
> \
> \### HTTP Request\
> \
> \*\*\*GET\*\*\* \`/{tenantName}/{instanceName}/formations/{version}/encounters/{encounterTemplateName}\`\
> \
> in our example it would be:\
> \
> \*\*\*GET\*\*\* \`<https://api.live.welkincloud.io/gh/sb-demo/formations/current/encounters/temp-1\\`\\>
> \
> \*\*Responses\*\*\
> \
> \| Code | Description |\
> \| --- | --- |\
> \| 200 | OK |\
> \| 401 | Unauthorized |\
> \| 403 | Forbidden |\
> \| 404 | Not Found |

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"tags":[{"name":"Encounters","description":"The \"Encounters\" folder in the API collection houses a curated selection of API requests and endpoints that pertain to managing and tracking patient encounters. Encounters refer to the interactions, appointments, or medical events between healthcare professionals and patients. This folder organizes the necessary API calls for creating, retrieving, updating, and deleting encounter records, streamlining the testing and development of functionalities related to patient interactions within the API collection."}],"servers":[{"url":"https://api.live.welkincloud.io","description":"Welkin Health production API"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Bearer token obtained from `POST /{tenantName}/admin/api_clients/{clientName}`. Valid for 60 minutes."}},"parameters":{"TenantName":{"name":"tenantName","in":"path","required":true,"description":"Your organization (tenant) name, e.g. `acme-health`","schema":{"type":"string"}},"InstanceName":{"name":"instanceName","in":"path","required":true,"description":"Your environment name: `live`, `sandbox`, or a custom name","schema":{"type":"string"}},"Version":{"name":"version","in":"path","required":true,"description":"Formation version identifier (e.g. `current`, `draft`, or a version number)","schema":{"type":"string"}}},"schemas":{"EncounterTemplate":{"type":"object","required":["name","deliveryMethod"],"properties":{"id":{"type":"string","format":"uuid","readOnly":true},"name":{"type":"string","pattern":"^[a-z0-9\\-_]+$"},"title":{"type":"string"},"encounterDescription":{"type":"string","nullable":true},"encounterInstruction":{"type":"string","nullable":true},"encounterColor":{"type":"string","nullable":true},"type":{"type":"string","nullable":true},"deliveryMethod":{"type":"string"},"defaultDuration":{"type":"integer","nullable":true,"description":"Minutes"},"acuityAppointmentTypeId":{"type":"string","nullable":true},"responsibleParty":{"$ref":"#/components/schemas/ResponsibleParty"},"locationPdtSource":{"type":"object","nullable":true,"properties":{"name":{"type":"string"},"fields":{"type":"array","items":{"type":"string"}}}},"predefinedLocation":{"type":"string","nullable":true},"assessmentNames":{"type":"array","items":{"type":"string"}},"visitServices":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"modifiers":{"type":"array","items":{"type":"string"}}}}}}},"ResponsibleParty":{"type":"string","enum":["SELF_PAY","INSURANCE","UNKNOWN"],"deprecated":true}},"responses":{"BadRequest":{"description":"Bad request — the request could not be understood or was missing required parameters."},"Unauthorized":{"description":"Unauthorized — the Bearer token is missing, expired, or invalid."},"Forbidden":{"description":"Forbidden — the API client role does not have permission for this resource. Check the role and security policy in Admin."},"NotFound":{"description":"Not found — the requested resource does not exist."},"TooManyRequests":{"description":"Too many requests — rate limit exceeded. Implement exponential backoff."},"InternalError":{"description":"Internal server error."}}},"paths":{"/{tenantName}/{instanceName}/formations/{version}/encounters/{encounterTemplateName}":{"get":{"summary":"Get Encounter Template by name","tags":["Encounters"],"operationId":"Get_Encounter_Template_by_name","parameters":[{"$ref":"#/components/parameters/TenantName"},{"$ref":"#/components/parameters/InstanceName"},{"$ref":"#/components/parameters/Version"},{"name":"encounterTemplateName","in":"path","required":true,"description":"`encounterTemplateName` path parameter","schema":{"type":"string"}}],"responses":{"200":{"description":"Encounter template","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EncounterTemplate"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"}},"description":"Request to Get one encounter template by name.\n\n### HTTP Request\n\n***GET*** `/{tenantName}/{instanceName}/formations/{version}/encounters/{encounterTemplateName}`\n\nin our example it would be:\n\n***GET*** `https://api.live.welkincloud.io/gh/sb-demo/formations/current/encounters/temp-1`\n\n**Responses**\n\n| Code | Description |\n| --- | --- |\n| 200 | OK |\n| 401 | Unauthorized |\n| 403 | Forbidden |\n| 404 | Not Found |"}}}}
```

## Create a Template for encounter

> Request to Create new encounter template.\
> \
> \### HTTP Request\
> \
> \*\*\*POST\*\*\* \`/{tenantName}/{instanceName}/formations/draft/encounters\`\
> \
> in our example it would be:\
> \
> \*\*\*POST\*\*\* \`<https://api.live.welkincloud.io/gh/sb-demo/formations/draft/encounters\\`\\>
> \
> \*\*Responses\*\*\
> \
> \| Code | Description |\
> \| --- | --- |\
> \| 201 | Created |\
> \| 401 | Unauthorized |\
> \| 403 | Forbidden |\
> \| 404 | Not Found |

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"tags":[{"name":"Encounters","description":"The \"Encounters\" folder in the API collection houses a curated selection of API requests and endpoints that pertain to managing and tracking patient encounters. Encounters refer to the interactions, appointments, or medical events between healthcare professionals and patients. This folder organizes the necessary API calls for creating, retrieving, updating, and deleting encounter records, streamlining the testing and development of functionalities related to patient interactions within the API collection."}],"servers":[{"url":"https://api.live.welkincloud.io","description":"Welkin Health production API"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Bearer token obtained from `POST /{tenantName}/admin/api_clients/{clientName}`. Valid for 60 minutes."}},"parameters":{"TenantName":{"name":"tenantName","in":"path","required":true,"description":"Your organization (tenant) name, e.g. `acme-health`","schema":{"type":"string"}},"InstanceName":{"name":"instanceName","in":"path","required":true,"description":"Your environment name: `live`, `sandbox`, or a custom name","schema":{"type":"string"}}},"schemas":{"EncounterTemplate":{"type":"object","required":["name","deliveryMethod"],"properties":{"id":{"type":"string","format":"uuid","readOnly":true},"name":{"type":"string","pattern":"^[a-z0-9\\-_]+$"},"title":{"type":"string"},"encounterDescription":{"type":"string","nullable":true},"encounterInstruction":{"type":"string","nullable":true},"encounterColor":{"type":"string","nullable":true},"type":{"type":"string","nullable":true},"deliveryMethod":{"type":"string"},"defaultDuration":{"type":"integer","nullable":true,"description":"Minutes"},"acuityAppointmentTypeId":{"type":"string","nullable":true},"responsibleParty":{"$ref":"#/components/schemas/ResponsibleParty"},"locationPdtSource":{"type":"object","nullable":true,"properties":{"name":{"type":"string"},"fields":{"type":"array","items":{"type":"string"}}}},"predefinedLocation":{"type":"string","nullable":true},"assessmentNames":{"type":"array","items":{"type":"string"}},"visitServices":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"modifiers":{"type":"array","items":{"type":"string"}}}}}}},"ResponsibleParty":{"type":"string","enum":["SELF_PAY","INSURANCE","UNKNOWN"],"deprecated":true}},"responses":{"BadRequest":{"description":"Bad request — the request could not be understood or was missing required parameters."},"Unauthorized":{"description":"Unauthorized — the Bearer token is missing, expired, or invalid."},"Forbidden":{"description":"Forbidden — the API client role does not have permission for this resource. Check the role and security policy in Admin."},"NotFound":{"description":"Not found — the requested resource does not exist."},"TooManyRequests":{"description":"Too many requests — rate limit exceeded. Implement exponential backoff."},"InternalError":{"description":"Internal server error."}}},"paths":{"/{tenantName}/{instanceName}/formations/draft/encounters":{"post":{"summary":"Create a Template for encounter","tags":["Encounters"],"operationId":"Create_a_Template_for_encounter","parameters":[{"$ref":"#/components/parameters/TenantName"},{"$ref":"#/components/parameters/InstanceName"}],"responses":{"201":{"description":"Created encounter template","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EncounterTemplate"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"}},"description":"Request to Create new encounter template.\n\n### HTTP Request\n\n***POST*** `/{tenantName}/{instanceName}/formations/draft/encounters`\n\nin our example it would be:\n\n***POST*** `https://api.live.welkincloud.io/gh/sb-demo/formations/draft/encounters`\n\n**Responses**\n\n| Code | Description |\n| --- | --- |\n| 201 | Created |\n| 401 | Unauthorized |\n| 403 | Forbidden |\n| 404 | Not Found |","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EncounterTemplate"}}}}}}}}
```

## Update Encounter Template by encounter template name

> Full update encounter template.\
> \
> \*\*\*PUT\*\*\* \`/{tenantName}/{instanceName}/formations/draft/encounters/{encounterTemplateName}\`\
> \
> in our example it would be:\
> \
> \*\*\*PUT\*\*\* \`<https://api.live.welkincloud.io/gh/sb-demo/formations/draft/encounters/temp-1\\`\\>
> \
> \*\*Responses\*\*\
> \
> \| Code | Description |\
> \| --- | --- |\
> \| 200 | OK |\
> \| 401 | Unauthorized |\
> \| 403 | Forbidden |\
> \| 404 | Not Found |

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"tags":[{"name":"Encounters","description":"The \"Encounters\" folder in the API collection houses a curated selection of API requests and endpoints that pertain to managing and tracking patient encounters. Encounters refer to the interactions, appointments, or medical events between healthcare professionals and patients. This folder organizes the necessary API calls for creating, retrieving, updating, and deleting encounter records, streamlining the testing and development of functionalities related to patient interactions within the API collection."}],"servers":[{"url":"https://api.live.welkincloud.io","description":"Welkin Health production API"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Bearer token obtained from `POST /{tenantName}/admin/api_clients/{clientName}`. Valid for 60 minutes."}},"parameters":{"TenantName":{"name":"tenantName","in":"path","required":true,"description":"Your organization (tenant) name, e.g. `acme-health`","schema":{"type":"string"}},"InstanceName":{"name":"instanceName","in":"path","required":true,"description":"Your environment name: `live`, `sandbox`, or a custom name","schema":{"type":"string"}}},"schemas":{"EncounterTemplate":{"type":"object","required":["name","deliveryMethod"],"properties":{"id":{"type":"string","format":"uuid","readOnly":true},"name":{"type":"string","pattern":"^[a-z0-9\\-_]+$"},"title":{"type":"string"},"encounterDescription":{"type":"string","nullable":true},"encounterInstruction":{"type":"string","nullable":true},"encounterColor":{"type":"string","nullable":true},"type":{"type":"string","nullable":true},"deliveryMethod":{"type":"string"},"defaultDuration":{"type":"integer","nullable":true,"description":"Minutes"},"acuityAppointmentTypeId":{"type":"string","nullable":true},"responsibleParty":{"$ref":"#/components/schemas/ResponsibleParty"},"locationPdtSource":{"type":"object","nullable":true,"properties":{"name":{"type":"string"},"fields":{"type":"array","items":{"type":"string"}}}},"predefinedLocation":{"type":"string","nullable":true},"assessmentNames":{"type":"array","items":{"type":"string"}},"visitServices":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"modifiers":{"type":"array","items":{"type":"string"}}}}}}},"ResponsibleParty":{"type":"string","enum":["SELF_PAY","INSURANCE","UNKNOWN"],"deprecated":true}},"responses":{"BadRequest":{"description":"Bad request — the request could not be understood or was missing required parameters."},"Unauthorized":{"description":"Unauthorized — the Bearer token is missing, expired, or invalid."},"Forbidden":{"description":"Forbidden — the API client role does not have permission for this resource. Check the role and security policy in Admin."},"NotFound":{"description":"Not found — the requested resource does not exist."},"TooManyRequests":{"description":"Too many requests — rate limit exceeded. Implement exponential backoff."},"InternalError":{"description":"Internal server error."}}},"paths":{"/{tenantName}/{instanceName}/formations/draft/encounters/etmp-master":{"put":{"summary":"Update Encounter Template by encounter template name","tags":["Encounters"],"operationId":"Update_Encounter_Template_by_encounter_template_name","parameters":[{"$ref":"#/components/parameters/TenantName"},{"$ref":"#/components/parameters/InstanceName"}],"responses":{"200":{"description":"Updated encounter template","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EncounterTemplate"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"}},"description":"Full update encounter template.\n\n***PUT*** `/{tenantName}/{instanceName}/formations/draft/encounters/{encounterTemplateName}`\n\nin our example it would be:\n\n***PUT*** `https://api.live.welkincloud.io/gh/sb-demo/formations/draft/encounters/temp-1`\n\n**Responses**\n\n| Code | Description |\n| --- | --- |\n| 200 | OK |\n| 401 | Unauthorized |\n| 403 | Forbidden |\n| 404 | Not Found |","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EncounterTemplate"}}}}}}}}
```

## Delete Encounter Template by template name

> Delete encounter template by name\
> \
> \### HTTP Request\
> \
> \*\*\*DELETE\*\*\* \`/{tenantName}/{instanceName}/formations/draft/encounters/{encounterTemplateName}\`\
> \
> in our example it would be:\
> \
> \*\*\*DELETE\*\*\* \`<https://api.live.welkincloud.io/gh/sb-demo/formations/draft/encounters/336ae731-c674-4b85-941a-ef3b37d93b82\\`\\>
> \
> \*\*Responses\*\*\
> \
> \| Code | Description |\
> \| --- | --- |\
> \| 200 | OK |\
> \| 401 | Unauthorized |\
> \| 403 | Forbidden |\
> \| 404 | Not Found |

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"tags":[{"name":"Encounters","description":"The \"Encounters\" folder in the API collection houses a curated selection of API requests and endpoints that pertain to managing and tracking patient encounters. Encounters refer to the interactions, appointments, or medical events between healthcare professionals and patients. This folder organizes the necessary API calls for creating, retrieving, updating, and deleting encounter records, streamlining the testing and development of functionalities related to patient interactions within the API collection."}],"servers":[{"url":"https://api.live.welkincloud.io","description":"Welkin Health production API"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Bearer token obtained from `POST /{tenantName}/admin/api_clients/{clientName}`. Valid for 60 minutes."}},"parameters":{"TenantName":{"name":"tenantName","in":"path","required":true,"description":"Your organization (tenant) name, e.g. `acme-health`","schema":{"type":"string"}},"InstanceName":{"name":"instanceName","in":"path","required":true,"description":"Your environment name: `live`, `sandbox`, or a custom name","schema":{"type":"string"}}},"responses":{"BadRequest":{"description":"Bad request — the request could not be understood or was missing required parameters."},"Unauthorized":{"description":"Unauthorized — the Bearer token is missing, expired, or invalid."},"Forbidden":{"description":"Forbidden — the API client role does not have permission for this resource. Check the role and security policy in Admin."},"NotFound":{"description":"Not found — the requested resource does not exist."},"TooManyRequests":{"description":"Too many requests — rate limit exceeded. Implement exponential backoff."},"InternalError":{"description":"Internal server error."}}},"paths":{"/{tenantName}/{instanceName}/formations/draft/encounters/{encounterTemplateName}":{"delete":{"summary":"Delete Encounter Template by template name","tags":["Encounters"],"operationId":"Delete_Encounter_Template_by_template_name","parameters":[{"$ref":"#/components/parameters/TenantName"},{"$ref":"#/components/parameters/InstanceName"},{"name":"encounterTemplateName","in":"path","required":true,"description":"`encounterTemplateName` path parameter","schema":{"type":"string"}}],"responses":{"200":{"description":"Encounter template deleted"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"}},"description":"Delete encounter template by name\n\n### HTTP Request\n\n***DELETE*** `/{tenantName}/{instanceName}/formations/draft/encounters/{encounterTemplateName}`\n\nin our example it would be:\n\n***DELETE*** `https://api.live.welkincloud.io/gh/sb-demo/formations/draft/encounters/336ae731-c674-4b85-941a-ef3b37d93b82`\n\n**Responses**\n\n| Code | Description |\n| --- | --- |\n| 200 | OK |\n| 401 | Unauthorized |\n| 403 | Forbidden |\n| 404 | Not Found |"}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.welkinhealth.com/api-reference/encounters.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
