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

# User information

> This endpoint lets you retrieve all the information on a user. You need to have `READ` access to this users.




## OpenAPI

````yaml /assets/openapi/openapi-bundled.yaml get /user/{user_id}
openapi: 3.1.0
info:
  title: Partoo Rest API
  version: v2
  license:
    name: © Copyright Partoo
    url: https://www.partoo.co/en/gtu-api/
  x-logo:
    url: >-
      https://partoo-client-images.s3.amazonaws.com/logo-partoo-restapi-white.png
  description: >
    ## Introduction

    The Partoo Rest API allows you to automate all the actions that are possible
    to do in the Partoo Web Application.


    The Partoo Rest API can be used for many different purposes:
      - Create/update/delete your businesses & users if you are a client.
      - Create/subscribe/manage organizations, businesses & users if you are a reseller.
      - Retrieve data on businesses you have access to if you are a publisher.
      - ...
servers:
  - url: https://api.partoo.co/v2
    description: Production server
  - url: https://api.sandbox.partoo.co/v2
    description: Sandbox server (dev environment for clients & partners)
security:
  - ApiKeyAuth: []
paths:
  /user/{user_id}:
    get:
      tags:
        - Users
      summary: User information
      description: >
        This endpoint lets you retrieve all the information on a user. You need
        to have `READ` access to this users.
      operationId: getUser
      parameters:
        - $ref: '#/components/parameters/path_user_id'
        - $ref: '#/components/parameters/query_display_business_ids'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserWithFeatures'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
components:
  parameters:
    path_user_id:
      in: path
      required: true
      name: user_id
      schema:
        type: string
      description: User id
    query_display_business_ids:
      in: query
      name: display_business_ids
      schema:
        type: boolean
        default: true
      required: false
      description: >
        - If `true`, response includes `business_ids`; a list of businesses the
        user has access to.

        - If `false`, response does *not* include `business_ids`.


        ⚠️ Note: The `business_ids` list is only populated for users with the
        `BUSINESS_MANAGER` role.
  schemas:
    UserWithFeatures:
      description: Partoo App User
      type: object
      properties:
        id:
          $ref: '#/components/schemas/UserId'
        org_id:
          $ref: '#/components/schemas/UserOrgId'
        first_name:
          $ref: '#/components/schemas/UserFirstName'
        last_name:
          $ref: '#/components/schemas/UserLastName'
        email:
          $ref: '#/components/schemas/UserEmail'
        lang:
          $ref: '#/components/schemas/Lang'
        sidebar_pages:
          $ref: '#/components/schemas/SidebarPages'
          deprecated: true
        available_features:
          description: The features the user has access to.
          type: array
          items:
            $ref: '#/components/schemas/Feature'
        business_ids:
          description: >
            Populated only for BUSINESS_MANAGER role.


            List of businesses ids the user can access.


            Note: For a reliable way of getting all the businesses the user can
            access, use
            [operation/searchBusinesses](/api-reference/businesses/search-for-businesses).
          type: array
          items:
            $ref: '#/components/schemas/BusinessId'
        accesses:
          $ref: '#/components/schemas/accesses'
        role:
          $ref: '#/components/schemas/Role'
        provider:
          $ref: '#/components/schemas/UserProvider'
        status:
          $ref: '#/components/schemas/UserStatus'
        disabled:
          description: The state of the User account.
          type: boolean
          example: false
        created_at:
          description: Timestamp representing the date the user was created
          type: number
          example: 1615299414
        shadow_user_id:
          description: Used internally at Partoo
          type: string
          example: ''
        custom_role:
          $ref: '#/components/schemas/CustomRoleApiId'
        sso_only:
          $ref: '#/components/schemas/SsoOnly'
    UserId:
      description: User id
      type: string
      example: 5309c3a237bbc544d8e26737
    UserOrgId:
      description: User organization id
      type: integer
      example: 42
    UserFirstName:
      description: User first name
      type: string
      example: Perceval
    UserLastName:
      description: User last name
      type: string
      example: de Galles
    UserEmail:
      description: User email
      type: string
      format: email
      example: perceval@kaamelott.com
    Lang:
      description: Available language in the application
      type: string
      enum:
        - fr
        - en
        - es
        - it
        - pt-br
        - de
        - ar
        - nl
        - pl
        - cs
        - ca
        - sk
        - pt
        - lv
        - ro
        - bg
        - hu
      example: fr
    SidebarPages:
      type: array
      description: |
        List of features the user can access from the sidebar.
      items:
        allOf:
          - $ref: '#/components/schemas/SidebarPagesFeatureEnum'
        type: string
        description: Sidebar page feature name
    Feature:
      allOf:
        - $ref: '#/components/schemas/FeatureEnum'
      type: string
      description: Business feature name
    BusinessId:
      description: Business id
      type: string
      example: 5409c35a97bbc544d8e26737
    accesses:
      description: >
        List of (list of Group ID).


        Accesses of the users for the new groups system, only for
        `GROUP_MANAGER` users.


        See [the Groups and Sections
        description](/guides/api/resources/organizations/groups)
      type: array
      items:
        type: array
        items:
          type: integer
      example:
        - - 1
          - 2
        - - 1
          - 3
    Role:
      description: User role in the application
      type: string
      enum:
        - PROVIDER
        - ORG_ADMIN
        - ORG_MANAGER
        - GROUP_MANAGER
        - BUSINESS_MANAGER
        - PUBLISHER
      example: BUSINESS_MANAGER
    UserProvider:
      description: User provider label
      type: string
      example: partoo
    UserStatus:
      description: User status in the application
      type: string
      enum:
        - active
        - invited
      example: active
    CustomRoleApiId:
      description: >
        Optional API identifier of a custom role to assign to the user. The
        value must match the `api_id` of one of the custom roles available to
        your organization.


        If no custom role is given, users with the role `GROUP_MANAGER` or
        `BUSINESS_MANAGER` will automatically be assigned to the default
        built-in custom role associated with their role.


        For more information about custom roles, see [Managing User Permissions
        with Custom Roles](/guides/api/guides/custom-roles-and-permissions)
      type: string
      example: my_custom_role
    SsoOnly:
      description: >
        Prevent the user from connecting directly from the Partoo connection
        page.


        This field is available for users whose organization has defined an SSO
        configuration.


        This field can be edited by a user with the role `ORG_ADMIN` or
        `PROVIDER`.
      type: boolean
      default: false
    SidebarPagesFeatureEnum:
      enum:
        - bulk_modification
        - diffusion
        - feedback_management
        - messages
        - posts
        - presence_analytics
        - review_analytics
        - review_invite
        - review_management
    FeatureEnum:
      enum:
        - diffusion
        - feedback_management
        - messages
        - posts
        - review_invite
        - review_management
  responses:
    '401':
      description: You are not authenticated
      content:
        application/json:
          schema:
            description: Error that occurs when you are not authenticated
            type: object
            properties:
              errors:
                type: object
                description: The detail of the error encountered
                properties:
                  authentication:
                    type: string
                    default: User not authenticated
    '403':
      description: |
        You are not allowed to perform this action
      content:
        application/json:
          schema:
            description: >
              Error that occurs when you are authenticated but you are trying to
              perform an action you are not allowed to perform
            type: object
            properties:
              errors:
                type: object
                description: The detail of the error encountered
                properties:
                  authorization:
                    type: string
                    default: Operation not allowed
    '404':
      description: Resource does not exist
      content:
        application/json:
          schema:
            description: >-
              Error that occcurs when you are trying to reach a resource that
              does not exist
            type: object
            properties:
              errors:
                type: object
                description: The detail of the error encountered
                properties:
                  json:
                    type: string
                    default: Resource not found
  securitySchemes:
    ApiKeyAuth:
      description: >
        The authentication system on Partoo API is using API Key that should be
        put in the header of the request (the name of the header is `x-APIKey`).
        An api_key is linked to a user. This user's role will give you different
        access level to the API features.
      type: apiKey
      in: header
      name: x-APIKey

````