# Get User Profile

| **API URL**     | {{url}}/user-service/user/profile |
| --------------- | --------------------------------- |
| **Method**      | POST                              |
| **Description** | Get details of the user           |

#### **Input** <a href="#getuserprofile-v2-input" id="getuserprofile-v2-input"></a>

| **Field Name**         | **Type** | **Mandatory** | **Example**                                                                                                                             |
| ---------------------- | -------- | ------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| Authorization (Header) | String   | Yes           | Bearer 1ba363a1edf54402b51f58060aa52b11d30f99a490295adec900fdabf2b472181c0bfb165be18f4f5c430c7218a244bd29b9300d3471acc08197ccfb996118f6 |
| client(Header)         | String   | Yes           | web                                                                                                                                     |

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

| **Field Name**               | **Type**  | **Comments**                |
| ---------------------------- | --------- | --------------------------- |
| message                      | String    | Got user                    |
| id                           | Integer   | User ID                     |
| firstName                    | String    | User First Name             |
| roles                        | String    | Roles of the user           |
| lastName                     | String    | User Last Name              |
| gender                       | String    | User Gender                 |
| phoneNumber                  | String    | User Phone number           |
| username                     | String    | User Username               |
| countryCode                  | String    | Country Code                |
| country                      | String    | Country details             |
| organizations                | String    | Organization                |
| tenantId                     | String    | Tenant id of user           |
| fhirId                       | Bigint    | Fhir ID for the user        |
| suiteAccess                  | String    | User Suite Access           |
| villages                     | String    | User Villages               |
| culture                      | String    | Culture details of the User |
| timezone                     | Timestamp | User Timezone               |
| defaultRoleName              | String    | User’s Role Name            |
| insightUserOrganization      | String    | Insights User               |
| reportUserOrganization       | String    | Report User                 |
| insightId                    | String    | Insight id                  |
| isTermsAndConditionsAccepted | Boolean   | Terms and Condition         |
| designation                  | String    | User’s designation          |
| redRisk                      | Boolean   | True or False               |

```
{
    "message": "Got user.",
    "entity": {
        "id": 63,
        "firstName": "Super",
        "roles": [
            {
                "id": 7,
                "name": "SUPER_ADMIN",
                "level": null,
                "groupName": "SPICE",
                "displayName": "Super Admin",
                "suiteAccessName": "admin",
                "appTypes": [
                    "COMMUNITY"
                ],
                "reportPrivileges": []
            }
        ],
        "lastName": "Admin",
        "gender": "Male",
        "phoneNumber": "98XXX321",
        "username": "mcf_labtechnicxxx@spice.mdt",
        "countryCode": "232",
        "country": {
            "id": 1,
            "name": "Sierra Leone",
            "phoneNumberCode": "232",
            "unitMeasurement": null,
            "regionCode": "1",
            "appTypes": [
                "COMMUNITY"
            ],
            "tenantId": 1
        },
        "organizations": [],
        "tenantId": 77,
        "fhirId": "49753",
        "suiteAccess": [
            "insights",
            "admin"
        ],
        "villages": [],
        "culture": {
            "id": 1,
            "name": "English",
            "code": "en"
        },
        "timezone": {
            "id": 1,
            "offset": "+05:30",
            "description": "Indian Time"
        },
        "defaultRoleName": "SUPER_ADMIN",
        "insightUserOrganization": [
            {
                "id": 4,
                "formDataId": 1,
                "name": "AMC Healthcare",
                "sequence": null,
                "parentOrganizationId": 3,
                "formName": "healthfacility"
            }
        ],
        "reportUserOrganization": [],
        "insightId": 195,
        "isTermsAndConditionsAccepted": false,
        "designation": {
            "id": null,
            "name": null
        },
        "redRisk": false
    },
    "status": true,
    "entityList": null,
    "responseCode": 200,
    "totalCount": null
}
```


---

# Agent Instructions: 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:

```
GET https://spice.docs.medtroniclabs.org/engineering/api-documentation/common-services/get-user-profile.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
