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

# Update an account

> Allows an authenticated API user to manage an account for a specific connection. The only supported update is to set the account as tracked or not tracked. All associated meters will be set to the same isTracked status as the account. Optionally, pass in a parameter updateMeters = false to prevent meter isTracked status from being updated.



## OpenAPI

````yaml /api-reference/openapi-v2-2.json patch /account/{account_id}
openapi: 3.1.0
info:
  title: Nectar API Documentation
  version: 1.0.0 (v1)
  description: >-
    Complete API documentation for v2.2 endpoints to managing companies, sites,
    data, and documents
servers:
  - url: https://external.nectarclimate.com/v2.2
    description: Nectar API Server
security: []
paths:
  /account/{account_id}:
    patch:
      tags:
        - Accounts
      summary: Update an account
      description: >-
        Allows an authenticated API user to manage an account for a specific
        connection. The only supported update is to set the account as tracked
        or not tracked. All associated meters will be set to the same isTracked
        status as the account. Optionally, pass in a parameter updateMeters =
        false to prevent meter isTracked status from being updated.
      operationId: account_partial_update
      parameters:
        - in: path
          name: account_id
          schema:
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedAccountUpdateRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedAccountUpdateRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedAccountUpdateRequest'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Account'
          description: ''
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: ''
        '403':
          description: 'Forbidden: Access to the account is denied.'
        '404':
          description: Account not found.
      security:
        - ExternalAuthentication: []
components:
  schemas:
    PatchedAccountUpdateRequest:
      type: object
      description: Request body for updating a utility account.
      properties:
        isTracked:
          type: boolean
          description: Indicates whether this account is currently being tracked by Nectar.
        updateMeters:
          type: boolean
          default: true
          description: >-
            Indicates whether to update the tracking status of the account's
            meters along with the account status. Defaults to true.
    Account:
      type: object
      description: Serializer for externally available fields of an Account object.
      properties:
        id:
          type: string
          format: uuid
          description: UUID of the account.
        accountNumber:
          type: string
          description: >-
            The actual account number. For utilities without account numbers,
            leave blank.
          maxLength: 200
        meters:
          type: array
          items:
            type: string
            format: uuid
            description: UUID of the meter site usage data entry.
        isTracked:
          type: boolean
          description: >-
            Deprecated boolean alias. UNSET is treated as True for backward
            compatibility.
        trackingStatus:
          allOf:
            - $ref: '#/components/schemas/TrackingStatusEnum'
          description: >-
            User-mutable tracking intent for this account. When set to DISABLED,
            data collection stops and the status field reflects as
            CUSTOMER_NOT_TRACKED. ENABLED resumes data collection. UNSET means
            no tracking decision has been made yet.


            * `ENABLED` - Enabled

            * `DISABLED` - Disabled

            * `UNSET` - Unset
        isDuplicated:
          type: string
        dataCollectionStartDate:
          type:
            - string
            - 'null'
          format: date
          description: >-
            Date when data collection for the account begins. This is the date
            from which Nectar will pull historical data. This field overrides
            the site, company, and connection level dataCollectionStartDate
            fields.
        isCollectingInvoiceData:
          type: boolean
          description: >-
            Indicates whether this account is collecting invoice data. If True,
            Nectar will collect invoice data with a maximum granularity of
            weekly intervals.
        isCollectingSmartMeterData:
          type: boolean
          description: >-
            Indicates whether this account is smart metered. If True, Nectar
            will collect metered data with a maximum granularity of daily
            intervals.
        datasourceTypes:
          type: array
          items:
            type: string
          description: >-
            List of unique datasource types for all meters associated with the
            account.
        lastServiceDate:
          type:
            - string
            - 'null'
          format: date
          description: >-
            The date when the account was closed by the utility (the end date of
            the last meter reading).
      required:
        - id
        - isDuplicated
        - isTracked
        - meters
    ErrorResponse:
      type: object
      description: Serializer for error responses.
      properties:
        detail:
          type: string
        error:
          type: string
    TrackingStatusEnum:
      enum:
        - ENABLED
        - DISABLED
        - UNSET
      type: string
      description: |-
        * `ENABLED` - Enabled
        * `DISABLED` - Disabled
        * `UNSET` - Unset
  securitySchemes:
    ExternalAuthentication:
      type: apiKey
      in: header
      name: X-API-KEY

````