> ## Documentation Index
> Fetch the complete documentation index at: https://docs.scanova.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Get User Details

> Get the details of a specific user including their role, permissions, and invitation status.

## Overview

Retrieves detailed information about a specific user in your account, including their role, permissions, invitation status, and activity details.

## Purpose

### **User Information**

* **Detailed User Data**: Get comprehensive user information
* **Role and Permissions**: View user's access level and permissions
* **Invitation Status**: Check invitation and acceptance status
* **Activity Tracking**: Monitor user activity and engagement

### **User Management**

* **User Profile**: View complete user profile
* **Permission Review**: Review user's specific permissions
* **Status Monitoring**: Track user invitation and acceptance
* **Access Control**: Understand user's access level

## Path Parameters

| Parameter        | Type    | Required | Description           | Example |
| ---------------- | ------- | -------- | --------------------- | ------- |
| `shared-user-id` | integer | Yes      | ID of the shared user | `479`   |

## Response Structure

The response returns a complete user object with detailed information:

| Field                    | Type        | Description                          |
| ------------------------ | ----------- | ------------------------------------ |
| `id`                     | integer     | Shared user relationship ID          |
| `shared_user`            | object      | User details (name, email, activity) |
| `access_level`           | object      | User's role and permissions          |
| `invitation_sent_on`     | string/null | When invitation was sent             |
| `invitation_accepted_on` | string/null | When invitation was accepted         |
| `is_invitation_sent`     | boolean     | Whether invitation has been sent     |
| `is_invitation_accepted` | boolean     | Whether invitation has been accepted |
| `created`                | string      | When user was added to account       |
| `modified`               | string      | When user was last modified          |
| `tags`                   | array       | Tags assigned to the user            |

## Examples

### **Get User Details**

```bash theme={null}
curl -X GET "https://management.scanova.io/multi-users/479/" \
  -H "Authorization: YOUR_API_KEY"
```

### **Response Example**

```json theme={null}
{
  "id": 479,
  "shared_user": {
    "id": 1452,
    "first_name": "Jon Doe",
    "last_name": "",
    "full_name": "Jon Doe",
    "email": "jon.doe@scanova.io",
    "is_shared": true,
    "date_joined": "2023-09-11T16:28:22.113793+05:30",
    "is_social_signup": false,
    "is_sso_login": false,
    "has_usable_password": true,
    "language": "en",
    "last_login": null,
    "first_login": false,
    "enforce_mfa": false,
    "mfa_enabled": false,
    "mfa_status": "Disabled"
  },
  "access_level": {
    "id": 1,
    "name": "Manager",
    "permissions": [
      {
        "id": 22,
        "code": "QR_CODE_CAN_ADD",
        "name": "Can Add QR Code",
        "description": "Can add QR Code",
        "is_boolean": true
      },
      {
        "id": 23,
        "code": "QR_CODE_CAN_VIEW",
        "name": "Can view QR Code",
        "description": "Can view QR Code",
        "is_boolean": true
      },
      {
        "id": 24,
        "code": "QR_CODE_CAN_EDIT",
        "name": "Can edit QR Code",
        "description": "Can edit QR Code",
        "is_boolean": true
      },
      {
        "id": 26,
        "code": "QR_CODE_CAN_DOWNLOAD",
        "name": "Can download QR code",
        "description": "Can download QR Code",
        "is_boolean": true
      },
      {
        "id": 1,
        "code": "ANALYTICS_CAN_VIEW",
        "name": "Analytics Can View",
        "description": "Can view analytics",
        "is_boolean": true
      }
    ],
    "is_custom": false
  },
  "invitation_sent_on": "2023-09-11T16:28:22.227002+05:30",
  "invitation_accepted_on": null,
  "is_invitation_sent": true,
  "is_invitation_accepted": false,
  "created": "2023-09-11T16:28:22.223671+05:30",
  "modified": "2023-09-11T16:28:22.227109+05:30",
  "tags": []
}
```

## User Information Fields

### **Basic Information**

* **`first_name`**: User's first name
* **`last_name`**: User's last name
* **`full_name`**: User's complete name
* **`email`**: User's email address
* **`language`**: User's preferred language

### **Account Status**

* **`is_shared`**: Whether this is a shared user (true) or account owner (false)
* **`date_joined`**: When the user joined
* **`last_login`**: User's last login time (null if never logged in)
* **`first_login`**: Whether this is the user's first login

### **Security Information**

* **`has_usable_password`**: Whether user has a usable password
* **`enforce_mfa`**: Whether MFA is enforced for this user
* **`mfa_enabled`**: Whether MFA is enabled for this user
* **`mfa_status`**: Current MFA status

### **Authentication Methods**

* **`is_social_signup`**: Whether user signed up via social login
* **`is_sso_login`**: Whether user uses SSO login

## Integration Examples

### **JavaScript - User Profile Display**

```javascript theme={null}
async function getUserDetails(userId) {
  try {
    const response = await fetch(`https://management.scanova.io/multi-users/${userId}/`, {
      method: 'GET',
      headers: {
        'Authorization': 'YOUR_API_KEY'
      }
    });
    
    if (response.ok) {
      const user = await response.json();
      
      // Display user information
      document.getElementById('userName').textContent = user.shared_user.full_name;
      document.getElementById('userEmail').textContent = user.shared_user.email;
      document.getElementById('userRole').textContent = user.access_level.name;
      document.getElementById('userStatus').textContent = user.is_invitation_accepted ? 'Active' : 'Pending';
      document.getElementById('lastLogin').textContent = user.shared_user.last_login ? 
        new Date(user.shared_user.last_login).toLocaleString() : 'Never';
      
      // Display permissions
      const permissionsList = document.getElementById('permissionsList');
      user.access_level.permissions.forEach(permission => {
        const li = document.createElement('li');
        li.textContent = permission.name;
        permissionsList.appendChild(li);
      });
      
      return user;
    } else {
      throw new Error('Failed to fetch user details');
    }
  } catch (error) {
    console.error('Error fetching user details:', error);
    return null;
  }
}

// Usage
getUserDetails(479);
```

### **Python - User Information Retrieval**

```python theme={null}
import requests
from datetime import datetime

def get_user_details(user_id):
    url = f"https://management.scanova.io/multi-users/{user_id}/"
    headers = {"Authorization": "YOUR_API_KEY"}
    
    try:
        response = requests.get(url, headers=headers)
        response.raise_for_status()
        
        user = response.json()
        user_info = user['shared_user']
        access_level = user['access_level']
        
        print(f"User Details for {user_info['full_name']}")
        print("=" * 50)
        print(f"Email: {user_info['email']}")
        print(f"Role: {access_level['name']}")
        print(f"Status: {'Active' if user['is_invitation_accepted'] else 'Pending'}")
        print(f"Date Joined: {user_info['date_joined']}")
        print(f"Last Login: {user_info['last_login'] or 'Never'}")
        print(f"MFA Status: {user_info['mfa_status']}")
        print(f"Language: {user_info['language']}")
        
        print("\nPermissions:")
        for permission in access_level['permissions']:
            print(f"  - {permission['name']}: {permission['description']}")
        
        return user
        
    except requests.exceptions.RequestException as e:
        print(f"Error fetching user details: {e}")
        return None

# Usage
user_details = get_user_details(479)
```

### **PHP - User Profile Page**

```php theme={null}
<?php
function getUserDetails($userId) {
    $url = "https://management.scanova.io/multi-users/{$userId}/";
    $headers = [
        "Authorization: YOUR_API_KEY"
    ];
    
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    
    $response = curl_exec($ch);
    $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
    curl_close($ch);
    
    if ($httpCode === 200) {
        $user = json_decode($response, true);
        $userInfo = $user['shared_user'];
        $accessLevel = $user['access_level'];
        
        echo "<h2>User Profile: {$userInfo['full_name']}</h2>";
        echo "<table border='1'>";
        echo "<tr><th>Field</th><th>Value</th></tr>";
        echo "<tr><td>Email</td><td>{$userInfo['email']}</td></tr>";
        echo "<tr><td>Role</td><td>{$accessLevel['name']}</td></tr>";
        echo "<tr><td>Status</td><td>" . ($user['is_invitation_accepted'] ? 'Active' : 'Pending') . "</td></tr>";
        echo "<tr><td>Date Joined</td><td>{$userInfo['date_joined']}</td></tr>";
        echo "<tr><td>Last Login</td><td>" . ($userInfo['last_login'] ?: 'Never') . "</td></tr>";
        echo "<tr><td>MFA Status</td><td>{$userInfo['mfa_status']}</td></tr>";
        echo "<tr><td>Language</td><td>{$userInfo['language']}</td></tr>";
        echo "</table>";
        
        echo "<h3>Permissions</h3>";
        echo "<ul>";
        foreach ($accessLevel['permissions'] as $permission) {
            echo "<li>{$permission['name']}: {$permission['description']}</li>";
        }
        echo "</ul>";
        
        return $user;
    } else {
        echo "Error fetching user details";
        return null;
    }
}

// Usage
$userId = $_GET['user_id'] ?? 479;
$userDetails = getUserDetails($userId);
?>
```

## Use Cases

### **User Profile Management**

* **User Details**: Display comprehensive user information
* **Permission Review**: Review user's specific permissions
* **Status Monitoring**: Track user invitation and acceptance
* **Activity Tracking**: Monitor user login activity

### **Administrative Tools**

* **User Audit**: Review individual user access and activity
* **Permission Management**: Understand user's specific permissions
* **Access Control**: Verify user access levels
* **User Support**: Help users with account issues

### **API Integration**

* **User Synchronization**: Sync user data with external systems
* **Access Control**: Implement role-based access control
* **User Analytics**: Analyze individual user activity
* **Automated Management**: Automate user management tasks

<Note>
  This endpoint provides detailed information about a specific user. Use this to get comprehensive user data including permissions, activity, and status information.
</Note>

<Info>
  The user ID in the URL is the shared user relationship ID, not the user's account ID. You can get this ID from the user list endpoint.
</Info>


## OpenAPI

````yaml GET /multi-users/{shared-user-id}/
openapi: 3.0.0
info:
  title: Scanova API - User Management
  description: >-
    User management endpoints for managing shared users, roles, and permissions
    in your Scanova account. These endpoints allow you to invite users, assign
    roles, and manage access levels.
  version: 1.0.0
servers:
  - url: https://management.scanova.io
    description: Scanova Management API Server
security:
  - apiKeyAuth: []
paths:
  /multi-users/{shared-user-id}/:
    get:
      tags:
        - User Management
      summary: Get User Details
      description: >-
        Get the details of a specific user including their role, permissions,
        and invitation status.
      parameters:
        - name: shared-user-id
          in: path
          required: true
          description: ID of the shared user
          schema:
            type: integer
          example: 479
      responses:
        '200':
          description: User details retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SharedUser'
        '401':
          description: Unauthorized - Invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthenticationErrorResponse'
        '404':
          description: User not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKeyAuth: []
components:
  schemas:
    SharedUser:
      type: object
      properties:
        id:
          type: integer
          description: Shared user relationship ID
          example: 479
        shared_user:
          $ref: '#/components/schemas/User'
        access_level:
          $ref: '#/components/schemas/AccessLevel'
        invitation_sent_on:
          type: string
          format: date-time
          nullable: true
          description: When the invitation was sent
          example: '2023-09-11T16:28:22.227002+05:30'
        invitation_accepted_on:
          type: string
          format: date-time
          nullable: true
          description: When the invitation was accepted
          example: null
        is_invitation_sent:
          type: boolean
          description: Whether invitation has been sent
          example: true
        is_invitation_accepted:
          type: boolean
          description: Whether invitation has been accepted
          example: false
        created:
          type: string
          format: date-time
          description: When the user was added
          example: '2023-09-11T16:28:22.223671+05:30'
        modified:
          type: string
          format: date-time
          description: When the user was last modified
          example: '2023-09-11T16:28:22.227109+05:30'
        tags:
          type: array
          items:
            $ref: '#/components/schemas/UserTag'
          description: Tags assigned to the user
    AuthenticationErrorResponse:
      type: object
      properties:
        detail:
          type: string
          example: Authentication credentials were not provided.
    ErrorResponse:
      type: object
      properties:
        detail:
          type: string
          example: Not found.
    User:
      type: object
      properties:
        id:
          type: integer
          description: User ID
          example: 1452
        first_name:
          type: string
          description: User's first name
          example: Jon
        last_name:
          type: string
          description: User's last name
          example: Doe
        full_name:
          type: string
          description: User's full name
          example: Jon Doe
        email:
          type: string
          format: email
          description: User's email address
          example: jon.doe@scanova.io
        is_shared:
          type: boolean
          description: Whether this is a shared user
          example: true
        date_joined:
          type: string
          format: date-time
          description: When the user joined
          example: '2023-09-11T16:28:22.113793+05:30'
        is_social_signup:
          type: boolean
          description: Whether user signed up via social login
          example: false
        is_sso_login:
          type: boolean
          description: Whether user uses SSO login
          example: false
        has_usable_password:
          type: boolean
          description: Whether user has a usable password
          example: true
        language:
          type: string
          description: User's preferred language
          example: en
        last_login:
          type: string
          format: date-time
          nullable: true
          description: User's last login time
          example: null
        first_login:
          type: boolean
          description: Whether this is the user's first login
          example: false
        enforce_mfa:
          type: boolean
          description: Whether MFA is enforced for this user
          example: false
        mfa_enabled:
          type: boolean
          description: Whether MFA is enabled for this user
          example: false
        mfa_status:
          type: string
          description: MFA status
          example: Disabled
    AccessLevel:
      type: object
      properties:
        id:
          type: integer
          description: Access level ID
          example: 1
        name:
          type: string
          description: Access level name
          example: Manager
        permissions:
          type: array
          items:
            $ref: '#/components/schemas/Permission'
          description: List of permissions for this access level
        is_custom:
          type: boolean
          description: Whether this is a custom role or default role
          example: false
    UserTag:
      type: object
      properties:
        id:
          type: integer
          description: Tag ID
          example: 2950
        name:
          type: string
          description: Tag name
          example: SOCIAL ALL FIELDS
    Permission:
      type: object
      properties:
        id:
          type: integer
          description: Permission ID
          example: 22
        code:
          type: string
          description: Permission code
          example: QR_CODE_CAN_ADD
        name:
          type: string
          description: Permission name
          example: Can Add QR Code
        description:
          type: string
          description: Permission description
          example: Can add QR Code
        is_boolean:
          type: boolean
          description: Whether this is a boolean permission
          example: true
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        API key authentication. Enter your API key directly in the Authorization
        header.

````