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

# Read user details

> Getting user data based on passed userId



## OpenAPI

````yaml reference/openapi.json GET /drive/v1/users/{userId}
openapi: 3.1.0
info:
  title: Drive API
  version: 1.0.0
  description: >-
    The Drive API provides comprehensive access to Plugsurfing's charging
    infrastructure network. It enables you to manage users, charging keys,
    search for charging locations, handle payments, and control charging
    sessions.
servers:
  - url: https://{environment}.plugsurfing.com
    variables:
      environment:
        enum:
          - drive-api-stage
        default: drive-api-stage
        description: >-
          API environment - use drive-api-stage for testing and drive-api for
          production
security: []
tags:
  - name: Geosearch
    description: >-
      Search and retrieve detailed information about charging locations and
      stations
  - name: Users
    description: >-
      Manage user accounts including creation, retrieval, updates, and deletion.
      Handles user-specific data and preferences.
  - name: Charging Keys
    description: >-
      Manage physical and virtual charging keys including creation, activation,
      updates, and status management. Essential for user access to charging
      stations.
  - name: Sessions
    description: >-
      Access and manage charging session data including history, status, and
      detailed session information
  - name: Remote Charging
    description: >-
      Control charging sessions remotely including starting and stopping
      sessions, and monitoring session status
  - name: Payment Options
    description: >-
      Manage payment methods and handle transaction processing for charging
      services
  - name: User Groups
    description: Manage user group memberships
  - name: Vouchers
    description: Redeem vouchers
  - name: Charging Key Orders
    description: Handle the ordering and fulfillment process for physical charging keys
  - name: EMP Charging Keys
    description: E-Mobility Provider specific endpoints for managing charging keys
  - name: EMP Geosearch
    description: E-Mobility Provider specific endpoints for location search and information
  - name: EMP Orders
    description: E-Mobility Provider specific endpoints for managing orders
  - name: EMP Sessions
    description: E-Mobility Provider specific endpoints for managing charging sessions
  - name: EMP Fleets
    description: E-Mobility Provider specific endpoints for managing fleets
paths:
  /drive/v1/users/{userId}:
    get:
      tags:
        - Users
      summary: Read user details
      description: Getting user data based on passed userId
      operationId: getUser
      parameters:
        - name: userId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserInfo'
              example:
                id: 6f36dc9b-446f-462b-aae0-95c7636d5c6c
                email: driver@example.com
                language: en
                vatNumber: SE123456789001
                billingAddress:
                  line1: Kungsgatan 1
                  city: Stockholm
                  postalCode: '11143'
                  countryCode: SE
                userGroups: []
        '400':
          description: The provided query parameters, route parameters or body is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidRequestErrorResponse'
              example:
                message: Invalid request payload
                details:
                  - field X is required
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                message: Resource not found
      security:
        - ApiKeyAuth: []
components:
  schemas:
    UserInfo:
      type: object
      required:
        - id
        - hasDebt
      properties:
        id:
          type: string
          description: User identifier
          example: b5d00e95-b998-4a33-9210-84777f4cb4f9
        email:
          type: string
          example: john.smith@plugsurfing.com
          description: User email address.
        vatNumber:
          type: string
          description: VAT number associated with the user.
        billingAddress:
          type: object
          properties:
            name:
              type: string
              example: John Smith
            companyName:
              type: string
              example: MyCompany
            firstName:
              type: string
              example: John
            lastName:
              type: string
              example: Smith
            addressLine1:
              type: string
              example: Charger road 1
            addressLine2:
              type: string
              example: Door 1
            postalCode:
              type: string
              example: '12345'
            city:
              type: string
              example: Berlin
            country:
              type: string
              example: Germany
            billingEmail:
              type: string
              example: invoice@mycompany.com
            additionalInformation:
              type: string
          description: Billing address associated with the user.
        hasDebt:
          type: boolean
          description: >-
            true if any of the sessions payments failed. (Relevant only if
            clearing is done by Plugsurfing)
          example: false
        userGroups:
          type: array
          items:
            $ref: '#/components/schemas/UserGroup'
          description: User groups the user currently belongs to.
      description: User profile details returned by user management endpoints.
    InvalidRequestErrorResponse:
      title: InvalidRequestErrorResponse
      type: object
      required:
        - message
        - fields
      properties:
        message:
          type: string
        fields:
          type: array
          items:
            title: InvalidField
            type: object
            required:
              - name
              - message
              - rejectedValue
            properties:
              name:
                type: string
              message:
                type: string
                example: UserId is not correct
              rejectedValue:
                type: string
    ErrorResponse:
      title: ErrorResponse
      type: object
      properties:
        message:
          type: string
    UserGroup:
      type: object
      required:
        - id
      properties:
        id:
          type: string
          example: aGnOerO87e
          description: Unique identifier of the user group.
        memberSince:
          type: string
          format: date-time
          example: '2023-01-30T10:00:00.111Z'
          description: UTC timestamp when the user joined the group.
      description: Membership information for a user group.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key for authentication

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.