> 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/care-plan.md).

# Care Plan

APIs for working with patient care plan: overview and goals

## Goal tasks list

> Get list of tasks related to goal\
> \
> 1\.  HTTP Request\
> &#x20;   \
> \
> \*\*\*GET\*\*\* \`/{tenantName}/{instanceName}/patients/{patientId}/care-plan/goals/{goalId}/tasks\`\
> \
> 2\\. In our example it would be:\
> \
> \*\*\*GET\*\*\* \`<https://api.live.welkincloud.io/gh/sb-demo/patients/d6ea79ce-d3d6-4c2d-a27e-e4d1207f60f1/care-plan/goals/57827fdb-d240-46f9-8e6a-a89441cf8718/tasks\\`\\>
> \
> \*\*Responses\*\*\
> \
> \| Code | Description |\
> \| --- | --- |\
> \| 200 | Created |\
> \| 401 | Unauthorized |\
> \| 403 | Forbidden |\
> \| 404 | Not Found |

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"tags":[{"name":"Care plan","description":"APIs for working with patient care plan: overview and goals"}],"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"}},"GoalId":{"name":"goalId","in":"path","required":true,"description":"UUID of the care plan goal","schema":{"type":"string","format":"uuid"}}},"schemas":{"Task":{"type":"object","required":["name","status","priority","assignee"],"properties":{"id":{"type":"string","format":"uuid","readOnly":true},"createdBy":{"type":"string","format":"uuid","readOnly":true},"updatedBy":{"type":"string","format":"uuid","readOnly":true},"createdByName":{"type":"string","readOnly":true},"updatedByName":{"type":"string","readOnly":true},"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true},"name":{"type":"string"},"description":{"type":"string","nullable":true},"dueDate":{"type":"string","format":"date-time","nullable":true},"status":{"$ref":"#/components/schemas/TaskStatus"},"priority":{"$ref":"#/components/schemas/TaskPriority"},"patient":{"$ref":"#/components/schemas/IndexedNamed","description":"Set automatically from the path patientId when created via the Goal Task endpoint."},"assignee":{"$ref":"#/components/schemas/TaskUser"},"watchers":{"type":"array","items":{"$ref":"#/components/schemas/TaskUser"}},"comments":{"type":"array","items":{"$ref":"#/components/schemas/TaskComment"}},"goalId":{"type":"string","format":"uuid","nullable":true,"readOnly":true},"templateName":{"type":"string","nullable":true},"createdType":{"$ref":"#/components/schemas/TaskCreatedType"},"sourceId":{"type":"string","format":"uuid","nullable":true},"sourceType":{"$ref":"#/components/schemas/TaskSourceType"},"hiddenPhi":{"type":"boolean"},"watchersType":{"$ref":"#/components/schemas/WatchersType","default":"POINT_OF_CONTACT"}}},"TaskStatus":{"type":"string","enum":["TODO","IN_PROGRESS","COMPLETED","CANCELED"]},"TaskPriority":{"type":"string","enum":["LOW","MEDIUM","HIGH","URGENT"]},"IndexedNamed":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","nullable":true}}},"TaskUser":{"allOf":[{"$ref":"#/components/schemas/IndexedNamed"},{"type":"object","properties":{"enabled":{"type":"boolean","nullable":true}}}]},"TaskComment":{"type":"object","required":["text"],"properties":{"id":{"type":"string","format":"uuid","readOnly":true},"createdAt":{"type":"string","format":"date-time","readOnly":true},"author":{"$ref":"#/components/schemas/TaskUser"},"text":{"type":"string"},"patient":{"$ref":"#/components/schemas/IndexedNamed"},"user":{"$ref":"#/components/schemas/IndexedNamed"}}},"TaskCreatedType":{"type":"string","enum":["AUTOMATION","USER"]},"TaskSourceType":{"type":"string","enum":["ASSESSMENT"]},"WatchersType":{"type":"string","enum":["POINT_OF_CONTACT","CARE_TEAM"]}},"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}/care-plan/goals/{goalId}/tasks":{"get":{"summary":"Goal tasks list","tags":["Care plan"],"operationId":"Goal_tasks_list","parameters":[{"$ref":"#/components/parameters/TenantName"},{"$ref":"#/components/parameters/InstanceName"},{"$ref":"#/components/parameters/PatientId"},{"$ref":"#/components/parameters/GoalId"}],"responses":{"200":{"description":"Tasks for this goal","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Task"}}}}},"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 list of tasks related to goal\n\n1.  HTTP Request\n    \n\n***GET*** `/{tenantName}/{instanceName}/patients/{patientId}/care-plan/goals/{goalId}/tasks`\n\n2\\. In our example it would be:\n\n***GET*** `https://api.live.welkincloud.io/gh/sb-demo/patients/d6ea79ce-d3d6-4c2d-a27e-e4d1207f60f1/care-plan/goals/57827fdb-d240-46f9-8e6a-a89441cf8718/tasks`\n\n**Responses**\n\n| Code | Description |\n| --- | --- |\n| 200 | Created |\n| 401 | Unauthorized |\n| 403 | Forbidden |\n| 404 | Not Found |"}}}}
```

## Add Goal task

> Add custom task to goal\
> \
> 1\.  HTTP Request\
> &#x20;   \
> \
> \*\*\*GET\*\*\* \`/{tenantName}/{instanceName}/patients/{patientId}/care-plan/goals/{goalId}/tasks\`\
> \
> 2\\. In our example it would be:\
> \
> \*\*\*GET\*\*\* \`<https://api.live.welkincloud.io/gh/sb-demo/patients/d6ea79ce-d3d6-4c2d-a27e-e4d1207f60f1/care-plan/goals/57827fdb-d240-46f9-8e6a-a89441cf8718/tasks\\`\\>
> \
> \*\*Responses\*\*\
> \
> \| Code | Description |\
> \| --- | --- |\
> \| 200 | Created |\
> \| 401 | Unauthorized |\
> \| 403 | Forbidden |\
> \| 404 | Not Found |

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"tags":[{"name":"Care plan","description":"APIs for working with patient care plan: overview and goals"}],"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"}},"GoalId":{"name":"goalId","in":"path","required":true,"description":"UUID of the care plan goal","schema":{"type":"string","format":"uuid"}}},"schemas":{"Task":{"type":"object","required":["name","status","priority","assignee"],"properties":{"id":{"type":"string","format":"uuid","readOnly":true},"createdBy":{"type":"string","format":"uuid","readOnly":true},"updatedBy":{"type":"string","format":"uuid","readOnly":true},"createdByName":{"type":"string","readOnly":true},"updatedByName":{"type":"string","readOnly":true},"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true},"name":{"type":"string"},"description":{"type":"string","nullable":true},"dueDate":{"type":"string","format":"date-time","nullable":true},"status":{"$ref":"#/components/schemas/TaskStatus"},"priority":{"$ref":"#/components/schemas/TaskPriority"},"patient":{"$ref":"#/components/schemas/IndexedNamed","description":"Set automatically from the path patientId when created via the Goal Task endpoint."},"assignee":{"$ref":"#/components/schemas/TaskUser"},"watchers":{"type":"array","items":{"$ref":"#/components/schemas/TaskUser"}},"comments":{"type":"array","items":{"$ref":"#/components/schemas/TaskComment"}},"goalId":{"type":"string","format":"uuid","nullable":true,"readOnly":true},"templateName":{"type":"string","nullable":true},"createdType":{"$ref":"#/components/schemas/TaskCreatedType"},"sourceId":{"type":"string","format":"uuid","nullable":true},"sourceType":{"$ref":"#/components/schemas/TaskSourceType"},"hiddenPhi":{"type":"boolean"},"watchersType":{"$ref":"#/components/schemas/WatchersType","default":"POINT_OF_CONTACT"}}},"TaskStatus":{"type":"string","enum":["TODO","IN_PROGRESS","COMPLETED","CANCELED"]},"TaskPriority":{"type":"string","enum":["LOW","MEDIUM","HIGH","URGENT"]},"IndexedNamed":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","nullable":true}}},"TaskUser":{"allOf":[{"$ref":"#/components/schemas/IndexedNamed"},{"type":"object","properties":{"enabled":{"type":"boolean","nullable":true}}}]},"TaskComment":{"type":"object","required":["text"],"properties":{"id":{"type":"string","format":"uuid","readOnly":true},"createdAt":{"type":"string","format":"date-time","readOnly":true},"author":{"$ref":"#/components/schemas/TaskUser"},"text":{"type":"string"},"patient":{"$ref":"#/components/schemas/IndexedNamed"},"user":{"$ref":"#/components/schemas/IndexedNamed"}}},"TaskCreatedType":{"type":"string","enum":["AUTOMATION","USER"]},"TaskSourceType":{"type":"string","enum":["ASSESSMENT"]},"WatchersType":{"type":"string","enum":["POINT_OF_CONTACT","CARE_TEAM"]}},"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}/care-plan/goals/{goalId}/tasks":{"post":{"summary":"Add Goal task","tags":["Care plan"],"operationId":"Add_Goal_task","parameters":[{"$ref":"#/components/parameters/TenantName"},{"$ref":"#/components/parameters/InstanceName"},{"$ref":"#/components/parameters/PatientId"},{"$ref":"#/components/parameters/GoalId"}],"responses":{"201":{"description":"Task created under this goal","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}}},"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":"Add custom task to goal\n\n1.  HTTP Request\n    \n\n***GET*** `/{tenantName}/{instanceName}/patients/{patientId}/care-plan/goals/{goalId}/tasks`\n\n2\\. In our example it would be:\n\n***GET*** `https://api.live.welkincloud.io/gh/sb-demo/patients/d6ea79ce-d3d6-4c2d-a27e-e4d1207f60f1/care-plan/goals/57827fdb-d240-46f9-8e6a-a89441cf8718/tasks`\n\n**Responses**\n\n| Code | Description |\n| --- | --- |\n| 200 | Created |\n| 401 | Unauthorized |\n| 403 | Forbidden |\n| 404 | Not Found |","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}}}}}}}
```

## Goal comments list

> Get list of comments related to goal\
> \
> 1\.  HTTP Request\
> &#x20;   \
> \
> \*\*\*GET\*\*\* \`/{tenantName}/{instanceName}/patients/{patientId}/care-plan/goals/{goalId}/comments\`\
> \
> 2\\. In our example it would be:\
> \
> \*\*\*GET\*\*\* \`<https://api.live.welkincloud.io/gh/sb-demo/patients/d6ea79ce-d3d6-4c2d-a27e-e4d1207f60f1/care-plan/goals/57827fdb-d240-46f9-8e6a-a89441cf8718/comments\\`\\>
> \
> \*\*Responses\*\*\
> \
> \| Code | Description |\
> \| --- | --- |\
> \| 200 | Created |\
> \| 401 | Unauthorized |\
> \| 403 | Forbidden |\
> \| 404 | Not Found |

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"tags":[{"name":"Care plan","description":"APIs for working with patient care plan: overview and goals"}],"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"}},"GoalId":{"name":"goalId","in":"path","required":true,"description":"UUID of the care plan goal","schema":{"type":"string","format":"uuid"}}},"schemas":{"GoalComment":{"type":"object","required":["text"],"properties":{"id":{"type":"string","format":"uuid","readOnly":true,"nullable":true},"createdByName":{"type":"string","readOnly":true,"nullable":true},"createdAt":{"type":"string","format":"date-time","readOnly":true,"nullable":true},"updatedByName":{"type":"string","readOnly":true,"nullable":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true,"nullable":true},"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}/care-plan/goals/{goalId}/comments":{"get":{"summary":"Goal comments list","tags":["Care plan"],"operationId":"Goal_comments_list","parameters":[{"$ref":"#/components/parameters/TenantName"},{"$ref":"#/components/parameters/InstanceName"},{"$ref":"#/components/parameters/PatientId"},{"$ref":"#/components/parameters/GoalId"}],"responses":{"200":{"description":"Comments for this goal","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GoalComment"}}}}},"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 list of comments related to goal\n\n1.  HTTP Request\n    \n\n***GET*** `/{tenantName}/{instanceName}/patients/{patientId}/care-plan/goals/{goalId}/comments`\n\n2\\. In our example it would be:\n\n***GET*** `https://api.live.welkincloud.io/gh/sb-demo/patients/d6ea79ce-d3d6-4c2d-a27e-e4d1207f60f1/care-plan/goals/57827fdb-d240-46f9-8e6a-a89441cf8718/comments`\n\n**Responses**\n\n| Code | Description |\n| --- | --- |\n| 200 | Created |\n| 401 | Unauthorized |\n| 403 | Forbidden |\n| 404 | Not Found |"}}}}
```

## Add Goal comment

> Add comment to goal\
> \
> \### HTTP Request\
> \
> \*\*\*POST\*\*\* \`/{tenantName}/{instanceName}/patients/{patientId}/care-plan/goals/{goalId}/comments\`\
> \
> in our example it would be:\
> \
> \*\*\*POST\*\*\* \`<https://api.live.welkincloud.io/gh/sb-demo/patients/d6ea79ce-d3d6-4c2d-a27e-e4d1207f60f1/care-plan/goals/57827fdb-d240-46f9-8e6a-a89441cf8718/comments\\`\\>
> \
> \*\*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":"Care plan","description":"APIs for working with patient care plan: overview and goals"}],"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"}},"GoalId":{"name":"goalId","in":"path","required":true,"description":"UUID of the care plan goal","schema":{"type":"string","format":"uuid"}}},"schemas":{"GoalComment":{"type":"object","required":["text"],"properties":{"id":{"type":"string","format":"uuid","readOnly":true,"nullable":true},"createdByName":{"type":"string","readOnly":true,"nullable":true},"createdAt":{"type":"string","format":"date-time","readOnly":true,"nullable":true},"updatedByName":{"type":"string","readOnly":true,"nullable":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true,"nullable":true},"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}/care-plan/goals/{goalId}/comments":{"post":{"summary":"Add Goal comment","tags":["Care plan"],"operationId":"Add_Goal_comment","parameters":[{"$ref":"#/components/parameters/TenantName"},{"$ref":"#/components/parameters/InstanceName"},{"$ref":"#/components/parameters/PatientId"},{"$ref":"#/components/parameters/GoalId"}],"responses":{"201":{"description":"Comment created on this goal","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoalComment"}}}},"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":"Add comment to goal\n\n### HTTP Request\n\n***POST*** `/{tenantName}/{instanceName}/patients/{patientId}/care-plan/goals/{goalId}/comments`\n\nin our example it would be:\n\n***POST*** `https://api.live.welkincloud.io/gh/sb-demo/patients/d6ea79ce-d3d6-4c2d-a27e-e4d1207f60f1/care-plan/goals/57827fdb-d240-46f9-8e6a-a89441cf8718/comments`\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/GoalComment"}}}}}}}}
```

## Goals list

> Get goals list without additional entity (tasks, comments), can be filtered by status.\
> \
> 1\.  HTTP Request\
> &#x20;   \
> \
> \*\*\*GET\*\*\* \`/{tenantName}/{instanceName}/patients/{patientId}/care-plan/goals\`\
> \
> 2\\. In our example it would be:\
> \
> \*\*\*GET\*\*\* \`<https://api.live.welkincloud.io/gh/sb-demo/patients/d6ea79ce-d3d6-4c2d-a27e-e4d1207f60f1/care-plan/goals\\`>

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"tags":[{"name":"Care plan","description":"APIs for working with patient care plan: overview and goals"}],"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":{"GoalsPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/GoalDetails"}},"metaInfo":{"$ref":"#/components/schemas/PageMetaInfo"}}},"GoalDetails":{"type":"object","properties":{"id":{"type":"string","format":"uuid","readOnly":true},"createdByName":{"type":"string","readOnly":true},"createdAt":{"type":"string","readOnly":true},"updatedByName":{"type":"string","readOnly":true},"updatedAt":{"type":"string","readOnly":true},"name":{"type":"string","nullable":true},"type":{"type":"string","nullable":true},"priority":{"$ref":"#/components/schemas/GoalPriority"},"status":{"$ref":"#/components/schemas/GoalStatus"},"templateName":{"type":"string","nullable":true}}},"GoalPriority":{"type":"string","enum":["LOW","MEDIUM","HIGH"]},"GoalStatus":{"type":"string","enum":["ACTIVE","COMPLETED","REMOVED"]},"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}/care-plan/goals":{"get":{"summary":"Goals list","tags":["Care plan"],"operationId":"Goals_list","parameters":[{"$ref":"#/components/parameters/TenantName"},{"$ref":"#/components/parameters/InstanceName"},{"$ref":"#/components/parameters/PatientId"},{"name":"status","in":"query","required":false,"schema":{"type":"string"},"description":"Single status or list"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":0,"minimum":0},"description":"Page Index"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","default":20},"description":"Page Size"}],"responses":{"200":{"description":"Paginated list of goals. Note: there is no flat `status` query param in the backend — filtering by status requires the generic filter mechanism (`filters`/`jsonFilters` with fieldsPath=[\"status\"]).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoalsPage"}}}},"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 goals list without additional entity (tasks, comments), can be filtered by status.\n\n1.  HTTP Request\n    \n\n***GET*** `/{tenantName}/{instanceName}/patients/{patientId}/care-plan/goals`\n\n2\\. In our example it would be:\n\n***GET*** `https://api.live.welkincloud.io/gh/sb-demo/patients/d6ea79ce-d3d6-4c2d-a27e-e4d1207f60f1/care-plan/goals`"}}}}
```

## Create Goal

> Create goal for patient by goal-template\
> \
> 1\.  HTTP Request\
> &#x20;   \
> \
> \*\*\*POST\*\*\* \`/{tenantName}/{instanceName}/patients/{patientId}/care-plan/goals\`\
> \
> 2\\. In our example it would be:\
> \
> \*\*\*POST\*\*\* \`<https://api.live.welkincloud.io/gh/sb-demo/patients/d6ea79ce-d3d6-4c2d-a27e-e4d1207f60f1/care-plan/goals\\`\\>
> \
> \*\*Parameters\*\*\
> \
> \| Name | Located in | Description | Required | Type |\
> \| --- | --- | --- | --- | --- |\
> \| patientId | path | ID of patient | Yes | UUID |\
> \| tenantName | path | Name of tenant | Yes | string |\
> \| instanceName | path | Name of instance | Yes | string |\
> \| dto | body | dto | Yes | json |\
> \
> \*\*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":"Care plan","description":"APIs for working with patient care plan: overview and goals"}],"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":{"GoalDetails":{"type":"object","properties":{"id":{"type":"string","format":"uuid","readOnly":true},"createdByName":{"type":"string","readOnly":true},"createdAt":{"type":"string","readOnly":true},"updatedByName":{"type":"string","readOnly":true},"updatedAt":{"type":"string","readOnly":true},"name":{"type":"string","nullable":true},"type":{"type":"string","nullable":true},"priority":{"$ref":"#/components/schemas/GoalPriority"},"status":{"$ref":"#/components/schemas/GoalStatus"},"templateName":{"type":"string","nullable":true}}},"GoalPriority":{"type":"string","enum":["LOW","MEDIUM","HIGH"]},"GoalStatus":{"type":"string","enum":["ACTIVE","COMPLETED","REMOVED"]},"CreateGoalRequest":{"type":"object","required":["goalTemplateName"],"properties":{"goalTemplateName":{"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}/care-plan/goals":{"post":{"summary":"Create Goal","tags":["Care plan"],"operationId":"Create_Goal","parameters":[{"$ref":"#/components/parameters/TenantName"},{"$ref":"#/components/parameters/InstanceName"},{"$ref":"#/components/parameters/PatientId"}],"responses":{"201":{"description":"Goal created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoalDetails"}}}},"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":"Create goal for patient by goal-template\n\n1.  HTTP Request\n    \n\n***POST*** `/{tenantName}/{instanceName}/patients/{patientId}/care-plan/goals`\n\n2\\. In our example it would be:\n\n***POST*** `https://api.live.welkincloud.io/gh/sb-demo/patients/d6ea79ce-d3d6-4c2d-a27e-e4d1207f60f1/care-plan/goals`\n\n**Parameters**\n\n| Name | Located in | Description | Required | Type |\n| --- | --- | --- | --- | --- |\n| patientId | path | ID of patient | Yes | UUID |\n| tenantName | path | Name of tenant | Yes | string |\n| instanceName | path | Name of instance | Yes | string |\n| dto | body | dto | Yes | json |\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/CreateGoalRequest"}}}}}}}}
```

## Goal details

> Get extended goal view: details, tasks, comments.\
> \
> 1\.  HTTP Request\
> &#x20;   \
> \
> \*\*\*GET\*\*\* \`/{tenantName}/{instanceName}/patients/{patientId}/care-plan/goals/{goalId}\`\
> \
> 2\\. In our example it would be:\
> \
> \*\*\*GET\*\*\* \`<https://api.live.welkincloud.io/gh/sb-demo/patients/d6ea79ce-d3d6-4c2d-a27e-e4d1207f60f1/care-plan/goals/57827fdb-d240-46f9-8e6a-a89441cf8718\\`\\>
> \
> \*\*Parameters\*\*\
> \
> \| Name | Located in | Description | Required | Type |\
> \| --- | --- | --- | --- | --- |\
> \| patientId | path | ID of patient | Yes | UUID |\
> \| goalId | path | ID of goal | Yes | UUID |\
> \| tenantName | path | Name of tenant | Yes | string |\
> \| instanceName | path | Name of instance | Yes | string |\
> \
> \*\*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":"Care plan","description":"APIs for working with patient care plan: overview and goals"}],"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"}},"GoalId":{"name":"goalId","in":"path","required":true,"description":"UUID of the care plan goal","schema":{"type":"string","format":"uuid"}}},"schemas":{"Goal":{"type":"object","properties":{"details":{"$ref":"#/components/schemas/GoalDetails"},"tasks":{"type":"array","items":{"$ref":"#/components/schemas/Task"}},"comments":{"type":"array","items":{"$ref":"#/components/schemas/GoalComment"}}}},"GoalDetails":{"type":"object","properties":{"id":{"type":"string","format":"uuid","readOnly":true},"createdByName":{"type":"string","readOnly":true},"createdAt":{"type":"string","readOnly":true},"updatedByName":{"type":"string","readOnly":true},"updatedAt":{"type":"string","readOnly":true},"name":{"type":"string","nullable":true},"type":{"type":"string","nullable":true},"priority":{"$ref":"#/components/schemas/GoalPriority"},"status":{"$ref":"#/components/schemas/GoalStatus"},"templateName":{"type":"string","nullable":true}}},"GoalPriority":{"type":"string","enum":["LOW","MEDIUM","HIGH"]},"GoalStatus":{"type":"string","enum":["ACTIVE","COMPLETED","REMOVED"]},"Task":{"type":"object","required":["name","status","priority","assignee"],"properties":{"id":{"type":"string","format":"uuid","readOnly":true},"createdBy":{"type":"string","format":"uuid","readOnly":true},"updatedBy":{"type":"string","format":"uuid","readOnly":true},"createdByName":{"type":"string","readOnly":true},"updatedByName":{"type":"string","readOnly":true},"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true},"name":{"type":"string"},"description":{"type":"string","nullable":true},"dueDate":{"type":"string","format":"date-time","nullable":true},"status":{"$ref":"#/components/schemas/TaskStatus"},"priority":{"$ref":"#/components/schemas/TaskPriority"},"patient":{"$ref":"#/components/schemas/IndexedNamed","description":"Set automatically from the path patientId when created via the Goal Task endpoint."},"assignee":{"$ref":"#/components/schemas/TaskUser"},"watchers":{"type":"array","items":{"$ref":"#/components/schemas/TaskUser"}},"comments":{"type":"array","items":{"$ref":"#/components/schemas/TaskComment"}},"goalId":{"type":"string","format":"uuid","nullable":true,"readOnly":true},"templateName":{"type":"string","nullable":true},"createdType":{"$ref":"#/components/schemas/TaskCreatedType"},"sourceId":{"type":"string","format":"uuid","nullable":true},"sourceType":{"$ref":"#/components/schemas/TaskSourceType"},"hiddenPhi":{"type":"boolean"},"watchersType":{"$ref":"#/components/schemas/WatchersType","default":"POINT_OF_CONTACT"}}},"TaskStatus":{"type":"string","enum":["TODO","IN_PROGRESS","COMPLETED","CANCELED"]},"TaskPriority":{"type":"string","enum":["LOW","MEDIUM","HIGH","URGENT"]},"IndexedNamed":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","nullable":true}}},"TaskUser":{"allOf":[{"$ref":"#/components/schemas/IndexedNamed"},{"type":"object","properties":{"enabled":{"type":"boolean","nullable":true}}}]},"TaskComment":{"type":"object","required":["text"],"properties":{"id":{"type":"string","format":"uuid","readOnly":true},"createdAt":{"type":"string","format":"date-time","readOnly":true},"author":{"$ref":"#/components/schemas/TaskUser"},"text":{"type":"string"},"patient":{"$ref":"#/components/schemas/IndexedNamed"},"user":{"$ref":"#/components/schemas/IndexedNamed"}}},"TaskCreatedType":{"type":"string","enum":["AUTOMATION","USER"]},"TaskSourceType":{"type":"string","enum":["ASSESSMENT"]},"WatchersType":{"type":"string","enum":["POINT_OF_CONTACT","CARE_TEAM"]},"GoalComment":{"type":"object","required":["text"],"properties":{"id":{"type":"string","format":"uuid","readOnly":true,"nullable":true},"createdByName":{"type":"string","readOnly":true,"nullable":true},"createdAt":{"type":"string","format":"date-time","readOnly":true,"nullable":true},"updatedByName":{"type":"string","readOnly":true,"nullable":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true,"nullable":true},"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}/care-plan/goals/{goalId}":{"get":{"summary":"Goal details","tags":["Care plan"],"operationId":"Goal_details","parameters":[{"$ref":"#/components/parameters/TenantName"},{"$ref":"#/components/parameters/InstanceName"},{"$ref":"#/components/parameters/PatientId"},{"$ref":"#/components/parameters/GoalId"}],"responses":{"200":{"description":"Goal with its tasks and comments","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Goal"}}}},"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 extended goal view: details, tasks, comments.\n\n1.  HTTP Request\n    \n\n***GET*** `/{tenantName}/{instanceName}/patients/{patientId}/care-plan/goals/{goalId}`\n\n2\\. In our example it would be:\n\n***GET*** `https://api.live.welkincloud.io/gh/sb-demo/patients/d6ea79ce-d3d6-4c2d-a27e-e4d1207f60f1/care-plan/goals/57827fdb-d240-46f9-8e6a-a89441cf8718`\n\n**Parameters**\n\n| Name | Located in | Description | Required | Type |\n| --- | --- | --- | --- | --- |\n| patientId | path | ID of patient | Yes | UUID |\n| goalId | path | ID of goal | Yes | UUID |\n| tenantName | path | Name of tenant | Yes | string |\n| instanceName | path | Name of instance | Yes | string |\n\n**Responses**\n\n| Code | Description |\n| --- | --- |\n| 200 | OK |\n| 401 | Unauthorized |\n| 403 | Forbidden |\n| 404 | Not Found |"}}}}
```

## Update Goal

> Update goal details: name, status, priority.\
> \
> 1\.  HTTP Request\
> &#x20;   \
> \
> \*\*\*PATCH\*\*\* \`/{tenantName}/{instanceName}/patients/{patientId}/care-plan/goals/{goalId}\`\
> \
> 2\\. In our example it would be:\
> \
> \*\*\*PATCH\*\*\* \`<https://api.live.welkincloud.io/gh/sb-demo/patients/d6ea79ce-d3d6-4c2d-a27e-e4d1207f60f1/care-plan/goals/57827fdb-d240-46f9-8e6a-a89441cf8718\\`\\>
> \
> \*\*Parameters\*\*\
> \
> \| Name | Located in | Description | Required | Type |\
> \| --- | --- | --- | --- | --- |\
> \| patientId | path | ID of patient | Yes | UUID |\
> \| goalId | path | ID of goal | Yes | UUID |\
> \| tenantName | path | Name of tenant | Yes | string |\
> \| instanceName | path | Name of instance | Yes | string |\
> \| dto | body | dto | Yes | json |\
> \
> \*\*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":"Care plan","description":"APIs for working with patient care plan: overview and goals"}],"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"}},"GoalId":{"name":"goalId","in":"path","required":true,"description":"UUID of the care plan goal","schema":{"type":"string","format":"uuid"}}},"schemas":{"GoalDetails":{"type":"object","properties":{"id":{"type":"string","format":"uuid","readOnly":true},"createdByName":{"type":"string","readOnly":true},"createdAt":{"type":"string","readOnly":true},"updatedByName":{"type":"string","readOnly":true},"updatedAt":{"type":"string","readOnly":true},"name":{"type":"string","nullable":true},"type":{"type":"string","nullable":true},"priority":{"$ref":"#/components/schemas/GoalPriority"},"status":{"$ref":"#/components/schemas/GoalStatus"},"templateName":{"type":"string","nullable":true}}},"GoalPriority":{"type":"string","enum":["LOW","MEDIUM","HIGH"]},"GoalStatus":{"type":"string","enum":["ACTIVE","COMPLETED","REMOVED"]}},"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}/care-plan/goals/{goalId}":{"patch":{"summary":"Update Goal","tags":["Care plan"],"operationId":"Update_Goal","parameters":[{"$ref":"#/components/parameters/TenantName"},{"$ref":"#/components/parameters/InstanceName"},{"$ref":"#/components/parameters/PatientId"},{"$ref":"#/components/parameters/GoalId"}],"responses":{"200":{"description":"Updated goal","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoalDetails"}}}},"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":"Update goal details: name, status, priority.\n\n1.  HTTP Request\n    \n\n***PATCH*** `/{tenantName}/{instanceName}/patients/{patientId}/care-plan/goals/{goalId}`\n\n2\\. In our example it would be:\n\n***PATCH*** `https://api.live.welkincloud.io/gh/sb-demo/patients/d6ea79ce-d3d6-4c2d-a27e-e4d1207f60f1/care-plan/goals/57827fdb-d240-46f9-8e6a-a89441cf8718`\n\n**Parameters**\n\n| Name | Located in | Description | Required | Type |\n| --- | --- | --- | --- | --- |\n| patientId | path | ID of patient | Yes | UUID |\n| goalId | path | ID of goal | Yes | UUID |\n| tenantName | path | Name of tenant | Yes | string |\n| instanceName | path | Name of instance | Yes | string |\n| dto | body | dto | Yes | json |\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/GoalDetails"}}}}}}}}
```

## Create Patient Overview

> 1\.  HTTP Request\
> &#x20;   \
> \
> \*\*\*POST\*\*\* \`/{tenantName}/{instanceName}/patients/{patientId}/care-plan/overview\`\
> \
> 2\\. In our example it would be:\
> \
> \*\*\*POST\*\*\* \`<https://api.live.welkincloud.io/gh/sb-demo/patients/d6ea79ce-d3d6-4c2d-a27e-e4d1207f60f1/care-plan/overview\\`\\>
> \
> \*\*Parameters\*\*\
> \
> \| Name | Located in | Description | Required | Type |\
> \| --- | --- | --- | --- | --- |\
> \| patientId | path | ID of patient | Yes | UUID |\
> \| tenantName | path | Name of tenant | Yes | string |\
> \| instanceName | path | Name of instance | Yes | string |\
> \
> \*\*Responses\*\*\
> \
> \| Code | Description |\
> \| --- | --- |\
> \| 200 | OK |\
> \| 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":"Care plan","description":"APIs for working with patient care plan: overview and goals"}],"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":{"PatientOverview":{"type":"object","properties":{"createdByName":{"type":"string","readOnly":true},"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedByName":{"type":"string","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true},"overview":{"type":"string","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}/care-plan/overview":{"post":{"summary":"Create Patient Overview","tags":["Care plan"],"operationId":"Create_Patient_Overview","parameters":[{"$ref":"#/components/parameters/TenantName"},{"$ref":"#/components/parameters/InstanceName"},{"$ref":"#/components/parameters/PatientId"}],"responses":{"201":{"description":"Patient overview created/updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientOverview"}}}},"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":"1.  HTTP Request\n    \n\n***POST*** `/{tenantName}/{instanceName}/patients/{patientId}/care-plan/overview`\n\n2\\. In our example it would be:\n\n***POST*** `https://api.live.welkincloud.io/gh/sb-demo/patients/d6ea79ce-d3d6-4c2d-a27e-e4d1207f60f1/care-plan/overview`\n\n**Parameters**\n\n| Name | Located in | Description | Required | Type |\n| --- | --- | --- | --- | --- |\n| patientId | path | ID of patient | Yes | UUID |\n| tenantName | path | Name of tenant | Yes | string |\n| instanceName | path | Name of instance | Yes | string |\n\n**Responses**\n\n| Code | Description |\n| --- | --- |\n| 200 | OK |\n| 201 | Created |\n| 401 | Unauthorized |\n| 403 | Forbidden |\n| 404 | Not Found |","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientOverview"}}}}}}}}
```

## Update Patient Overview

> Update patient overview\
> \
> 1\.  HTTP Request\
> &#x20;   \
> \
> \*\*\*PUT\*\*\* \`/{tenantName}/{instanceName}/patients/{patientId}/care-plan/overview\`\
> \
> 2\\. In our example it would be:\
> \
> \*\*\*PUT\*\*\* \`<https://api.live.welkincloud.io/gh/sb-demo/patients/d6ea79ce-d3d6-4c2d-a27e-e4d1207f60f1/care-plan/overview\\`\\>
> \
> \*\*Parameters\*\*\
> \
> \| Name | Located in | Description | Required | Type |\
> \| --- | --- | --- | --- | --- |\
> \| patientId | path | ID of patient | Yes | UUID |\
> \| tenantName | path | Name of tenant | Yes | string |\
> \| instanceName | path | Name of instance | Yes | string |

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"tags":[{"name":"Care plan","description":"APIs for working with patient care plan: overview and goals"}],"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":{"PatientOverview":{"type":"object","properties":{"createdByName":{"type":"string","readOnly":true},"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedByName":{"type":"string","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true},"overview":{"type":"string","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}/care-plan/overview":{"put":{"summary":"Update Patient Overview","tags":["Care plan"],"operationId":"Update_Patient_Overview","parameters":[{"$ref":"#/components/parameters/TenantName"},{"$ref":"#/components/parameters/InstanceName"},{"$ref":"#/components/parameters/PatientId"}],"responses":{"200":{"description":"Patient overview updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientOverview"}}}},"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":"Update patient overview\n\n1.  HTTP Request\n    \n\n***PUT*** `/{tenantName}/{instanceName}/patients/{patientId}/care-plan/overview`\n\n2\\. In our example it would be:\n\n***PUT*** `https://api.live.welkincloud.io/gh/sb-demo/patients/d6ea79ce-d3d6-4c2d-a27e-e4d1207f60f1/care-plan/overview`\n\n**Parameters**\n\n| Name | Located in | Description | Required | Type |\n| --- | --- | --- | --- | --- |\n| patientId | path | ID of patient | Yes | UUID |\n| tenantName | path | Name of tenant | Yes | string |\n| instanceName | path | Name of instance | Yes | string |","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientOverview"}}}}}}}}
```

## Get Care Plan by patientId

> Get overview and system fields\
> \
> 1\.  HTTP Request\
> &#x20;   \
> \
> \*\*\*GET\*\*\* \`/{tenantName}/{instanceName}/patients/{patientId}/care-plan\`\
> \
> 2\\. In our example it would be:\
> \
> \*\*\*GET\*\*\* \`<https://api.live.welkincloud.io/gh/sb-demo/patients/d6ea79ce-d3d6-4c2d-a27e-e4d1207f60f1/care-plan\\`\\>
> \
> \*\*Parameters\*\*\
> \
> \| Name | Located in | Description | Required | Type |\
> \| --- | --- | --- | --- | --- |\
> \| patientId | path | ID of patient | Yes | UUID |\
> \| tenantName | path | Name of tenant | Yes | string |\
> \| instanceName | path | Name of instance | Yes | string |\
> \
> \*\*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":"Care plan","description":"APIs for working with patient care plan: overview and goals"}],"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":{"CarePlan":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"createdByName":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedByName":{"type":"string"},"updatedAt":{"type":"string","format":"date-time"},"patientId":{"type":"string","format":"uuid"},"patientOverview":{"$ref":"#/components/schemas/PatientOverview","nullable":true}}},"PatientOverview":{"type":"object","properties":{"createdByName":{"type":"string","readOnly":true},"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedByName":{"type":"string","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true},"overview":{"type":"string","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}/care-plan":{"get":{"summary":"Get Care Plan by patientId","tags":["Care plan"],"operationId":"Get_Care_Plan_by_patientId","parameters":[{"$ref":"#/components/parameters/TenantName"},{"$ref":"#/components/parameters/InstanceName"},{"$ref":"#/components/parameters/PatientId"}],"responses":{"200":{"description":"Patient care plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CarePlan"}}}},"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 overview and system fields\n\n1.  HTTP Request\n    \n\n***GET*** `/{tenantName}/{instanceName}/patients/{patientId}/care-plan`\n\n2\\. In our example it would be:\n\n***GET*** `https://api.live.welkincloud.io/gh/sb-demo/patients/d6ea79ce-d3d6-4c2d-a27e-e4d1207f60f1/care-plan`\n\n**Parameters**\n\n| Name | Located in | Description | Required | Type |\n| --- | --- | --- | --- | --- |\n| patientId | path | ID of patient | Yes | UUID |\n| tenantName | path | Name of tenant | Yes | string |\n| instanceName | path | Name of instance | Yes | string |\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/care-plan.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.
