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

# Documents

## Documents - Document Summary

Documents are based on CDTs - we have one common system CDT (formation) with name “\_document\_summary” and all document types will be created with a “link” to this summary. So relation between Document Summary Record and Document Type Record is one-to-one.

“\_document\_summary” can’t be edited.

“\_document\_summary” has such fields set by default: - type - it’s the “link” between summary and document types - each created document type will be shown in this list like option. By default, we have 3 document types: Assessment (name - doc-type-assessment), Docusign (name - doc-type-docusign) and Others (name - doc-type-others). - files - for storing document files. Currently, users can upload only jpg, jpeg, png and pdf files.

**Document Summary Record folder**

Contains requests for creating a document record and uploading files to it

**Document Records folder**

Contains requests to populate custom fields that can be created in the Designer for document types

## Get all Documents Summary Records

> HTTP Method: GET\
> \
> 1\.  HTTP URL: \`<https://api.live.welkincloud.io/welkonnect/commcenter/patients/ee66e8e8-6ce1-40d3-b6cb-e5727c5347c8/document-summary\\`\\>
> 2\.  HTTP Response Codes: 200

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"tags":[{"name":"Documents","description":"# Documents - Document Summary\n\nDocuments are based on CDTs - we have one common system CDT (formation) with name “_document_summary” and all document types will be created with a “link” to this summary. So relation between Document Summary Record and Document Type Record is one-to-one.\n\n“_document_summary” can’t be edited.\n\n“_document_summary” has such fields set by default: - type - it’s the “link” between summary and document types - each created document type will be shown in this list like option. By default, we have 3 document types: Assessment (name - doc-type-assessment), Docusign (name - doc-type-docusign) and Others (name - doc-type-others). - files - for storing document files. Currently, users can upload only jpg, jpeg, png and pdf files.\n\n**Document Summary Record folder**\n\nContains requests for creating a document record and uploading files to it\n\n**Document Records folder**\n\nContains requests to populate custom fields that can be created in the Designer for document types"}],"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":{"CdtRecordList":{"type":"object","properties":{"name":{"type":"string"},"data":{"allOf":[{"$ref":"#/components/schemas/PaginatedResponse"},{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/CdtRecord"}}}}]}}},"PaginatedResponse":{"type":"object","description":"Standard paginated response wrapper.","properties":{"content":{"type":"array","items":{"type":"object"}},"pageable":{"$ref":"#/components/schemas/PageableInfo"},"totalElements":{"type":"integer","description":"Total number of matching records"},"totalPages":{"type":"integer","description":"Total number of pages"},"last":{"type":"boolean"},"first":{"type":"boolean"},"number":{"type":"integer","description":"Current page number (zero-based)"},"size":{"type":"integer","description":"Page size"},"numberOfElements":{"type":"integer","description":"Number of elements on the current page"},"empty":{"type":"boolean"},"sort":{"$ref":"#/components/schemas/SortInfo"}}},"PageableInfo":{"type":"object","properties":{"sort":{"$ref":"#/components/schemas/SortInfo"},"pageSize":{"type":"integer"},"pageNumber":{"type":"integer"},"offset":{"type":"integer"},"unpaged":{"type":"boolean"},"paged":{"type":"boolean"}}},"SortInfo":{"type":"object","properties":{"sorted":{"type":"boolean"},"unsorted":{"type":"boolean"},"empty":{"type":"boolean"}}},"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}/document-summary":{"get":{"summary":"Get all Documents Summary Records","tags":["Documents"],"operationId":"Get_all_Documents_Summary_Records","parameters":[{"$ref":"#/components/parameters/TenantName"},{"$ref":"#/components/parameters/InstanceName"},{"$ref":"#/components/parameters/PatientId"},{"name":"sourceId","in":"query","required":false,"schema":{"type":"string","format":"uuid"},"description":"Used for filtering by source id"}],"responses":{"200":{"description":"Paginated document summary records","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CdtRecordList"}}}},"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 Method: GET\n\n1.  HTTP URL: `https://api.live.welkincloud.io/welkonnect/commcenter/patients/ee66e8e8-6ce1-40d3-b6cb-e5727c5347c8/document-summary`\n2.  HTTP Response Codes: 200"}}}}
```

## Create Document Summary Record

> Request to create a Document Summary Record. The type is the type of the document we are adding to the patient (the name can be taken from the Designer). In the request response you will need to get the id to create a record in this Document Summary\
> \
> HTTP Method: POST\
> \
> 1\. HTTP URL: \`<https://api.live.welkincloud.io/welkonnect/commcenter/patients/ee66e8e8-6ce1-40d3-b6cb-e5727c5347c8/document-summary/\\`\\>
> &#x20;   \
> 2\. HTTP Response Codes: 201

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"tags":[{"name":"Documents","description":"# Documents - Document Summary\n\nDocuments are based on CDTs - we have one common system CDT (formation) with name “_document_summary” and all document types will be created with a “link” to this summary. So relation between Document Summary Record and Document Type Record is one-to-one.\n\n“_document_summary” can’t be edited.\n\n“_document_summary” has such fields set by default: - type - it’s the “link” between summary and document types - each created document type will be shown in this list like option. By default, we have 3 document types: Assessment (name - doc-type-assessment), Docusign (name - doc-type-docusign) and Others (name - doc-type-others). - files - for storing document files. Currently, users can upload only jpg, jpeg, png and pdf files.\n\n**Document Summary Record folder**\n\nContains requests for creating a document record and uploading files to it\n\n**Document Records folder**\n\nContains requests to populate custom fields that can be created in the Designer for document types"}],"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)."}}},"DocumentTypeName":{"type":"string","description":"Default document types are always present; tenants may add custom ones.","enum":["doc-type-docusign","doc-type-assessment","doc-type-others","doc-type-care-team-member-signature","doc-type-care-team-member-and-supervisor-signature","doc-type-assessment-consent","doc-type-invoice","doc-type-superbill"]},"File":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"originalName":{"type":"string"},"size":{"type":"integer","description":"Bytes"},"contentType":{"type":"string"},"storageKey":{"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}/document-summary":{"post":{"summary":"Create Document Summary Record","tags":["Documents"],"operationId":"Create_Document_Summary_Record","parameters":[{"$ref":"#/components/parameters/TenantName"},{"$ref":"#/components/parameters/InstanceName"},{"$ref":"#/components/parameters/PatientId"}],"responses":{"201":{"description":"Document summary record created","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":"Request to create a Document Summary Record. The type is the type of the document we are adding to the patient (the name can be taken from the Designer). In the request response you will need to get the id to create a record in this Document Summary\n\nHTTP Method: POST\n\n1. HTTP URL: `https://api.live.welkincloud.io/welkonnect/commcenter/patients/ee66e8e8-6ce1-40d3-b6cb-e5727c5347c8/document-summary/`\n    \n2. HTTP Response Codes: 201","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type"],"properties":{"type":{"$ref":"#/components/schemas/DocumentTypeName"},"files":{"type":"array","items":{"$ref":"#/components/schemas/File"}}},"additionalProperties":true,"description":"Fields as defined by the `_document_summary` CDT. `type` links the summary to a document type."}}}}}}}}
```

## Get Document Summary Record By ID

> HTTP Method: GET\
> \
> 1\.  HTTP URL: \`<https://api.live.welkincloud.io/welkonnect/commcenter/patients/ee66e8e8-6ce1-40d3-b6cb-e5727c5347c8/document-summary/4a59584c-af30-49c4-8601-b43b4fbeb741\\`\\>
> 2\.  HTTP Response Codes: 200

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"tags":[{"name":"Documents","description":"# Documents - Document Summary\n\nDocuments are based on CDTs - we have one common system CDT (formation) with name “_document_summary” and all document types will be created with a “link” to this summary. So relation between Document Summary Record and Document Type Record is one-to-one.\n\n“_document_summary” can’t be edited.\n\n“_document_summary” has such fields set by default: - type - it’s the “link” between summary and document types - each created document type will be shown in this list like option. By default, we have 3 document types: Assessment (name - doc-type-assessment), Docusign (name - doc-type-docusign) and Others (name - doc-type-others). - files - for storing document files. Currently, users can upload only jpg, jpeg, png and pdf files.\n\n**Document Summary Record folder**\n\nContains requests for creating a document record and uploading files to it\n\n**Document Records folder**\n\nContains requests to populate custom fields that can be created in the Designer for document types"}],"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)."}}}},"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}/document-summary/{id}":{"get":{"summary":"Get Document Summary Record By ID","tags":["Documents"],"operationId":"Get_Document_Summary_Record_By_ID","parameters":[{"$ref":"#/components/parameters/TenantName"},{"$ref":"#/components/parameters/InstanceName"},{"$ref":"#/components/parameters/PatientId"},{"name":"id","in":"path","required":true,"description":"`id` path parameter","schema":{"type":"string"}}],"responses":{"200":{"description":"Document summary record. Pass `?signedUrls=true` to get signed file URLs.","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 Method: GET\n\n1.  HTTP URL: `https://api.live.welkincloud.io/welkonnect/commcenter/patients/ee66e8e8-6ce1-40d3-b6cb-e5727c5347c8/document-summary/4a59584c-af30-49c4-8601-b43b4fbeb741`\n2.  HTTP Response Codes: 200","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"}}}}}}}}}}
```

## Update Document Summary Record

> A request to delete files added to the Document Summary Record.\
> \
> The id should be the id of the Document Summary from the Create Document Summary Record request.\
> \
> The body contains information about the type of document \*\*that was specified at creation\*\*, as well as a list of files \*\*to be saved\*\* for this record. Other files (which are not passed in the body of the request) will be deleted.\
> \
> Information about files in the record can be obtained from the Get Document Summary Record By ID or Get all Documents Summary Records requests.\
> \
> 1\. HTTP URL: \`<https://api.live.welkincloud.io/welkonnect/commcenter/patients/ee66e8e8-6ce1-40d3-b6cb-e5727c5347c8/document-summary/4a59584c-af30-49c4-8601-b43b4fbeb741\\`\\>
> &#x20;   \
> 2\. HTTP Response Codes: 200

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"tags":[{"name":"Documents","description":"# Documents - Document Summary\n\nDocuments are based on CDTs - we have one common system CDT (formation) with name “_document_summary” and all document types will be created with a “link” to this summary. So relation between Document Summary Record and Document Type Record is one-to-one.\n\n“_document_summary” can’t be edited.\n\n“_document_summary” has such fields set by default: - type - it’s the “link” between summary and document types - each created document type will be shown in this list like option. By default, we have 3 document types: Assessment (name - doc-type-assessment), Docusign (name - doc-type-docusign) and Others (name - doc-type-others). - files - for storing document files. Currently, users can upload only jpg, jpeg, png and pdf files.\n\n**Document Summary Record folder**\n\nContains requests for creating a document record and uploading files to it\n\n**Document Records folder**\n\nContains requests to populate custom fields that can be created in the Designer for document types"}],"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)."}}}},"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}/document-summary/{id}":{"put":{"summary":"Update Document Summary Record","tags":["Documents"],"operationId":"Update_Document_Summary_Record","parameters":[{"$ref":"#/components/parameters/TenantName"},{"$ref":"#/components/parameters/InstanceName"},{"$ref":"#/components/parameters/PatientId"},{"name":"id","in":"path","required":true,"description":"`id` path parameter","schema":{"type":"string"}}],"responses":{"200":{"description":"Updated document summary 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":"A request to delete files added to the Document Summary Record.\n\nThe id should be the id of the Document Summary from the Create Document Summary Record request.\n\nThe body contains information about the type of document **that was specified at creation**, as well as a list of files **to be saved** for this record. Other files (which are not passed in the body of the request) will be deleted.\n\nInformation about files in the record can be obtained from the Get Document Summary Record By ID or Get all Documents Summary Records requests.\n\n1. HTTP URL: `https://api.live.welkincloud.io/welkonnect/commcenter/patients/ee66e8e8-6ce1-40d3-b6cb-e5727c5347c8/document-summary/4a59584c-af30-49c4-8601-b43b4fbeb741`\n    \n2. HTTP Response Codes: 200","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Fields as defined by the `_document_summary` CDT."}}}}}}}}
```

## Delete Document Summary Record

> Request to delete a Document Summary Record.\
> \
> 1\. HTTP Method: DELETE\
> &#x20;   \
> 2\. HTTP URL: \`<https://api.live.welkincloud.io/welkonnect/commcenter/patients/ee66e8e8-6ce1-40d3-b6cb-e5727c5347c8/document-summary/4a59584c-af30-49c4-8601-b43b4fbeb741\\`\\>
> &#x20;   \
> 3\. HTTP Response Codes: 200

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"tags":[{"name":"Documents","description":"# Documents - Document Summary\n\nDocuments are based on CDTs - we have one common system CDT (formation) with name “_document_summary” and all document types will be created with a “link” to this summary. So relation between Document Summary Record and Document Type Record is one-to-one.\n\n“_document_summary” can’t be edited.\n\n“_document_summary” has such fields set by default: - type - it’s the “link” between summary and document types - each created document type will be shown in this list like option. By default, we have 3 document types: Assessment (name - doc-type-assessment), Docusign (name - doc-type-docusign) and Others (name - doc-type-others). - files - for storing document files. Currently, users can upload only jpg, jpeg, png and pdf files.\n\n**Document Summary Record folder**\n\nContains requests for creating a document record and uploading files to it\n\n**Document Records folder**\n\nContains requests to populate custom fields that can be created in the Designer for document types"}],"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"}}},"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}/document-summary/{id}":{"delete":{"summary":"Delete Document Summary Record","tags":["Documents"],"operationId":"Delete_Document_Summary_Record","parameters":[{"$ref":"#/components/parameters/TenantName"},{"$ref":"#/components/parameters/InstanceName"},{"$ref":"#/components/parameters/PatientId"},{"name":"id","in":"path","required":true,"description":"`id` path parameter","schema":{"type":"string"}}],"responses":{"200":{"description":"Document summary record 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":"Request to delete a Document Summary Record.\n\n1. HTTP Method: DELETE\n    \n2. HTTP URL: `https://api.live.welkincloud.io/welkonnect/commcenter/patients/ee66e8e8-6ce1-40d3-b6cb-e5727c5347c8/document-summary/4a59584c-af30-49c4-8601-b43b4fbeb741`\n    \n3. HTTP Response Codes: 200","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"}}}}}}}}}}
```

## Download Document Summary Record File

> 1\.  HTTP Method: GET\
> 2\.  HTTP URL: \`<https://api.live.welkincloud.io/welkonnect/commcenter/patients/ee66e8e8-6ce1-40d3-b6cb-e5727c5347c8/document-summary/4a59584c-af30-49c4-8601-b43b4fbeb741/files/bcade721-fa3d-46fe-9013-d07033212c6a\\`\\>
> 3\.  HTTP Response Codes: 200\
> 4\.  Content-Type is taken from file (e.g. image/png, image/jpeg)

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"tags":[{"name":"Documents","description":"# Documents - Document Summary\n\nDocuments are based on CDTs - we have one common system CDT (formation) with name “_document_summary” and all document types will be created with a “link” to this summary. So relation between Document Summary Record and Document Type Record is one-to-one.\n\n“_document_summary” can’t be edited.\n\n“_document_summary” has such fields set by default: - type - it’s the “link” between summary and document types - each created document type will be shown in this list like option. By default, we have 3 document types: Assessment (name - doc-type-assessment), Docusign (name - doc-type-docusign) and Others (name - doc-type-others). - files - for storing document files. Currently, users can upload only jpg, jpeg, png and pdf files.\n\n**Document Summary Record folder**\n\nContains requests for creating a document record and uploading files to it\n\n**Document Records folder**\n\nContains requests to populate custom fields that can be created in the Designer for document types"}],"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"}},"FileId":{"name":"fileId","in":"path","required":true,"description":"UUID of the uploaded file","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}/document-summary/{id}/files/{fileId}":{"get":{"summary":"Download Document Summary Record File","tags":["Documents"],"operationId":"Download_Document_Summary_Record_File","parameters":[{"$ref":"#/components/parameters/TenantName"},{"$ref":"#/components/parameters/InstanceName"},{"$ref":"#/components/parameters/PatientId"},{"name":"id","in":"path","required":true,"description":"`id` path parameter","schema":{"type":"string"}},{"$ref":"#/components/parameters/FileId"}],"responses":{"200":{"description":"Binary file content (supports HTTP Range requests)."},"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 Method: GET\n2.  HTTP URL: `https://api.live.welkincloud.io/welkonnect/commcenter/patients/ee66e8e8-6ce1-40d3-b6cb-e5727c5347c8/document-summary/4a59584c-af30-49c4-8601-b43b4fbeb741/files/bcade721-fa3d-46fe-9013-d07033212c6a`\n3.  HTTP Response Codes: 200\n4.  Content-Type is taken from file (e.g. image/png, image/jpeg)"}}}}
```

## Get Documents Record

> \## Get Document Type Record\
> \
> 1\. HTTP Method: GET\
> &#x20;   \
> 2\. HTTP URL: \`<https://api.live.welkincloud.io/welkonnect/commcenter/patients/ee66e8e8-6ce1-40d3-b6cb-e5727c5347c8/document-summary/4a59584c-af30-49c4-8601-b43b4fbeb741/doc-type-docusign\\`\\>
> &#x20;   \
> 3\. HTTP Response Codes: 200

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"tags":[{"name":"Documents","description":"# Documents - Document Summary\n\nDocuments are based on CDTs - we have one common system CDT (formation) with name “_document_summary” and all document types will be created with a “link” to this summary. So relation between Document Summary Record and Document Type Record is one-to-one.\n\n“_document_summary” can’t be edited.\n\n“_document_summary” has such fields set by default: - type - it’s the “link” between summary and document types - each created document type will be shown in this list like option. By default, we have 3 document types: Assessment (name - doc-type-assessment), Docusign (name - doc-type-docusign) and Others (name - doc-type-others). - files - for storing document files. Currently, users can upload only jpg, jpeg, png and pdf files.\n\n**Document Summary Record folder**\n\nContains requests for creating a document record and uploading files to it\n\n**Document Records folder**\n\nContains requests to populate custom fields that can be created in the Designer for document types"}],"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)."}}}},"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}/document-summary/{id}/{docType}":{"get":{"summary":"Get Documents Record","tags":["Documents"],"operationId":"Get_Documents_Record","parameters":[{"$ref":"#/components/parameters/TenantName"},{"$ref":"#/components/parameters/InstanceName"},{"$ref":"#/components/parameters/PatientId"},{"name":"id","in":"path","required":true,"description":"UUID of the document summary record","schema":{"type":"string","format":"uuid"}},{"name":"docType","in":"path","required":true,"description":"`docType` path parameter","schema":{"type":"string"}}],"responses":{"200":{"description":"Document type 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":"## Get Document Type Record\n\n1. HTTP Method: GET\n    \n2. HTTP URL: `https://api.live.welkincloud.io/welkonnect/commcenter/patients/ee66e8e8-6ce1-40d3-b6cb-e5727c5347c8/document-summary/4a59584c-af30-49c4-8601-b43b4fbeb741/doc-type-docusign`\n    \n3. HTTP Response Codes: 200","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"int":{"type":"integer"}}}}}}}}}}
```

## Create Document Record

> A request to add custom fields to a Document Record. The request body contains the names of fields that are created in the Designer for this document type.\
> \
> The id should be the id of the Document Summary from the Create Document Summary Record request\
> \
> HTTP Method: POST\
> \
> 1\. HTTP URL: \`<https://api.live.welkincloud.io/welkonnect/commcenter/patients/ee66e8e8-6ce1-40d3-b6cb-e5727c5347c8/document-summary/4a59584c-af30-49c4-8601-b43b4fbeb741/doc-type-docusign\\`\\>
> &#x20;   \
> 2\. HTTP Response Codes: 201

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"tags":[{"name":"Documents","description":"# Documents - Document Summary\n\nDocuments are based on CDTs - we have one common system CDT (formation) with name “_document_summary” and all document types will be created with a “link” to this summary. So relation between Document Summary Record and Document Type Record is one-to-one.\n\n“_document_summary” can’t be edited.\n\n“_document_summary” has such fields set by default: - type - it’s the “link” between summary and document types - each created document type will be shown in this list like option. By default, we have 3 document types: Assessment (name - doc-type-assessment), Docusign (name - doc-type-docusign) and Others (name - doc-type-others). - files - for storing document files. Currently, users can upload only jpg, jpeg, png and pdf files.\n\n**Document Summary Record folder**\n\nContains requests for creating a document record and uploading files to it\n\n**Document Records folder**\n\nContains requests to populate custom fields that can be created in the Designer for document types"}],"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)."}}}},"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}/document-summary/{id}/{docType}":{"post":{"summary":"Create Document Record","tags":["Documents"],"operationId":"Create_Document_Record","parameters":[{"$ref":"#/components/parameters/TenantName"},{"$ref":"#/components/parameters/InstanceName"},{"$ref":"#/components/parameters/PatientId"},{"name":"id","in":"path","required":true,"description":"UUID of the document summary record","schema":{"type":"string","format":"uuid"}},{"name":"docType","in":"path","required":true,"description":"Document type name (e.g. `doc-type-others`, `doc-type-assessment`)","schema":{"type":"string"}}],"responses":{"201":{"description":"Document type record created","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":"A request to add custom fields to a Document Record. The request body contains the names of fields that are created in the Designer for this document type.\n\nThe id should be the id of the Document Summary from the Create Document Summary Record request\n\nHTTP Method: POST\n\n1. HTTP URL: `https://api.live.welkincloud.io/welkonnect/commcenter/patients/ee66e8e8-6ce1-40d3-b6cb-e5727c5347c8/document-summary/4a59584c-af30-49c4-8601-b43b4fbeb741/doc-type-docusign`\n    \n2. HTTP Response Codes: 201","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Fields as defined by the target document type's CDT. One document record per summary record (1:1)."}}}}}}}}
```

## Update Document Record

> A request to edit custom fields in a Document Record. \*\*To edit a record, Document Record must first be created.\*\*\
> \
> The request body contains the names of fields that are created in the Designer for this document type.\
> \
> The id should be the id of the Document Summary from the Create Document Summary Record request\
> \
> 1\. HTTP Method: PUT\
> &#x20;   \
> 2\. HTTP URL: \`<https://api.live.welkincloud.io/welkonnect/commcenter/patients/ee66e8e8-6ce1-40d3-b6cb-e5727c5347c8/document-summary/4a59584c-af30-49c4-8601-b43b4fbeb741/doc-type-docusign\\`\\>
> &#x20;   \
> 3\. HTTP Response Codes: 200

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"tags":[{"name":"Documents","description":"# Documents - Document Summary\n\nDocuments are based on CDTs - we have one common system CDT (formation) with name “_document_summary” and all document types will be created with a “link” to this summary. So relation between Document Summary Record and Document Type Record is one-to-one.\n\n“_document_summary” can’t be edited.\n\n“_document_summary” has such fields set by default: - type - it’s the “link” between summary and document types - each created document type will be shown in this list like option. By default, we have 3 document types: Assessment (name - doc-type-assessment), Docusign (name - doc-type-docusign) and Others (name - doc-type-others). - files - for storing document files. Currently, users can upload only jpg, jpeg, png and pdf files.\n\n**Document Summary Record folder**\n\nContains requests for creating a document record and uploading files to it\n\n**Document Records folder**\n\nContains requests to populate custom fields that can be created in the Designer for document types"}],"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)."}}}},"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}/document-summary/{id}/{docType}":{"put":{"summary":"Update Document Record","tags":["Documents"],"operationId":"Update_Document_Record","parameters":[{"$ref":"#/components/parameters/TenantName"},{"$ref":"#/components/parameters/InstanceName"},{"$ref":"#/components/parameters/PatientId"},{"name":"id","in":"path","required":true,"description":"UUID of the document summary record","schema":{"type":"string","format":"uuid"}},{"name":"docType","in":"path","required":true,"description":"Document type name (e.g. `doc-type-others`, `doc-type-assessment`)","schema":{"type":"string"}}],"responses":{"200":{"description":"Updated document type 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":"A request to edit custom fields in a Document Record. **To edit a record, Document Record must first be created.**\n\nThe request body contains the names of fields that are created in the Designer for this document type.\n\nThe id should be the id of the Document Summary from the Create Document Summary Record request\n\n1. HTTP Method: PUT\n    \n2. HTTP URL: `https://api.live.welkincloud.io/welkonnect/commcenter/patients/ee66e8e8-6ce1-40d3-b6cb-e5727c5347c8/document-summary/4a59584c-af30-49c4-8601-b43b4fbeb741/doc-type-docusign`\n    \n3. HTTP Response Codes: 200","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Fields as defined by the target document type's CDT."}}}}}}}}
```

## Delete Document Record

> 1\.  HTTP Method: DELETE\
> 2\.  HTTP URL: \`<https://api.live.welkincloud.io/welkonnect/commcenter/formations/current/document-types/doc-type-assessment\\`\\>
> 3\.  HTTP Response Code: 200

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"tags":[{"name":"Documents","description":"# Documents - Document Summary\n\nDocuments are based on CDTs - we have one common system CDT (formation) with name “_document_summary” and all document types will be created with a “link” to this summary. So relation between Document Summary Record and Document Type Record is one-to-one.\n\n“_document_summary” can’t be edited.\n\n“_document_summary” has such fields set by default: - type - it’s the “link” between summary and document types - each created document type will be shown in this list like option. By default, we have 3 document types: Assessment (name - doc-type-assessment), Docusign (name - doc-type-docusign) and Others (name - doc-type-others). - files - for storing document files. Currently, users can upload only jpg, jpeg, png and pdf files.\n\n**Document Summary Record folder**\n\nContains requests for creating a document record and uploading files to it\n\n**Document Records folder**\n\nContains requests to populate custom fields that can be created in the Designer for document types"}],"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"}}},"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}/document-summary/{id}/{docType}":{"delete":{"summary":"Delete Document Record","tags":["Documents"],"operationId":"Delete_Document_Record","parameters":[{"$ref":"#/components/parameters/TenantName"},{"$ref":"#/components/parameters/InstanceName"},{"$ref":"#/components/parameters/PatientId"},{"name":"id","in":"path","required":true,"description":"`id` path parameter","schema":{"type":"string"}},{"name":"docType","in":"path","required":true,"description":"`docType` path parameter","schema":{"type":"string"}}],"responses":{"200":{"description":"Document type record 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":"1.  HTTP Method: DELETE\n2.  HTTP URL: `https://api.live.welkincloud.io/welkonnect/commcenter/formations/current/document-types/doc-type-assessment`\n3.  HTTP Response Code: 200","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"int":{"type":"integer"}}}}}}}}}}
```

## Upload Document Summary Record File

> Request to add a document to the Document Summary Record. The id should be the id of the Document Summary from the Create Document Summary Record request\
> \
> HTTP Method: POST\
> \
> 1\. HTTP URL: \`<https://api.live.welkincloud.io/welkonnect/commcenter/patients/ee66e8e8-6ce1-40d3-b6cb-e5727c5347c8/document-summary/4a59584c-af30-49c4-8601-b43b4fbeb741/files\\`\\>
> &#x20;   \
> 2\. HTTP Response Codes: 201\
> &#x20;   \
> 3\. Content-Type: multipart/form-data;\
> &#x20;   \
> 4\. Files should be with key “files” (few files allowed)\
> \
> Allowed extensions: jpg, jpeg, png, pdf, doc, docx, xls, xlsx, csv, mp4. Max 10 files per request, 200MB total; per-file limit 25MB (200MB for pdf/mp4).

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"tags":[{"name":"Documents","description":"# Documents - Document Summary\n\nDocuments are based on CDTs - we have one common system CDT (formation) with name “_document_summary” and all document types will be created with a “link” to this summary. So relation between Document Summary Record and Document Type Record is one-to-one.\n\n“_document_summary” can’t be edited.\n\n“_document_summary” has such fields set by default: - type - it’s the “link” between summary and document types - each created document type will be shown in this list like option. By default, we have 3 document types: Assessment (name - doc-type-assessment), Docusign (name - doc-type-docusign) and Others (name - doc-type-others). - files - for storing document files. Currently, users can upload only jpg, jpeg, png and pdf files.\n\n**Document Summary Record folder**\n\nContains requests for creating a document record and uploading files to it\n\n**Document Records folder**\n\nContains requests to populate custom fields that can be created in the Designer for document types"}],"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":{"File":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"originalName":{"type":"string"},"size":{"type":"integer","description":"Bytes"},"contentType":{"type":"string"},"storageKey":{"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}/document-summary/{id}/files":{"post":{"summary":"Upload Document Summary Record File","tags":["Documents"],"operationId":"Upload_Document_Summary_Record_File","parameters":[{"$ref":"#/components/parameters/TenantName"},{"$ref":"#/components/parameters/InstanceName"},{"$ref":"#/components/parameters/PatientId"},{"name":"id","in":"path","required":true,"description":"UUID of the document summary record","schema":{"type":"string","format":"uuid"}}],"responses":{"201":{"description":"Uploaded files","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/File"}}}}},"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 add a document to the Document Summary Record. The id should be the id of the Document Summary from the Create Document Summary Record request\n\nHTTP Method: POST\n\n1. HTTP URL: `https://api.live.welkincloud.io/welkonnect/commcenter/patients/ee66e8e8-6ce1-40d3-b6cb-e5727c5347c8/document-summary/4a59584c-af30-49c4-8601-b43b4fbeb741/files`\n    \n2. HTTP Response Codes: 201\n    \n3. Content-Type: multipart/form-data;\n    \n4. Files should be with key “files” (few files allowed)\n\nAllowed extensions: jpg, jpeg, png, pdf, doc, docx, xls, xlsx, csv, mp4. Max 10 files per request, 200MB total; per-file limit 25MB (200MB for pdf/mp4).","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"files":{"type":"string","format":"binary","description":""}}}}}}}}}}
```


---

# 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/documents.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.
