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

# Cluster bijwerken

> Werkt een cluster gedeeltelijk bij. Elk van `name`, `limitKw` (of
`null` om het plafond te verwijderen), `locationIds`, of `status`
(`ACTIVE`/`INACTIVE`) kan worden meegegeven.




## OpenAPI

````yaml api-reference/energy-management/openapi.nl.yaml PATCH /clusters/{clusterId}
openapi: 3.1.0
info:
  title: RiDERgy Energy Management API
  version: '1.0'
  license:
    name: Proprietary
    identifier: LicenseRef-Proprietary
  description: >
    Programmatische aansturing van laadvermogenslimieten voor locaties,

    individuele laadpunten, organisaties en locatie-overschrijdende clusters.


    ## Authenticatie

    Elk endpoint, behalve `GET /health` en `POST /oauth/token`, vereist een

    Bearer-token verkregen via de OAuth 2.0 client_credentials-flow:


    1. Maak OAuth-clientgegevens aan in het RiDERgy dashboard.

    2. Wissel deze in voor een kortlevend toegangstoken via `POST /oauth/token`.

    3. Geef het token door als `Authorization: Bearer <token>` bij elk verzoek.


    Tokens verlopen na 3600 seconden. Je tenant is ingebed in het token en

    kan niet vervalst worden: inloggegevens van de ene tenant hebben geen

    toegang tot een andere.


    Je tenant moet de Energy Management API-functie geactiveerd hebben,

    anders mislukken verzoeken met `403 FEATURE_NOT_ENABLED`. Neem contact op

    met RiDERgy om deze te activeren.


    ## Scopes

    Tokens dragen scopes die bepalen welke endpoints toegankelijk zijn:

    `locations:read`, `locations:write`, `clusters:read`, `clusters:write`,

    `chargers:write`, `org:write`. Verzoeken aan endpoints die een scope

    vereisen die het token niet heeft, mislukken met `403 INSUFFICIENT_SCOPE`.


    ## Prioriteitsmodel

    Locatie- en laadpuntlimieten worden aangestuurd via
    **prioriteits-tijdvensterprofielen**:


    - Prioriteiten lopen van **0 (laagste) tot 10 (hoogste)**, in
    OCPP-stackstijl.

    - Een doel (locatie of laadpuntconnector) kan tot 11 profielen hebben,
      één per prioriteitsniveau, elk met een eigen `[startTime, endTime)`-venster.
    - Op elk moment is het **effectieve limiet** de `limitKw` van het
      profiel met de hoogste prioriteit waarvan het venster momenteel actief is.
    - Als er geen profiel actief is, valt een locatie terug op zijn
    `permanentLimitKw`.

    - Het indienen van een profiel op een prioriteit die al bestaat voor dat
      doel **vervangt** het bestaande profiel.
    - Profielen worden automatisch toegepast en teruggedraaid op hun
      `startTime`/`endTime`. Zodra een profiel is aangemaakt zijn er geen
      verdere API-aanroepen nodig. Profielrecords worden nooit verwijderd, dus
      de geschiedenis blijft opvraagbaar.

    ## Fouten

    Alle fouten delen deze structuur:


    ```json

    {
      "error": {
        "code": "LOCATION_NOT_FOUND",
        "message": "Location 123 was not found for the provided tenant",
        "requestId": "b1f6e6b0-..."
      }
    }

    ```
servers:
  - url: https://api.ridergy.com/v1
    description: Production
security:
  - BearerAuth: []
tags:
  - name: Auth
    description: OAuth 2.0-tokenendpoint voor de client_credentials-grant.
  - name: Health
    description: Ongeauthenticeerde servicecontrole.
  - name: Locations
    description: >-
      Locatieniveau vermogenslimieten en prioriteitsprofielen lezen en
      instellen.
  - name: Chargers
    description: >-
      Individuele laadpuntconnectoren vergrendelen op een vast vermogenslimiet
      voor een tijdvenster.
  - name: Organizations
    description: >-
      Tenant-brede plafondprofielen (alleen geregistreerd, handhaving nog niet
      actief).
  - name: Clusters
    description: >-
      Locaties groeperen onder een gedeeld kW-plafond en schema's op de hele
      groep toepassen.
paths:
  /clusters/{clusterId}:
    patch:
      tags:
        - Clusters
      summary: Update a cluster
      description: |
        Werkt een cluster gedeeltelijk bij. Elk van `name`, `limitKw` (of
        `null` om het plafond te verwijderen), `locationIds`, of `status`
        (`ACTIVE`/`INACTIVE`) kan worden meegegeven.
      operationId: updateCluster
      parameters:
        - $ref: '#/components/parameters/ClusterId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ClusterPatchRequest'
            examples:
              example:
                value:
                  limitKw: 250
      responses:
        '200':
          description: Bijgewerkt cluster
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Cluster'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/FeatureNotEnabled'
        '404':
          $ref: '#/components/responses/ClusterNotFound'
components:
  parameters:
    ClusterId:
      name: clusterId
      description: >-
        De unieke ID van de cluster, geretourneerd bij het aanmaken van de
        cluster.
      in: path
      required: true
      schema:
        type: string
      example: clst_20260612_a1b2c3d4
  schemas:
    ClusterPatchRequest:
      type: object
      properties:
        name:
          type: string
          example: North Campus
        limitKw:
          type:
            - number
            - 'null'
          description: Stel in op `null` om het clusterplafond te verwijderen.
          example: 250
        locationIds:
          type: array
          minItems: 1
          items:
            type: string
        status:
          type: string
          enum:
            - ACTIVE
            - INACTIVE
    Cluster:
      type: object
      properties:
        clusterId:
          type: string
          example: clst_20260612_a1b2c3d4
        tenantUuid:
          type: string
        name:
          type: string
          example: North Campus
        locationIds:
          type: array
          items:
            type: string
          example:
            - '3632155'
            - '3632156'
        limitKw:
          type:
            - number
            - 'null'
          example: 200
        status:
          type: string
          enum:
            - ACTIVE
            - INACTIVE
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: LOCATION_NOT_FOUND
            message:
              type: string
              example: Location 123 was not found for the provided tenant
            requestId:
              type: string
              format: uuid
  responses:
    BadRequest:
      description: Ongeldige request body of doel is inactief
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            invalidBody:
              summary: INVALID_REQUEST_BODY
              value:
                error:
                  code: INVALID_REQUEST_BODY
                  message: limitKw must be a positive number
                  requestId: b1f6e6b0-1234-4abc-9def-000000000000
            targetInactive:
              summary: TARGET_INACTIVE
              value:
                error:
                  code: TARGET_INACTIVE
                  message: Location 123 is not active
                  requestId: b1f6e6b0-1234-4abc-9def-000000000000
    Unauthorized:
      description: Bearer-token ontbreekt, is ongeldig of verlopen
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            unauthorized:
              value:
                error:
                  code: UNAUTHORIZED
                  message: Invalid or expired token
                  requestId: b1f6e6b0-1234-4abc-9def-000000000000
    FeatureNotEnabled:
      description: Tenant heeft de Energy Management API niet geactiveerd
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            featureNotEnabled:
              value:
                error:
                  code: FEATURE_NOT_ENABLED
                  message: >-
                    The Energy Management API is not enabled for your account.
                    Contact RiDERgy to enable this feature.
                  requestId: b1f6e6b0-1234-4abc-9def-000000000000
    ClusterNotFound:
      description: Cluster niet gevonden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            clusterNotFound:
              value:
                error:
                  code: CLUSTER_NOT_FOUND
                  message: Cluster clst_20260612_a1b2c3d4 not found
                  requestId: b1f6e6b0-1234-4abc-9def-000000000000
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >
        OAuth 2.0-toegangstoken verkregen via `POST /oauth/token` met
        client_credentials-grant.

        Tenant en scopes zijn ingebed in de JWT, er zijn geen extra headers
        nodig.

````

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