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

# Get app user by id

> Retrieves an app user by id. Only available to operators with a whitelabel app.



## OpenAPI

````yaml /openapi/integration-api-v2/openapi.yaml get /v2/app-users/{id}
openapi: 3.0.0
info:
  title: Spirii API
  description: Spirii API
  version: 2.10.0
  contact: {}
servers:
  - url: https://api.spirii.com
security: []
tags: []
paths:
  /v2/app-users/{id}:
    get:
      tags:
        - App Users
        - App Users v2
      summary: Get app user by id
      description: >-
        Retrieves an app user by id. Only available to operators with a
        whitelabel app.
      operationId: getAppUserById
      parameters:
        - name: id
          required: true
          in: path
          description: App user id
          schema:
            type: number
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AppUserResponseDTO'
        '400':
          description: Bad Request. An explanation message will be provided.
        '401':
          description: >-
            Unauthorized. The requested operation cannot be performed with the
            current access permissions.
        '403':
          description: >-
            Forbidden. Access is restricted to operators with a whitelabel app,
            or the request is otherwise not permitted.
        '404':
          description: The app user was not found.
        '500':
          description: >-
            An unexpected error occurred on the server while processing the
            request.
      security:
        - Authorization: []
components:
  schemas:
    AppUserResponseDTO:
      type: object
      properties:
        id:
          type: integer
          description: The unique identifier of the app user.
        firstName:
          type: string
          description: The first name of the app user.
        lastName:
          type: string
          description: The last name of the app user.
        email:
          type: string
          description: The email address of the app user.
        phoneNumber:
          type: string
          description: The phone number of the app user.
        whitelabel:
          type: string
          description: The whitelabel the app user belongs to.
        newsletter:
          type: boolean
          description: Indicates whether the app user is subscribed to the newsletter.
        createdAt:
          format: date-time
          type: string
          description: The creation date of the app user.
        whitelabelCompany:
          description: The whitelabel company associated with the app user.
          allOf:
            - $ref: '#/components/schemas/AppUserWhitelabelCompanyDTO'
        company:
          description: The company associated with the app user.
          allOf:
            - $ref: '#/components/schemas/AppUserCompanyDTO'
        operatorId:
          type: integer
          description: The unique identifier of the operator the app user belongs to.
        companyId:
          type: integer
          description: The unique identifier of the company the app user belongs to.
        firebaseUserId:
          type: string
          description: The Firebase user identifier associated with the app user.
        stripeId:
          type: string
          description: The Stripe customer identifier associated with the app user.
        locations:
          description: The locations associated with the app user.
          type: array
          items:
            $ref: '#/components/schemas/AppUserLocationDTO'
        chargeCards:
          description: The charge cards associated with the app user.
          type: array
          items:
            $ref: '#/components/schemas/AppUserChargeCardDTO'
        creditCards:
          description: The credit cards associated with the app user.
          type: array
          items:
            $ref: '#/components/schemas/AppUserCreditCardDTO'
        vouchers:
          description: The vouchers associated with the app user.
          type: array
          items:
            $ref: '#/components/schemas/AppUserVoucherDTO'
      required:
        - id
        - createdAt
    AppUserWhitelabelCompanyDTO:
      type: object
      properties:
        id:
          type: integer
          description: The unique identifier of the whitelabel company.
        name:
          type: string
          description: The name of the whitelabel company.
      required:
        - id
        - name
    AppUserCompanyDTO:
      type: object
      properties:
        id:
          type: integer
          description: The unique identifier of the company.
        crmId:
          type: integer
          description: The CRM identifier of the company.
        name:
          type: string
          description: The name of the company.
      required:
        - id
        - crmId
        - name
    AppUserLocationDTO:
      type: object
      properties:
        locationId:
          type: integer
          description: The unique identifier of the location.
        name:
          type: string
          description: The name of the location.
        streetAddress:
          type: string
          description: The street address of the location.
        zipCode:
          type: string
          description: The zip code of the location.
        city:
          type: string
          description: The city of the location.
        countryId:
          type: integer
          description: The unique identifier of the country.
      required:
        - locationId
    AppUserChargeCardDTO:
      type: object
      properties:
        id:
          type: integer
          description: The unique identifier of the charge card.
        label:
          type: string
          description: The label assigned to the charge card.
        uid:
          type: string
          description: The UID of the charge card.
        crmCustomerId:
          type: integer
          description: The CRM customer identifier associated with the charge card.
        active:
          type: boolean
          description: Indicates whether the charge card is active.
        roamingEnabled:
          type: boolean
          description: Indicates whether roaming is enabled for the charge card.
        comment:
          type: string
          description: A comment associated with the charge card.
        type:
          type: string
          description: The type of the charge card.
        createdAt:
          format: date-time
          type: string
          description: The creation date of the charge card.
      required:
        - id
    AppUserCreditCardDTO:
      type: object
      properties:
        cardId:
          type: string
          description: The unique identifier of the credit card.
        brand:
          type: string
          description: The brand of the credit card, e.g. Visa or Mastercard.
        lastFour:
          type: string
          description: The last four digits of the credit card number.
        expMonth:
          type: integer
          description: The expiration month of the credit card.
        expYear:
          type: integer
          description: The expiration year of the credit card.
        isDefault:
          type: boolean
          description: Indicates whether this is the default credit card.
        lastUsedAt:
          format: date-time
          type: string
          description: The date the credit card was last used.
        createdAt:
          format: date-time
          type: string
          description: The creation date of the credit card.
        setupIntentId:
          type: string
          description: The Stripe setup intent identifier for the credit card.
      required:
        - cardId
    AppUserVoucherDTO:
      type: object
      properties:
        voucherId:
          type: integer
          description: The unique identifier of the voucher.
        createdAt:
          format: date-time
          type: string
          description: The date the voucher was added to the app user.
        groupId:
          type: integer
          description: The unique identifier of the voucher group.
        code:
          type: string
          description: The voucher code.
        maxUsers:
          type: integer
          description: The maximum number of users allowed to redeem the voucher.
        expiresAt:
          format: date-time
          type: string
          description: The expiration date of the voucher.
        notes:
          type: string
          description: Notes associated with the voucher.
        perKwh:
          type: number
          description: The discount per kWh granted by the voucher.
        locations:
          type: object
          description: The locations the voucher is restricted to.
      required:
        - voucherId
  securitySchemes:
    Authorization:
      type: apiKey
      in: header
      name: Authorization
      description: '`Authorization: Bearer <SPIRII_API_KEY>`'

````