> 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/custom-data-types-cdt-formation.md).

# Custom Data Types (CDT) Formation

The "Custom Data Types (CDT) Formation" folder within the API collection is a dedicated section that focuses on API requests and endpoints related to the getting CDTs information from formation.

## Get One CDT

> This is a GET request endpoint that retrieves information about a specific CDT within the current formation. The endpoint requires the URL of the application, the name of the tenant, and the name of the instance. Additionally, the endpoint requires the name of the CDT to retrieve information for.

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"tags":[{"name":"Custom Data Types (CDT) Formation","description":"The \"Custom Data Types (CDT) Formation\" folder within the API collection is a dedicated section that focuses on API requests and endpoints related to the getting CDTs information from formation."}],"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"}},"CdtName":{"name":"cdtName","in":"path","required":true,"description":"Machine-readable CDT name defined in Designer (e.g. `my_custom_type`)","schema":{"type":"string"}}},"schemas":{"Cdt":{"type":"object","required":["name","fields"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","pattern":"^[a-z0-9\\-_]+$"},"title":{"type":"string"},"label":{"type":"string"},"version":{"type":"integer"},"internal":{"type":"boolean"},"readable":{"type":"boolean","default":true},"updatable":{"type":"boolean","default":true},"type":{"$ref":"#/components/schemas/DtType"},"relation":{"$ref":"#/components/schemas/CdtRelation"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/DtField"}}}},"DtType":{"type":"string","enum":["SINGLE_RECORD","MULTI_RECORD"]},"CdtRelation":{"type":"string","enum":["COMMON","PATIENT_INFO","PATIENT","PATIENT_GOAL","ENCOUNTER","ENCOUNTER_DISPOSITION","ENCOUNTER_ASSESSMENT","ASSESSMENT","ASSESSMENT_SCORING","ASSESSMENT_CONSENT","ASSESSMENT_RESULTS_FILE","ASSESSMENT_GROUP","DOCUMENT_SUMMARY","DOCUMENT_TYPE","BILLING_CLAIMS_STATUS","INVOICE","SUPERBILL"]},"DtField":{"type":"object","required":["name","type","meta"],"properties":{"name":{"type":"string","pattern":"^[a-z0-9\\-_]+$"},"type":{"$ref":"#/components/schemas/FieldTypeEnum"},"formula":{"type":"string","nullable":true},"dictionary":{"type":"object","nullable":true,"properties":{"name":{"type":"string"},"field":{"type":"string"}}},"profileDataType":{"type":"object","nullable":true,"properties":{"name":{"type":"string"},"fields":{"type":"array","items":{"type":"string"}}}},"customDataType":{"type":"object","nullable":true,"properties":{"name":{"type":"string"},"fields":{"type":"array","items":{"type":"string"}}}},"customFieldType":{"type":"string","nullable":true},"editable":{"type":"boolean","default":true},"searchable":{"type":"boolean"},"bulkEdit":{"type":"boolean"},"phi":{"type":"boolean"},"disable":{"type":"boolean","description":"JSON key for the \"disabled\" field."},"injectedSource":{"type":"boolean"},"displayType":{"$ref":"#/components/schemas/DtFieldDisplayType"},"valueType":{"$ref":"#/components/schemas/DtFieldValueType"},"meta":{"$ref":"#/components/schemas/DtFieldMeta"},"mask":{"$ref":"#/components/schemas/FieldMask"},"richTextEnabled":{"type":"boolean"}}},"FieldTypeEnum":{"type":"string","enum":["TEXT","TEXTAREA","PASSWORD","EMAIL","INTEGER","FLOAT","PERCENT","RADIO","CHECKBOX","SELECT","CHOICE","DATE","TIME","DATETIME","FILE","IMAGE","URL","PHONE","UUID","SSN","ADDRESS","LOCATION","FORMULA","OBJECT","SIGNATURE"]},"DtFieldDisplayType":{"type":"string","enum":["CHECKBOX","RADIO","SELECT"]},"DtFieldValueType":{"type":"string","enum":["STRING","INTEGER","FLOAT","OBJECT"]},"DtFieldMeta":{"type":"object","properties":{"label":{"type":"string"},"minLength":{"type":"integer","nullable":true},"maxLength":{"type":"integer","nullable":true},"minValue":{"type":"string","nullable":true},"maxValue":{"type":"string","nullable":true},"fileTypes":{"type":"array","items":{"type":"string"}},"maxFiles":{"type":"integer","nullable":true},"maxTotalFileSize":{"type":"integer","nullable":true,"description":"Bytes"},"required":{"type":"boolean","nullable":true},"options":{"type":"array","items":{"$ref":"#/components/schemas/OptionItem"}},"multiple":{"type":"boolean","nullable":true},"patterns":{"type":"array","items":{"type":"string","enum":["NUMBERS_ONLY","LETTERS_ONLY"]}}}},"OptionItem":{"type":"object","properties":{"label":{"type":"string"},"value":{},"refCdtName":{"type":"string","nullable":true}}},"FieldMask":{"type":"object","properties":{"symbol":{"type":"string","minLength":1,"maxLength":1,"default":"*"},"startPosition":{"type":"integer","minimum":1},"endPosition":{"type":"integer","nullable":true}}}},"responses":{"BadRequest":{"description":"Bad request — the request could not be understood or was missing required parameters."},"Unauthorized":{"description":"Unauthorized — the Bearer token is missing, expired, or invalid."},"Forbidden":{"description":"Forbidden — the API client role does not have permission for this resource. Check the role and security policy in Admin."},"NotFound":{"description":"Not found — the requested resource does not exist."},"TooManyRequests":{"description":"Too many requests — rate limit exceeded. Implement exponential backoff."},"InternalError":{"description":"Internal server error."}}},"paths":{"/{tenantName}/{instanceName}/formations/current/cdts/{cdtName}":{"get":{"summary":"Get One CDT","tags":["Custom Data Types (CDT) Formation"],"operationId":"Get_One_CDT","parameters":[{"$ref":"#/components/parameters/TenantName"},{"$ref":"#/components/parameters/InstanceName"},{"$ref":"#/components/parameters/CdtName"}],"responses":{"200":{"description":"CDT formation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cdt"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"}},"description":"This is a GET request endpoint that retrieves information about a specific CDT within the current formation. The endpoint requires the URL of the application, the name of the tenant, and the name of the instance. Additionally, the endpoint requires the name of the CDT to retrieve information for."}}}}
```

## Get All CDT

> This API endpoint allows you to retrieve information about the (CDTs) associated with the current formation in a specified tenant and instance. The GET request should be sent to the specified URL with the appropriate values for the {{tenantName}} and {{instanceName}} parameters. Upon successful execution of the request, the response will contain a list of the CDTs associated with the current formation, including their names and any other relevant metadata.

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"tags":[{"name":"Custom Data Types (CDT) Formation","description":"The \"Custom Data Types (CDT) Formation\" folder within the API collection is a dedicated section that focuses on API requests and endpoints related to the getting CDTs information from formation."}],"servers":[{"url":"https://api.live.welkincloud.io","description":"Welkin Health production API"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Bearer token obtained from `POST /{tenantName}/admin/api_clients/{clientName}`. Valid for 60 minutes."}},"parameters":{"TenantName":{"name":"tenantName","in":"path","required":true,"description":"Your organization (tenant) name, e.g. `acme-health`","schema":{"type":"string"}},"InstanceName":{"name":"instanceName","in":"path","required":true,"description":"Your environment name: `live`, `sandbox`, or a custom name","schema":{"type":"string"}}},"schemas":{"CdtRelation":{"type":"string","enum":["COMMON","PATIENT_INFO","PATIENT","PATIENT_GOAL","ENCOUNTER","ENCOUNTER_DISPOSITION","ENCOUNTER_ASSESSMENT","ASSESSMENT","ASSESSMENT_SCORING","ASSESSMENT_CONSENT","ASSESSMENT_RESULTS_FILE","ASSESSMENT_GROUP","DOCUMENT_SUMMARY","DOCUMENT_TYPE","BILLING_CLAIMS_STATUS","INVOICE","SUPERBILL"]},"Cdt":{"type":"object","required":["name","fields"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","pattern":"^[a-z0-9\\-_]+$"},"title":{"type":"string"},"label":{"type":"string"},"version":{"type":"integer"},"internal":{"type":"boolean"},"readable":{"type":"boolean","default":true},"updatable":{"type":"boolean","default":true},"type":{"$ref":"#/components/schemas/DtType"},"relation":{"$ref":"#/components/schemas/CdtRelation"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/DtField"}}}},"DtType":{"type":"string","enum":["SINGLE_RECORD","MULTI_RECORD"]},"DtField":{"type":"object","required":["name","type","meta"],"properties":{"name":{"type":"string","pattern":"^[a-z0-9\\-_]+$"},"type":{"$ref":"#/components/schemas/FieldTypeEnum"},"formula":{"type":"string","nullable":true},"dictionary":{"type":"object","nullable":true,"properties":{"name":{"type":"string"},"field":{"type":"string"}}},"profileDataType":{"type":"object","nullable":true,"properties":{"name":{"type":"string"},"fields":{"type":"array","items":{"type":"string"}}}},"customDataType":{"type":"object","nullable":true,"properties":{"name":{"type":"string"},"fields":{"type":"array","items":{"type":"string"}}}},"customFieldType":{"type":"string","nullable":true},"editable":{"type":"boolean","default":true},"searchable":{"type":"boolean"},"bulkEdit":{"type":"boolean"},"phi":{"type":"boolean"},"disable":{"type":"boolean","description":"JSON key for the \"disabled\" field."},"injectedSource":{"type":"boolean"},"displayType":{"$ref":"#/components/schemas/DtFieldDisplayType"},"valueType":{"$ref":"#/components/schemas/DtFieldValueType"},"meta":{"$ref":"#/components/schemas/DtFieldMeta"},"mask":{"$ref":"#/components/schemas/FieldMask"},"richTextEnabled":{"type":"boolean"}}},"FieldTypeEnum":{"type":"string","enum":["TEXT","TEXTAREA","PASSWORD","EMAIL","INTEGER","FLOAT","PERCENT","RADIO","CHECKBOX","SELECT","CHOICE","DATE","TIME","DATETIME","FILE","IMAGE","URL","PHONE","UUID","SSN","ADDRESS","LOCATION","FORMULA","OBJECT","SIGNATURE"]},"DtFieldDisplayType":{"type":"string","enum":["CHECKBOX","RADIO","SELECT"]},"DtFieldValueType":{"type":"string","enum":["STRING","INTEGER","FLOAT","OBJECT"]},"DtFieldMeta":{"type":"object","properties":{"label":{"type":"string"},"minLength":{"type":"integer","nullable":true},"maxLength":{"type":"integer","nullable":true},"minValue":{"type":"string","nullable":true},"maxValue":{"type":"string","nullable":true},"fileTypes":{"type":"array","items":{"type":"string"}},"maxFiles":{"type":"integer","nullable":true},"maxTotalFileSize":{"type":"integer","nullable":true,"description":"Bytes"},"required":{"type":"boolean","nullable":true},"options":{"type":"array","items":{"$ref":"#/components/schemas/OptionItem"}},"multiple":{"type":"boolean","nullable":true},"patterns":{"type":"array","items":{"type":"string","enum":["NUMBERS_ONLY","LETTERS_ONLY"]}}}},"OptionItem":{"type":"object","properties":{"label":{"type":"string"},"value":{},"refCdtName":{"type":"string","nullable":true}}},"FieldMask":{"type":"object","properties":{"symbol":{"type":"string","minLength":1,"maxLength":1,"default":"*"},"startPosition":{"type":"integer","minimum":1},"endPosition":{"type":"integer","nullable":true}}}},"responses":{"BadRequest":{"description":"Bad request — the request could not be understood or was missing required parameters."},"Unauthorized":{"description":"Unauthorized — the Bearer token is missing, expired, or invalid."},"Forbidden":{"description":"Forbidden — the API client role does not have permission for this resource. Check the role and security policy in Admin."},"NotFound":{"description":"Not found — the requested resource does not exist."},"TooManyRequests":{"description":"Too many requests — rate limit exceeded. Implement exponential backoff."},"InternalError":{"description":"Internal server error."}}},"paths":{"/{tenantName}/{instanceName}/formations/current/cdts":{"get":{"summary":"Get All CDT","tags":["Custom Data Types (CDT) Formation"],"operationId":"Get_All_CDT","parameters":[{"$ref":"#/components/parameters/TenantName"},{"$ref":"#/components/parameters/InstanceName"},{"name":"relations","in":"query","required":false,"description":"Filter by CDT relation type(s)","schema":{"type":"array","items":{"$ref":"#/components/schemas/CdtRelation"}},"style":"form","explode":true},{"name":"pdtName","in":"query","required":false,"description":"Filter CDTs related to a specific PDT name","schema":{"type":"string"}},{"name":"names","in":"query","required":false,"description":"Filter by exact CDT name(s)","schema":{"type":"array","items":{"type":"string"}},"style":"form","explode":true},{"name":"search","in":"query","required":false,"description":"Free-text search","schema":{"type":"string","maxLength":50}},{"name":"internalOnly","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"List of CDT formations","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Cdt"}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"}},"description":"This API endpoint allows you to retrieve information about the (CDTs) associated with the current formation in a specified tenant and instance. The GET request should be sent to the specified URL with the appropriate values for the {{tenantName}} and {{instanceName}} parameters. Upon successful execution of the request, the response will contain a list of the CDTs associated with the current formation, including their names and any other relevant metadata."}}}}
```


---

# 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/custom-data-types-cdt-formation.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.
