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

# Read mine

> This endpoint returns details about the currently authenticated user. This is useful for applications where a user may need to view or update their own profile, check their roles, or verify their account status



## OpenAPI

````yaml /openapi/public/openapi-setting.json get /user
openapi: 3.0.0
info:
  title: MileApp API - Setting
  version: 3.0.0
  description: MileApp API Documentation - RESTful API for field operations management.
servers:
  - url: https://apiweb.mile.app/api/v3
security:
  - bearerAuth: []
tags:
  - name: User
    description: >-
      User data includes information contained within a user account, such as
      details that define a user's hub access and role within the system. Hub
      access determines the locations or areas of the application a user can
      access or the specific actions they can perform. User attributes consist
      of the user ID, name, email, and status.


      MileApp provides five predefined user roles, and you can create custom
      roles based on your organization's needs. The predefined roles are
      **Owner, Admin, Planner, and Field user**. A user can only hold one role
      at a time but can be granted access to multiple hubs.
  - name: Team
    description: >-
      This API allows you to manage teams. It serves as a tool to effectively
      manage and restrict user task assignments within your organization.


      **To see the details of team object, please follow [this
      link](#tag/team_model)**
  - name: Role
    description: >-
      This API enables you to retrieve a list of predefined roles and any custom
      roles associated with your account. By making a GET request to this API,
      you can obtain information about the available roles within the system.
      The predefined roles refer to a set of role types that are already defined
      by the system. In this particular case, the predefined roles include
      Finance, Owner, Planner, Admin, and Field User. Additionally, the API may
      also return any custom roles that have been created within your account.


      **To see the details of role object, please follow [this
      link](#tag/role_model)**
  - name: Hub
    description: >-
      In our system, a Hub is a fundamental entity within an organization,
      serving as the central point for managing various operational components.
      It acts as the parent structure for a wide range of resources and
      functionalities, including tasks, visits, users, vehicles, routing
      results, routing configurations, and data sources.


      **To see the details of hub object, please follow [this
      link](#tag/hub_model)**


      ## Conceptual Understanding of Hubs


      - **User Perspective:** For users, a Hub represents their headquarters or
      primary working area. It is where they carry out their daily activities
      and manage their tasks effectively. Each user interacts with the Hub to
      access resources and perform operations specific to their roles.


      - **Task Perspective:** From the perspective of task management, the Hub
      signifies the working area for tasks. It is the location where tasks are
      initiated, monitored, and completed. The Hub facilitates organization and
      efficiency in task execution.


      - **Routing Perspective:** In the context of routing and logistics, a Hub
      serves as a critical location for vehicles. It is where vehicles begin
      their routes, return after completing their journeys, and may make
      strategic stops along the way. The routing module relies on the Hub to
      optimize vehicle assignments and manage routes effectively.
  - name: App Integration
    description: >-
      This API allows you to manage Integration of enterprise app. Currently
      available for Azure.


      **To see the details of integration object, please follow [this
      link](#tag/app_integration_model)**
  - name: Plugin
    description: >-
      The Plugin API allows developers to create and manage custom add-ons
      within the Mile V3 platform. Plugins enable dynamic functionality through
      JavaScript resources and custom icons, allowing organizations to extend
      platform capabilities with custom features and integrations.


      **To see the details of plugin object, please follow [this
      link](#tag/plugin_model)**
paths:
  /user:
    get:
      tags:
        - User
      summary: Read mine
      description: >-
        This endpoint returns details about the currently authenticated user.
        This is useful for applications where a user may need to view or update
        their own profile, check their roles, or verify their account status
      operationId: user
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/usersuccess1'
              examples:
                response:
                  value:
                    _id: 65c1f4eeca7c4816d94587b7
                    name: example
                    email: example@mile.app
                    provider: web
                    hubId:
                      - 65c1f68ea735b522d370ea22
                      - 65c1f7b800da624e7267a822
                      - 65cf10ace3103030040ad152
                      - 65c1f79069b4a9333c5a3d12
                      - 6661404dfe5cf5096220cb42
                      - 65d2d821035413251965f242
                    organizationId: 65c1f4eeca7c4816d94587b2
                    status: active
                    lastLogin: '2024-06-18T03:54:47+00:00'
                    roleId: 65c1f4eeca7c4816d94587b3
                    activationCode: 5dc25a36e280ba34ef6dfe1f54dcb5d6
                    onboardingStep: []
                    teamId: []
                    updatedTime: '2024-06-18T03:58:26+00:00'
                    createdTime: '2024-02-06T08:59:26+00:00'
                    personalToken: >-
                      eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiI2NGY0YzUyYjdmYWI3ZjE3YzcwNTA3MTIiLCJqdGkiOiI4OWNkZWU3NDFjOWMxNzZiOWUzYWM5YzIzMWFhNGNmMWIxYTQ1M2ZkMjlmMzk4Yjc2MDhjODZiZGM0YWE3OTc3ZTQxMDRiYjVhNzIyZTM5OCIsImlhdCI6MTcxMDk5MDU4MywibmJmIjoxNzEwOTkwNTgzLCJleHAiOjQ4NjY2NjQxODMsInN1YiI6IjY1YzFmNGVlY2E3YzQ4MTZkOTQ1ODdiNyIsInNjb3BlcyI6W119.n1eiSvhm6LiuVcggn3XtT0_5wN10FXW4ZB4xgj2LeGK-7SU0zo3w-yqAe21VHJ-Jp20I_ovbbmj4rFhyqQZgUqD0N6SXvL8CFs1WayHzTK18EB_tYQo9R8ZxhdYvqkHLi_9t-wcAs0Sor-YR1zWaesissQyi7-5TB70oQ6QM4KZpqiKOpOMol_vh-0-NbhOblOVBeROknnM9TV-TjHF22w6gtlaKBhVXALCFLJROUTn2cDrjfA29dU5YXiSPvJtS5jT91O7x59cZDDU3TQmaB0Wlqd581_Q7Cy1oJH89oYpKqprECNjiAafIdRiqKAVay6wDGXDDBditnXECIVpWZ3EU6cocReyKBs83QvWZFeKo7rfuLwWAf8wPvRKi2jTXDe7ATS97ltbuFHteA9I5wZWeWFGgOjwZzwQOvEKnCDMYQC5vuk8ZCCle-0nRo8D02M6gnLK-bUTqhv6cgDON8bA6NTBUoy4rwAMeLvh2VgEIspPD7sl8lHvdseR1aXpQPYKSAL4pSO0qCNPpXxE9NRHt_i3ByY0gBvMdhTwJfct251jphptdfFPu8kLUBAC2dg_1p8M2B2KyEMuEb28NTghInj0PHIvC8cxnUi-dRCgzDJUd7SDoegQiZ4KdBLHA-3W3mb4NLP-pXVwpC_pYVkanyBZuhRcQSOkEj6ym4qs
                    phoneNumber: null
                    dynamicVisitTime: []
                    organization:
                      _id: 65c1f4eeca7c4816d94587b2
                      user:
                        name: example
                        country: IDN
                        phoneNumber: +62 812345677
                        numberOfUsers: 51-1000
                        industry: Last Mile
                        position: Owner/Director
                        email: example@mile.app
                        companyName: MileApp Bandung
                        hub:
                          name: Bandung
                          displayName: Bandung
                          address: >-
                            11, Jalan Stasiun Barat, Bandung Kota 40181,
                            Indonesia
                          lat: '-6.91458'
                          lng: '107.60211'
                        flows:
                          - 62d526290b18b1039408f652
                          - 62d525fe2f12035a550a55e3
                          - 63a561c0fd378bcce9877d2f
                          - 63a561c0fd378bcce9877d30
                          - 62d526540b18b1039408f653
                          - 63a561c0fd378bcce9877d31
                      productId: prod_free
                      status: verified
                      verifiedTime: '2024-02-06T09:06:23+00:00'
                      curPeriodEndTime: null
                      curPeriodStartTime: null
                      eligible: true
                      configuration:
                        filesAccessPermission: private
                        filesServerProvider: milesto
                      updatedTime: '2024-02-06T09:06:24+00:00'
                      createdTime: '2024-02-06T08:59:26+00:00'
                      customerId:
                        idr: cus_PVmAbPSpUmETFp
                        usd: null
                      country:
                        code: IDN
                        phoneCode: '+62'
                        name: Indonesia
                        alpha2Code: ID
                        enableLanguage: true
                        language: id
                        languageName: Indonesian
                    role:
                      _id: 65c1f4eeca7c4816d94587b3
                      name: owner
                      isAdmin: true
                      isDefault: true
                      permissionList:
                        - 6156d6475320c9679e337eba
                        - 615ac4ab5c3c0b3d3e83dfc1
                        - 615ac4ab5c3c0b3d3e83dfc2
                        - 615ac5175c3c0b3d3e83dfc3
                        - 615ac5185c3c0b3d3e83dfc5
                        - 615ac5185c3c0b3d3e83dfc6
                        - 615ac5185c3c0b3d3e83dfc7
                        - 615ac5195c3c0b3d3e83dfc8
                        - 615ac5195c3c0b3d3e83dfc9
                        - 615ac5625c3c0b3d3e83dfca
                        - 615ac5635c3c0b3d3e83dfcb
                        - 615ac5635c3c0b3d3e83dfcc
                        - 6163b9f723c7545255411653
                        - 6163b9f823c7545255411655
                        - 6163b9f823c7545255411656
                        - 61699635faf2a008e491e117
                        - 61699635faf2a008e491e118
                        - 61699636faf2a008e491e119
                        - 61710b3e83e2af47aa833dfd
                        - 61725da59e28573f25d21433
                        - 619df73f4b17064cfff6d3f1
                        - 619df73f4b17064cfff6d3f2
                        - 619df73f4b17064cfff6d3f3
                        - 61a589a721d8e9691727abca
                        - 61a589a721d8e9691727abcb
                        - 61a589a821d8e9691727abcc
                        - 61a589a821d8e9691727abcd
                        - 61a589a921d8e9691727abcf
                        - 61a589aa21d8e9691727abd0
                        - 61a589aa21d8e9691727abd1
                        - 61a589ab21d8e9691727abd2
                        - 61d3f0a024406248b48614b3
                        - 61d3f0d524406248b48615b9
                        - 61d3f0fe24406248b48616ac
                        - 61d3f12d24406248b48617d9
                        - 61d3f19324406248b4861909
                        - 61d3f1a224406248b4861991
                        - 61d3f1b624406248b48619be
                        - 61d3f24524406248b4861c20
                        - 61d3f25424406248b4861ca1
                        - 622578a0e9afc432da65dac1
                        - 622578a0e9afc432da65dac2
                        - 622578a0e9afc432da65dac3
                        - 622578a0e9afc432da65dac4
                        - 622b338c2edf688a1d57cdaa
                        - 622b33af2edf688a1d57ce21
                        - 622b3e492edf688a1d57f49a
                        - 6257cc1e475945cff40aea6b
                        - 62554e48475945cff4f7a7de
                        - 627cb24e62e252387d3bd03d
                        - 6321461de3ac5dbf30484d70
                        - 6321461de3ac5dbf30484d71
                        - 62c7eb1203c741efeeb6cc8c
                        - 62c7eb1203c741efeeb6cc8d
                        - 62c7eb1203c741efeeb6cc8e
                        - 62c7eb1203c741efeeb6cc8f
                        - 62834562511cb545d750bc94
                        - 62834562511cb545d750bc95
                        - 62834562511cb545d750bc96
                        - 62834562511cb545d750bc97
                        - 63edc5a74dfe56be43b641c3
                        - 63edc5a74dfe56be43b641c4
                        - 63edc5a74dfe56be43b641c5
                        - 63edc5a74dfe56be43b641c6
                        - 63edc5a74dfe56be43b641c7
                        - 63edc5a74dfe56be43b641c8
                        - 63edc5a74dfe56be43b641c9
                        - 63edc5a74dfe56be43b641ca
                        - 64599816ff3acaa5f5fc1df2
                        - 645b0f5acdcc614c1b6934ae
                        - 645b0f5acdcc614c1b6934ae
                        - 64fea1b5e8070ec6372ec80e
                        - 64fea1b5e8070ec6372ec80d
                        - 64fea1b5e8070ec6372ec80c
                        - 64fea1b5e8070ec6372ec80b
                        - 652cb205e4c10f4d7a6c2257
                        - 66223fa1943f0c322d03d24c
                      permissionDetails:
                        - permissionName: view/checkincheckout
                          interval: null
                          checkinRadius: null
                          checkoutRadius: null
                        - permissionName: add/task
                          items: null
                      permissions:
                        - name: view/dashboard
                          module: dashboard
                          menu: dashboard
                          displayName: View dashboard
                          access: true
                          meta: {}
                        - name: view/task
                          module: mileField
                          menu: task
                          displayName: View task
                          access: true
                          meta: {}
                        - name: view/task/only-me
                          module: mileField
                          menu: task
                          displayName: Show Only Me
                          access: false
                          meta: {}
                        - name: view/tracking
                          module: mileField
                          menu: tracking
                          displayName: View tracking
                          access: true
                          meta: {}
                        - name: add/task
                          module: mileField
                          menu: task
                          displayName: Create task
                          access: true
                          meta:
                            items: null
                        - name: edit/task
                          module: mileField
                          menu: task
                          displayName: Edit task
                          access: true
                          meta: {}
                        - name: assign/task
                          module: mileField
                          menu: task
                          displayName: Assign/Unassign task
                          access: true
                          meta: {}
                        - name: move/task
                          module: mileField
                          menu: task
                          displayName: Move task
                          access: true
                          meta: {}
                        - name: export/task
                          module: mileField
                          menu: task
                          displayName: Export task
                          access: true
                          meta: {}
                        - name: delete/task
                          module: mileField
                          menu: task
                          displayName: Delete task
                          access: true
                          meta: {}
                        - name: view/schedule
                          module: mileField
                          menu: schedule
                          displayName: View schedule
                          access: true
                          meta: {}
                        - name: add/schedule
                          module: mileField
                          menu: schedule
                          displayName: Create schedule
                          access: true
                          meta: {}
                        - name: edit/schedule
                          module: mileField
                          menu: schedule
                          displayName: Edit schedule
                          access: true
                          meta: {}
                        - name: delete/schedule
                          module: mileField
                          menu: schedule
                          displayName: Delete schedule
                          access: true
                          meta: {}
                        - name: view/vehicle
                          module: mileRoute
                          menu: vehicle
                          displayName: View vehicle
                          access: true
                          meta: {}
                        - name: add/vehicle
                          module: mileRoute
                          menu: vehicle
                          displayName: Create vehicle
                          access: true
                          meta: {}
                        - name: edit/vehicle
                          module: mileRoute
                          menu: vehicle
                          displayName: Edit vehicle
                          access: true
                          meta: {}
                        - name: delete/vehicle
                          module: mileRoute
                          menu: vehicle
                          displayName: Delete vehicle
                          access: true
                          meta: {}
                        - name: view/result
                          module: mileRoute
                          menu: result
                          displayName: View result
                          access: true
                          meta: {}
                        - name: edit/result
                          module: mileRoute
                          menu: result
                          displayName: Edit result
                          access: true
                          meta: {}
                        - name: delete/result
                          module: mileRoute
                          menu: result
                          displayName: Delete result
                          access: true
                          meta: {}
                        - name: dispatch/result
                          module: mileRoute
                          menu: Result
                          displayName: Dispatch result
                          access: true
                          meta: {}
                        - name: route-optimization
                          module: mileRoute
                          menu: result
                          displayName: Route optimization
                          access: true
                          meta: {}
                        - name: view/configuration
                          module: mileRoute
                          menu: configuration
                          displayName: View configuration
                          access: true
                          meta: {}
                        - name: edit/configuration
                          module: mileRoute
                          menu: configuration
                          displayName: Edit configuration
                          access: true
                          meta: {}
                        - name: view/plan
                          module: mileBilling
                          menu: billing
                          displayName: View plan
                          access: true
                          meta: {}
                        - name: view/subscription
                          module: mileBilling
                          menu: billing
                          displayName: View subscription
                          access: true
                          meta: {}
                        - name: view/history
                          module: mileBilling
                          menu: billing
                          displayName: View history
                          access: true
                          meta: {}
                        - name: view/user
                          module: mileSetting
                          menu: user
                          displayName: View user
                          access: true
                          meta: {}
                        - name: invite
                          module: mileSetting
                          menu: user
                          displayName: Invite user
                          access: true
                          meta: {}
                        - name: edit/member
                          module: mileSetting
                          menu: user
                          displayName: Edit user
                          access: true
                          meta: {}
                        - name: delete/member
                          module: mileSetting
                          menu: user
                          displayName: Delete user
                          access: true
                          meta: {}
                        - name: view/permission
                          module: mileSetting
                          menu: permission
                          displayName: View permission
                          access: true
                          meta: {}
                        - name: edit/permission
                          module: mileSetting
                          menu: permission
                          displayName: Edit permission
                          access: true
                          meta: {}
                        - name: view/hub
                          module: mileSetting
                          menu: hub
                          displayName: View hub
                          access: true
                          meta: {}
                        - name: add/hub
                          module: mileSetting
                          menu: hub
                          displayName: Create hub
                          access: true
                          meta: {}
                        - name: edit/hub
                          module: mileSetting
                          menu: hub
                          displayName: Edit hub
                          access: true
                          meta: {}
                        - name: delete/hub
                          module: mileSetting
                          menu: hub
                          displayName: Delete hub
                          access: true
                          meta: {}
                        - name: view/flow
                          module: mileSetting
                          menu: flow
                          displayName: View flow
                          access: true
                          meta: {}
                        - name: add/flow
                          module: mileSetting
                          menu: flow
                          displayName: Create flow
                          access: true
                          meta: {}
                        - name: edit/flow
                          module: mileSetting
                          menu: flow
                          displayName: Edit flow
                          access: true
                          meta: {}
                        - name: delete/flow
                          module: mileSetting
                          menu: flow
                          displayName: Delete flow
                          access: true
                          meta: {}
                        - name: view/workflow
                          module: Setting
                          menu: Workflow
                          displayName: View workflow
                          access: false
                          meta: {}
                        - name: add/workflow
                          module: Setting
                          menu: Workflow
                          displayName: Add workflow
                          access: false
                          meta: {}
                        - name: edit/workflow
                          module: Setting
                          menu: Workflow
                          displayName: Edit workflow
                          access: false
                          meta: {}
                        - name: delete/workflow
                          module: Setting
                          menu: Workflow
                          displayName: Delete workflow
                          access: false
                          meta: {}
                        - name: view/role
                          module: mileSetting
                          menu: role
                          displayName: View role
                          access: true
                          meta: {}
                        - name: create/role
                          module: mileSetting
                          menu: role
                          displayName: Create role
                          access: true
                          meta: {}
                        - name: edit/role
                          module: mileSetting
                          menu: role
                          displayName: Edit role
                          access: true
                          meta: {}
                        - name: delete/role
                          module: mileSetting
                          menu: role
                          displayName: Delete role
                          access: true
                          meta: {}
                        - name: view/organization
                          module: mileSetting
                          menu: organization
                          displayName: View organization
                          access: true
                          meta: {}
                        - name: edit/organization
                          module: mileSetting
                          menu: organization
                          displayName: Edit organization
                          access: true
                          meta: {}
                        - name: view/automation
                          module: mileSetting
                          menu: automation
                          displayName: View automation
                          access: true
                          meta: {}
                        - name: add/automation
                          module: mileSetting
                          menu: automation
                          displayName: Create automation
                          access: true
                          meta: {}
                        - name: edit/automation
                          module: mileSetting
                          menu: automation
                          displayName: Edit automation
                          access: true
                          meta: {}
                        - name: delete/automation
                          module: mileSetting
                          menu: automation
                          displayName: Delete automation
                          access: true
                          meta: {}
                        - name: view/data
                          module: mileSetting
                          menu: data
                          displayName: View data
                          access: true
                          meta: {}
                        - name: add/data
                          module: mileSetting
                          menu: data
                          displayName: Create data
                          access: true
                          meta: {}
                        - name: edit/data
                          module: mileSetting
                          menu: data
                          displayName: Edit data
                          access: true
                          meta: {}
                        - name: delete/data
                          module: mileSetting
                          menu: data
                          displayName: Delete data
                          access: true
                          meta: {}
                        - name: view/dataType
                          module: mileSetting
                          menu: dataType
                          displayName: View data type
                          access: true
                          meta: {}
                        - name: add/dataType
                          module: mileSetting
                          menu: dataType
                          displayName: Create data type
                          access: true
                          meta: {}
                        - name: edit/dataType
                          module: mileSetting
                          menu: dataType
                          displayName: Edit data type
                          access: true
                          meta: {}
                        - name: delete/dataType
                          module: mileSetting
                          menu: dataType
                          displayName: Delete data type
                          access: true
                          meta: {}
                        - name: task/reorder
                          module: mileAdvanced
                          menu: Task
                          displayName: Reorder my task
                          access: false
                          meta: {}
                        - name: view/checkincheckout
                          module: mileAdvanced
                          menu: Tracking
                          displayName: Start - Finish
                          access: false
                          meta:
                            interval: null
                            checkinRadius: null
                            checkoutRadius: null
                        - name: edit/constraint
                          module: mileRoute
                          menu: configuration
                          displayName: Edit constraint
                          access: true
                          meta: {}
                        - name: token/manage-token
                          module: Advanced
                          menu: Personal Access Token
                          displayName: Manage personal access token
                          access: true
                          meta: {}
                        - name: security/otp-email
                          module: Advanced
                          menu: Multi-factor authentication
                          displayName: Multi-factor authentication by email OTP
                          access: false
                          meta: {}
                        - name: view/trash
                          module: mileSetting
                          menu: Trash
                          displayName: Trash
                          access: false
                          meta: {}
                        - name: view/team
                          module: Setting
                          menu: Team
                          displayName: View team
                          access: true
                          meta: {}
                        - name: add/team
                          module: Setting
                          menu: Team
                          displayName: Create team
                          access: true
                          meta: {}
                        - name: edit/team
                          module: Setting
                          menu: Team
                          displayName: Edit team
                          access: true
                          meta: {}
                        - name: delete/team
                          module: Setting
                          menu: Team
                          displayName: Delete team
                          access: true
                          meta: {}
                        - name: single/login
                          module: mileAdvanced
                          menu: Single Login
                          displayName: Single Login
                          access: false
                          meta: {}
                      organizationId: 65c1f4eeca7c4816d94587b2
                      passwordPolicyId: null
                      updatedTime: '2024-02-06T08:59:26.274000Z'
                      createdTime: '2024-02-06T08:59:26.274000Z'
                    firstLogin: false
                    passwordExpired: false
        '500':
          description: Server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: boolean
                    description: Shows if the request was successful.
                  message:
                    type: string
                    description: A short message explaining what went wrong.
                example:
                  status: false
                  message: Internal server error, please contact support@mile.app.
      deprecated: false
      security:
        - bearerAuth: []
components:
  schemas:
    usersuccess1:
      title: usersuccess1
      example:
        _id: 61c2fbaaf27b374e8913fe77
        name: bagus@paket.id
        email: bagus@paket.id
        hubId:
          - 61d669550a569567af791bc2
          - 61d90e15cffc2774fa796d22
        organization_id: 61c2fbaaf27b374e8913fe72
        status: active
        is_deleted: false
        role_id: 61c2fbaaf27b374e8913fe73
        activation_code: c0af258c432c15f30a7f6c36b2e1938e
        updated_at: '1970-01-25T20:31:23.647000Z'
        created_at: '1970-01-25T20:31:23.647000Z'
        role:
          _id: 61c2fbaaf27b374e8913fe73
          name: owner
          is_admin: true
          permission_list:
            - 6156d6475320c9679e337eba
            - 615ac4ab5c3c0b3d3e83dfc1
            - 615ac4ab5c3c0b3d3e83dfc2
            - 615ac5175c3c0b3d3e83dfc3
            - 615ac5185c3c0b3d3e83dfc5
            - 615ac5185c3c0b3d3e83dfc6
            - 615ac5185c3c0b3d3e83dfc7
            - 615ac5195c3c0b3d3e83dfc8
            - 615ac5195c3c0b3d3e83dfc9
            - 615ac5625c3c0b3d3e83dfca
            - 615ac5635c3c0b3d3e83dfcb
            - 615ac5635c3c0b3d3e83dfcc
            - 6163b9f723c7545255411653
            - 6163b9f823c7545255411655
            - 6163b9f823c7545255411656
            - 61699635faf2a008e491e117
            - 61699635faf2a008e491e118
            - 61699636faf2a008e491e119
            - 61710b3e83e2af47aa833dfd
            - 61725da59e28573f25d21433
            - 619df73f4b17064cfff6d3f1
            - 619df73f4b17064cfff6d3f2
            - 619df73f4b17064cfff6d3f3
            - 61a589a721d8e9691727abca
            - 61a589a721d8e9691727abcb
            - 61a589a821d8e9691727abcc
            - 61a589a821d8e9691727abcd
            - 61a589a921d8e9691727abce
            - 61a589a921d8e9691727abcf
            - 61a589aa21d8e9691727abd0
            - 61a589aa21d8e9691727abd1
            - 61a589ab21d8e9691727abd2
            - 61d3f0a024406248b48614b3
            - 61d3f0d524406248b48615b9
            - 61d3f0fe24406248b48616ac
            - 61d3f12d24406248b48617d9
            - 61d3f19324406248b4861909
            - 61d3f1a224406248b4861991
            - 61d3f1b624406248b48619be
            - 61d3f24524406248b4861c20
            - 61d3f25424406248b4861ca1
          organization_id: 61c2fbaaf27b374e8913fe72
          is_deleted: false
          updated_at: '1970-01-25T20:31:23.647000Z'
          created_at: '1970-01-25T20:31:23.647000Z'
        organization:
          _id: 61c2fbaaf27b374e8913fe72
          user:
            name: bagus@paket.id
            email: bagus@paket.id
          license:
            _id: 6181124748f6945f89d02191
            plan_id: 18078
            name: demo
            level: 0
            rule:
              trips: no_limit
              constraint_limit: no_limit
              slack_type: dynamic
              speed: dynamic
              time_window: 'yes'
              geocoding: 500
              multitrip: '10'
              use_all_vehicle: available
            module: mile_route
            vehicle: no_limit
          updated_at: '1970-01-25T20:31:23.647000Z'
          created_at: '1970-01-25T20:31:23.647000Z'
      type: object
      properties:
        _id:
          type: string
        name:
          type: string
        email:
          type: string
        hubId:
          type: array
          items:
            type: string
        organization_id:
          type: string
        status:
          type: string
        is_deleted:
          type: boolean
        role_id:
          type: string
        activation_code:
          type: string
        updated_at:
          type: string
        created_at:
          type: string
        role:
          $ref: '#/components/schemas/Role'
        organization:
          $ref: '#/components/schemas/Organization2'
    Role:
      example:
        _id: 6449f8ef2c481b07d40ecfc3
        name: owner
        isAdmin: true
        isDefault: true
        permissions:
          - _id: 61d3f0d524406248b48615b9
            name: view/task
            module: mileField
            menu: task
            displayName: View task
            access: true
        permissionList:
          - 6156d6475320c9679e337eba
          - 615ac4ab5c3c0b3d3e83dfc1
        permissionDetails:
          - permissionName: view/checkincheckout
            interval: null
            checkinRadius: null
            checkoutRadius: null
        passwordPolicyId: 621dd813eb3eblasuyjasy
        organizationId: 621dd813eb3ebf16b94dbde3
        updatedTime: '2023-04-27T04:24:15.217000Z'
        createdTime: '2023-04-27T04:24:15.217000Z'
      type: object
      properties:
        _id:
          type: string
          description: >-
            Unique identifier for the role data, which can be used to reference
            and manage this specific role.
        name:
          type: string
          description: >-
            Indicates the name of the role. Roles define different levels of
            access and privileges within a system.
        isAdmin:
          type: boolean
          description: A boolean value indicating whether the role is an admin role.
        isDefault:
          type: boolean
          description: Another boolean value indicating whether the role is a default role.
        permissions:
          type: array
          description: >-
            This is an array of permissions related to specific modules and
            menus within the system.
        permissionList:
          type: array
          description: This is an array of IDs that references other permissions.
        permissionDetails:
          type: array
          description: >-
            This section provides additional details about the permissions
            associated with the role.
        passwordPolicyId:
          type: string
          description: ID of the password policy associated with this role, if any.
        organizationId:
          type: string
          description: >-
            Identifier for the organization or company that owns or manages the
            hub.
        updatedTime:
          type: string
          description: >-
            Timestamp represents the last time the hub data was updated. It
            includes date and time information.
        createdTime:
          type: string
          description: >-
            Timestamp represents the date and time when this hub data was
            initially created.
    Organization2:
      title: Organization2
      example:
        _id: 61c2fbaaf27b374e8913fe72
        user:
          name: bagus@paket.id
          email: bagus@paket.id
        license:
          _id: 6181124748f6945f89d02191
          plan_id: 18078
          name: demo
          level: 0
          rule:
            trips: no_limit
            constraint_limit: no_limit
            slack_type: dynamic
            speed: dynamic
            time_window: 'yes'
            geocoding: 500
            multitrip: '10'
            use_all_vehicle: available
          module: mile_route
          vehicle: no_limit
        updated_at: '1970-01-25T20:31:23.647000Z'
        created_at: '1970-01-25T20:31:23.647000Z'
      type: object
      properties:
        _id:
          type: string
        user:
          $ref: '#/components/schemas/User2'
        license:
          $ref: '#/components/schemas/License'
        updated_at:
          type: string
        created_at:
          type: string
      required:
        - _id
        - user
        - license
        - updated_at
        - created_at
    User2:
      title: User2
      example:
        name: bagus@paket.id
        email: bagus@paket.id
      type: object
      properties:
        name:
          type: string
        email:
          type: string
      required:
        - name
        - email
    License:
      title: License
      example:
        _id: 6181124748f6945f89d02191
        plan_id: 18078
        name: demo
        level: 0
        rule:
          trips: no_limit
          constraint_limit: no_limit
          slack_type: dynamic
          speed: dynamic
          time_window: 'yes'
          geocoding: 500
          multitrip: '10'
          use_all_vehicle: available
        module: mile_route
        vehicle: no_limit
      type: object
      properties:
        _id:
          type: string
        plan_id:
          type: integer
          format: int32
        name:
          type: string
        level:
          type: integer
          format: int32
        rule:
          $ref: '#/components/schemas/Rule'
        module:
          type: string
        vehicle:
          type: string
      required:
        - _id
        - plan_id
        - name
        - level
        - rule
        - module
        - vehicle
    Rule:
      title: Rule
      example:
        trips: no_limit
        constraint_limit: no_limit
        slack_type: dynamic
        speed: dynamic
        time_window: 'yes'
        geocoding: 500
        multitrip: '10'
        use_all_vehicle: available
      type: object
      properties:
        trips:
          type: string
        constraint_limit:
          type: string
        slack_type:
          type: string
        speed:
          type: string
        time_window:
          type: string
        geocoding:
          type: integer
          format: int32
        multitrip:
          type: string
        use_all_vehicle:
          type: string
      required:
        - trips
        - constraint_limit
        - slack_type
        - speed
        - time_window
        - geocoding
        - multitrip
        - use_all_vehicle
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Use a valid Bearer token to authenticate.

````