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

# Update the user's charging configuration

> Apply mode and/or threshold changes to all of the user's charging
devices in one transaction. Rejects modes outside ``available_modes`` and
thresholds below any device's band minimum (422).



## OpenAPI

````yaml https://app.podero.com/api/partners/v2.0/openapi.json put /api/partners/v2.0/org/{org_id}/users/{user_id}/charging-config
openapi: 3.1.0
info:
  title: Podero Partner API
  version: '2.0'
  description: >-
    This API provides a unified interaction point for Podero's partner
    companies.


    The goal of this API is to give partners easily integratable endpoints that
    don't require extensive software

    development. For this reason, the endpoints focus around user and device
    management, setting of preferences

    and high level device controls.


    While direct control of devices is implemented for special use cases such as
    pause power, we abstract away low level

    direct device steering so developers and partners can focus on delivering
    maximum value to end users.
  termsOfService: https://www.podero.com/terms-and-conditions
servers: []
security: []
paths:
  /api/partners/v2.0/org/{org_id}/users/{user_id}/charging-config:
    put:
      tags:
        - User Charging Config
      summary: Update the user's charging configuration
      description: >-
        Apply mode and/or threshold changes to all of the user's charging

        devices in one transaction. Rejects modes outside ``available_modes``
        and

        thresholds below any device's band minimum (422).
      operationId: >-
        integrations_api_api_v2_organizations_users_charging_config_router_update_charging_config
      parameters:
        - in: path
          name: org_id
          schema:
            description: The organization ID of the user's organization
            format: uuid
            title: Org Id
            type: string
          required: true
          description: The organization ID of the user's organization
        - in: path
          name: user_id
          schema:
            description: The user whose charging configuration to update
            format: uuid
            title: User Id
            type: string
          required: true
          description: The user whose charging configuration to update
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SmartChargingConfigUpdate'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SmartChargingConfigOutput'
      security:
        - OAuth2: []
components:
  schemas:
    SmartChargingConfigUpdate:
      description: |-
        All fields optional — omitted fields are left unchanged. The mode must
        be in ``available_modes`` (``none`` always is); thresholds must satisfy
        every device's hysteresis-band minimum (``min_band_w`` on GET).
      properties:
        smart_charging_mode:
          anyOf:
            - $ref: '#/components/schemas/SmartChargingMode'
            - type: 'null'
        hems_min_export_to_start_w:
          anyOf:
            - maximum: 50000
              minimum: 0
              type: integer
            - type: 'null'
          title: Hems Min Export To Start W
        hems_max_import_before_stopping_w:
          anyOf:
            - maximum: 50000
              minimum: 0
              type: integer
            - type: 'null'
          title: Hems Max Import Before Stopping W
      title: SmartChargingConfigUpdate
      type: object
    SmartChargingConfigOutput:
      properties:
        smart_charging_mode:
          $ref: '#/components/schemas/SmartChargingMode'
        mode_conflict:
          title: Mode Conflict
          type: boolean
        config_divergence:
          title: Config Divergence
          type: boolean
        devices:
          items:
            $ref: '#/components/schemas/DeviceModeOutput'
          title: Devices
          type: array
        available_modes:
          items:
            $ref: '#/components/schemas/ModeAvailabilityOutput'
          title: Available Modes
          type: array
        hems_eligible:
          title: Hems Eligible
          type: boolean
        hems_ineligible_reasons:
          items:
            $ref: '#/components/schemas/ModeReason'
          title: Hems Ineligible Reasons
          type: array
        thresholds:
          anyOf:
            - $ref: '#/components/schemas/ThresholdsOutput'
            - type: 'null'
        health_warning:
          anyOf:
            - $ref: '#/components/schemas/HealthWarningOutput'
            - type: 'null'
        status:
          $ref: '#/components/schemas/SmartChargingStatusOutput'
      required:
        - smart_charging_mode
        - mode_conflict
        - config_divergence
        - devices
        - available_modes
        - hems_eligible
        - hems_ineligible_reasons
        - thresholds
        - health_warning
        - status
      title: SmartChargingConfigOutput
      type: object
    SmartChargingMode:
      description: >-
        User-facing charging mode on the partner-API wire — the projection of
        the

        ``DesiredSteering`` subset ``{NO_STEERING, DAY_AHEAD, HEMS,
        DAY_AHEAD_HEMS}``.


        Only the Day-Ahead + HEMS nibbles are user-selectable here; Intraday and
        Curtailment are

        folded into the same projection (a Day-Ahead+Intraday device still reads
        ``spot``). Use

        ``to_desired_steering`` / ``wire_mode_from_desired`` to cross the
        boundary — never compare a

        ``DesiredSteering`` against one of these directly.
      enum:
        - none
        - spot
        - hems
        - hems_and_spot
      title: SmartChargingMode
      type: string
    DeviceModeOutput:
      properties:
        device_id:
          format: uuid
          title: Device Id
          type: string
        device_type:
          title: Device Type
          type: string
        smart_charging_mode:
          $ref: '#/components/schemas/SmartChargingMode'
        is_primary_actuator:
          title: Is Primary Actuator
          type: boolean
      required:
        - device_id
        - device_type
        - smart_charging_mode
        - is_primary_actuator
      title: DeviceModeOutput
      type: object
    ModeAvailabilityOutput:
      properties:
        mode:
          $ref: '#/components/schemas/SmartChargingMode'
        available:
          title: Available
          type: boolean
        reasons:
          items:
            $ref: '#/components/schemas/ModeReason'
          title: Reasons
          type: array
      required:
        - mode
        - available
        - reasons
      title: ModeAvailabilityOutput
      type: object
    ModeReason:
      description: |-
        Why a mode is unavailable (or HEMS ineligible). Stable wire codes the
        frontend maps to unlock hints — e.g. a locked HEMS row rendering
        "Connect an inverter".
      enum:
        - no_ev
        - no_battery_capacity
        - no_actuator
        - wallbox_not_modulating
        - no_inverter
        - inverter_no_export_data
      title: ModeReason
      type: string
    ThresholdsOutput:
      properties:
        hems_min_export_to_start_w:
          title: Hems Min Export To Start W
          type: integer
        hems_max_import_before_stopping_w:
          title: Hems Max Import Before Stopping W
          type: integer
        min_band_w:
          title: Min Band W
          type: integer
      required:
        - hems_min_export_to_start_w
        - hems_max_import_before_stopping_w
        - min_band_w
      title: ThresholdsOutput
      type: object
    HealthWarningOutput:
      properties:
        code:
          $ref: '#/components/schemas/HealthWarningCode'
        since:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Since
      required:
        - code
        - since
      title: HealthWarningOutput
      type: object
    SmartChargingStatusOutput:
      properties:
        ux_phase:
          $ref: '#/components/schemas/UXPhase'
        mechanism:
          anyOf:
            - $ref: '#/components/schemas/Mechanism'
            - type: 'null'
        charge_power_w:
          anyOf:
            - type: number
            - type: 'null'
          title: Charge Power W
        boost:
          anyOf:
            - $ref: '#/components/schemas/BoostState'
            - type: 'null'
        solar_kwh_today:
          anyOf:
            - type: number
            - type: 'null'
          title: Solar Kwh Today
        as_of:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: As Of
      required:
        - ux_phase
        - mechanism
        - charge_power_w
        - boost
        - solar_kwh_today
        - as_of
      title: SmartChargingStatusOutput
      type: object
    HealthWarningCode:
      enum:
        - inverter_disconnected
        - inverter_data_stale
        - wallbox_disconnected
        - config_divergence
      title: HealthWarningCode
      type: string
    UXPhase:
      description: |-
        User-facing solar-charging phase — a server-side projection of the
        internal 3-state HEMS machine (idle/commitment/active) plus mode and
        eligibility. The internal enum stays untouched.
      enum:
        - 'off'
        - unavailable
        - idle
        - starting
        - active
        - paused
      title: UXPhase
      type: string
    Mechanism:
      description: |-
        Which control path is steering the charge right now. Surfaced as the
        status icon (car vs wallbox), never as a user choice.
      enum:
        - wallbox
        - smartcar
      title: Mechanism
      type: string
    BoostState:
      enum:
        - available
        - requested
        - unavailable
        - ongoing
      title: BoostState
      type: string
  securitySchemes:
    OAuth2:
      type: oauth2
      flows:
        password:
          tokenUrl: /api/partners/v2.0/auth/token
          scopes: {}
        clientCredentials:
          tokenUrl: /api/partners/v2.0/auth/token
          scopes: {}

````