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

# PDT Record

Endpoints to work with PDTs.

## Get All PDT by name

> This API endpoint is used to retrieve a list of Profile Data Types (PDTs) for a given core type name. PDTs are used to describe the structure and attributes of different types of data in a profile. By providing the core type name in the URL, this endpoint returns all the available PDTs associated with that core type. The response includes details such as the name, description, and attributes of each PDT. This information can be useful when creating or updating a profile in an application. This endpoint uses the GET HTTP method.

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"tags":[{"name":"PDT Record","description":"Endpoints to work with PDTs."}],"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"}},"PdtName":{"name":"pdtName","in":"path","required":true,"description":"Profile Data Type (PDT) name","schema":{"type":"string"}}},"schemas":{"PdtRecordPage":{"type":"object","properties":{"pdtName":{"type":"string"},"lastUpdatedAt":{"type":"string","format":"date-time","nullable":true},"records":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PdtRecord"}},"metaInfo":{"type":"object","properties":{"page":{"type":"integer"},"pageSize":{"type":"integer"},"totalElements":{"type":"integer"},"numberOfElements":{"type":"integer"}}}}}}},"PdtRecord":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"fullValue":{"type":"string","nullable":true},"deleted":{"type":"boolean"},"pdtName":{"type":"string"},"jsonBody":{"type":"object","additionalProperties":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}/pdts/{pdtName}":{"get":{"summary":"Get All PDT by name","tags":["PDT Record"],"operationId":"Get_All_PDT_by_name_2","parameters":[{"$ref":"#/components/parameters/TenantName"},{"$ref":"#/components/parameters/InstanceName"},{"$ref":"#/components/parameters/PdtName"},{"name":"fields","in":"query","required":false,"schema":{"type":"string"}},{"name":"dateStart","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"dateEnd","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"showDeleted","in":"query","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"Paginated PDT records","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PdtRecordPage"}}}},"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 is used to retrieve a list of Profile Data Types (PDTs) for a given core type name. PDTs are used to describe the structure and attributes of different types of data in a profile. By providing the core type name in the URL, this endpoint returns all the available PDTs associated with that core type. The response includes details such as the name, description, and attributes of each PDT. This information can be useful when creating or updating a profile in an application. This endpoint uses the GET HTTP method."}}}}
```

## Create PDT

> This endpoint allows you to create a new Profile Data Type (PDT) for a specific core type. A PDT is used to define the structure and format of a specific type of profile data in the system. To create a new PDT, you must provide the necessary data in the request body in the specified format. The core\_type\_name parameter in the endpoint URL specifies the core type that the new PDT will be associated with.\
> \
> Upon successful creation of a new PDT, the endpoint will return a response containing the details of the new PDT, including its unique identifier, name, and associated core type. This newly created PDT can then be used to define and store profile data for the associated core type.\
> \
> \*\*Note:\*\*\
> \
> \- \*\*phone:\*\* when working with patients and fields such as phone, phone must be specified in the international format, E.164 format, without zero

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"tags":[{"name":"PDT Record","description":"Endpoints to work with PDTs."}],"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"}},"PdtName":{"name":"pdtName","in":"path","required":true,"description":"Profile Data Type (PDT) name","schema":{"type":"string"}}},"schemas":{"PdtRecord":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"fullValue":{"type":"string","nullable":true},"deleted":{"type":"boolean"},"pdtName":{"type":"string"},"jsonBody":{"type":"object","additionalProperties":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}/pdts/{pdtName}":{"post":{"summary":"Create PDT","tags":["PDT Record"],"operationId":"Create_PDT","parameters":[{"$ref":"#/components/parameters/TenantName"},{"$ref":"#/components/parameters/InstanceName"},{"$ref":"#/components/parameters/PdtName"}],"responses":{"201":{"description":"Created PDT record","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PdtRecord"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"}},"description":"This endpoint allows you to create a new Profile Data Type (PDT) for a specific core type. A PDT is used to define the structure and format of a specific type of profile data in the system. To create a new PDT, you must provide the necessary data in the request body in the specified format. The core_type_name parameter in the endpoint URL specifies the core type that the new PDT will be associated with.\n\nUpon successful creation of a new PDT, the endpoint will return a response containing the details of the new PDT, including its unique identifier, name, and associated core type. This newly created PDT can then be used to define and store profile data for the associated core type.\n\n**Note:**\n\n- **phone:** when working with patients and fields such as phone, phone must be specified in the international format, E.164 format, without zero","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Field values as defined by the target PDT schema."}}}}}}}}
```

## Get PDT by ID

> This API endpoint performs a GET request to retrieve information about a specific instance of a Profile Data Type (PDT) with the given \`core\_type\_name\` and \`core\_type\_id\`.\
> \
> The \`core\_type\_name\` parameter specifies the name of the core type of the PDT, while the \`core\_type\_id\` parameter specifies the unique identifier of the instance of the PDT to retrieve.\
> \
> This endpoint returns a JSON object containing the details of the requested PDT instance, including its unique identifier, core type, data values, and any metadata associated with it. If the PDT instance does not exist or cannot be found, an appropriate error message will be returned.

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"tags":[{"name":"PDT Record","description":"Endpoints to work with PDTs."}],"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"}},"PdtName":{"name":"pdtName","in":"path","required":true,"description":"Profile Data Type (PDT) name","schema":{"type":"string"}},"PdtId":{"name":"pdtId","in":"path","required":true,"description":"UUID of the PDT record","schema":{"type":"string","format":"uuid"}}},"schemas":{"PdtRecord":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"fullValue":{"type":"string","nullable":true},"deleted":{"type":"boolean"},"pdtName":{"type":"string"},"jsonBody":{"type":"object","additionalProperties":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}/pdts/{pdtName}/{pdtId}":{"get":{"summary":"Get PDT by ID","tags":["PDT Record"],"operationId":"Get_PDT_by_ID","parameters":[{"$ref":"#/components/parameters/TenantName"},{"$ref":"#/components/parameters/InstanceName"},{"$ref":"#/components/parameters/PdtName"},{"$ref":"#/components/parameters/PdtId"}],"responses":{"200":{"description":"PDT record","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PdtRecord"}}}},"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 performs a GET request to retrieve information about a specific instance of a Profile Data Type (PDT) with the given `core_type_name` and `core_type_id`.\n\nThe `core_type_name` parameter specifies the name of the core type of the PDT, while the `core_type_id` parameter specifies the unique identifier of the instance of the PDT to retrieve.\n\nThis endpoint returns a JSON object containing the details of the requested PDT instance, including its unique identifier, core type, data values, and any metadata associated with it. If the PDT instance does not exist or cannot be found, an appropriate error message will be returned."}}}}
```

## Delete PDT

> This endpoint allows deleting a specific instance of a Profile Data Type (PDT) with the given \`core\_type\_id\` under the \`core\_type\_name\`. The request must use the HTTP method \`DELETE\` and provide the URL with the appropriate \`tenantName\` and \`instanceName\`. This action will permanently remove the instance of the PDT from the system and cannot be undone. A successful deletion will return a \`204 No Content\` response status code. If the specified PDT instance does not exist, the API will return a \`404 Not Found\` response status code. It is recommended to use caution when deleting PDT instances as it can have an impact on the system's functionality and data integrity.

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"tags":[{"name":"PDT Record","description":"Endpoints to work with PDTs."}],"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"}},"PdtName":{"name":"pdtName","in":"path","required":true,"description":"Profile Data Type (PDT) name","schema":{"type":"string"}},"PdtId":{"name":"pdtId","in":"path","required":true,"description":"UUID of the PDT record","schema":{"type":"string","format":"uuid"}}},"schemas":{"PdtRecord":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"fullValue":{"type":"string","nullable":true},"deleted":{"type":"boolean"},"pdtName":{"type":"string"},"jsonBody":{"type":"object","additionalProperties":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}/pdts/{pdtName}/{pdtId}":{"delete":{"summary":"Delete PDT","tags":["PDT Record"],"operationId":"Delete_PDT","parameters":[{"$ref":"#/components/parameters/TenantName"},{"$ref":"#/components/parameters/InstanceName"},{"$ref":"#/components/parameters/PdtName"},{"$ref":"#/components/parameters/PdtId"}],"responses":{"200":{"description":"PDT record soft-deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PdtRecord"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"}},"description":"This endpoint allows deleting a specific instance of a Profile Data Type (PDT) with the given `core_type_id` under the `core_type_name`. The request must use the HTTP method `DELETE` and provide the URL with the appropriate `tenantName` and `instanceName`. This action will permanently remove the instance of the PDT from the system and cannot be undone. A successful deletion will return a `204 No Content` response status code. If the specified PDT instance does not exist, the API will return a `404 Not Found` response status code. It is recommended to use caution when deleting PDT instances as it can have an impact on the system's functionality and data integrity."}}}}
```

## Update PDT

> This endpoint allows for updating an existing record of a specific Profile Data Type (PDT) identified by its unique \`core\_type\_id\` and \`core\_type\_name\`. The HTTP method used is PATCH. The request body should contain the updated values for the fields that need to be modified. The response will include the updated record of the PDT with the new values for the specified fields. If the \`core\_type\_id\` or \`core\_type\_name\` provided in the URL path does not match any existing record, the response will return a 404 status code.\
> \
> \*\*Note:\*\*\
> \
> \- \*\*phone:\*\* when working with patients and fields such as phone, phone must be specified in the international format, E.164 format, without zero

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"tags":[{"name":"PDT Record","description":"Endpoints to work with PDTs."}],"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"}},"PdtName":{"name":"pdtName","in":"path","required":true,"description":"Profile Data Type (PDT) name","schema":{"type":"string"}},"PdtId":{"name":"pdtId","in":"path","required":true,"description":"UUID of the PDT record","schema":{"type":"string","format":"uuid"}}},"schemas":{"PdtRecord":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"fullValue":{"type":"string","nullable":true},"deleted":{"type":"boolean"},"pdtName":{"type":"string"},"jsonBody":{"type":"object","additionalProperties":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}/pdts/{pdtName}/{pdtId}":{"patch":{"summary":"Update PDT","tags":["PDT Record"],"operationId":"Update_PDT","parameters":[{"$ref":"#/components/parameters/TenantName"},{"$ref":"#/components/parameters/InstanceName"},{"$ref":"#/components/parameters/PdtName"},{"$ref":"#/components/parameters/PdtId"}],"responses":{"200":{"description":"Updated PDT record","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PdtRecord"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"}},"description":"This endpoint allows for updating an existing record of a specific Profile Data Type (PDT) identified by its unique `core_type_id` and `core_type_name`. The HTTP method used is PATCH. The request body should contain the updated values for the fields that need to be modified. The response will include the updated record of the PDT with the new values for the specified fields. If the `core_type_id` or `core_type_name` provided in the URL path does not match any existing record, the response will return a 404 status code.\n\n**Note:**\n\n- **phone:** when working with patients and fields such as phone, phone must be specified in the international format, E.164 format, without zero","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Partial field values to update."}}}}}}}}
```

## Get Patients list by PDT

> This endpoint allows the user to retrieve a list of patients that have profile data associated with the given Core Type ID under the specified Core Type Name in the current formation. The response will include basic information about each patient, such as their ID, name, and other relevant metadata. This information can be useful for various purposes such as managing patient data, conducting analysis on patient profiles, and more.\
> \
> To use this endpoint, you need to provide the URL, the tenant name, instance name, the Core Type Name, and Core Type ID in the endpoint URL. An authentication token may also be required to access the resource depending on the security settings of the API.\
> \
> \*\*Note:\*\* unlike sibling PDT-record endpoints, this one is not marked as a public/third-party endpoint in the backend — confirm with Welkin before relying on it in production integrations.

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"tags":[{"name":"PDT Record","description":"Endpoints to work with PDTs."}],"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"}},"PdtName":{"name":"pdtName","in":"path","required":true,"description":"Profile Data Type (PDT) name","schema":{"type":"string"}},"PdtId":{"name":"pdtId","in":"path","required":true,"description":"UUID of the PDT record","schema":{"type":"string","format":"uuid"}}},"schemas":{"PatientPage":{"allOf":[{"$ref":"#/components/schemas/PaginatedResponse"},{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/PatientResponse"}}}}]},"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"}}},"PatientResponse":{"type":"object","description":"Patient record. Response is extensible — tenant-configured custom attributes appear as additional top-level properties beyond those listed here.","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"externalGuid":{"type":"string","format":"uuid","nullable":true},"externalId":{"type":"string","nullable":true},"mrn":{"type":"string","nullable":true},"nric":{"type":"string","nullable":true},"accessCode":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"createdByName":{"type":"string"},"updatedByName":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"middleName":{"type":"string","nullable":true},"birthDate":{"type":"string","format":"date-time","nullable":true},"gender":{"$ref":"#/components/schemas/PatientGender"},"maritalStatus":{"$ref":"#/components/schemas/MaritalStatus"},"primaryLanguage":{"$ref":"#/components/schemas/PatientLanguage"},"secondaryLanguage":{"$ref":"#/components/schemas/PatientLanguage"},"email":{"type":"string","format":"email","nullable":true},"secondaryEmail":{"type":"string","format":"email","nullable":true},"phone":{"type":"string","nullable":true},"phoneLabel":{"type":"string","nullable":true},"primaryPhoneCapabilities":{"type":"array","items":{"$ref":"#/components/schemas/PhoneCapability"}},"secondaryPhone":{"type":"string","nullable":true},"secondaryPhoneLabel":{"type":"string","nullable":true},"secondaryPhoneCapabilities":{"type":"array","items":{"$ref":"#/components/schemas/PhoneCapability"}},"preferableInstancePhoneId":{"type":"string","format":"uuid","nullable":true},"country":{"type":"string","nullable":true},"state":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"zip":{"type":"string","nullable":true},"addressLine1":{"type":"string","nullable":true},"addressLine2":{"type":"string","nullable":true},"timezone":{"type":"string","nullable":true},"patientType":{"$ref":"#/components/schemas/PatientType"},"notes":{"type":"string","nullable":true},"careTeamMembers":{"type":"array","items":{"$ref":"#/components/schemas/CareTeamMember"},"readOnly":true,"description":"Deprecated — use careTeam."},"patientPrograms":{"type":"array","items":{"$ref":"#/components/schemas/PatientProgram"},"readOnly":true},"careTeam":{"type":"array","items":{"$ref":"#/components/schemas/PatientTeamMember"}},"territorialTeam":{"type":"array","items":{"$ref":"#/components/schemas/PatientTeamMember"},"readOnly":true,"description":"Only populated when the `expand=true` query param is set."},"cadence":{"type":"array","items":{"$ref":"#/components/schemas/PatientCadence"}},"patientRegion":{"type":"string","nullable":true},"patientRegionTitle":{"type":"string","readOnly":true,"nullable":true},"patientTerritory":{"type":"string","nullable":true},"pointOfContact":{"$ref":"#/components/schemas/PatientTeamMember","nullable":true}}},"PatientGender":{"type":"string","enum":["MALE","FEMALE","OTHER","UNKNOWN"]},"MaritalStatus":{"type":"string","enum":["A","D","I","L","M","P","S","T","U","W","UKN"],"description":"A = Annulled, D = Divorced, I = Interlocutory, L = Legally Separated, M = Married, P = Polygamous, S = Never Married, T = Domestic partner, U = Unmarried, W = Widowed, UKN = Unknown"},"PatientLanguage":{"type":"string","enum":["ENGLISH","SPANISH","FRENCH","PORTUGUESE","GERMAN","ITALIAN","ARABIC","CHINESE","MANDARIN","VIETNAMESE","JAPANESE","RUSSIAN","ALBANIAN","OTHER"]},"PhoneCapability":{"type":"string","enum":["VOICE_CALL","SMS","WHATS_APP"]},"PatientType":{"type":"string","enum":["ADULT","MINOR","COUPLE"]},"CareTeamMember":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"User UUID"},"pointOfContact":{"type":"boolean","description":"Whether this member is the point of contact"}},"required":["id"]},"PatientProgram":{"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"},"programName":{"type":"string"},"programTitle":{"type":"string"},"programDescription":{"type":"string","nullable":true},"assigned":{"type":"boolean","default":true},"patientId":{"type":"string","format":"uuid"},"currentPhase":{"$ref":"#/components/schemas/PatientPhase"},"status":{"$ref":"#/components/schemas/PatientProgramStatus"},"compatibleWithCurrentVersion":{"type":"boolean"},"pathHistory":{"type":"array","items":{"$ref":"#/components/schemas/PatientPhase"}}}},"PatientPhase":{"type":"object","properties":{"timestamp":{"type":"string","format":"date-time"},"createdBy":{"type":"string","format":"uuid","nullable":true},"createdByName":{"type":"string"},"name":{"type":"string"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"currentVersion":{"type":"string"},"deleted":{"type":"boolean"}}},"PatientProgramStatus":{"type":"string","enum":["NOT_STARTED","IN_PROGRESS","INTERRUPTED","FINISHED"]},"PatientTeamMember":{"type":"object","description":"Full care team member representation returned on Patient reads.","properties":{"id":{"type":"string","format":"uuid"},"username":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string","format":"email"},"roles":{"type":"array","items":{"$ref":"#/components/schemas/SimpleRole"}},"pointOfContact":{"type":"boolean"},"enabled":{"type":"boolean"}}},"SimpleRole":{"type":"object","properties":{"name":{"type":"string"},"primaryRole":{"type":"boolean"},"description":{"type":"string","nullable":true},"instanceId":{"type":"string","format":"uuid","nullable":true}}},"PatientCadence":{"type":"object","required":["priority"],"properties":{"schedules":{"type":"array","items":{"$ref":"#/components/schemas/CadenceSchedule"}},"priority":{"$ref":"#/components/schemas/PatientCadencePriority"}}},"CadenceSchedule":{"type":"object","properties":{"hour":{"type":"integer","minimum":0,"maximum":23},"minute":{"type":"integer","minimum":0,"maximum":59},"days":{"type":"array","items":{"$ref":"#/components/schemas/DayOfWeek"}},"weekNumbers":{"type":"array","items":{"type":"integer"}}}},"DayOfWeek":{"type":"string","enum":["MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY","SUNDAY"]},"PatientCadencePriority":{"type":"string","enum":["LOW","MEDIUM","HIGH"]}},"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}/pdts/{pdtName}/{pdtId}/patients":{"get":{"summary":"Get Patients list by PDT","tags":["PDT Record"],"operationId":"Get_Patients_list_by_PDT","parameters":[{"$ref":"#/components/parameters/TenantName"},{"$ref":"#/components/parameters/InstanceName"},{"$ref":"#/components/parameters/PdtName"},{"$ref":"#/components/parameters/PdtId"}],"responses":{"200":{"description":"Paginated list of patients linked to this PDT record","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientPage"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"}},"description":"This endpoint allows the user to retrieve a list of patients that have profile data associated with the given Core Type ID under the specified Core Type Name in the current formation. The response will include basic information about each patient, such as their ID, name, and other relevant metadata. This information can be useful for various purposes such as managing patient data, conducting analysis on patient profiles, and more.\n\nTo use this endpoint, you need to provide the URL, the tenant name, instance name, the Core Type Name, and Core Type ID in the endpoint URL. An authentication token may also be required to access the resource depending on the security settings of the API.\n\n**Note:** unlike sibling PDT-record endpoints, this one is not marked as a public/third-party endpoint in the backend — confirm with Welkin before relying on it in production integrations."}}}}
```


---

# 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/pdt-record.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.
