# User Validate

| **API URL**     | {{url}}/admin-service/user/validate-user |
| --------------- | ---------------------------------------- |
| **Method**      | POST                                     |
| **Description** | Validate the User                        |

#### **Sample Input** <a href="#uservalidate-v2-sampleinput" id="uservalidate-v2-sampleinput"></a>

| **Field Name**         | **Type** | **Mandatory** | **Example**                                                                                                                             |
| ---------------------- | -------- | ------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| appTypes               | String   | Yes           | App type for the user                                                                                                                   |
| email                  | String   | Yes           | Email to validate the user                                                                                                              |
| Authorization (Header) | String   | Yes           | Bearer 1ba363a1edf54402b51f58060aa52b11d30f99a490295adec900fdabf2b472181c0bfb165be18f4f5c430c7218a244bd29b9300d3471acc08197ccfb996118f6 |
| client                 | String   | Yes           | web                                                                                                                                     |

```
{
  "appTypes": [
    "COMMUNITY"
  ],
  "email": "XXXXremXXXXkar@ideas2it.com"
}
```

#### **Sample Output** <a href="#uservalidate-v2-sampleoutput" id="uservalidate-v2-sampleoutput"></a>

| **Field Name**               | **Type** | **Comments**                            |
| ---------------------------- | -------- | --------------------------------------- |
| message                      | String   | Got users.                              |
| status                       | String   | Entity status                           |
| entityList                   | String   | Entity List                             |
| id                           | Bigint   | Medication id                           |
| firstName                    | String   | First Name of user                      |
| roles                        | String   | Roles for the user                      |
| lastName                     | String   | Last name for the user                  |
| gender                       | String   | User gender                             |
| phoneNumber                  | Bigint   | User phone Number                       |
| username                     | String   | login user name                         |
| countryCode                  | Bigint   | Country Code                            |
| country                      | String   | Country details                         |
| organizations                | String   | Organizations details                   |
| tenantId                     | Bigint   | Tenant Id                               |
| fhirId                       | Bigint   | Fhir Id for user                        |
| suiteAccess                  | String   | mob                                     |
| Villages                     | String   | List of villages                        |
| culture                      | String   | User culture                            |
| timezone                     | Date     | User timezone                           |
| defaultRoleName              | String   | CHW                                     |
| isTermsAndConditionsAccepted | Boolean  | Check for Terms And Conditions Accepted |
| designation                  | String   | Designation                             |
| active                       | Boolean  | Status for user                         |
| redRisk                      | Boolean  | RedRisk for user                        |

```
{
  "message": "Got All users.",
  "entity": null,
  "status": true,
  "entityList": [
      {
          "id": 5,
          "firstName": "CHW",
          "roles": [
              {
                  "id": 2,
                  "name": "CHW",
                  "level": null,
                  "groupName": "SPICE",
                  "displayName": "Community Health Worker",
                  "suiteAccessName": "mob",
                  "appTypes": [
                      "COMMUNITY"
                  ],
                  "reportPrivileges": [
                      "hf4"
                  ]
              }
          ],
          "lastName": "FHIR",
          "gender": "male",
          "phoneNumber": "86XXXXX111",
          "username": "cXXXX_fXXr@test.com",
          "countryCode": "23",
          "country": {
              "id": 1,
              "name": "Sierra Leone",
              "phoneNumberCode": "232",
              "unitMeasurement": null,
              "regionCode": "1",
              "appTypes": [
                  "COMMUNITY"
              ],
              "tenantId": 1
          },
          "organizations": [
              {
                  "id": 11,
                  "formDataId": 6,
                  "name": "Rainbow HF",
                  "sequence": null,
                  "parentOrganizationId": 4,
                  "formName": "healthfacility"
              }
          ],
          "tenantId": 11,
          "fhirId": "9606",
          "suiteAccess": [
              "mob"
          ],
          "villages": [
              {
                  "id": 1,
                  "name": "Guindy",
                  "villagecode": null,
                  "chiefdomId": 1,
                  "userId": null,
                  "countryId": 1,
                  "districtId": 1,
                  "chiefdomCode": null,
                  "districtCode": null,
                  "memberSequence": 0,
                  "householdSequence": 0,
                  "code": "0001"
              }
          ],
          "culture": {
              "id": 1,
              "name": "English",
              "code": "en"
          },
          "timezone": {
              "id": 1,
              "offset": "+05:30",
              "description": "Indian Time"
          },
          "defaultRoleName": "CHW",
          "insightUserOrganization": [],
          "reportUserOrganization": [],
          "isTermsAndConditionsAccepted": false,
          "designation": {
              "id": null,
              "name": null
          },
          "active": false,
          "redRisk": false
      }
  ],
  "responseCode": 200,
  "totalCount": 1
}
```
