openapi: 3.1.0
x-redocly:
  openapi:
    hideSchemaTitles: true
info:
  title: ev.energy v2 API
  version: '2.0'
  contact:
    email: developers@ev.energy
    url: developers.ev.energy
    name: ev.energy developers
  description: The official API for ev.energy, version 2.
  license:
    name: Proprietary
    url: https://ev.energy
  termsOfService: ''
servers:
  - url: https://api.ev.energy/v2
    description: Live API for both production and sandbox requests.
    x-internal: false
  - description: Staging server for internal testing only.
    url: https://api-staging.ev.energy/v2
    x-internal: true
paths:
  /:
    get:
      summary: API root
      description: Get links to resources accessible in the API.
      operationId: get-root
      responses:
        '200':
          description: Returns a list of all top-level collection URLs in the API.
          content:
            application/json:
              schema:
                type: object
                properties:
                  users:
                    type: string
                    x-stoplight:
                      id: piqg550z09atb
                    format: uri
                  carbon_feeds:
                    type: string
                    format: uri
                  evses:
                    type: string
                    x-stoplight:
                      id: iyvttz4z687mq
                    format: uri
                  evse_models:
                    type: string
                    x-stoplight:
                      id: m8b93d7v2w9ws
                    format: uri
                  evse_makes:
                    type: string
                    x-stoplight:
                      id: zsqv82w659bhk
                    format: uri
                  vehicles:
                    type: string
                    x-stoplight:
                      id: 3uz8wjvh1clf1
                    format: uri
                  vehicle_trims:
                    type: string
                    x-stoplight:
                      id: 6a78vkdpu3hif
                    format: uri
                  vehicle_models:
                    type: string
                    x-stoplight:
                      id: 7zugmoe5598cq
                    format: uri
                  vehicle_makes:
                    type: string
                    x-stoplight:
                      id: 8nvvyecmxba4g
                    format: uri
                  suppliers:
                    type: string
                    x-stoplight:
                      id: fqe6vpzaddotk
                    format: uri
                  tariffs:
                    type: string
                    x-stoplight:
                      id: gij3xoni47t1k
                    format: uri
                  support_tickets:
                    type: string
                    x-stoplight:
                      id: abc123supporttickets
                    format: uri
              examples:
                Example:
                  value:
                    users: https://api.ev.energy/v2/users/
                    carbon_feeds: https://api.ev.energy/v2/carbon_feeds/
                    evses: https://api.ev.energy/v2/evses/
                    evse_models: https://api.ev.energy/v2/evse_models/
                    evse_makes: https://api.ev.energy/v2/evse_makes/
                    vehicles: https://api.ev.energy/v2/vehicles/
                    vehicle_trims: https://api.ev.energy/v2/vehicle_trims/
                    vehicle_models: https://api.ev.energy/v2/vehicle_models/
                    vehicle_makes: https://api.ev.energy/v2/vehicle_makes/
                    suppliers: https://api.ev.energy/v2/suppliers/
                    tariffs: https://api.ev.energy/v2/tariffs/
                    support_tickets: https://api.ev.energy/v2/support_tickets/
          headers:
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
        '400':
          $ref: '#/components/responses/Problem400BadRequestRetrieve'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      security: []
      parameters:
        - $ref: '#/components/parameters/version-2'
      tags:
        - Root
  /users:
    get:
      summary: List users
      tags:
        - Users
      responses:
        '200':
          description: Returns a list of Users.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/User'
                  x-stoplight:
                    id: 6bm90fli1i3fr
          headers:
            Link:
              $ref: '#/components/headers/link'
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
        '400':
          $ref: '#/components/responses/Problem400BadRequestList'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: get-users
      x-stoplight:
        id: mrck1303yto6s
      description: List all the users that the authorization token has access to.
      parameters:
        - $ref: '#/components/parameters/previous'
        - $ref: '#/components/parameters/next'
        - $ref: '#/components/parameters/page_size'
        - $ref: '#/components/parameters/expand-on-user'
        - $ref: '#/components/parameters/version-2'
      security:
        - oauth2:
            - user:read
    post:
      summary: Create user
      tags:
        - Users
      responses:
        '201':
          description: User Created Successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
        '400':
          $ref: '#/components/responses/Problem400BadRequestRetrieve'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '404':
          $ref: '#/components/responses/Problem404NotFound'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: post-users
      x-stoplight:
        id: dco5cz6pz6eok
      security:
        - oauth2:
            - user:write
      description: Create an individual user in the ev.energy system.
      parameters:
        - $ref: '#/components/parameters/version-2'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/User'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/User'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/User'
  /users/{user_id}:
    parameters:
      - $ref: '#/components/parameters/user_id'
    get:
      summary: Retrieve user
      description: Retrieve information about a single, specific user.
      tags:
        - Users
      responses:
        '200':
          description: Returns a single User.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
          headers:
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
        '400':
          $ref: '#/components/responses/Problem400BadRequestRetrieve'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '404':
          $ref: '#/components/responses/Problem404NotFound'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: get-users-user_id
      x-stoplight:
        id: zuqg8zw8rrtri
      parameters:
        - $ref: '#/components/parameters/expand-on-user'
        - $ref: '#/components/parameters/version-2'
      security:
        - oauth2:
            - user:read
    patch:
      summary: Update User
      tags:
        - Users
      responses:
        '200':
          description: User updated successfully.
          headers:
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
        '400':
          $ref: '#/components/responses/Problem400BadRequestRetrieve'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '404':
          $ref: '#/components/responses/Problem404NotFound'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: patch-users-user_id
      x-stoplight:
        id: v7yc1egi1jw92
      security:
        - oauth2:
            - user:write
      description: Update user information.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/User'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/User'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/User'
      parameters:
        - $ref: '#/components/parameters/version-2'
        - $ref: '#/components/parameters/expand-on-user'
  /evses:
    get:
      summary: List EVSEs
      tags:
        - EVSEs
      responses:
        '200':
          description: Returns a list of EVSEs.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/EVSE'
                  x-stoplight:
                    id: axfkh0ulqiwr3
          headers:
            Link:
              $ref: '#/components/headers/link'
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
        '400':
          $ref: '#/components/responses/Problem400BadRequestList'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: get-evses
      x-stoplight:
        id: pngu6u2ytkc25
      parameters:
        - $ref: '#/components/parameters/previous'
        - $ref: '#/components/parameters/next'
        - $ref: '#/components/parameters/page_size'
        - $ref: '#/components/parameters/expand-on-evse'
        - $ref: '#/components/parameters/version-2'
      description: List all the EVSEs that the authorization token has access to.
      security:
        - oauth2:
            - evse:read
  /evses/{evse_id}:
    parameters:
      - $ref: '#/components/parameters/evse_id'
    get:
      summary: Retrieve an EVSE
      tags:
        - EVSEs
      responses:
        '200':
          description: Returns a single EVSE.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EVSE'
              examples:
                Example 1:
                  value:
                    id: evse01HSH04KDEWF6Z4DB2J77J74K5
                    url: >-
                      https://api.ev.energy/v2/evses/evse01HSH04KDEWF6Z4DB2J77J74K5
                    model:
                      id: emod01HS9A004X5TB5JCMHENB5Z446
                      name: EVWC2S22
                      make:
                        id: emak01HS8FRXKJD5JZZ7ZN6W8H21P8
                        name: BG SyncEV
                    user: >-
                      https://api.ev.energy/v2/users/user01HN2NJ9NMRZBXT1H6FT9N7735
          headers:
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
        '400':
          $ref: '#/components/responses/Problem400BadRequestRetrieve'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '404':
          $ref: '#/components/responses/Problem404NotFound'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: get-evses-evse_id
      x-stoplight:
        id: zm120warsiybr
      parameters:
        - $ref: '#/components/parameters/expand-on-evse'
        - $ref: '#/components/parameters/version-2'
      description: Retrieve a single, specific EVSE's details.
      security:
        - oauth2:
            - evse:read
    delete:
      summary: Decommission an EVSE
      tags:
        - EVSEs
      responses:
        '204':
          description: The EVSE has been decommissioned successfully.
          headers:
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '404':
          $ref: '#/components/responses/Problem404NotFound'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: delete-evses-evse_id
      x-stoplight:
        id: 75da2jb8ailj2
      parameters:
        - $ref: '#/components/parameters/version-2'
      description: Decommission the EVSE by disconnecting it from the ev.energy system.
      security:
        - oauth2:
            - evse:write
  /evse_models:
    get:
      summary: List EVSE models
      tags:
        - EVSEs
      responses:
        '200':
          description: Returns a list of EVSE models.
          headers:
            Link:
              $ref: '#/components/headers/link'
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/EVSEModel'
                  x-stoplight:
                    id: lny7aynncni2t
        '400':
          $ref: '#/components/responses/Problem400BadRequestList'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: get-evse_models
      x-stoplight:
        id: 52umqdx3jy4li
      parameters:
        - $ref: '#/components/parameters/previous'
        - $ref: '#/components/parameters/next'
        - $ref: '#/components/parameters/page_size'
        - $ref: '#/components/parameters/expand-on-evsemodel'
        - $ref: '#/components/parameters/version-2'
        - $ref: '#/components/parameters/available_for_user_id'
        - $ref: '#/components/parameters/user'
        - $ref: '#/components/parameters/evse_make_id_q'
      description: List all the EVSE models known by the ev.energy system.
      security:
        - oauth2:
            - evse:read
  /evse_models/{evse_model_id}:
    get:
      summary: Retrieve an EVSE model
      tags:
        - EVSEs
      responses:
        '200':
          description: Return a single EVSE model.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EVSEModel'
          headers:
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
        '400':
          $ref: '#/components/responses/Problem400BadRequestRetrieve'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '404':
          $ref: '#/components/responses/Problem404NotFound'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: get-evse_models-evse_model_id
      parameters:
        - $ref: '#/components/parameters/expand-on-evsemodel'
        - $ref: '#/components/parameters/version-2'
      x-stoplight:
        id: 4pc760wqtq3cv
      description: Retrieve details for a single, specific EVSE model.
      security:
        - oauth2:
            - evse:read
    parameters:
      - $ref: '#/components/parameters/evse_model_id'
  /evse_makes:
    get:
      summary: List EVSE makes
      tags:
        - EVSEs
      responses:
        '200':
          description: Return a list of EVSE Makes.
          headers:
            Link:
              $ref: '#/components/headers/link'
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/EVSEMake'
                  x-stoplight:
                    id: u67ieuuiyc6l2
        '400':
          $ref: '#/components/responses/Problem400BadRequestList'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: get-evse_makes
      x-stoplight:
        id: wuqbbdqmtera4
      parameters:
        - $ref: '#/components/parameters/previous'
        - $ref: '#/components/parameters/next'
        - $ref: '#/components/parameters/page_size'
        - $ref: '#/components/parameters/version-2'
        - $ref: '#/components/parameters/available_for_user_id'
        - $ref: '#/components/parameters/user'
      description: List all the EVSE makes known by the ev.energy system.
      security:
        - oauth2:
            - evse:read
    parameters: []
  /evse_makes/{evse_make_id}:
    parameters:
      - $ref: '#/components/parameters/evse_make_id'
    get:
      summary: Retrieve an EVSE make
      tags:
        - EVSEs
      responses:
        '200':
          description: Return a single EVSE make.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EVSEMake'
          headers:
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
        '400':
          $ref: '#/components/responses/Problem400BadRequestRetrieve'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '404':
          $ref: '#/components/responses/Problem404NotFound'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: get-evse_makes-evse_make_id
      x-stoplight:
        id: m0j2ufnzy0sw8
      parameters:
        - $ref: '#/components/parameters/version-2'
      description: Retrieve details for a single, specific EVSE make.
      security:
        - oauth2:
            - evse:read
  /evses/{evse_id}/status_logs:
    get:
      summary: List status logs for an EVSE
      description: >-
        List the historical status logs for a specific EVSE. Used to find out
        the state of the EVSE at each point it reported in to ev.energy.
      tags:
        - EVSEs
      responses:
        '200':
          description: List all status logs for a specific EVSE, sorted newest first.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/EVSEStatusLog'
                  x-stoplight:
                    id: ze3ms3d7uoae5
          headers:
            Link:
              $ref: '#/components/headers/link-timestamps'
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
        '400':
          $ref: '#/components/responses/Problem400BadRequestList'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '404':
          $ref: '#/components/responses/Problem404NotFound'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: get-evses-evse_id-status_logs
      x-stoplight:
        id: 7s9a7eeb9z92r
      parameters:
        - $ref: '#/components/parameters/previous'
        - $ref: '#/components/parameters/next'
        - $ref: '#/components/parameters/page_size'
        - $ref: '#/components/parameters/sampled_at__gte'
        - $ref: '#/components/parameters/sampled_at__lte'
        - $ref: '#/components/parameters/expand-on-evsestatuslog'
        - $ref: '#/components/parameters/version-2'
      security:
        - oauth2:
            - evse:read
    parameters:
      - $ref: '#/components/parameters/evse_id'
  /evses/{evse_id}/status_logs/{sampled_at}:
    parameters:
      - $ref: '#/components/parameters/evse_id'
      - schema:
          type: string
          format: date-time
        name: sampled_at
        in: path
        required: true
        description: The time the log's data was recorded on the device.
        example: '2024-04-17T09:39:45.984584Z'
    get:
      summary: Retrieve a status log for an EVSE
      description: >-
        An EVSE status log is uniquely identified by the combination of EVSE ID
        and the time it was sampled at.
      tags:
        - EVSEs
      responses:
        '200':
          description: Retrieve a single status log for a specific EVSE.
          headers:
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EVSEStatusLog'
        '400':
          $ref: '#/components/responses/Problem400BadRequestRetrieve'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '404':
          $ref: '#/components/responses/Problem404NotFound'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: get-evses-evse_id-status_logs-timestamp
      x-stoplight:
        id: erbqtx54mlwkf
      parameters:
        - $ref: '#/components/parameters/version-2'
        - $ref: '#/components/parameters/expand-on-evsestatuslog'
      security:
        - oauth2:
            - evse:read
  /evses/{evse_id}/command_logs:
    parameters:
      - $ref: '#/components/parameters/evse_id'
    get:
      summary: List command logs for an EVSE
      description: >-
        List the historical command logs for a specific EVSE. These logs record
        commands that were sent to the EVSE.
      tags:
        - EVSEs
      responses:
        '200':
          description: List all command logs for a specific EVSE, sorted newest first.
          headers:
            Link:
              $ref: '#/components/headers/link-timestamps'
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/EVSECommandLog'
        '400':
          $ref: '#/components/responses/Problem400BadRequestList'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '404':
          $ref: '#/components/responses/Problem404NotFound'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: get-evses-evse_id-command_logs
      parameters:
        - $ref: '#/components/parameters/version-2'
        - $ref: '#/components/parameters/previous'
        - $ref: '#/components/parameters/next'
        - $ref: '#/components/parameters/page_size'
        - $ref: '#/components/parameters/logged_at__gte'
        - $ref: '#/components/parameters/logged_at__lte'
        - $ref: '#/components/parameters/expand-on-evsecommandlog'
      security:
        - oauth2:
            - debug:read
  /evses/{evse_id}/command_logs/{logged_at}:
    parameters:
      - $ref: '#/components/parameters/evse_id'
      - schema:
          type: string
          format: date-time
        name: logged_at
        in: path
        required: true
        description: The time the command was logged.
        example: '2024-04-17T09:39:45.984584Z'
    get:
      summary: Retrieve a command log for an EVSE
      description: >-
        An EVSE command log is uniquely identified by the combination of EVSE ID
        and the time it was logged at.
      tags:
        - EVSEs
      responses:
        '200':
          description: Retrieve a single command log for a specific EVSE.
          headers:
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EVSECommandLog'
        '400':
          $ref: '#/components/responses/Problem400BadRequestRetrieve'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '404':
          $ref: '#/components/responses/Problem404NotFound'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: get-evses-evse_id-command_logs-timestamp
      parameters:
        - $ref: '#/components/parameters/version-2'
        - $ref: '#/components/parameters/expand-on-evsecommandlog'
      security:
        - oauth2:
            - debug:read
  /evse_onboarding:
    get:
      summary: Initiate EVSE onboarding
      tags:
        - EVSEs
      responses:
        '302':
          description: >-
            Have the user's browser follow the redirect to be prompted to
            connect their EVSE to the ev.energy system.


            If a make or model were not provided, the user will first be
            redirected to a screen to select these.
          headers:
            Location:
              schema:
                type: string
              description: >-
                The URL that the users browser will be redirected to in order to
                integrate their EVSE.
        '400':
          $ref: '#/components/responses/Problem400BadRequestRetrieve'
        '404':
          $ref: '#/components/responses/Problem404NotFound'
      operationId: get-evse_onboarding
      description: >-
        Initiate the onboarding process for a new EVSE in your user's browser
        (or an embedded web view in an app).


        If neither `make_id` or `model_id` are passed as query parameters, the
        user will be shown a user interface to pick their EVSE make.
      parameters:
        - $ref: '#/components/parameters/user_id_onboarding'
        - schema:
            type: string
            example: emak01HN2NJQRGDQP0GBE1F7R6PB3D
          in: query
          name: make_id
          description: Specify the make of EVSE to be onboarded.
        - schema:
            type: string
            example: emod01HN2NJHAJJAQD32QJ4QXTDSGW
          in: query
          name: model_id
          description: Specify the model of EVSE to be onboarded.
        - $ref: '#/components/parameters/client_id'
      security: []
      x-stoplight:
        id: zi6b7wsque837
    parameters: []
  /vehicles:
    get:
      summary: List vehicles
      tags:
        - Vehicles
      responses:
        '200':
          description: Return a list of vehicles.
          headers:
            Link:
              $ref: '#/components/headers/link'
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Vehicle'
                  x-stoplight:
                    id: 4nly29njiglwc
        '400':
          $ref: '#/components/responses/Problem400BadRequestList'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: get-vehicles
      x-stoplight:
        id: csulnjfizx1pf
      parameters:
        - $ref: '#/components/parameters/previous'
        - $ref: '#/components/parameters/next'
        - $ref: '#/components/parameters/page_size'
        - $ref: '#/components/parameters/expand-on-vehicle'
        - $ref: '#/components/parameters/version-2'
      description: List all the vehicles that the authorization token has access to.
      security:
        - oauth2:
            - vehicle:read
    post:
      summary: Create unintegrated vehicle
      tags:
        - Vehicles
      responses:
        '201':
          description: Returns the newly created vehicle resource.
          headers:
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Vehicle'
        '400':
          $ref: '#/components/responses/Problem400BadRequestRetrieve'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: post-vehicles
      x-stoplight:
        id: gub8ihc3zsh5s
      description: >-
        If a vehicle cannot be integrated with our system, an "unintegrated"
        vehicle must be created instead to represent it and record important
        details like battery size.


        To add a vehicle that can be integrated, see the [Onboarding
        documentation](docs/howto/onboarding_custom.md).
      security:
        - oauth2:
            - vehicle:write
      parameters:
        - $ref: '#/components/parameters/version-2'
        - $ref: '#/components/parameters/expand'
        - $ref: '#/components/parameters/evenergy-user-required'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VehicleWrite'
  /vehicles/{vehicle_id}:
    parameters:
      - $ref: '#/components/parameters/vehicle_id'
    get:
      summary: Retrieve a vehicle
      tags:
        - Vehicles
      responses:
        '200':
          description: Return a single vehicle.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Vehicle'
          headers:
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
        '400':
          $ref: '#/components/responses/Problem400BadRequestRetrieve'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '404':
          $ref: '#/components/responses/Problem404NotFound'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: get-vehicles-vehicle_id
      x-stoplight:
        id: 5udqn5b8j3x78
      parameters:
        - $ref: '#/components/parameters/expand-on-vehicle'
        - $ref: '#/components/parameters/version-2'
      description: Retrieve a single, specific vehicle's details.
      security:
        - oauth2:
            - vehicle:read
    patch:
      summary: Update a vehicle
      tags:
        - Vehicles
      responses:
        '200':
          description: Vehicle updated successfully.
          headers:
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
          content:
            application/json:
              schema:
                type: object
                $ref: '#/components/schemas/Vehicle'
        '400':
          $ref: '#/components/responses/Problem400BadRequestList'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '404':
          $ref: '#/components/responses/Problem404NotFound'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: patch-vehicles
      x-stoplight:
        id: qstmjneaodeof
      parameters:
        - $ref: '#/components/parameters/expand-on-vehicle'
        - $ref: '#/components/parameters/version-2'
      description: Update a vehicle.
      security:
        - oauth2:
            - vehicle:write
      requestBody:
        description: Details of Vehicle to be updated.
        content:
          application/json:
            schema:
              type: object
              properties:
                maximum_charge_limit_percentage:
                  type: integer
                  x-stoplight:
                    id: hxg1v3auj9dxt
                  minimum: 50
                  maximum: 100
                  description: >-
                    The required target state of charge of the car as a
                    percentage between 50 and 100. The car will not be smart
                    charged above this value.  
    delete:
      summary: Remove a vehicle
      tags:
        - Vehicles
      responses:
        '200':
          description: The vehicle has been deleted.
          headers:
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: integer
              examples:
                Example:
                  value:
                    remaining_car_count: 0
        '204':
          description: Sandbox vehicles are not deleted.
          headers:
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '404':
          $ref: '#/components/responses/Problem404NotFound'
        '405':
          $ref: '#/components/responses/Problem405MethodNotAllowed'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: delete-vehicles
      x-stoplight:
        id: eevo90d9lprq0
      description: Remove a vehicle by disconnecting it from the ev.energy system.
      security:
        - oauth2:
            - vehicle:write
      parameters:
        - $ref: '#/components/parameters/version-2'
  /vehicle_trims:
    get:
      summary: List vehicle trims
      tags:
        - Vehicles
      responses:
        '200':
          description: Return a list of vehicle trims.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/VehicleTrim'
                  x-stoplight:
                    id: 6h5mb4qp50drr
          headers:
            Link:
              $ref: '#/components/headers/link'
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
        '400':
          $ref: '#/components/responses/Problem400BadRequestList'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: get-vehicle_trims
      x-stoplight:
        id: 05uhegqwgl1m8
      parameters:
        - $ref: '#/components/parameters/previous'
        - $ref: '#/components/parameters/next'
        - $ref: '#/components/parameters/page_size'
        - $ref: '#/components/parameters/expand-on-vehicletrim'
        - $ref: '#/components/parameters/version-2'
        - $ref: '#/components/parameters/user'
        - $ref: '#/components/parameters/vehicle_model_id_q'
      description: >-
        List all the vehicle trims known by the ev.energy system.


        Trim refers to a set of features that can be applied to a particular
        model of vehicle: https://en.wikipedia.org/wiki/Car_model#Trim_level.
      security:
        - oauth2:
            - vehicle:read
    post:
      summary: Create a custom vehicle trim
      tags:
        - Vehicles
      responses:
        '201':
          description: Returns the newly created vehicle trim resource.
          headers:
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VehicleTrim'
        '400':
          $ref: '#/components/responses/Problem400BadRequestRetrieve'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: post-vehicle_trims
      x-stoplight:
        id: vehicle-trim-create
      description: |-
        Creates a new trim for the specified model that can be used if
        we are missing a trim. These trims will not be available in the
        list trims api call
      security:
        - oauth2:
            - vehicle:write
      parameters:
        - $ref: '#/components/parameters/version-2'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VehicleTrimCreate'
    parameters: []
  /vehicle_trims/{vehicle_trim_id}:
    get:
      summary: Retrieve a vehicle trim
      tags:
        - Vehicles
      responses:
        '200':
          description: Return a single vehicle trim.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VehicleTrim'
          headers:
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
        '400':
          $ref: '#/components/responses/Problem400BadRequestRetrieve'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '404':
          $ref: '#/components/responses/Problem404NotFound'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: get-vehicle_trims-vehicle_trim_id
      parameters:
        - $ref: '#/components/parameters/expand-on-vehicletrim'
        - $ref: '#/components/parameters/version-2'
      x-stoplight:
        id: hcm6or6p9ioan
      description: >-
        Retrieve details for a single, specific vehicle trim.


        Trim refers to a set of features that can be applied to a particular
        model of vehicle: https://en.wikipedia.org/wiki/Car_model#Trim_level.
      security:
        - oauth2:
            - vehicle:read
    parameters:
      - $ref: '#/components/parameters/vehicle_trim_id'
  /vehicle_models:
    get:
      summary: List vehicle models
      tags:
        - Vehicles
      responses:
        '200':
          description: Return a list of vehicle models.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/VehicleModel'
          headers:
            Link:
              $ref: '#/components/headers/link'
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
        '400':
          $ref: '#/components/responses/Problem400BadRequestList'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: get-vehicle_models
      parameters:
        - $ref: '#/components/parameters/previous'
        - $ref: '#/components/parameters/next'
        - $ref: '#/components/parameters/page_size'
        - $ref: '#/components/parameters/expand-on-vehiclemodel'
        - $ref: '#/components/parameters/version-2'
        - $ref: '#/components/parameters/user'
        - $ref: '#/components/parameters/vehicle_make_id_q'
      x-stoplight:
        id: 1cvmi5z18jlht
      description: List all the vehicle models known by the ev.energy system.
      security:
        - oauth2:
            - vehicle:read
    post:
      summary: Create vehicle model
      tags:
        - Vehicles
      responses:
        '201':
          description: Returns the newly created vehicle model resource.
          headers:
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VehicleModel'
        '400':
          $ref: '#/components/responses/Problem400BadRequestRetrieve'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: post-vehicle_models
      description: >-
        Create a new vehicle model in the ev.energy system.


        Newly created models are hidden by default and must be reviewed before
        becoming visible.
      security:
        - oauth2:
            - vehicle:write
      parameters:
        - $ref: '#/components/parameters/version-2'
        - $ref: '#/components/parameters/user'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VehicleModelWrite'
    parameters: []
  /vehicle_models/{vehicle_model_id}:
    get:
      summary: Retrieve a vehicle model
      tags:
        - Vehicles
      responses:
        '200':
          description: Return a list of vehicle models.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VehicleModel'
          headers:
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
        '400':
          $ref: '#/components/responses/Problem400BadRequestRetrieve'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '404':
          $ref: '#/components/responses/Problem404NotFound'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: get-vehicle_models-vehicle_model_id
      parameters:
        - $ref: '#/components/parameters/expand-on-vehiclemodel'
        - $ref: '#/components/parameters/version-2'
      x-stoplight:
        id: u2h177w6k6ycq
      description: Retrieve details for a single, specific vehicle model.
      security:
        - oauth2:
            - vehicle:read
    parameters:
      - $ref: '#/components/parameters/vehicle_model_id'
  /vehicle_makes:
    get:
      summary: List vehicle makes
      tags:
        - Vehicles
      responses:
        '200':
          description: Return a list of vehicle makes.
          headers:
            Link:
              $ref: '#/components/headers/link'
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/VehicleMake'
                  x-stoplight:
                    id: 49ok8l94w5lvo
        '400':
          $ref: '#/components/responses/Problem400BadRequestList'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: get-vehicle_makes
      x-stoplight:
        id: gqmnps3zlmrdr
      parameters:
        - $ref: '#/components/parameters/previous'
        - $ref: '#/components/parameters/next'
        - $ref: '#/components/parameters/page_size'
        - $ref: '#/components/parameters/version-2'
        - $ref: '#/components/parameters/user'
      description: List all the vehicle makes known by the ev.energy system.
      security:
        - oauth2:
            - vehicle:read
  /vehicle_makes/{vehicle_make_id}:
    parameters:
      - $ref: '#/components/parameters/vehicle_make_id'
    get:
      summary: Retrieve a vehicle make
      description: Retrieve details for a single, specific vehicle make.
      tags:
        - Vehicles
      responses:
        '200':
          description: Return a single vehicle make.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VehicleMake'
          headers:
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
        '400':
          $ref: '#/components/responses/Problem400BadRequestRetrieve'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '404':
          $ref: '#/components/responses/Problem404NotFound'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: get-vehicle_makes-vehicle_make_id
      x-stoplight:
        id: x6c9mut7e621k
      parameters:
        - $ref: '#/components/parameters/version-2'
      security:
        - oauth2:
            - vehicle:read
  /vehicles/{vehicle_id}/status_logs:
    parameters:
      - $ref: '#/components/parameters/vehicle_id'
    get:
      summary: List status logs for a vehicle
      description: >-
        List the historical status logs for a specific Vehicle. Used to find out
        the state of the Vehicle at each point it reported in to ev.energy.
      tags:
        - Vehicles
      responses:
        '200':
          description: >-
            List all the status logs for a specific Vehicle, sorted newest
            first.
          headers:
            Link:
              $ref: '#/components/headers/link-timestamps'
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/VehicleStatusLog'
                  x-stoplight:
                    id: 64u0481t03i7k
        '400':
          $ref: '#/components/responses/Problem400BadRequestList'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '404':
          $ref: '#/components/responses/Problem404NotFound'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: get-vehicles-vehicle_id-status_logs
      x-stoplight:
        id: ic8zuqgghizz1
      parameters:
        - $ref: '#/components/parameters/version-2'
        - $ref: '#/components/parameters/previous'
        - $ref: '#/components/parameters/next'
        - $ref: '#/components/parameters/page_size'
        - $ref: '#/components/parameters/sampled_at__gte'
        - $ref: '#/components/parameters/sampled_at__lte'
        - $ref: '#/components/parameters/expand-on-vehiclestatuslog'
      security:
        - oauth2:
            - vehicle:read
  /vehicles/{vehicle_id}/status_logs/{sampled_at}:
    parameters:
      - $ref: '#/components/parameters/vehicle_id'
      - schema:
          type: string
          format: date-time
        name: sampled_at
        in: path
        required: true
        description: The time the log's data was recorded on the device.
        example: '2024-04-17T09:39:45.984584Z'
    get:
      summary: Retrieve a specific status log for a vehicle
      description: >-
        A single status log for a particular vehicle is uniquely identified by
        the timestamp it was logged at.
      tags:
        - Vehicles
      responses:
        '200':
          description: Returns the Vehicle status logged at a specific time.
          headers:
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VehicleStatusLog'
        '400':
          $ref: '#/components/responses/Problem400BadRequestRetrieve'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '404':
          $ref: '#/components/responses/Problem404NotFound'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: get-vehicles-vehicle_id-status_logs-timestamp
      x-stoplight:
        id: h9fw00e4tvk0o
      parameters:
        - $ref: '#/components/parameters/version-2'
        - $ref: '#/components/parameters/expand-on-vehiclestatuslog'
      security:
        - oauth2:
            - vehicle:read
  /vehicles/{vehicle_id}/error_logs:
    parameters:
      - $ref: '#/components/parameters/vehicle_id'
    get:
      summary: List API error logs for a vehicle
      description: >-
        List the historical API error logs for a specific Vehicle. These logs
        capture errors that occurred when attempting to communicate with the
        vehicle's telematics API.
      tags:
        - Vehicles
      responses:
        '200':
          description: >-
            List all the API error logs for a specific Vehicle, sorted newest
            first.
          headers:
            Link:
              $ref: '#/components/headers/link-timestamps'
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/VehicleAPIErrorLog'
        '400':
          $ref: '#/components/responses/Problem400BadRequestList'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '404':
          $ref: '#/components/responses/Problem404NotFound'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: get-vehicles-vehicle_id-error_logs
      parameters:
        - $ref: '#/components/parameters/version-2'
        - $ref: '#/components/parameters/previous'
        - $ref: '#/components/parameters/next'
        - $ref: '#/components/parameters/page_size'
        - $ref: '#/components/parameters/logged_at__gte'
        - $ref: '#/components/parameters/logged_at__lte'
        - $ref: '#/components/parameters/expand-on-vehicleapierrorlog'
      security:
        - oauth2:
            - vehicle:read
  /vehicles/{vehicle_id}/error_logs/{logged_at}:
    parameters:
      - $ref: '#/components/parameters/vehicle_id'
      - schema:
          type: string
          format: date-time
        name: logged_at
        in: path
        required: true
        description: The time the error was logged.
        example: '2024-04-17T09:39:45.984584Z'
    get:
      summary: Retrieve a specific API error log for a vehicle
      description: >-
        A single API error log for a particular vehicle is uniquely identified
        by the timestamp it was logged at.
      tags:
        - Vehicles
      responses:
        '200':
          description: Returns the Vehicle API error logged at a specific time.
          headers:
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VehicleAPIErrorLog'
        '400':
          $ref: '#/components/responses/Problem400BadRequestRetrieve'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '404':
          $ref: '#/components/responses/Problem404NotFound'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: get-vehicles-vehicle_id-error_logs-timestamp
      parameters:
        - $ref: '#/components/parameters/version-2'
        - $ref: '#/components/parameters/expand-on-vehicleapierrorlog'
      security:
        - oauth2:
            - vehicle:read
  /vehicles/{vehicle_id}/location_logs:
    parameters:
      - $ref: '#/components/parameters/vehicle_id'
    get:
      summary: List location logs for a vehicle
      description: >-
        List the historical location log timestamps for a specific Vehicle.
        Returns metadata about when location data was recorded, without exposing
        the actual location coordinates.
      tags:
        - Vehicles
      responses:
        '200':
          description: >-
            List all the location log timestamps for a specific Vehicle, sorted
            newest first.
          headers:
            Link:
              $ref: '#/components/headers/link-timestamps'
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/VehicleLocationLog'
        '400':
          $ref: '#/components/responses/Problem400BadRequestList'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '404':
          $ref: '#/components/responses/Problem404NotFound'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: get-vehicles-vehicle_id-location_logs
      parameters:
        - $ref: '#/components/parameters/version-2'
        - $ref: '#/components/parameters/previous'
        - $ref: '#/components/parameters/next'
        - $ref: '#/components/parameters/page_size'
        - $ref: '#/components/parameters/sampled_at__gte'
        - $ref: '#/components/parameters/sampled_at__lte'
        - $ref: '#/components/parameters/expand-on-vehiclelocationlog'
      security:
        - oauth2:
            - vehicle:read
  /vehicles/{vehicle_id}/location_logs/{sampled_at}:
    parameters:
      - $ref: '#/components/parameters/vehicle_id'
      - schema:
          type: string
          format: date-time
        name: sampled_at
        in: path
        required: true
        description: The time the location data was sampled from the vehicle.
        example: '2024-04-17T09:39:45.984584Z'
    get:
      summary: Retrieve a specific location log for a vehicle
      description: >-
        A single location log for a particular vehicle is uniquely identified by
        the timestamp it was sampled at. Returns metadata only, without exposing
        the actual location coordinates.
      tags:
        - Vehicles
      responses:
        '200':
          description: Returns the Vehicle location log metadata at a specific time.
          headers:
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VehicleLocationLog'
        '400':
          $ref: '#/components/responses/Problem400BadRequestRetrieve'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '404':
          $ref: '#/components/responses/Problem404NotFound'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: get-vehicles-vehicle_id-location_logs-timestamp
      parameters:
        - $ref: '#/components/parameters/version-2'
        - $ref: '#/components/parameters/expand-on-vehiclelocationlog'
      security:
        - oauth2:
            - vehicle:read
  /vehicles/{vehicle_id}/command_logs:
    parameters:
      - $ref: '#/components/parameters/vehicle_id'
    get:
      summary: List command logs for a vehicle
      description: >-
        List the historical command logs for a specific Vehicle. These logs
        record commands that were sent to the vehicle.
      tags:
        - Vehicles
      responses:
        '200':
          description: >-
            List all the command logs for a specific Vehicle, sorted newest
            first.
          headers:
            Link:
              $ref: '#/components/headers/link-timestamps'
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/VehicleCommandLog'
        '400':
          $ref: '#/components/responses/Problem400BadRequestList'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '404':
          $ref: '#/components/responses/Problem404NotFound'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: get-vehicles-vehicle_id-command_logs
      parameters:
        - $ref: '#/components/parameters/version-2'
        - $ref: '#/components/parameters/previous'
        - $ref: '#/components/parameters/next'
        - $ref: '#/components/parameters/page_size'
        - $ref: '#/components/parameters/logged_at__gte'
        - $ref: '#/components/parameters/logged_at__lte'
        - $ref: '#/components/parameters/expand-on-vehiclecommandlog'
      security:
        - oauth2:
            - debug:read
  /vehicles/{vehicle_id}/command_logs/{logged_at}:
    parameters:
      - $ref: '#/components/parameters/vehicle_id'
      - schema:
          type: string
          format: date-time
        name: logged_at
        in: path
        required: true
        description: The time the command was logged.
        example: '2024-04-17T09:39:45.984584Z'
    get:
      summary: Retrieve a specific command log for a vehicle
      description: >-
        A single command log for a particular vehicle is uniquely identified by
        the timestamp it was logged at.
      tags:
        - Vehicles
      responses:
        '200':
          description: Returns the Vehicle command logged at a specific time.
          headers:
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VehicleCommandLog'
        '400':
          $ref: '#/components/responses/Problem400BadRequestRetrieve'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '404':
          $ref: '#/components/responses/Problem404NotFound'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: get-vehicles-vehicle_id-command_logs-timestamp
      parameters:
        - $ref: '#/components/parameters/version-2'
        - $ref: '#/components/parameters/expand-on-vehiclecommandlog'
      security:
        - oauth2:
            - debug:read
  /vehicle_onboarding:
    get:
      summary: Initiate vehicle onboarding
      tags:
        - Vehicles
      responses:
        '302':
          description: >-
            Have the user's browser follow the redirect to be prompted to
            connect their vehicle to the ev.energy system.


            If a make, model or trim were not provided, the user will first be
            redirect to a screen to select these.
          headers:
            Location:
              schema:
                type: string
              description: >-
                The URL that the users browser will be redirected to in order to
                integrate their Vehicle.
        '400':
          $ref: '#/components/responses/Problem400BadRequestRetrieve'
        '404':
          $ref: '#/components/responses/Problem404NotFound'
      operationId: get-vehicle_onboarding
      x-stoplight:
        id: amq66vgomki32
      description: >-
        Initiate the onboarding process for a new vehicle in your user's browser
        (or an embedded web view in an app).


        If none of `make_id`, `model_id` or `trim_id` are passed as query
        parameters, the user will be shown a user interface to pick their
        vehicle make.
      security: []
      parameters:
        - $ref: '#/components/parameters/user_id_onboarding'
        - schema:
            type: string
            example: vmak01J443798BF893ZHFQVCS0FA23
          in: query
          name: make_id
          description: Specify the make of vehicle to be onboarded.
        - schema:
            type: string
            example: vhcl01HNARS42AVJN9QWQF6J52B7MB
          in: query
          name: model_id
          description: Specify the model of vehicle to be onboarded.
        - schema:
            type: string
            example: vhcl01HNARS42AVJN9QWQF6J52B7MB
          in: query
          name: trim_id
          description: Specify the trim of vehicle to be onboarded.
        - $ref: '#/components/parameters/client_id'
  /suppliers:
    get:
      summary: List suppliers, sorted alphabetically by name.
      tags:
        - Tariffs
      responses:
        '200':
          description: Return a list of Suppliers.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Supplier'
                  x-stoplight:
                    id: qaihcx2d21c14
          headers:
            Link:
              $ref: '#/components/headers/link-pages'
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
        '400':
          $ref: '#/components/responses/Problem400BadRequestList'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '404':
          $ref: '#/components/responses/Problem404NotFound'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: get-suppliers
      x-stoplight:
        id: 4vz4b3x1kz6od
      parameters:
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/page_size'
        - $ref: '#/components/parameters/available_for_user_id'
        - $ref: '#/components/parameters/version-2'
      description: >-
        List all the energy suppliers known by the ev.energy system.


        Use the `available_for_user_id` query parameter to narrow the list to
        only those relevant to a specific user.
      security:
        - oauth2:
            - tariff:read
  /suppliers/{supplier_id}:
    parameters:
      - $ref: '#/components/parameters/supplier_id'
    get:
      summary: Retrieve a supplier
      tags:
        - Tariffs
      responses:
        '200':
          description: Return a single supplier.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Supplier'
          headers:
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
        '400':
          $ref: '#/components/responses/Problem400BadRequestRetrieve'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '404':
          $ref: '#/components/responses/Problem404NotFound'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: get-suppliers-suppler_id
      x-stoplight:
        id: 9snsk3ipmud6c
      parameters:
        - $ref: '#/components/parameters/version-2'
      description: Retrieve details for a single, specific energy supplier.
      security:
        - oauth2:
            - tariff:read
  /tariffs:
    get:
      summary: List tariffs, sorted alphabetically by name.
      tags:
        - Tariffs
      responses:
        '200':
          description: Return a list of Tariffs.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Tariff'
                  x-stoplight:
                    id: 5vmxis01hu63g
          headers:
            Link:
              $ref: '#/components/headers/link-pages'
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
        '400':
          $ref: '#/components/responses/Problem400BadRequestList'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '404':
          $ref: '#/components/responses/Problem404NotFound'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: get-tariffs
      x-stoplight:
        id: b7lyiefeqtik1
      parameters:
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/page_size'
        - $ref: '#/components/parameters/expand-on-tariff'
        - $ref: '#/components/parameters/supplier_id_query'
        - $ref: '#/components/parameters/available_for_user_id'
        - $ref: '#/components/parameters/include_optional_tariff'
        - $ref: '#/components/parameters/version-2'
      description: >-
        List all the energy supplier tariffs known by the ev.energy system.


        Use the `available_for_user_id` query parameter to narrow the list to
        only those relevant to a specific user and `supplier` query parameter to
        list only tariffs for a specific supplier.
      security:
        - oauth2:
            - tariff:read
  /tariffs/{tariff_id}:
    parameters:
      - $ref: '#/components/parameters/tariff_id'
    get:
      summary: Retrieve a tariff
      tags:
        - Tariffs
      responses:
        '200':
          description: Return a single Tariff.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TariffDetail'
          headers:
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
        '400':
          $ref: '#/components/responses/Problem400BadRequestRetrieve'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '404':
          $ref: '#/components/responses/Problem404NotFound'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: get-tariffs-tariff_id
      x-stoplight:
        id: 999jz7rz6ns6l
      parameters:
        - $ref: '#/components/parameters/expand-on-tariff'
        - $ref: '#/components/parameters/available_for_user_id'
        - $ref: '#/components/parameters/version-2'
      description: Retrieve details for a single, specific tariff.
      security:
        - oauth2:
            - tariff:read
  /tariffs/{tariff_id}/prices:
    parameters:
      - $ref: '#/components/parameters/tariff_id'
    get:
      summary: List prices for a tariff
      tags:
        - Tariffs
      responses:
        '200':
          description: Returns a paginated list of prices for the specified tariff.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Price'
          headers:
            Link:
              $ref: '#/components/headers/link-pages'
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
        '400':
          $ref: '#/components/responses/Problem400BadRequestList'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '404':
          $ref: '#/components/responses/Problem404NotFound'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: get-tariff-prices
      x-stoplight:
        id: tariff-prices-list
      parameters:
        - name: started_at__gte
          in: query
          required: false
          schema:
            type: string
            format: date-time
            example: '2024-01-15T10:00:00Z'
          description: Filter for prices starting at or after this datetime (ISO 8601).
        - name: started_at__lte
          in: query
          required: false
          schema:
            type: string
            format: date-time
            example: '2024-01-15T10:00:00Z'
          description: Filter for prices starting at or before this datetime (ISO 8601).
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/page_size'
        - $ref: '#/components/parameters/version-2'
      description: >-
        Returns all prices for the specified tariff. Results are ordered by
        start time (most recent first).


        Use `started_at__gte` and `started_at__lte` to filter by time range.
      security:
        - oauth2:
            - tariff:read
            - tariff:prices:read
  /carbon_feeds:
    get:
      summary: List carbon feeds
      description: >-
        List all carbon feeds visible to the authenticated client. Carbon feeds
        represent sources of carbon intensity data for specific regions or
        grids.
      tags:
        - Carbon
      responses:
        '200':
          description: Returns a list of carbon feeds, sorted by name.
          headers:
            Link:
              $ref: '#/components/headers/link'
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CarbonFeed'
        '400':
          $ref: '#/components/responses/Problem400BadRequestList'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: get-carbon_feeds
      x-stoplight:
        id: carbon-feeds-list
      parameters:
        - $ref: '#/components/parameters/version-2'
        - $ref: '#/components/parameters/previous'
        - $ref: '#/components/parameters/next'
        - $ref: '#/components/parameters/page_size'
      security:
        - oauth2:
            - carbon:read
  /carbon_feeds/{carbon_feed_id}:
    parameters:
      - $ref: '#/components/parameters/carbon_feed_id'
    get:
      summary: Retrieve a carbon feed
      description: >-
        Retrieve a specific carbon feed, representing a source of carbon
        intensity data for a region or grid.
      tags:
        - Carbon
      responses:
        '200':
          description: Returns information about a single carbon feed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CarbonFeed'
          headers:
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
        '400':
          $ref: '#/components/responses/Problem400BadRequestRetrieve'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '404':
          $ref: '#/components/responses/Problem404NotFound'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: get-carbon_feeds-carbon_feed_id
      x-stoplight:
        id: carbon-feed-detail
      parameters:
        - $ref: '#/components/parameters/version-2'
      security:
        - oauth2:
            - carbon:read
  /carbon_feeds/{carbon_feed_id}/carbon_intensities:
    parameters:
      - $ref: '#/components/parameters/carbon_feed_id'
    get:
      summary: List carbon intensity data
      description: >-
        Returns a paginated list of carbon intensity data points for a specific
        carbon feed. Carbon intensity represents the amount of CO2 emissions per
        unit of electricity generated, measured in grams of CO2 per
        kilowatt-hour (gCO2/kWh).


        Use `started_at__gte` and `started_at__lte` to filter by time range.
      tags:
        - Carbon
      responses:
        '200':
          description: >-
            Returns a list of carbon intensity data points, sorted by started_at
            descending.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CarbonIntensities'
          headers:
            Link:
              $ref: '#/components/headers/link'
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
        '400':
          $ref: '#/components/responses/Problem400BadRequestList'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '404':
          $ref: '#/components/responses/Problem404NotFound'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: get-carbon_feeds-carbon_feed_id-carbon_intensities
      x-stoplight:
        id: carbon-intensities-list
      parameters:
        - $ref: '#/components/parameters/version-2'
        - $ref: '#/components/parameters/previous'
        - $ref: '#/components/parameters/next'
        - $ref: '#/components/parameters/page_size'
        - $ref: '#/components/parameters/expand-on-carbonintensity'
        - name: started_at__gte
          in: query
          required: false
          schema:
            type: string
            format: date-time
            example: '2024-01-15T10:00:00Z'
          description: Filter for entries on or after this datetime (ISO 8601).
        - name: started_at__lte
          in: query
          required: false
          schema:
            type: string
            format: date-time
            example: '2024-01-15T12:00:00Z'
          description: Filter for entries on or before this datetime (ISO 8601).
      security:
        - oauth2:
            - carbon:read
  /charging_sub_sessions:
    get:
      summary: List charging sub sessions
      description: List all charging sub sessions visible to the authenticated client.
      tags:
        - Charging Sessions
      responses:
        '200':
          description: Returns a list of charging sub sessions, sorted newest first.
          headers:
            Link:
              $ref: '#/components/headers/link'
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ChargingSubSession'
                  x-stoplight:
                    id: 8n6gh719dm77n
        '400':
          $ref: '#/components/responses/Problem400BadRequestList'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: get-charging_sub_sessions
      x-stoplight:
        id: as0f41l3vhfta
      parameters:
        - $ref: '#/components/parameters/version-2'
        - $ref: '#/components/parameters/previous'
        - $ref: '#/components/parameters/next'
        - $ref: '#/components/parameters/page_size'
        - $ref: '#/components/parameters/expand-on-chargingsubsession'
        - $ref: '#/components/parameters/evse_id_q'
        - $ref: '#/components/parameters/vehicle_id_q'
        - $ref: '#/components/parameters/user_id_q'
        - $ref: '#/components/parameters/energy_delivered_watt_hours__gte'
        - $ref: '#/components/parameters/energy_delivered_watt_hours__lte'
        - $ref: '#/components/parameters/is_finished'
        - $ref: '#/components/parameters/mode'
        - schema:
            type: string
            format: date-time
          in: query
          name: start__gt
          description: Only return sessions that started after the passed date
        - schema:
            type: string
            format: date-time
          in: query
          name: start__lt
          description: Only return sessions that started before the passed date
        - schema:
            type: string
            format: date-time
          in: query
          name: end__gt
          description: Only return sessions that ended after the passed date
        - schema:
            type: string
            format: date-time
          in: query
          name: end__lt
          description: Only return sessions that ended before the passed date
      security:
        - oauth2:
            - charging_session:read
  /charging_sub_sessions/{charging_sub_session_id}:
    parameters:
      - $ref: '#/components/parameters/charging_sub_session_id'
    get:
      summary: Retrieve a charging sub-session
      description: >-
        Retrieve a specific charging sub-session, representing a period of
        charging in a single mode.
      tags:
        - Charging Sessions
      responses:
        '200':
          description: Returns information about a single charging sub-session.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChargingSubSession'
          headers:
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
        '400':
          $ref: '#/components/responses/Problem400BadRequestRetrieve'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '404':
          $ref: '#/components/responses/Problem404NotFound'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: get-charging_sub_sessions-charging_sub_session_id
      x-stoplight:
        id: ctyvufif2x88y
      parameters:
        - $ref: '#/components/parameters/version-2'
        - $ref: '#/components/parameters/expand-on-chargingsubsession'
      security:
        - oauth2:
            - charging_session:read
  /charging_sub_sessions/{charging_sub_session_id}/energy_usage:
    parameters:
      - $ref: '#/components/parameters/charging_sub_session_id'
    get:
      summary: Retrieve periodic energy usage intervals for a charging sub-session
      description: >-
        Retrieve periodic energy usage intervals for a specific charging
        sub-session.


        If you are looking for intervals that cover the whole time energy is
        being delivered (which are therefore of irregular length) use the
        `merge_consecutive_intervals` query parameter.
      tags:
        - Charging Sessions
      responses:
        '200':
          description: >-
            Returns information about a single charging sub-session's energy
            usage.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnergyUsage'
          headers:
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
        '400':
          $ref: '#/components/responses/Problem400BadRequestRetrieve'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '404':
          $ref: '#/components/responses/Problem404NotFound'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: get-charging_sub_sessions-charging_sub_session_id-energy_usage
      parameters:
        - $ref: '#/components/parameters/version-2'
        - $ref: '#/components/parameters/expand-on-chargingsubsession-energyusage'
        - $ref: '#/components/parameters/energy_delivered_watt_hours__gt'
        - schema:
            type: boolean
          in: query
          name: merge_consecutive_intervals
          description: >-
            Request consecutive intervals of energy delivery (and intervals of
            no delivery) to be merged into combined periods of irregular
            length. 
      security:
        - oauth2:
            - charging_session:read
      x-stoplight:
        id: 3tqxztazgw0wx
  /notifications:
    get:
      summary: List notifications
      tags:
        - Notifications
      responses:
        '200':
          description: Retrieve all current notifications.
          headers:
            Link:
              $ref: '#/components/headers/link-pages'
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Notification'
                  x-stoplight:
                    id: sgpimgmbi9chq
              examples:
                Example 1:
                  value:
                    - id: notf67O36PLTFDB57M0E5L33JZLGM0
                      url: >-
                        https://api.ev.energy/notifications/notf67O36PLTFDB57M0E5L33JZLGM0
                      message_id: ERR0123
                      category: ACTIONABLE
                      event_time: '2019-08-24T14:15:22Z'
                      short_text_title: Your car is disconnected
                      short_text_body: We need to reconnect to keep smart charging
                      detail_page_title: Your car is disconnected
                      detail_page_body: >-
                        Your car has been disconnected. This happens when your
                        password is reset.

                        We need you to re-authorise ev.energy to access your
                        account in order for us to keep managing your charging.

                        Blah blah blah.
                      external_link: https://example.com
                      external_button_label: More info
        '400':
          $ref: '#/components/responses/Problem400BadRequestList'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: get-notifications
      x-stoplight:
        id: vnaxbw3axeaof
      parameters:
        - $ref: '#/components/parameters/previous'
        - $ref: '#/components/parameters/next'
        - $ref: '#/components/parameters/page_size'
        - $ref: '#/components/parameters/version-2'
        - $ref: '#/components/parameters/Accept-Language'
      description: |-
        Lists notifications for the user making the request. For each
        notification it returns a category (INFO, ERROR etc) and a title
        (in the user's language) for display in their inbox.
  /notifications/{notification_id}:
    parameters:
      - $ref: '#/components/parameters/notification_id'
    patch:
      summary: Update a notification
      tags:
        - Notifications
      responses:
        '200':
          description: Notification updated successfully.
          headers:
            EVEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
          content:
            application/json:
              schema:
                type: object
                properties:
                  Notification:
                    $ref: '#/components/schemas/Notification'
                    x-stoplight:
                      id: tcaztploz5cwc
        '400':
          $ref: '#/components/responses/Problem400BadRequestCreate'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '404':
          $ref: '#/components/responses/Problem404NotFound'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: patch-notifications-notification_id
      x-stoplight:
        id: 46a8rc0dycg79
      description: Update a notification.
      security:
        - oauth2: []
      requestBody:
        description: Details of Notification to be updated.
        content:
          application/json:
            schema:
              type: object
              properties:
                read_at:
                  type: string
                  x-stoplight:
                    id: 4xirs989l6j1j
                  format: date-time
    get:
      summary: Retrieve a notification
      tags:
        - Notifications
      responses:
        '200':
          description: Retrieve a specific notification.
          headers:
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Notification'
              examples:
                Example 1:
                  value:
                    id: notf67O36PLTFDB57M0E5L33JZLGM0
                    url: >-
                      https://api.ev.energy/notifications/notf67O36PLTFDB57M0E5L33JZLGM0
                    message_id: ERR0123
                    category: ACTIONABLE
                    event_time: '2019-08-24T14:15:22Z'
                    short_text_title: Your car is disconnected
                    short_text_body: We need to reconnect to keep smart charging
                    detail_page_title: Your car is disconnected
                    detail_page_body: >-
                      Your car has been disconnected. This happens when your
                      password is reset.

                      We need you to re-authorise ev.energy to access your
                      account in order for us to keep managing your charging.

                      Blah blah blah.
                    external_link: https://example.com
                    external_button_label: More info
        '400':
          $ref: '#/components/responses/Problem400BadRequestRetrieve'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '404':
          $ref: '#/components/responses/Problem404NotFound'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: get-notifications-notification_id
      x-stoplight:
        id: 0fhv9advpp95h
      parameters:
        - $ref: '#/components/parameters/version-2'
        - $ref: '#/components/parameters/Accept-Language'
      description: |-
        Retrieves the full details of a specified notification. The title,
        short_text and long_text fields will be translated into the user's
        language.
      security:
        - oauth2: []
  /webhook_portal:
    get:
      summary: Retrieve access link for webhook portal
      tags:
        - Webhooks
      responses:
        '200':
          description: Returns a URL that gives access to the Webhook configuration portal.
          content:
            application/json:
              schema:
                type: object
                properties:
                  url:
                    type: string
                    x-stoplight:
                      id: 0m4ei71zy3dj6
                    format: uri
                    example: https://app.svix.com/login#key=xyz
                    readOnly: true
          headers:
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: get-webhook_portal
      x-stoplight:
        id: 3crk5zqey07dn
      description: Generate a one time use link to access the portal to configure webhooks.
      security:
        - oauth2: []
      parameters:
        - $ref: '#/components/parameters/version-2'
      requestBody:
        content: {}
  /solar_arrays:
    get:
      summary: List solar arrays
      responses:
        '200':
          description: Returns a list of solar arrays.
          headers:
            Link:
              $ref: '#/components/headers/link'
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SolarArray'
              examples:
                Example 1:
                  value:
                    - id: solr01JASZTD3T7N39DTZPBJVXNPKP
                      url: >-
                        https://api.ev.energy/v2/solar_arrays/solr01JASZTD3T7N39DTZPBJVXNPKP
                      capacity_watts: 7000
                      inverter: >-
                        https://api.ev.energy/v2/inverters/invtFB08NVS8KADFY6GAQ9C6RMFGUY
                      forecast:
                        solar_watt_hours_until_midnight: 19
                        percent_vehicle_battery_charge_until_midnight: 30
                        last_updated_at: '2024-10-16T11:26:16'
                      user: >-
                        https://api.ev.energy/v2/users/user01HN2NJ9NMRZBXT1H6FT9N7735
        '400':
          $ref: '#/components/responses/Problem400BadRequestList'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: get-solar-arrays
      description: List all the solar arrays that the authorization token has access to.
      parameters:
        - $ref: '#/components/parameters/previous'
        - $ref: '#/components/parameters/next'
        - $ref: '#/components/parameters/page_size'
        - $ref: '#/components/parameters/expand-on-solararray'
        - schema:
            type: string
            example: vhcl01HRFF3SEVSCRAV9B3CHVDFN0H
          in: query
          name: vehicle_id
          description: >-
            When provided, populates the
            `percent_vehicle_battery_charge_until_midnight` field.
      x-stoplight:
        id: tpk4j3ocq91sr
      tags:
        - Solar
      security:
        - oauth2:
            - solar:read
    parameters:
      - $ref: '#/components/parameters/version-2'
      - $ref: '#/components/parameters/Accept-Language'
    post:
      description: |
        Creates a solar array and associates it with the user.
      summary: Create a solar array
      operationId: post-solar-arrays
      parameters: []
      requestBody:
        description: Details of Solar Array to be created.
        content:
          application/json:
            schema:
              type: object
              properties:
                capacity_watts:
                  type: integer
                  x-stoplight:
                    id: s3s2g1rbfco20
                  minimum: 0
      responses:
        '201':
          description: Solar Array created.
          headers:
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
          content:
            application/json:
              schema:
                type: object
                $ref: '#/components/schemas/SolarArray'
              examples:
                Example 1:
                  value:
                    id: solr01JASZTD3T7N39DTZPBJVXNPKP
                    url: >-
                      https://api.ev.energy/solar_arrays/solr01JASZTD3T7N39DTZPBJVXNPKP
                    capacity_watts: 7000
                    inverter: >-
                      https://api.ev.energy/inverters/invtFB08NVS8KADFY6GAQ9C6RMFGUY
                    forecast:
                      solar_watt_hours_until_midnight: 19
                      percent_vehicle_battery_charge_until_midnight: 30
                      last_updated_at: '2024-10-16T11:26:16'
                    user: >-
                      https://api.ev.energy/v2/users/user01HN2NJ9NMRZBXT1H6FT9N7735
        '400':
          $ref: '#/components/responses/Problem400BadRequestCreate'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      tags:
        - Solar
      security:
        - oauth2:
            - solar:write
  /solar_arrays/{solar_array_id}:
    parameters:
      - schema:
          type: string
          example: solr01JASZTD3T7N39DTZPBJVXNPKP
          pattern: solr[A-Z\d]{26}
        name: solar_array_id
        in: path
        required: true
        description: The ID of the specific Solar Array to retrieve or update.
      - $ref: '#/components/parameters/version-2'
      - $ref: '#/components/parameters/Accept-Language'
    get:
      description: Retrieve a single, specific solar array's details.
      operationId: get-solar-arrays-solar_array_id
      summary: Retrieve a solar array
      parameters:
        - $ref: '#/components/parameters/expand-on-solararray'
        - $ref: '#/components/parameters/version-2'
        - schema:
            type: string
            example: vhcl01HRFF3SEVSCRAV9B3CHVDFN0H
          in: query
          name: vehicle_id
          description: >-
            When provided, populates the
            `percent_vehicle_battery_charge_until_midnight` field.
      responses:
        '200':
          description: Returns a single solar array.
          headers:
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
          content:
            application/json:
              schema:
                type: object
                $ref: '#/components/schemas/SolarArray'
              examples:
                Example 1:
                  value:
                    id: solr01JASZTD3T7N39DTZPBJVXNPKP
                    url: >-
                      https://api.ev.energy/solar_arrays/solr01JASZTD3T7N39DTZPBJVXNPKP
                    capacity_watts: 7000
                    inverter: >-
                      https://api.ev.energy/inverters/invtFB08NVS8KADFY6GAQ9C6RMFGUY
                    forecast:
                      solar_watt_hours_until_midnight: 19
                      percent_vehicle_battery_charge_until_midnight: 30
                      last_updated_at: '2024-10-16T11:26:16'
                    user: >-
                      https://api.ev.energy/v2/users/user01HN2NJ9NMRZBXT1H6FT9N7735
        '400':
          $ref: '#/components/responses/Problem400BadRequestRetrieve'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '404':
          $ref: '#/components/responses/Problem404NotFound'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      tags:
        - Solar
      security:
        - oauth2:
            - solar:read
    patch:
      summary: Update a solar array
      tags:
        - Solar
      responses:
        '200':
          description: Solar array updated successfully.
          headers:
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
          content:
            application/json:
              schema:
                type: object
                $ref: '#/components/schemas/SolarArray'
              examples:
                Example 1:
                  value:
                    id: solr01JASZTD3T7N39DTZPBJVXNPKP
                    url: >-
                      https://api.ev.energy/solar_arrays/solr01JASZTD3T7N39DTZPBJVXNPKP
                    capacity_watts: 7000
                    inverter: >-
                      https://api.ev.energy/inverters/invtFB08NVS8KADFY6GAQ9C6RMFGUY
                    forecast:
                      solar_watt_hours_until_midnight: 19
                      percent_vehicle_battery_charge_until_midnight: 30
                      last_updated_at: '2024-10-16T11:26:16'
                    user: >-
                      https://api.ev.energy/v2/users/user01HN2NJ9NMRZBXT1H6FT9N7735
        '400':
          $ref: '#/components/responses/Problem400BadRequestCreate'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '404':
          $ref: '#/components/responses/Problem404NotFound'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: patch-solar_arrays-solar_array_id
      x-stoplight:
        id: sxxgtzkyxd1co
      description: Update a solar array.
      parameters:
        - $ref: '#/components/parameters/expand-on-solararray'
        - $ref: '#/components/parameters/version-2'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                capacity_watts:
                  type: integer
                  x-stoplight:
                    id: 9d1rfl1wrwf3m
                  minimum: 0
            examples:
              Example 1:
                value:
                  capacity_watts: 7000
        description: Details of Solar Array to be updated.
      security:
        - oauth2:
            - solar:write
  /subscriptions:
    get:
      summary: List subscriptions
      responses:
        '200':
          description: Returns a list of subscriptions.
          headers:
            Link:
              $ref: '#/components/headers/link'
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Subscription'
                  x-stoplight:
                    id: 4e8kfc7zy65g7
              examples:
                Example 1:
                  value:
                    - id: subsB1USP6YGD1VPIDJSHTZARUX11M
                      url: >-
                        https://api.ev.energy/subscriptions/subsB1USP6YGD1VPIDJSHTZARUX11M
                      offering: >-
                        https://api.ev.energy/v2/subscription_offerings/suboB1USP6YGD1VPIDJSHTZARUX11M
                      user: >-
                        https://api.ev.energy/v2/user/user01HN2NJ9NMRZBXT1H6FT9N7735
        '400':
          $ref: '#/components/responses/Problem400BadRequestList'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: get-subscriptions
      description: >-
        List all the valid subscriptions that the authorization token has access
        to.
      parameters:
        - $ref: '#/components/parameters/previous'
        - $ref: '#/components/parameters/next'
        - $ref: '#/components/parameters/page_size'
        - $ref: '#/components/parameters/expand-on-subscription'
        - $ref: '#/components/parameters/version-2'
        - $ref: '#/components/parameters/Accept-Language'
      x-stoplight:
        id: 307kfpdkzb4mp
      tags:
        - Subscriptions
      security:
        - oauth2:
            - subscription:read
  /subscription_offerings/{offering_id}:
    get:
      summary: Retrieve a subscription offering
      responses:
        '200':
          description: Returns a single subscription offering.
          headers:
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionOffering'
              examples:
                Example 1:
                  value:
                    id: suboB1USP6YGD1VPIDJSHTZARUX11M
                    url: >-
                      https://api.ev.energy/v2/subscription_offerings/suboB1USP6YGD1VPIDJSHTZARUX11M
                    name: ev.energy Solar Lifetime
        '400':
          $ref: '#/components/responses/Problem400BadRequestList'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '404':
          $ref: '#/components/responses/Problem404NotFound'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: get-subscription-offerings-offering_id
      description: Retrieve a single, specific subscription offering's details.
      parameters:
        - $ref: '#/components/parameters/expand-on-subscription'
        - $ref: '#/components/parameters/version-2'
        - $ref: '#/components/parameters/Accept-Language'
      tags:
        - Subscriptions
      security:
        - oauth2:
            - subscription:read
      x-stoplight:
        id: b78vs8lmbcm38
    parameters:
      - schema:
          type: string
        name: offering_id
        in: path
        required: true
        description: The ID of the specific subscription offering to retrieve
  /support_tickets:
    get:
      summary: List support tickets
      tags:
        - Support Tickets
      responses:
        '200':
          description: Returns a list of support tickets.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SupportTicket'
                  x-stoplight:
                    id: supportticketlistitem
          headers:
            Link:
              $ref: '#/components/headers/link'
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
        '400':
          $ref: '#/components/responses/Problem400BadRequestList'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: get-support_tickets
      x-stoplight:
        id: supportticketlist
      description: >-
        List all support tickets that the authorization token has access to.


        Access control:

        - User-scoped tokens: Returns only tickets belonging to that user

        - Organization-scoped tokens: Returns only tickets belonging to users in
        that organization

        - Tokens with access_all_areas: Returns all tickets including those
        without a user


        Note: Tickets without a user (null user field) are only accessible to
        applications with access_all_areas permission. These tickets represent
        inquiries from channels where a user account may not exist (e.g.,
        pre-signup inquiries, web forms).
      parameters:
        - $ref: '#/components/parameters/previous'
        - $ref: '#/components/parameters/next'
        - $ref: '#/components/parameters/page_size'
        - $ref: '#/components/parameters/version-2'
        - $ref: '#/components/parameters/expand-on-supportticket'
        - schema:
            type: string
          in: query
          name: external_ticket_id
          description: Filter by external ticket ID from support system
        - schema:
            type: string
          in: query
          name: human_verified_category
          description: Filter by human verified category
        - schema:
            type: string
          in: query
          name: human_verified_subcategory
          description: Filter by human verified subcategory
        - schema:
            type: string
          in: query
          name: ai_generated_category
          description: Filter by AI generated category
        - schema:
            type: string
          in: query
          name: ai_generated_subcategory
          description: Filter by AI generated subcategory
        - schema:
            type: boolean
          in: query
          name: human_verified_category__isnull
          description: Filter for tickets with or without human verified category
        - schema:
            type: boolean
          in: query
          name: human_verified_subcategory__isnull
          description: Filter for tickets with or without human verified subcategory
        - schema:
            type: boolean
          in: query
          name: ai_generated_category__isnull
          description: Filter for tickets with or without AI generated category
        - schema:
            type: boolean
          in: query
          name: ai_generated_subcategory__isnull
          description: Filter for tickets with or without AI generated subcategory
        - schema:
            type: string
          in: query
          name: status
          description: Filter by ticket status (e.g., Open, Resolved, Closed)
        - schema:
            type: string
          in: query
          name: status__in
          description: Filter by multiple status values (comma-separated)
        - schema:
            type: string
          in: query
          name: priority
          description: Filter by ticket priority (e.g., Low, Medium, High, Urgent)
        - schema:
            type: string
          in: query
          name: priority__in
          description: Filter by multiple priority values (comma-separated)
        - schema:
            type: boolean
          in: query
          name: priority__isnull
          description: Filter for tickets with or without priority
        - schema:
            type: string
            format: date-time
          in: query
          name: created_at__gte
          description: Filter tickets created on or after this date
        - schema:
            type: string
            format: date-time
          in: query
          name: created_at__lte
          description: Filter tickets created on or before this date
        - schema:
            type: string
          in: query
          name: created_at__range
          description: >-
            Filter tickets created within a date range (comma-separated start
            and end dates)
        - schema:
            type: string
            format: uri
          in: query
          name: user
          description: Filter tickets by a specific user ID
        - schema:
            type: boolean
          in: query
          name: user__isnull
          description: Filter for tickets with or without an associated user
        - schema:
            type: string
          in: query
          name: tags
          description: Filter by tag (checks if the tag exists in the tags array)
        - schema:
            type: string
          in: query
          name: message_type
          description: >-
            Filter by message type (Initial Request, Customer Response, Human
            Agent Response, AI Agent Response)
        - schema:
            type: string
          in: query
          name: message_type__in
          description: Filter by multiple message types (comma-separated)
        - schema:
            type: string
          in: query
          name: source
          description: Filter by ticket source (e.g., Email, Phone, Feedback Widget)
        - schema:
            type: string
          in: query
          name: source__in
          description: Filter by multiple sources (comma-separated)
        - schema:
            type: string
            format: date-time
          in: query
          name: resolved_at__gte
          description: Filter tickets resolved on or after this date
        - schema:
            type: string
            format: date-time
          in: query
          name: resolved_at__lte
          description: Filter tickets resolved on or before this date
        - schema:
            type: string
          in: query
          name: resolved_at__range
          description: >-
            Filter tickets resolved within a date range (comma-separated start
            and end dates)
        - schema:
            type: boolean
          in: query
          name: resolved_at__isnull
          description: Filter for unresolved tickets (true) or resolved tickets (false)
        - schema:
            type: string
            format: date-time
          in: query
          name: ticket_updated_at__gte
          description: Filter tickets updated on or after this date
        - schema:
            type: string
            format: date-time
          in: query
          name: ticket_updated_at__lte
          description: Filter tickets updated on or before this date
        - schema:
            type: string
          in: query
          name: ticket_updated_at__range
          description: >-
            Filter tickets updated within a date range (comma-separated start
            and end dates)
        - schema:
            type: boolean
          in: query
          name: ticket_updated_at__isnull
          description: Filter for tickets with or without an update timestamp
        - schema:
            type: integer
          in: query
          name: position
          description: Filter by message position in the conversation (0 is first message)
        - schema:
            type: integer
          in: query
          name: position__gte
          description: Filter for messages at or after this position
        - schema:
            type: integer
          in: query
          name: position__lte
          description: Filter for messages at or before this position
      security:
        - oauth2:
            - support:read
  /support_tickets/{support_ticket_id}:
    parameters:
      - $ref: '#/components/parameters/support_ticket_id'
    get:
      summary: Retrieve support ticket
      description: >-
        Retrieve information about a single, specific support ticket.


        Access control:

        - User-scoped tokens: Can only access tickets belonging to that user

        - Organization-scoped tokens: Can only access tickets belonging to users
        in that organization

        - Tokens with access_all_areas: Can access all tickets including those
        without a user


        Note: Tickets without a user (null user field) will return 404 for
        tokens without access_all_areas permission.
      tags:
        - Support Tickets
      responses:
        '200':
          description: Returns a single support ticket.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SupportTicket'
          headers:
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
        '400':
          $ref: '#/components/responses/Problem400BadRequestRetrieve'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '404':
          $ref: '#/components/responses/Problem404NotFound'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: get-support_tickets-support_ticket_id
      x-stoplight:
        id: supportticketretrieve
      parameters:
        - $ref: '#/components/parameters/version-2'
        - $ref: '#/components/parameters/expand-on-supportticket'
      security:
        - oauth2:
            - support:read
    patch:
      summary: Update support ticket
      tags:
        - Support Tickets
      responses:
        '200':
          description: Support ticket updated successfully.
          headers:
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SupportTicket'
        '400':
          $ref: '#/components/responses/Problem400BadRequestRetrieve'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '404':
          $ref: '#/components/responses/Problem404NotFound'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: patch-support_tickets-support_ticket_id
      x-stoplight:
        id: supportticketupdate
      security:
        - oauth2:
            - support:write
      description: >-
        Update support ticket categorization.


        Access control follows the same rules as retrieval:

        - User-scoped tokens: Can only update tickets belonging to that user

        - Organization-scoped tokens: Can only update tickets belonging to users
        in that organization

        - Tokens with access_all_areas: Can update all tickets including those
        without a user
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SupportTicket'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/SupportTicket'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/SupportTicket'
      parameters:
        - $ref: '#/components/parameters/version-2'
  /support_tickets/categories:
    get:
      summary: Get support ticket categories
      tags:
        - Support Tickets
      description: Returns all available support ticket categories and subcategories.
      operationId: get-support_tickets-categories
      x-stoplight:
        id: supportticketcategories
      responses:
        '200':
          description: Returns all available categories and subcategories.
          content:
            application/json:
              schema:
                type: object
                properties:
                  categories:
                    type: array
                    description: >-
                      List of all available ticket categories. Each category
                      includes the enum value and its human-readable label.
                    items:
                      type: object
                      required:
                        - value
                        - label
                      properties:
                        value:
                          allOf:
                            - $ref: '#/components/schemas/SupportTicketCategoryEnum'
                          description: >-
                            The enum value (ALL_CAPS format) for programmatic
                            use.
                          example: CHARGER
                        label:
                          type: string
                          description: Human-readable label for display.
                          example: Charger
                  subcategories:
                    type: array
                    description: >-
                      List of all available ticket subcategories. Each
                      subcategory includes the enum value and its human-readable
                      label.
                    items:
                      type: object
                      required:
                        - value
                        - label
                      properties:
                        value:
                          allOf:
                            - $ref: >-
                                #/components/schemas/SupportTicketSubcategoryEnum
                          description: >-
                            The enum value (ALL_CAPS format) for programmatic
                            use.
                          example: HARDWARE_ISSUE
                        label:
                          type: string
                          description: Human-readable label for display.
                          example: Hardware Issue
              examples:
                Example:
                  value:
                    categories:
                      - value: ACCOUNT
                        label: Account
                      - value: CHARGER
                        label: Charger
                      - value: CHARGING_SESSION
                        label: Charging Session
                      - value: MOBILE_APP
                        label: Mobile App
                      - value: OTHER
                        label: Other
                      - value: SOLAR
                        label: Solar
                      - value: USABILITY_UX
                        label: Usability/UX
                      - value: VEHICLE
                        label: Vehicle
                    subcategories:
                      - value: ACCESSIBILITY
                        label: Accessibility
                      - value: HARDWARE_ISSUE
                        label: Hardware Issue
                      - value: APP_CRASH_FREEZE
                        label: App crash / freeze
                      - value: TELEMATICS_ISSUE
                        label: Telematics issue
          headers:
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      parameters:
        - $ref: '#/components/parameters/version-2'
  /support-ticket-stats/sankey:
    get:
      summary: Get support ticket Sankey diagram data
      tags:
        - Support Tickets
      description: >-
        Returns aggregated data for visualizing ticket flow from category to
        subcategory in a Sankey diagram. Only includes tickets with
        human-verified categories.
      operationId: get-support_ticket_stats-sankey
      x-stoplight:
        id: supportticketstats-sankey
      responses:
        '200':
          description: Returns Sankey diagram nodes and links.
          content:
            application/json:
              schema:
                type: object
                properties:
                  nodes:
                    type: array
                    description: >-
                      List of nodes in the Sankey diagram (categories and
                      subcategories).
                    items:
                      type: object
                      required:
                        - id
                        - label
                      properties:
                        id:
                          type: string
                          description: >-
                            Unique identifier for the node (prefixed with
                            'category:' or 'subcategory:').
                          example: category:Charger
                        label:
                          type: string
                          description: Human-readable label for display.
                          example: Charger
                  links:
                    type: array
                    description: List of links between nodes representing ticket flows.
                    items:
                      type: object
                      required:
                        - source
                        - target
                        - value
                      properties:
                        source:
                          type: string
                          description: ID of the source node (category).
                          example: category:Charger
                        target:
                          type: string
                          description: ID of the target node (subcategory).
                          example: subcategory:Hardware Issue
                        value:
                          type: integer
                          description: Number of tickets flowing from source to target.
                          example: 42
              examples:
                Example:
                  value:
                    nodes:
                      - id: category:Charger
                        label: Charger
                      - id: subcategory:Hardware Issue
                        label: Hardware Issue
                    links:
                      - source: category:Charger
                        target: subcategory:Hardware Issue
                        value: 42
          headers:
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      parameters:
        - $ref: '#/components/parameters/version-2'
  /support-ticket-stats/volume:
    get:
      summary: Get support ticket volume time series
      tags:
        - Support Tickets
      description: >-
        Returns time series data showing ticket volume over time. Can be grouped
        by day, week, or month.
      operationId: get-support_ticket_stats-volume
      x-stoplight:
        id: supportticketstats-volume
      responses:
        '200':
          description: Returns time series data for ticket volume.
          content:
            application/json:
              schema:
                type: object
                properties:
                  time_series:
                    type: array
                    description: List of time periods with ticket counts.
                    items:
                      type: object
                      required:
                        - date
                        - count
                      properties:
                        date:
                          type: string
                          format: date
                          description: ISO 8601 date string for the time period.
                          example: '2024-01-15'
                        count:
                          type: integer
                          description: Number of distinct tickets created in this period.
                          example: 23
              examples:
                Example:
                  value:
                    time_series:
                      - date: '2024-01-15'
                        count: 23
                      - date: '2024-01-16'
                        count: 31
                      - date: '2024-01-17'
                        count: 18
          headers:
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      parameters:
        - $ref: '#/components/parameters/version-2'
        - name: group_by
          in: query
          description: Time period to group by (day, week, or month). Defaults to day.
          schema:
            type: string
            enum:
              - day
              - week
              - month
            default: day
  /support-ticket-stats/resolution:
    get:
      summary: Get support ticket resolution metrics
      tags:
        - Support Tickets
      description: >-
        Returns metrics about ticket resolution including resolution rate,
        average and median resolution times.
      operationId: get-support_ticket_stats-resolution
      x-stoplight:
        id: supportticketstats-resolution
      responses:
        '200':
          description: Returns resolution metrics.
          content:
            application/json:
              schema:
                type: object
                required:
                  - resolution_rate
                  - total_resolved
                  - total_unresolved
                properties:
                  resolution_rate:
                    type: number
                    format: float
                    description: Percentage of tickets that have been resolved (0-1).
                    example: 0.85
                  avg_resolution_time_hours:
                    type: number
                    format: float
                    nullable: true
                    description: >-
                      Average time to resolve a ticket in hours. Null if no
                      tickets resolved.
                    example: 24.5
                  median_resolution_time_hours:
                    type: number
                    format: float
                    nullable: true
                    description: >-
                      Median time to resolve a ticket in hours. Null if no
                      tickets resolved.
                    example: 18.2
                  total_resolved:
                    type: integer
                    description: Total number of resolved tickets.
                    example: 170
                  total_unresolved:
                    type: integer
                    description: Total number of unresolved tickets.
                    example: 30
              examples:
                Example:
                  value:
                    resolution_rate: 0.85
                    avg_resolution_time_hours: 24.5
                    median_resolution_time_hours: 18.2
                    total_resolved: 170
                    total_unresolved: 30
          headers:
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      parameters:
        - $ref: '#/components/parameters/version-2'
  /support-ticket-stats/status:
    get:
      summary: Get support ticket status breakdown
      tags:
        - Support Tickets
      description: Returns the distribution of tickets across different status values.
      operationId: get-support_ticket_stats-status
      x-stoplight:
        id: supportticketstats-status
      responses:
        '200':
          description: Returns ticket breakdown by status.
          content:
            application/json:
              schema:
                type: object
                properties:
                  breakdown:
                    type: array
                    description: List of status values with counts and percentages.
                    items:
                      type: object
                      required:
                        - status
                        - count
                        - percentage
                      properties:
                        status:
                          type: string
                          description: Status value.
                          example: open
                        count:
                          type: integer
                          description: Number of distinct tickets with this status.
                          example: 45
                        percentage:
                          type: number
                          format: float
                          description: Percentage of total tickets (0-1).
                          example: 0.45
              examples:
                Example:
                  value:
                    breakdown:
                      - status: open
                        count: 45
                        percentage: 0.45
                      - status: closed
                        count: 55
                        percentage: 0.55
          headers:
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      parameters:
        - $ref: '#/components/parameters/version-2'
  /support-ticket-stats/priority:
    get:
      summary: Get support ticket priority breakdown
      tags:
        - Support Tickets
      description: Returns the distribution of tickets across different priority values.
      operationId: get-support_ticket_stats-priority
      x-stoplight:
        id: supportticketstats-priority
      responses:
        '200':
          description: Returns ticket breakdown by priority.
          content:
            application/json:
              schema:
                type: object
                properties:
                  breakdown:
                    type: array
                    description: List of priority values with counts and percentages.
                    items:
                      type: object
                      required:
                        - priority
                        - count
                        - percentage
                      properties:
                        priority:
                          type: string
                          description: Priority value.
                          example: high
                        count:
                          type: integer
                          description: Number of distinct tickets with this priority.
                          example: 12
                        percentage:
                          type: number
                          format: float
                          description: Percentage of total tickets (0-1).
                          example: 0.12
              examples:
                Example:
                  value:
                    breakdown:
                      - priority: high
                        count: 12
                        percentage: 0.12
                      - priority: medium
                        count: 58
                        percentage: 0.58
                      - priority: low
                        count: 30
                        percentage: 0.3
          headers:
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      parameters:
        - $ref: '#/components/parameters/version-2'
  /support-ticket-stats/source:
    get:
      summary: Get support ticket source breakdown
      tags:
        - Support Tickets
      description: Returns the distribution of tickets across different source values.
      operationId: get-support_ticket_stats-source
      x-stoplight:
        id: supportticketstats-source
      responses:
        '200':
          description: Returns ticket breakdown by source.
          content:
            application/json:
              schema:
                type: object
                properties:
                  breakdown:
                    type: array
                    description: List of source values with counts and percentages.
                    items:
                      type: object
                      required:
                        - source
                        - count
                        - percentage
                      properties:
                        source:
                          type: string
                          description: Source value.
                          example: mobile_app
                        count:
                          type: integer
                          description: Number of distinct tickets from this source.
                          example: 67
                        percentage:
                          type: number
                          format: float
                          description: Percentage of total tickets (0-1).
                          example: 0.67
              examples:
                Example:
                  value:
                    breakdown:
                      - source: mobile_app
                        count: 67
                        percentage: 0.67
                      - source: web
                        count: 33
                        percentage: 0.33
          headers:
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      parameters:
        - $ref: '#/components/parameters/version-2'
  /support-ticket-stats/top-categories:
    get:
      summary: Get top support ticket categories and subcategories
      tags:
        - Support Tickets
      description: >-
        Returns the most common categories and subcategories sorted by ticket
        count. Supports a limit parameter to control the number of results.
      operationId: get-support_ticket_stats-top-categories
      x-stoplight:
        id: supportticketstats-top-categories
      responses:
        '200':
          description: Returns top categories and subcategories.
          content:
            application/json:
              schema:
                type: object
                properties:
                  categories:
                    type: array
                    description: List of most common categories.
                    items:
                      type: object
                      required:
                        - category
                        - count
                        - percentage
                      properties:
                        category:
                          allOf:
                            - $ref: '#/components/schemas/SupportTicketCategoryEnum'
                          description: Category enum value.
                          example: CHARGER
                        count:
                          type: integer
                          description: Number of distinct tickets with this category.
                          example: 145
                        percentage:
                          type: number
                          format: float
                          description: Percentage of total tickets (0-1).
                          example: 0.45
                  subcategories:
                    type: array
                    description: >-
                      List of most common subcategories with their parent
                      category.
                    items:
                      type: object
                      required:
                        - subcategory
                        - category
                        - count
                        - percentage
                      properties:
                        subcategory:
                          allOf:
                            - $ref: >-
                                #/components/schemas/SupportTicketSubcategoryEnum
                          description: Subcategory enum value.
                          example: HARDWARE_ISSUE
                        category:
                          allOf:
                            - $ref: '#/components/schemas/SupportTicketCategoryEnum'
                          description: Parent category enum value.
                          example: CHARGER
                        count:
                          type: integer
                          description: Number of distinct tickets with this subcategory.
                          example: 78
                        percentage:
                          type: number
                          format: float
                          description: Percentage of total tickets (0-1).
                          example: 0.24
              examples:
                Example:
                  value:
                    categories:
                      - category: CHARGER
                        count: 145
                        percentage: 0.45
                      - category: MOBILE_APP
                        count: 89
                        percentage: 0.28
                    subcategories:
                      - subcategory: HARDWARE_ISSUE
                        category: CHARGER
                        count: 78
                        percentage: 0.24
                      - subcategory: APP_CRASH_FREEZE
                        category: MOBILE_APP
                        count: 45
                        percentage: 0.14
          headers:
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      parameters:
        - $ref: '#/components/parameters/version-2'
        - name: limit
          in: query
          description: >-
            Maximum number of categories/subcategories to return. Defaults to
            10.
          schema:
            type: integer
            default: 10
            minimum: 1
  /inverters:
    post:
      summary: Create an Inverter
      responses:
        '201':
          description: Inverter created.
          headers:
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Inverter'
              examples:
                Example 1:
                  value:
                    id: invtFB08NVS8KADFY6GAQ9C6RMFGUY
                    url: >-
                      https://api.ev.energy/inverters/invtFB08NVS8KADFY6GAQ9C6RMFGUY
                    model:
                      id: imodT4J2GW1IOPAA7FRW53R8P4UXCB
                      url: >-
                        https://api.ev.energy/inverters/imodT4J2GW1IOPAA7FRW53R8P4UXCB
                      name: Envoy-R
                      make:
                        id: imakK7XDPL63NNBDQ5DPB6K3TP87JA
                        url: >-
                          https://api.ev.energy/inverter_makes/imakK7XDPL63NNBDQ5DPB6K3TP87JA
                        name: Enphase
                    user: >-
                      https://api.ev.energy/v2/users/user01HN2NJ9NMRZBXT1H6FT9N7735
        '400':
          $ref: '#/components/responses/Problem400BadRequestRetrieve'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '404':
          $ref: '#/components/responses/Problem404NotFound'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: post-inverters
      x-stoplight:
        id: 9yzxd6nrxvgut
      description: Creates an Inverter and associates it with a user's solar array.
      parameters:
        - $ref: '#/components/parameters/version-2'
      security:
        - oauth2:
            - inverter:write
      requestBody:
        content:
          application/json:
            schema:
              type: object
              x-examples:
                Example 1:
                  model: imod7XL7Q5294J6TUZARBQT2D1EOHY
              properties:
                model:
                  type: string
                  format: uri
                  example: >-
                    https://api.ev.energy/v2/inverter_models/imodOTQRGK9OKMPDU63SYGJ9T6FH3A
                user:
                  type: string
                  x-stoplight:
                    id: qzlpz2nlihuaq
                  format: uri
                  example: >-
                    https://api.ev.energy/v2/users/user01HN2NJ9NMRZBXT1H6FT9N7735
            examples:
              Example 1:
                value:
                  model: >-
                    https://api.ev.energy/inverters/imod7XL7Q5294J6TUZARBQT2D1EOHY
        description: Details of the Inverter to be created.
      tags:
        - Solar
    get:
      summary: List inverters
      responses:
        '200':
          description: Returns a list of inverters.
          headers:
            Link:
              $ref: '#/components/headers/link'
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Inverter'
                  x-stoplight:
                    id: 8jmtz3bc7jxzr
              examples:
                Example 1:
                  value:
                    - id: invtFB08NVS8KADFY6GAQ9C6RMFGUY
                      url: >-
                        https://api.ev.energy/inverters/invtFB08NVS8KADFY6GAQ9C6RMFGUY
                      model: >-
                        https://api.ev.energy/inverters/imodT4J2GW1IOPAA7FRW53R8P4UXCB
                      user: >-
                        https://api.ev.energy/v2/users/user01HN2NJ9NMRZBXT1H6FT9N7735
        '400':
          $ref: '#/components/responses/Problem400BadRequestList'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: get-inverters
      x-stoplight:
        id: mdie893qhytv5
      description: List all the inverters that the authorization token has access to.
      security:
        - oauth2:
            - inverter:read
      parameters:
        - $ref: '#/components/parameters/version-2'
        - $ref: '#/components/parameters/previous'
        - $ref: '#/components/parameters/next'
        - $ref: '#/components/parameters/page_size'
        - $ref: '#/components/parameters/expand-on-inverter'
        - $ref: '#/components/parameters/Accept-Language'
      tags:
        - Solar
  /inverters/{inverter_id}:
    parameters:
      - schema:
          type: string
        name: inverter_id
        in: path
        required: true
        description: The ID of the specific Inverter to retrieve or update.
    get:
      summary: Retrieve an inverter
      responses:
        '200':
          description: Returns a single inverter.
          headers:
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Inverter'
              examples:
                Example 1:
                  value:
                    id: invtFB08NVS8KADFY6GAQ9C6RMFGUY
                    url: >-
                      https://api.ev.energy/inverters/invtFB08NVS8KADFY6GAQ9C6RMFGUY
                    model:
                      id: imodT4J2GW1IOPAA7FRW53R8P4UXCB
                      url: >-
                        https://api.ev.energy/inverters/imodT4J2GW1IOPAA7FRW53R8P4UXCB
                      name: Envoy-R
                      make:
                        id: imakK7XDPL63NNBDQ5DPB6K3TP87JA
                        url: >-
                          https://api.ev.energy/inverter_makes/imakK7XDPL63NNBDQ5DPB6K3TP87JA
                        name: Enphase
                    user: >-
                      https://api.ev.energy/v2/users/user01HN2NJ9NMRZBXT1H6FT9N7735
        '400':
          $ref: '#/components/responses/Problem400BadRequestRetrieve'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '404':
          $ref: '#/components/responses/Problem404NotFound'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: get-inverters-inverter_id
      x-stoplight:
        id: z6jxvhr2cajbe
      description: Retrieve a single, specific inverter's details.
      security:
        - oauth2:
            - inverter:read
      parameters:
        - $ref: '#/components/parameters/version-2'
        - $ref: '#/components/parameters/expand-on-inverter'
        - $ref: '#/components/parameters/Accept-Language'
      tags:
        - Solar
  /inverter_makes:
    get:
      summary: List inverter makes
      tags:
        - Solar
      responses:
        '200':
          description: Return a list of Inverter Makes.
          headers:
            Link:
              $ref: '#/components/headers/link'
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/InverterMake'
                  x-stoplight:
                    id: iar1ky0j49av9
              examples:
                Example 1:
                  value:
                    - id: imakK7XDPL63NNBDQ5DPB6K3TP87JA
                      url: >-
                        https://api.ev.energy/inverter_makes/imakK7XDPL63NNBDQ5DPB6K3TP87JA
                      name: Enphase
        '400':
          $ref: '#/components/responses/Problem400BadRequestList'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: get-inverter_makes
      x-stoplight:
        id: qdrb6vonhncm4
      description: List all the inverter makes known by the ev.energy system.
      security:
        - oauth2:
            - inverter:read
      parameters:
        - $ref: '#/components/parameters/version-2'
        - $ref: '#/components/parameters/previous'
        - $ref: '#/components/parameters/next'
        - $ref: '#/components/parameters/page_size'
        - $ref: '#/components/parameters/available_for_user_id'
        - $ref: '#/components/parameters/Accept-Language'
  /inverter_makes/{inverter_make_id}:
    parameters:
      - schema:
          type: string
        name: inverter_make_id
        in: path
        required: true
        description: The ID of the specific inverter make to retrieve.
    get:
      summary: Retrieve an inverter make
      tags:
        - Solar
      responses:
        '200':
          description: Return a single inverter make.
          headers:
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InverterMake'
              examples:
                Example 1:
                  value:
                    id: imakK7XDPL63NNBDQ5DPB6K3TP87JA
                    url: >-
                      https://api.ev.energy/inverter_makes/imakK7XDPL63NNBDQ5DPB6K3TP87JA
                    name: Enphase
        '400':
          $ref: '#/components/responses/Problem400BadRequestRetrieve'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem404NotFound'
        '404':
          $ref: '#/components/responses/Problem404NotFound'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: get-inverter_makes-inverter_make_id
      x-stoplight:
        id: gh57p6epkcixf
      description: Retrieve details for a single, specific EVSE make.
      security:
        - oauth2:
            - inverter:read
      parameters:
        - $ref: '#/components/parameters/version-2'
        - $ref: '#/components/parameters/Accept-Language'
  /inverter_models:
    get:
      summary: List inverter models
      tags:
        - Solar
      responses:
        '200':
          description: Returns a list of inverter models.
          headers:
            Link:
              $ref: '#/components/headers/link'
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/InverterModel'
                  x-stoplight:
                    id: nul1aq3tkhqgb
              examples:
                Example 1:
                  value:
                    - id: imodT4J2GW1IOPAA7FRW53R8P4UXCB
                      url: >-
                        https://api.ev.energy/inverters/imodT4J2GW1IOPAA7FRW53R8P4UXCB
                      name: Envoy-R
                      make: >-
                        https://api.ev.energy/inverter_makes/imakK7XDPL63NNBDQ5DPB6K3TP87JA
        '400':
          $ref: '#/components/responses/Problem400BadRequestList'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: get-inverter_models
      x-stoplight:
        id: 0lu8yszag2i3h
      description: List all the inverter models known by the ev.energy system.
      security:
        - oauth2:
            - inverter:read
      parameters:
        - $ref: '#/components/parameters/version-2'
        - $ref: '#/components/parameters/previous'
        - $ref: '#/components/parameters/next'
        - $ref: '#/components/parameters/page_size'
        - $ref: '#/components/parameters/expand-on-invertermodel'
        - $ref: '#/components/parameters/Accept-Language'
        - $ref: '#/components/parameters/inverter_make_id_q'
  /inverter_models/{inverter_model_id}:
    parameters:
      - schema:
          type: string
        name: inverter_model_id
        in: path
        required: true
        description: The ID of the specific inverter model to retrieve.
    get:
      summary: Retrieve an inverter model
      tags:
        - Solar
      responses:
        '200':
          description: Return a single inverter model.
          headers:
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InverterModel'
              examples:
                Example 1:
                  value:
                    id: imodT4J2GW1IOPAA7FRW53R8P4UXCB
                    url: >-
                      https://api.ev.energy/inverters/imodT4J2GW1IOPAA7FRW53R8P4UXCB
                    name: Envoy-R
                    make:
                      id: imakK7XDPL63NNBDQ5DPB6K3TP87JA
                      url: >-
                        https://api.ev.energy/inverter_makes/imakK7XDPL63NNBDQ5DPB6K3TP87JA
                      name: Enphase
        '400':
          $ref: '#/components/responses/Problem400BadRequestRetrieve'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '404':
          $ref: '#/components/responses/Problem404NotFound'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: get-inverter_models-inverter_model_id
      x-stoplight:
        id: 6h2mil1asmv3h
      description: Retrieve details for a single, specific inverter model.
      security:
        - oauth2:
            - inverter:read
      parameters:
        - $ref: '#/components/parameters/version-2'
        - $ref: '#/components/parameters/expand-on-invertermodel'
        - $ref: '#/components/parameters/Accept-Language'
  /inverter_onboarding:
    get:
      summary: Allows a user to authenticate with their inverter account.
      tags:
        - Solar
      responses:
        '302':
          description: Found
        '400':
          description: Bad Request
        '404':
          description: Not Found
      operationId: get-inverter_onboarding
      x-stoplight:
        id: xbn2uk0x7k9a4
      parameters:
        - $ref: '#/components/parameters/version-2'
        - $ref: '#/components/parameters/Accept-Language'
        - $ref: '#/components/parameters/user_id_onboarding'
        - schema:
            type: string
          in: query
          name: make_id
          description: The make ID for the inverter that is going to be onboarded.
        - schema:
            type: string
          in: query
          name: inverter_id
          description: The ID for the inverter that is going to be onboarded.
        - $ref: '#/components/parameters/client_id'
      description: >-
        This endpoint will redirect to a web page that a user can use to login
        into their inverter account.


        This should be visited in a web browser as it contains interactive UI
        elements.
  /rebate_types:
    get:
      summary: List Rebate Types
      tags:
        - Rebates
      responses:
        '200':
          description: Return a list of rebate types.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/RebateType'
                  x-stoplight:
                    id: rg8zeokm2wzxz
              examples:
                Example 1:
                  value:
                    - $ref: '#/components/examples/RebateType'
          headers:
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
        '400':
          $ref: '#/components/responses/Problem400BadRequestRetrieve'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '404':
          $ref: '#/components/responses/Problem404NotFound'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: get-rebate_types
      x-stoplight:
        id: itg8hit4bnwzt
      x-internal: true
      description: Retrieve a list of rebate types available to the user.
      parameters:
        - $ref: '#/components/parameters/version-2'
        - $ref: '#/components/parameters/expand-on-rebatetype'
  /rebate_types/{rebate_type_id}:
    parameters:
      - schema:
          type: string
          example: rbttB1USP6YGD1VPIDJSHTZARUX11M
          pattern: rbtt[A-Z\d]{26}
        name: rebate_type_id
        in: path
        required: true
        description: ID of the requested rebate type
    get:
      summary: Retrieve rebate type
      tags:
        - Rebates
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                $ref: '#/components/schemas/RebateType'
              examples:
                Example 1:
                  $ref: '#/components/examples/RebateType'
          headers:
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
        '400':
          $ref: '#/components/responses/Problem400BadRequestRetrieve'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '404':
          $ref: '#/components/responses/Problem404NotFound'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: get-rebate_types-rebate_type_id
      x-stoplight:
        id: 8za8grbq36ka8
      x-internal: true
      description: Retrieve a specific rebate type by id.
      parameters:
        - $ref: '#/components/parameters/version-2'
        - $ref: '#/components/parameters/Accept-Language'
        - $ref: '#/components/parameters/expand-on-rebatetype'
  /rebate_evidence_types:
    get:
      summary: List Rebate Evidence Types
      tags:
        - Rebates
      responses:
        '200':
          description: Return a list of rebate evidence types.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/RebateEvidenceType'
          headers:
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
        '400':
          $ref: '#/components/responses/Problem400BadRequestRetrieve'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '404':
          $ref: '#/components/responses/Problem404NotFound'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: get-rebate_evidence_types
      description: Retrieve a list of rebate types available to the user.
      parameters:
        - $ref: '#/components/parameters/version-2'
  /rebate_evidence_types/{rebate_evidence_type_id}:
    parameters:
      - schema:
          type: string
          example: rbetB1USP6YGD1VPIDJSHTZARUX11M
          pattern: rbet[A-Z\d]{26}
        name: rebate_evidence_type_id
        in: path
        required: true
        description: ID of the requested rebate evidence type
    get:
      summary: Retrieve rebate evidence type
      tags:
        - Rebates
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                $ref: '#/components/schemas/RebateEvidenceType'
          headers:
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
        '400':
          $ref: '#/components/responses/Problem400BadRequestRetrieve'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '404':
          $ref: '#/components/responses/Problem404NotFound'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: get-rebate_types-rebate_evidence_type_id
      x-internal: true
      description: Retrieve a specific rebate evidence type by id.
      parameters:
        - $ref: '#/components/parameters/version-2'
        - $ref: '#/components/parameters/Accept-Language'
  /user_rebates:
    post:
      summary: Create rebate application
      tags:
        - Rebates
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserRebateCreated'
              examples:
                Example 1:
                  value:
                    id: rbtuB1USP6YGD1VPIDJSHTZARUX11M
                    url: >-
                      https://api.ev.energy/v2/user_rebates/rbtuB1USP6YGD1VPIDJSHTZARUX11M
          headers:
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
        '400':
          $ref: '#/components/responses/Problem400BadRequestRetrieve'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: post-rebates
      x-stoplight:
        id: 0nsnnnxgrdr4g
      x-internal: true
      description: Creates a rebate application, returning the application ID.
      parameters:
        - $ref: '#/components/parameters/version-2'
        - $ref: '#/components/parameters/user'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - rebate_type
              properties:
                rebate_type:
                  type: string
                  description: Rebate type resource uri
                  example: >-
                    https://api.ev.energy/v2/rebate_types/rbttB1USP6YGD1VPIDJSHTZARUX11M
    get:
      summary: List rebate applications
      tags:
        - Rebates
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/UserRebate'
                  x-stoplight:
                    id: hb2ivpcl3r0bl
              examples:
                Example 1:
                  value:
                    - $ref: '#/components/examples/UserRebate'
          headers:
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
        '400':
          $ref: '#/components/responses/Problem400BadRequestRetrieve'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: get-rebates
      x-stoplight:
        id: kmpavj4t78gdx
      x-internal: true
      description: Lists all a user's rebate applications.
      parameters:
        - $ref: '#/components/parameters/version-2'
        - $ref: '#/components/parameters/expand-on-userrebate'
        - $ref: '#/components/parameters/user'
  /user_rebates/{user_rebate_id}:
    parameters:
      - $ref: '#/components/parameters/user_rebate_id'
    get:
      summary: Retrieve rebate application
      tags:
        - Rebates
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                $ref: '#/components/schemas/UserRebate'
              examples:
                Example 1:
                  value:
                    $ref: '#/components/examples/UserRebate'
        '400':
          $ref: '#/components/responses/Problem400BadRequestRetrieve'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '404':
          $ref: '#/components/responses/Problem404NotFound'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: get-rebates-application_id
      x-stoplight:
        id: cuq86zdvobzef
      description: Retrieve a specific rebate application.
      parameters:
        - $ref: '#/components/parameters/expand-on-userrebate'
        - $ref: '#/components/parameters/version-2'
        - $ref: '#/components/parameters/user'
    patch:
      summary: Update rebate application
      tags:
        - Rebates
      responses:
        '200':
          description: OK
          headers:
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
          content:
            application/json:
              schema:
                type: object
                x-examples:
                  Example 1:
                    id: str
                    url: str
                properties:
                  id:
                    type: string
                    description: uid of the user_rebate
                  url:
                    type: string
                    description: url of the user_rebate
        '400':
          $ref: '#/components/responses/Problem400BadRequestRetrieve'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '404':
          $ref: '#/components/responses/Problem404NotFound'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: patch-user_rebates-application_id
      x-stoplight:
        id: 9gj6nz4nvvipo
      description: Attach evidence to a rebate application.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - rebate_type
                - evidence_type
                - evidence_data
              properties:
                rebate_type:
                  type: string
                  x-stoplight:
                    id: 0b786pl23chla
                  description: Rebate type resource uri
                evidence_type:
                  type: string
                  x-stoplight:
                    id: jy3hg5ihgp1ab
                  description: Rebate evidence type resource uri
                evidence_data:
                  type: array
                  x-stoplight:
                    id: q1adqlx7vcwqk
                  items:
                    x-stoplight:
                      id: flwn94d10rkj9
                    type: object
                    required:
                      - id
                      - value
                    properties:
                      id:
                        type: number
                        x-stoplight:
                          id: uarxmeeu1dhx7
                        description: Rebate evidence supporting data id
                      value:
                        type: string
                        x-stoplight:
                          id: gx4rh98wgmvcp
                        description: Form field value. Should not include currency symbol.
            examples:
              Example 1:
                value:
                  rebate_type: >-
                    https://api.ev.energy/v2/user_rebates/rbtuB1USP6YGD1VPIDJSHTZARUX11M
                  evidence_type: >-
                    https://api.ev.energy/v2/user_rebates/rbetB1USP6YGD1VPIDJSHTZARUX11M
                  evidence_data:
                    - id: 2
                      value: '1000'
        description: ''
      parameters:
        - $ref: '#/components/parameters/expand-on-userrebate'
        - $ref: '#/components/parameters/version-2'
        - $ref: '#/components/parameters/user'
  /user_rebates/{user_rebate_id}:submit:
    parameters:
      - $ref: '#/components/parameters/user_rebate_id'
    post:
      summary: Submit a completed rebate form
      tags:
        - Rebates
      responses:
        '200':
          description: OK
          headers:
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
        '400':
          $ref: '#/components/responses/Problem400BadRequestRetrieve'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '404':
          $ref: '#/components/responses/Problem404NotFound'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: post-user_rebates-application_id-:submit
      x-stoplight:
        id: 1b8kqsf1iwan3
      parameters:
        - $ref: '#/components/parameters/version-2'
        - $ref: '#/components/parameters/user'
      description: >-
        Once all evidence data and files have been uploaded, this endpoint is
        called to submit the rebate application for review by updating the Form
        status to "complete" and the application status to "pending_review". 
  /rebate_evidence_files:start_upload:
    parameters:
      - schema:
          type: string
        in: query
        name: user_rebate
        description: Application ID (uid) of the user_reabte
    post:
      summary: Start a file upload
      tags:
        - Rebates
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: object
                x-examples:
                  Example 1:
                    url: >-
                      https://api.ev.energy/v2/user_rebate_evidence_files/rbef1USP6YGD1VPIDJSHTZARUX11M
                    presigned_url: >-
                      https://cdn.app.ev.energy/evenergy-development-rebates-evidence-files/user_rebates/rbtuB1USP6YGD1VPIDJSHTZARUX11M/test_file-28a71d30552241a989cced058eaff01b.pdf?AWSAccessKeyId=DummyKeyID&Signature=Vq2tiQhuBb1%2FOEdv9fH9eFyMOw8%3D&Expires=1732224132
                properties:
                  id:
                    type: string
                    description: evidence file uid
                    x-stoplight:
                      id: e5ja02jz6029o
                  url:
                    type: string
                    description: evidence file resource url
                  presigned_url:
                    type: string
                    description: >-
                      AWS S3 presigned URL. This URL is required for the client
                      to send direct PUT or GET requests to S3
              examples:
                Example 1:
                  $ref: '#/components/examples/RebateEvidenceUploadStart'
        '400':
          $ref: '#/components/responses/Problem400BadRequestCreate'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: post-rebate-evidence_files:start_upload
      x-stoplight:
        id: w2p4n4qp3zhjq
      description: >-
        This endpoint creates the RebateEvidenceFile record and returns its uid
        as well as a presigned URL to use for direct upload to AWS S3.
      parameters:
        - $ref: '#/components/parameters/version-2'
        - $ref: '#/components/parameters/user'
      requestBody:
        description: Details of the file to be directly uploaded
        content:
          application/json:
            schema:
              type: object
              properties:
                file_name:
                  type: string
                  description: Original file name of the incoming file, with extention.
                rebate_evidence_type:
                  type: string
                  description: Rebate evidence type url
              x-examples:
                Example 1:
                  file_name: wiring_invoice.pdf
                  rebate_evidence_type: >-
                    https://api.ev.energy/v2/rebate_evidence_type/rbefB1USP6YGD1VPIDJSHTZARUX11M
  /rebate_evidence_files/{rebate_evidence_file_id}:finish_upload:
    post:
      summary: Finalize File Upload
      tags:
        - Rebates
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    x-stoplight:
                      id: q5oqhglwem0t3
                    description: Rebate evidence file uid
                  url:
                    type: string
                    x-stoplight:
                      id: xojdsrd07tume
                    description: Rebate evidence file resource url
              x-examples:
                Example 1:
                  id: rbefB1USP6YGD1VPIDJSHTZARUX11M
                  url: >-
                    https://api.ev.energy/v2/rebate_evidence_files/rbefB1USP6YGD1VPIDJSHTZARUX11M
              examples:
                Example 1:
                  value:
                    id: rbefB1USP6YGD1VPIDJSHTZARUX11M
                    url: >-
                      https://api.ev.energy/v2/rebate_evidence_files/rbefB1USP6YGD1VPIDJSHTZARUX11M
        '400':
          $ref: '#/components/responses/Problem400BadRequestCreate'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '404':
          $ref: '#/components/responses/Problem404NotFound'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: post-rebate-evidence_files-evidence_file_id-:finish_upload
      x-stoplight:
        id: meptmbd1xdjkm
      description: >-
        After the file is successfully uploaded to S3 via the presigned URL,
        this endpoint is called to set the upload_finished_at timestamp on the
        evidence_file record. 
      parameters:
        - $ref: '#/components/parameters/version-2'
        - $ref: '#/components/parameters/user'
    parameters:
      - $ref: '#/components/parameters/rebate_evidence_file_id'
  /rebate_evidence_files:
    get:
      summary: List rebate evidence files
      tags:
        - Rebates
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/RebateEvidenceFile'
                  x-stoplight:
                    id: 3j08pz1iwss8k
                readOnly: true
              examples: {}
        '400':
          $ref: '#/components/responses/Problem400BadRequestList'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: get-user_rebates-application_id-evidence_files
      x-stoplight:
        id: mxzbrq78wg0vu
      description: List all user's rebate evidence files
      parameters:
        - $ref: '#/components/parameters/version-2'
        - $ref: '#/components/parameters/expand-on-rebateevidencefile'
        - $ref: '#/components/parameters/user'
    parameters:
      - schema:
          type: string
        in: query
        name: user_rebate
        description: Application ID (uid) of the user_rebate
  /rebate_evidence_files/{rebate_evidence_file_id}:
    parameters:
      - $ref: '#/components/parameters/rebate_evidence_file_id'
    get:
      summary: Retrieve rebate evidence file details
      tags:
        - Rebates
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                $ref: '#/components/schemas/RebateEvidenceFile'
              examples:
                Example 1:
                  $ref: '#/components/examples/RebateEvidenceFile'
        '400':
          $ref: '#/components/responses/Problem400BadRequestRetrieve'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '404':
          $ref: '#/components/responses/Problem404NotFound'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: get-user_rebates-application_id-evidence_files-evidence_file_id
      x-stoplight:
        id: knlusqz6s188x
      description: Retrieve the details of a specific rebate evidence file.
      parameters:
        - $ref: '#/components/parameters/version-2'
        - $ref: '#/components/parameters/expand-on-rebateevidencefile'
        - $ref: '#/components/parameters/user'
  /programs:
    get:
      summary: List programs
      tags:
        - Programs
      responses:
        '200':
          description: Returns 0 or more Programs.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Program'
                  x-stoplight:
                    id: q2wn9ioxgz6zl
          headers:
            Link:
              $ref: '#/components/headers/link'
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
        '400':
          $ref: '#/components/responses/Problem400BadRequestList'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: get-programs
      x-stoplight:
        id: dx2g1jv9i2zyu
      parameters:
        - schema:
            type: string
            pattern: >-
              ^[-+]?([1-8]?\d(\.\d+)?|90(\.0+)?),\s*[-+]?(180(\.0+)?|((1[0-7]\d)|([1-9]?\d))(\.\d+)?)$
            example: 50.896453,-1.4037239
          in: query
          name: coordinates
          description: >-
            Filter the returned programs to only those available to someone who
            primarily charges their vehicles at these coordinates.
        - schema:
            type: string
            example: SW1 1AA
          in: query
          name: postal_code
          description: >-
            Filter the returned programs to only those available to someone
            someone who primarily charges their vehicles in this postal code
            area. The postal code needs to be in the correct format for the
            country specified by `country_code`.
        - schema:
            $ref: '#/components/schemas/CountryCode'
          in: query
          name: country_code
          description: >-
            Specify the country the postal code is within. Required if
            postal_code is used.
        - $ref: '#/components/parameters/version-2'
        - $ref: '#/components/parameters/user'
      description: >
        By default, this endpoint returns all programs in our system and does
        not require authentication. The `coordinates`, `postal_code` and
        `country_code` query parameters can be used to narrow the list down to
        just programs eligible for particular locations. Coordinates and postal
        code searching are mutually exclusive and mixing the query parameters
        will result in a 400 error response.


        If the client is authenticated as a specific user (either via
        Authorisation Code grant type or the `EvEnergy-User` header) it will
        return only programs that user is possibly eligible for, based on the
        location information we have for them.
      security: []
  /programs/{program_id}:
    parameters:
      - $ref: '#/components/parameters/program_id'
    get:
      summary: Retrieve a program
      tags:
        - Programs
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                $ref: '#/components/schemas/Program'
          headers:
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
        '400':
          $ref: '#/components/responses/Problem400BadRequestRetrieve'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '404':
          $ref: '#/components/responses/Problem404NotFound'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: get-programs-program_id
      x-stoplight:
        id: q0ppvanhyxg39
      description: Retrieve details for a single, specific program.
      security: []
      parameters:
        - $ref: '#/components/parameters/version-2'
  /incentive_schemes:
    get:
      summary: List incentive schemes
      tags:
        - Programs
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/IncentiveScheme'
                  x-stoplight:
                    id: 9uxxjiutuuk0i
          headers:
            Link:
              $ref: '#/components/headers/link'
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
        '400':
          $ref: '#/components/responses/Problem400BadRequestList'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: get-incentive_schemes
      x-stoplight:
        id: vul752bjahp3s
      description: >-
        Returns a list of Incentive Schemes that the authenticated User is
        eligble for.
      parameters:
        - $ref: '#/components/parameters/evenergy-user-required'
  /evse_sites:
    get:
      summary: List EVSE Sites
      tags:
        - Sites
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/EVSESite'
                  x-stoplight:
                    id: o3u6wlk49k5ex
                readOnly: true
          headers:
            Link:
              $ref: '#/components/headers/link'
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
        '400':
          $ref: '#/components/responses/Problem400BadRequestList'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: get-evse_sites
      x-stoplight:
        id: pnnzy3vp98k96
      description: List all available EVSE Sites
      parameters:
        - $ref: '#/components/parameters/version-2'
        - $ref: '#/components/parameters/user'
      security:
        - oauth2:
            - site:read
  /evse_sites/{evse_site_id}:
    parameters:
      - $ref: '#/components/parameters/evse_site_id'
    get:
      summary: Retrieve an EVSE Site
      tags:
        - Sites
      responses:
        '200':
          description: Returns a single EVSE Site.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EVSESite'
          headers:
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
        '400':
          $ref: '#/components/responses/Problem400BadRequestRetrieve'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '404':
          $ref: '#/components/responses/Problem404NotFound'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: get-evse_sites-evse_site_id
      parameters:
        - $ref: '#/components/parameters/version-2'
        - $ref: '#/components/parameters/user'
      description: Retrieve a single, specific EVSESite's details.
      security:
        - oauth2:
            - site:read
  /vehicles/{vehicle_id}/reconnect:
    parameters:
      - $ref: '#/components/parameters/vehicle_id'
    post:
      summary: Create reconnection URL
      tags:
        - Vehicles
      responses:
        '201':
          description: Returns the newly generated reconnection URL and it's expiry time.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VehicleReconnectionUrl'
          headers:
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
        '400':
          $ref: '#/components/responses/Problem400BadRequestCreate'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '404':
          $ref: '#/components/responses/Problem404NotFound'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: post-vehicles-vehicle_id-reconnect
      x-stoplight:
        id: ibh79ntf0zq6d
      description: Create a reconnection request URL for the Vehicle.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VehicleReconnectionUrl'
  /programs/{program_id}/user_verification:
    post:
      summary: Verify user
      tags:
        - Programs
      responses:
        '201':
          description: Created
          headers:
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
        '400':
          $ref: '#/components/responses/Problem400BadRequestCreate'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '404':
          $ref: '#/components/responses/Problem404NotFound'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: post-programs-user-verification
      x-stoplight:
        id: jp5uucu95vhs7
      description: >-
        Upload a user's utility account information for verification and account
        matching against the utility's customer data.


        An endpoint to serve this data will be added in future.
      parameters:
        - $ref: '#/components/parameters/version-2'
        - $ref: '#/components/parameters/user'
      requestBody:
        content:
          application/json:
            schema:
              type: object
            examples:
              Account Number Only:
                value:
                  account_number: 12345678-A
              Account Number and SAID:
                value:
                  account_number: '0987654321'
                  said: ABC-12345678
              PIN:
                value:
                  pin: abcde-12345
        description: >-
          The body must be a JSON object containing data required for user
          verification. The exact dat requirements differ by program and will be
          validated against a dynamic JSON schema, so no specific type is
          defined here.


          The examples are not exhaustive.
    parameters:
      - name: program_id
        in: path
        required: true
        schema:
          type: string
        description: The ID of the specific Program to retrieve.
  /cpms_providers:
    get:
      summary: List CPMS Providers
      description: >-
        Get a list of all the ChargePoint Management System Providers that we
        integrate with.
      tags:
        - Sites
      responses:
        '200':
          description: OK
          headers:
            Link:
              $ref: '#/components/headers/link'
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CPMSProvider'
                  x-stoplight:
                    id: nuiinij2nydpu
        '400':
          $ref: '#/components/responses/Problem400BadRequestList'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: get-cpms_providers
      x-stoplight:
        id: 3k6sstowlp0ny
      parameters:
        - $ref: '#/components/parameters/version-2'
        - $ref: '#/components/parameters/previous'
        - $ref: '#/components/parameters/next'
  /cpms_providers/{cpms_provider_id}:
    parameters:
      - schema:
          type: string
          enum:
            - CHARGEPOINT
        name: cpms_provider_id
        in: path
        required: true
        description: The ID of the specific provider to retrieve.
    get:
      summary: Retrieve a CPMS Provider
      description: Get details on a single CPMS provider.
      tags:
        - Sites
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CPMSProvider'
          headers:
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
        '400':
          $ref: '#/components/responses/Problem400BadRequestRetrieve'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '404':
          $ref: '#/components/responses/Problem404NotFound'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: get-cpms_providers-provider_id
      x-stoplight:
        id: lx3pxkk9mv55n
      parameters:
        - $ref: '#/components/parameters/version-2'
  /charging_sub_sessions/{charging_sub_session_id}/schedules:
    parameters:
      - $ref: '#/components/parameters/charging_sub_session_id'
    get:
      summary: Retrieve schedules for a charging sub-session
      description: >-
        Retrieve schedules for a specific charging sub-session.


        Schedules represent charging instructions for a charging session. Each
        schedule specifies a current (in milliamps) and a time period during
        which that current should be applied.
      tags:
        - Charging Sessions
      responses:
        '200':
          description: Returns information about a single charging sub-session's schedules.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Schedules'
          headers:
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
        '400':
          $ref: '#/components/responses/Problem400BadRequestRetrieve'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '404':
          $ref: '#/components/responses/Problem404NotFound'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: get-charging_sub_sessions-charging_sub_session_id-schedules
      parameters:
        - $ref: '#/components/parameters/version-2'
        - $ref: '#/components/parameters/expand-on-chargingsubsession-schedules'
        - schema:
            type: string
            format: date-time
          in: query
          name: started_at__gte
          description: >-
            Filter schedules with started_at greater than or equal to this
            datetime.
        - schema:
            type: string
            format: date-time
          in: query
          name: started_at__lte
          description: >-
            Filter schedules with started_at less than or equal to this
            datetime.
        - schema:
            type: string
            pattern: scpl[A-Z\d]{26}
            example: scpl01HSH04KDEWF6Z4DB2J77J74K5
          in: query
          name: schedule_plan_id
          description: Filter schedules generated from a specific schedule plan.
        - schema:
            type: boolean
            default: true
          in: query
          required: false
          name: only_most_recently_created
          description: Only show the most recently created schedule for each time period
      security:
        - oauth2:
            - chargingsession:read
      x-stoplight:
        id: chargingsubsession-schedules-endpoint
  /charging_sub_sessions/{charging_sub_session_id}/schedule_plans:
    parameters:
      - $ref: '#/components/parameters/charging_sub_session_id'
    get:
      summary: Retrieve schedule plans for a charging sub-session
      description: >-
        Retrieve schedule plans for a specific charging sub-session.


        Schedule plans represent the charging plan parameters used to generate
        schedules for a charging session. Each plan contains information about
        the ready-by time, charging requirements, and constraints that were used
        to create the charging schedule.
      tags:
        - Charging Sessions
      responses:
        '200':
          description: Returns schedule plans for a charging sub-session.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SchedulePlans'
          headers:
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
        '400':
          $ref: '#/components/responses/Problem400BadRequestRetrieve'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '404':
          $ref: '#/components/responses/Problem404NotFound'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: get-charging_sub_sessions-charging_sub_session_id-schedule_plans
      parameters:
        - $ref: '#/components/parameters/version-2'
        - $ref: '#/components/parameters/expand-on-chargingsubsession-scheduleplans'
        - schema:
            type: string
            format: date-time
          in: query
          name: created_at__gte
          description: >-
            Filter schedule plans with created_at greater than or equal to this
            datetime.
        - schema:
            type: string
            format: date-time
          in: query
          name: created_at__lte
          description: >-
            Filter schedule plans with created_at less than or equal to this
            datetime.
      security:
        - oauth2:
            - debug:read
      x-stoplight:
        id: chargingsubsession-scheduleplans-endpoint
  /dispatcher_logs:
    get:
      summary: List dispatcher logs
      description: >-
        List all dispatcher logs for a charging session. These logs record
        Dispatch Command attempts to EVSEs or Vehicles.
      tags:
        - Charging Sessions
      responses:
        '200':
          description: Returns a list of dispatcher logs, sorted newest first.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/DispatcherLog'
          headers:
            EvEnergy-Version:
              $ref: '#/components/headers/version-2'
            X-RateLimit-Limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            RetryAfter:
              $ref: '#/components/headers/retry-after'
        '400':
          $ref: '#/components/responses/Problem400BadRequestList'
        '401':
          $ref: '#/components/responses/Problem401Unauthorized'
        '403':
          $ref: '#/components/responses/Problem403Forbidden'
        '406':
          $ref: '#/components/responses/Problem406NotAcceptable'
        '429':
          $ref: '#/components/responses/Problem429TooManyRequests'
      operationId: get-dispatcher_logs
      parameters:
        - $ref: '#/components/parameters/version-2'
        - $ref: '#/components/parameters/expand-on-dispatcherlog'
        - name: charging_sub_session_id
          in: query
          required: true
          schema:
            type: string
            pattern: csub[A-Z\d]{26}
            example: csub01HSH04KDEWF6Z4DB2J77J74K5
          description: Filter dispatcher logs to a specific charging sub-session.
        - schema:
            type: string
            format: date-time
          in: query
          name: logged_at__gte
          description: Only return logs that were logged at or after the passed date.
        - schema:
            type: string
            format: date-time
          in: query
          name: logged_at__lte
          description: Only return logs that were logged at or before the passed date.
      security:
        - oauth2:
            - debug:read
      x-stoplight:
        id: dispatcherlog-endpoint
webhooks:
  charging_sub_session.created:
    post:
      summary: Charging sub-session created
      description: >-
        A charging sub-session is created, representing a period of charging in
        a single mode.
      tags:
        - Charging Sessions
      requestBody:
        description: >-
          Returns information about the charging sub-session that has been
          created.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChargingSubSessionCreatedWebhook'
      responses:
        '200':
          description: >-
            Return a 200 status to indicate that the data was received
            successfully.
  charging_sub_session.ended:
    post:
      summary: Charging sub-session ended
      description: >-
        A charging sub-session has ended, representing a period of charging in a
        single mode.
      tags:
        - Charging Sessions
      requestBody:
        description: Returns information about the charging sub-session that ended.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChargingSubSessionEndedWebhook'
      responses:
        '200':
          description: >-
            Return a 200 status to indicate that the data was received
            successfully.
components:
  schemas:
    User:
      title: User
      description: A resource that represents an individual user in the ev.energy system.
      type: object
      x-stoplight:
        id: 3k907xtruysj7
      x-tags:
        - Users
      required:
        - id
        - url
      properties:
        id:
          type: string
          description: Unique identifier for the given user.
          x-stoplight:
            id: sd0tvba2d88o3
          pattern: user[A-Z\d]{26}
          example: user01HN2NJ9NMRZBXT1H6FT9N7735
          readOnly: true
        url:
          type: string
          x-stoplight:
            id: l4zw4z838khna
          example: https://api.ev.energy/v2/users/user01HN2NJ9NMRZBXT1H6FT9N7735
          format: uri
          readOnly: true
        email:
          type: string
          format: email
          x-stoplight:
            id: 7sc1tgsxo3l66
        default_location:
          x-stoplight:
            id: rfdoz4vzwk3p0
          anyOf:
            - $ref: '#/components/schemas/Location'
              x-stoplight:
                id: 80a15sul4fsw9
            - $ref: '#/components/schemas/LocationDetail'
              x-stoplight:
                id: bfdbgsjmqhm8s
          description: >-
            LocationDetail is served when a single user is requested, otherwise
            Location is served for user lists.
        vehicles:
          type: array
          x-stoplight:
            id: mrswtaz8su8sq
          items:
            x-stoplight:
              id: g260qnhst101q
            type: string
            format: uri
            example: https://api.ev.energy/v2/vehicles/vhcl01HRFF3SEVSCRAV9B3CHVDFN0H
            readOnly: true
          readOnly: true
        evses:
          type: array
          x-stoplight:
            id: yzutem11rnonk
          items:
            x-stoplight:
              id: 5m9suy17q06qn
            type: string
            format: uri
            example: https://api.ev.energy/v2/evses/evse01HSH04XHZCT92RN018F0236ZM
            readOnly: true
          readOnly: true
    EVSE:
      title: EVSE
      description: >-
        A resource that represents a single, physical piece of hardware for
        supplying electricity to an electric vehicle.
      x-stoplight:
        id: ftniioylantob
      type: object
      x-tags:
        - EVSEs
      properties:
        id:
          type: string
          description: Unique identifier for the given EVSE.
          pattern: evse[A-Z\d]{26}
          example: evse01HSH04KDEWF6Z4DB2J77J74K5
          readOnly: true
        url:
          type: string
          x-stoplight:
            id: u6dfob339qdhd
          example: https://api.ev.energy/v2/evses/evse01HSH04KDEWF6Z4DB2J77J74K5
          format: uri
          readOnly: true
        model:
          x-stoplight:
            id: cyunl5s8cn8tt
          oneOf:
            - type: string
              x-stoplight:
                id: nz2b3pu457w9y
              format: uri
              behavior: Read Only
              example: >-
                https://api.ev.energy/v2/evse_models/emod01HS9A004X5TB5JCMHENB5Z446
            - $ref: '#/components/schemas/EVSEModel'
              x-stoplight:
                id: hz2c4lnyxg2f3
          readOnly: true
        user:
          x-stoplight:
            id: ooye2vtph4tr4
          example: https://api.ev.energy/v2/users/user01HN2NJ9NMRZBXT1H6FT9N7735
          oneOf:
            - type: string
              x-stoplight:
                id: trbwtxbvn9pts
              example: https://api.ev.energy/v2/users/user01HN2NJ9NMRZBXT1H6FT9N7735
              format: uri
            - $ref: '#/components/schemas/User'
              x-stoplight:
                id: ld02knhznhz7o
          readOnly: true
        latest_status_log:
          x-stoplight:
            id: nbh90iwwixok5
          example: >-
            https://api.ev.energy/v2/evse/evse01HSH04KDEWF6Z4DB2J77J74K5/status_logs/2024-01-01T11:11:11.1111Z/
          oneOf:
            - type:
                - string
                - 'null'
              x-stoplight:
                id: s3vqp1en1oaug
              example: >-
                https://api.ev.energy/v2/evse/evse01HSH04KDEWF6Z4DB2J77J74K5/status_logs/2024-01-01T11:11:11.1111Z/
              format: uri
            - $ref: '#/components/schemas/EVSEStatusLog'
              x-stoplight:
                id: uryldggb8lvyt
          description: >-
            An expandable reference to the most recent status log for this EVSE.
            This can be requested or expanded to get the most accurate
            information we have on the device's current status.
          readOnly: true
        charging_sub_sessions:
          type: string
          x-stoplight:
            id: hje5by3saknkv
          format: uri
          example: >-
            https://api.ev.energy/charging_sub_sessions/?evse_id=evse01HSH04KDEWF6Z4DB2J77J74K5
          description: >-
            Provides a pre-constructed URL to list charging sub-sessions
            involving this EVSE.
    EVSEModel:
      title: Model
      description: A resource representing a model of EVSEs.
      x-stoplight:
        id: pwv0ry0ne9pxg
      type: object
      properties:
        id:
          type: string
          x-stoplight:
            id: 0kyjumgf1f97q
          description: Unique identifier for the given EVSE Model.
          pattern: emod[A-Z\d]{26}
          example: emod01HS9A004X5TB5JCMHENB5Z446
          readOnly: true
        url:
          type: string
          x-stoplight:
            id: d9zbw8dguizkf
          format: uri
          example: https://api.ev.energy/v2/evse_models/emod01HS9A004X5TB5JCMHENB5Z446
          readOnly: true
        name:
          type: string
          x-stoplight:
            id: dojqufp5oehkr
          example: EVWC2S22
          readOnly: true
        make:
          x-stoplight:
            id: ae36q2rkxhwqz
          oneOf:
            - type: string
              x-stoplight:
                id: 9xzdm0ozzg777
              format: uri
              behavior: Read Only
              example: >-
                https://api.ev.energy/v2/evse_makes/emak01HS8FRMXGE3566EDXCMWGW5W4
            - $ref: '#/components/schemas/EVSEMake'
              x-stoplight:
                id: l7d5teyz0ohpp
        onboarding_url:
          type:
            - string
            - 'null'
          example: >-
            https://api.ev.energy/v2/evse_onboarding?model_id=emod01HN2NJHAJJAQD32QJ4QXTDSGW&user_id=user01HN2NJ9NMRZBXT1H6FT9N7735
          format: uri
          description: >-
            A pre-constructed link to initiate onboarding for an EVSE with this
            model. If it is null, then we do not support intergrating with this
            EVSE and the user will need an integrated vehicle in order for us to
            be able to track their charging.


            Note: if you are using client credentials authentication, the user
            ID will not be automatically included unless you set the
            EvEnergy-User header on your request.
          readOnly: true
      x-tags:
        - EVSEs
    EVSEMake:
      title: Make
      description: A resource representing a manufacturer of EVSEs.
      x-stoplight:
        id: i9kfwqn51v02o
      type: object
      x-tags:
        - EVSEs
      properties:
        id:
          type: string
          x-stoplight:
            id: 37x87bfycgk70
          description: Unique identifier for the given EVSE Make.
          pattern: emak[A-Z\d]{26}
          example: emak01HS8FRXKJD5JZZ7ZN6W8H21P8
          readOnly: true
        url:
          type: string
          x-stoplight:
            id: ut5hufa0am1x4
          format: uri
          example: https://api.ev.energy/v2/evse_makes/emak01HS8FRXKJD5JZZ7ZN6W8H21P8
          readOnly: true
        name:
          type: string
          x-stoplight:
            id: tjrz2ob8qc01b
          example: BG SyncEV
          readOnly: true
        icon:
          type:
            - string
            - 'null'
          format: uri
          example: https://cdn.example.com/volvo.png
          description: A url for an image of the make's logo.
          readOnly: true
        onboarding_url:
          type:
            - string
            - 'null'
          x-stoplight:
            id: m5ziuqzvlhdsq
          example: >-
            https://api.ev.energy/v2/evse_onboarding?make_id=emak01HN2NJQRGDQP0GBE1F7R6PB3D&user_id=user01HN2NJ9NMRZBXT1H6FT9N7735
          description: >-
            A pre-constructed link to initiate onboarding for an EVSE of this
            make. If it is null, then it cannot be onboarded with model alone.
            You should filter the list of [EVSE
            models](ev.energy-API-v2.yaml/paths/~1evse_models/get) by this make
            and then have the user select their model.


            Note: if you are using client credentials authentication, the user
            ID will not be automatically included unless you set the
            EvEnergy-User header on your request.
          readOnly: true
        models:
          type: string
          x-stoplight:
            id: 10srp9phz4cfv
          example: >-
            https://api.ev.energy/v2/evse_models/?make_id=emak01HN2NJQRGDQP0GBE1F7R6PB3D
          description: >-
            A pre-constructed link to a list of EVSE models filtered for this
            make.
    Vehicle:
      title: Vehicle
      description: A resource representing a single, physical electric vehicle.
      x-stoplight:
        id: ltaahhykiexft
      type: object
      x-tags:
        - Vehicles
      properties:
        id:
          type: string
          x-stoplight:
            id: sqoef8cx9s9zm
          description: Unique identifier for the given Vehicle.
          pattern: vhcl[A-Z\d]{26}
          example: vhcl01HRFF3SEVSCRAV9B3CHVDFN0H
          readOnly: true
        url:
          type: string
          x-stoplight:
            id: 4ja97oawg2j5b
          format: uri
          example: https://api.ev.energy/v2/vehicles/vhcl01HRFF3SEVSCRAV9B3CHVDFN0H
          readOnly: true
        trim:
          x-stoplight:
            id: 6nsmtlmvefvoa
          oneOf:
            - type: string
              x-stoplight:
                id: aeihfu1qimwhs
              format: uri
              behavior: Read Only
              example: >-
                https://api.ev.energy/v2/trim/vehicle_trim01HRFHBCM7VBSWRPVYFBQMH2BR
            - $ref: '#/components/schemas/VehicleTrim'
              x-stoplight:
                id: exnrhjvkue3ma
          description: >-
            Defaults to a url, but can be expanded to the full Trim resource via
            the `expand` query parameter.
          readOnly: true
        user:
          x-stoplight:
            id: p38uuenzx24uf
          example: https://api.ev.energy/v2/users/user01HN2NJ9NMRZBXT1H6FT9N7735
          oneOf:
            - type: string
              x-stoplight:
                id: cbehwr28b80l0
              format: uri
              behavior: Read Only
              example: https://api.ev.energy/v2/user/user01HN2NJ9NMRZBXT1H6FT9N7735
            - $ref: '#/components/schemas/User'
              x-stoplight:
                id: u25i8c3p5wia6
          description: >-
            Defaults to a url, but can be expanded to the full User resource via
            the `expand` query parameter.
        latest_status_log:
          x-stoplight:
            id: n4n3bu6ly8845
          example: >-
            https://api.ev.energy/v2/vehicles/vhcl01HRFF3SEVSCRAV9B3CHVDFN0H/status_logs/2024-04-17T09:39:45.994584Z/
          oneOf:
            - type:
                - string
                - 'null'
              x-stoplight:
                id: g1vt9nw8zjb8r
              example: >-
                https://api.ev.energy/v2/vehicles/vhcl01HRFF3SEVSCRAV9B3CHVDFN0H/status_logs/2024-04-17T09:39:45.994584Z/
              format: uri
            - $ref: '#/components/schemas/VehicleStatusLog'
              x-stoplight:
                id: myl67mwejyeu2
          description: >-
            An expandable reference to the most recent status log for this
            Vehicle. This can be requested or expanded to get the most accurate
            information we have on the device's current status.
        charging_sub_sessions:
          type: string
          x-stoplight:
            id: w2uqcthjggky9
          format: uri
          example: >-
            https://api.ev.energy/charging_sub_sessions/?vehicle_id=vhcl01HRFF3SEVSCRAV9B3CHVDFN0H
          description: >-
            Provides a pre-constructed URL to list charging sub-sessions
            involving this Vehicle.
        integrated:
          x-stoplight:
            id: xhj73fwwr3m4g
          enum:
            - UNINTEGRATED
            - ACTIVE
            - INACTIVE
          description: >-
            Whether we have an integration with this vehicle.

            - `UNINTEGRATED`: This vehicle is not integrated

            - `ACTIVE`: This vehicle is integrated and the connection is
            working.

            - `INACTIVE`: This vehicle has been integrated but the connection
            has been severed, usually because the user needs to reconnect it.
          readOnly: true
        maximum_charge_limit_percentage:
          type: integer
          x-stoplight:
            id: y1g45k28g514s
          minimum: 50
          maximum: 100
          description: >-
            The target state of charge of the car as a percentage between 50 and
            100. The car will not be smart charged above this value. Can be null
            if target charge level has not been set or we don't know the car's
            battery size.
          default: 100
    VehicleWrite:
      title: Vehicle
      x-stoplight:
        id: g0yhf4j3x27se
      description: Fields that can (or must) be set when creating a Vehicle resource.
      type: object
      x-tags:
        - Vehicles
      required:
        - trim
      properties:
        trim:
          type: string
          format: uri
          example: https://api.ev.energy/v2/trim/vehicle_trim01HRFHBCM7VBSWRPVYFBQMH2BR
          readOnly: false
        user:
          example: https://api.ev.energy/v2/users/user01HN2NJ9NMRZBXT1H6FT9N7735
          type: string
          format: uri
          readOnly: false
          description: Required if using Client Credentials authentication.
    VehicleTrim:
      title: VehicleTrim
      description: >-
        A resource representing a "trim level" of a particular vehicle model,
        which captures a specific set of features.
      x-stoplight:
        id: po6qg43x1etia
      type: object
      x-tags:
        - Vehicles
      properties:
        id:
          type: string
          x-stoplight:
            id: 4fo119znfyivc
          description: Unique identifier for the given Vehicle Trim.
          pattern: trim[A-Z\d]{26}
          example: trim01HRFHBCM7VBSWRPVYFBQMH2BR
          readOnly: true
        url:
          type: string
          x-stoplight:
            id: m4mynal07a4pe
          format: uri
          example: https://api.ev.energy/v2/vehicle_trim/trim01HRFHBCM7VBSWRPVYFBQMH2BR
          readOnly: true
        name:
          type: string
          x-stoplight:
            id: 72j1pgrowa1od
          example: Recharge Core (69 kWh)
          readOnly: true
        model:
          x-stoplight:
            id: fzscnvz5fciga
          oneOf:
            - type: string
              x-stoplight:
                id: akifmsd429kx5
              format: uri
              behavior: Read Only
            - $ref: '#/components/schemas/VehicleModel'
              x-stoplight:
                id: lrvfp6goqr0n3
        onboarding_url:
          type:
            - string
            - 'null'
          x-stoplight:
            id: a1xvfmx6643am
          example: >-
            https://api.ev.energy/v2/vehicle_onboarding?trim_id=trim01HN2NZ1040Y8E77CQGXADC2TZ&user_id=user01HN2NJ9NMRZBXT1H6FT9N7735
          format: uri
          description: >-
            A pre-constructed link to initiate onboarding for a vehicle with
            this trim. If it is null, then we do not support intergrating with
            this vehicle and you should POST the trim to
            [/vehicles](ev.energy-API-v2.yaml/paths/~1vehicles/post) to create
            an unintegrated vehicle.


            Note: if you are using client credentials authentication, the user
            ID will not be automatically included unless you set the
            EvEnergy-User header on your request.
          readOnly: true
    VehicleTrimCreate:
      title: VehicleTrimCreate
      description: Request body for creating a custom vehicle trim.
      x-stoplight:
        id: vehicle-trim-create-schema
      type: object
      x-tags:
        - Vehicles
      required:
        - name
        - model
        - battery_size_watt_hours
      properties:
        name:
          type: string
          x-stoplight:
            id: vehicle-trim-create-name
          description: The name of the vehicle trim.
          example: Custom Trim
        model:
          type: string
          x-stoplight:
            id: vehicle-trim-create-model
          format: uri
          description: URL reference to the vehicle model this trim belongs to.
          example: >-
            https://api.ev.energy/v2/vehicle_models/vmod01HSBR8Z36GD7A46K7M4R12VG0
        battery_size_watt_hours:
          type: integer
          x-stoplight:
            id: vehicle-trim-create-battery
          description: Battery size in watt hours. Must be between 1000 and 300000.
          minimum: 1000
          maximum: 300000
          example: 75500
    VehicleModelWrite:
      title: VehicleModelWrite
      description: Fields that must be set when creating a VehicleModel resource.
      type: object
      x-tags:
        - Vehicles
      required:
        - name
        - make
      properties:
        name:
          type: string
          description: The name of the vehicle model.
          example: Model 3
        make:
          type: string
          format: uri
          description: URL reference to the vehicle make.
          example: >-
            https://api.ev.energy/v2/vehicle_makes/vmak01HRFHBCM7VBSWRPVYFBQMH2BR
    VehicleModel:
      title: VehicleModel
      description: A resource representing a model of vehicle.
      x-stoplight:
        id: ix4k8mx5gwc90
      type: object
      x-tags:
        - Vehicles
      properties:
        id:
          type: string
          x-stoplight:
            id: 0l43bcfk20o4t
          description: Unique identifier for the given Vehicle Model.
          pattern: vmod[A-Z\d]{26}
          example: vmod01HSBR8Z36GD7A46K7M4R12VG0
          readOnly: true
        url:
          type: string
          x-stoplight:
            id: j77707e2tg242
          format: uri
          example: https://api.ev.energy/vehicle_models/vmod01HSBR8Z36GD7A46K7M4R12VG0
          readOnly: true
        name:
          type: string
          x-stoplight:
            id: yxvkotq67bkm0
          example: C40
          readOnly: true
        make:
          x-stoplight:
            id: yaa133aw2hfbi
          oneOf:
            - type: string
              x-stoplight:
                id: vhy5jjm96p86b
              format: uri
              behavior: Read Only
              example: >-
                https://api.ev.energy/v2/vehicle_makes/vmak01HRFHBCM7VBSWRPVYFBQMH2BR
            - $ref: '#/components/schemas/VehicleMake'
              x-stoplight:
                id: zzn6b0hfxneoz
        onboarding_url:
          type:
            - string
            - 'null'
          x-stoplight:
            id: 9al14s30ayx0e
          format: uri
          example: >-
            https://api.ev.energy/v2/vehicle_onboarding?model_id=vmod01HN2P436099PEQ20B7TKPGTEJ&user_id=user01HN2NJ9NMRZBXT1H6FT9N7735
          description: >-
            A pre-constructed link to initiate onboarding for a vehicle of this
            model. If it is null, then it cannot be onboarded with model alone.
            You should filter the list of [vehicle
            trims](ev.energy-API-v2.yaml/paths/~1vehicle_trims/get) by this
            model and then have the user select their trim.


            Note: if you are using client credentials authentication, the user
            ID will not be automatically included unless you set the
            EvEnergy-User header on your request.
        trims:
          type: string
          x-stoplight:
            id: u4bhq7e8jkslj
          format: uri
          example: >-
            https://api.ev.energy/vehicle_trims?model_id=vmod01HN2P436099PEQ20B7TKPGTEJ
          description: >
            A pre-constructed link to a list of vehicle trims filtered for this
            model.
    VehicleMake:
      title: VehicleMake
      description: A resource representing a vehicle manufacturer.
      x-stoplight:
        id: 3a91ed0afgnns
      type: object
      x-tags:
        - Vehicles
      properties:
        id:
          type: string
          x-stoplight:
            id: 1hyspfafu6rdi
          description: Unique identifier for the given Vehicle Make.
          pattern: vmak[A-Z\d]{26}
          example: vmak01HRFHBCM7VBSWRPVYFBQMH2BR
          readOnly: true
        url:
          type: string
          x-stoplight:
            id: 0djywdsg8vryt
          format: uri
          example: >-
            https://api.ev.energy/v2/vehicle_makes/vmak01HRFHBCM7VBSWRPVYFBQMH2BR
          readOnly: true
        name:
          type: string
          x-stoplight:
            id: yy92m2bj51gco
          example: Volvo
          readOnly: true
        icon:
          type:
            - string
            - 'null'
          format: uri
          example: https://cdn.example.com/volvo.png
          description: A url for an image of the make's logo.
          readOnly: true
        onboarding_url:
          type:
            - string
            - 'null'
          x-stoplight:
            id: d5hlb81d9ylrw
          example: >-
            https://api.ev.energy/v2/vehicle_onboarding/?make_id=vmak01HN2P75GBNFRJPCZJXEFVXH5E&user_id=user01HN2NJ9NMRZBXT1H6FT9N7735
          description: >-
            A pre-constructed link to initiate onboarding for a vehicle of this
            make. If it is null, then it cannot be onboarded with make alone.
            You should filter the list of [vehicle
            models](ev.energy-API-v2.yaml/paths/~1vehicle_models/get) by this
            make and then have the user select their model.


            Note: if you are using client credentials authentication, the user
            ID will not be automatically included unless you set the
            EvEnergy-User header on your request.
          readOnly: true
        models:
          type: string
          x-stoplight:
            id: cno5tjjrw66rw
          format: uri
          example: >-
            https://api.ev.energy/vehicle_models?make_id=vmak01HN2P75GBNFRJPCZJXEFVXH5E
          description: >-
            A pre-constructed link to a list of vehicle models filtered for this
            make.
          readOnly: true
    ScheduleInterval:
      title: ScheduleInterval
      description: >-
        A schedule interval represents a charging instruction for a specific
        time period within a charging session. It specifies the charging current
        (in milliamps) that should be applied during that period.
      x-stoplight:
        id: schedule-interval-schema
      type: object
      x-tags:
        - Schedules
      properties:
        started_at:
          type: string
          x-stoplight:
            id: schedule-started-at
          format: date-time
          example: '2024-01-01T02:00:00Z'
          description: >-
            The start time of the period this schedule applies to. Always
            aligned to half-hour boundaries (:00 or :30).
          readOnly: true
        interval_seconds:
          type:
            - integer
            - 'null'
          x-stoplight:
            id: schedule-interval-seconds
          example: 1800
          description: >-
            The duration of this schedule in seconds. Currently always 1800
            seconds (30 minutes), or null for boost sessions which have no
            defined end time.
          readOnly: true
        current_milliamps:
          type: integer
          x-stoplight:
            id: schedule-current-milliamps
          example: 7400
          description: >-
            The charging current in milliamps that should be applied during this
            period. A value of 0 means no charging.
          readOnly: true
        schedule_type:
          type: string
          x-stoplight:
            id: schedule-type
          example: SMART
          enum:
            - INITIAL_CHARGE_TIME
            - BATTERY_WARMING
            - SMART
            - BOOST
            - SOLAR_ONLY
            - SOLAR_SMART
            - V2G_DISCHARGE
            - V2G_CHARGEBACK
            - LEGACY
          description: |-
            The type of scheduling that generated this instruction.

            - INITIAL_CHARGE_TIME: Initial charge to condition the battery
            - BATTERY_WARMING: Pre-warming the hour before the ready-by-time
            - SMART: Optimised smart charging
            - BOOST: Immediate charging at maximum rate
            - SOLAR_ONLY: Charging only from solar generation
            - SOLAR_SMART: Combined solar and smart charging
            - V2G_DISCHARGE: Vehicle-to-grid discharge
            - V2G_CHARGEBACK: Charging back after V2G discharge
            - LEGACY: Legacy schedules from before type tracking
          readOnly: true
        dispatched_at:
          type:
            - string
            - 'null'
          x-stoplight:
            id: schedule-dispatched-at
          format: date-time
          example: '2024-01-01T02:00:15Z'
          description: >-
            When this schedule was last sent to the device. Null if not yet
            dispatched.
          readOnly: true
        created_at:
          type: string
          x-stoplight:
            id: schedule-created-at
          format: date-time
          example: '2024-01-01T01:55:00Z'
          description: When this schedule was created.
          readOnly: true
    ChargingSubSession:
      title: SubSession
      x-stoplight:
        id: b4hz44lmi8ol0
      type: object
      description: >-
        Represents periods within a Charging Session when the same mode of
        scheduling was active. Begins either when a vehicle is plugged in or
        when it switches mode (eg. from smart to boost) and ends either when the
        vehicle is unplugged or the mode switches again.
      x-tags:
        - Charging sessions
      properties:
        id:
          type: string
          x-stoplight:
            id: t95zxdsyiajw6
          description: Unique identifier for the given Charging sub-session.
          pattern: csub[A-Z\d]{26}
          example: csub01HSH04KDEWF6Z4DB2J77J74K5
          readOnly: true
        url:
          type: string
          x-stoplight:
            id: 2ns6f49nw3fai
          format: uri
          example: >-
            https://api.ev.energy/v2/charging_sub_sessions/csub01HSH04KDEWF6Z4DB2J77J74K5
        start:
          type: string
          x-stoplight:
            id: nl2dyngmo2xxe
          format: date-time
          readOnly: true
        end:
          type:
            - string
            - 'null'
          x-stoplight:
            id: fefwwyakkxt9j
          format: date-time
          readOnly: true
        mode:
          x-stoplight:
            id: s482mbdtprp59
          enum:
            - SMART
            - BOOST
            - UNMANAGED_HOME
            - UNMANAGED_OTG
            - MANAGED_OTG
          description: |-
            The type of scheduling applied during this period.

            smart: Actively optimised charging

            boost: Charge immediately

            unmanaged: No optimisation
          readOnly: true
        vehicle:
          x-stoplight:
            id: qzb6mu2svgjdx
          oneOf:
            - type:
                - string
                - 'null'
              x-stoplight:
                id: io9d3u5szv6kp
              example: https://api.ev.energy/v2/vehicles/vhcl01HRFF3SEVSCRAV9B3CHVDFN0H
              behavior: Read Only
              format: uri
            - $ref: '#/components/schemas/Vehicle'
              x-stoplight:
                id: hsxngry5sjcp3
        evse:
          x-stoplight:
            id: 3m25kepd9hf1t
          oneOf:
            - type:
                - string
                - 'null'
              x-stoplight:
                id: odq4qe114u8kv
              example: https://api.ev.energy/v2/evses/evse01HSH04KDEWF6Z4DB2J77J74K5
              format: uri
              behavior: Read Only
            - $ref: '#/components/schemas/EVSE'
              x-stoplight:
                id: rg4kg8gej6cl5
        energy_delivered_watt_hours:
          type: integer
          x-stoplight:
            id: iwgm2l1e1yetf
          example: 2300
          description: Net energy delivered to the vehicle during this sub-session in Wh.
          readOnly: true
        cost:
          type:
            - integer
            - 'null'
          x-stoplight:
            id: pr2clwl1uj7lg
          example: 634
          readOnly: true
        location:
          type: object
          x-stoplight:
            id: xvacf26t8qb8u
          properties:
            name:
              type: string
              x-stoplight:
                id: h9bvvfv5kwlwy
              example: Home
              readOnly: true
            coordinates:
              type: object
              $ref: '#/components/schemas/LatLong'
              x-stoplight:
                id: tgq49wjocxovs
              description: Can be null
            postal_code:
              type:
                - string
                - 'null'
              x-stoplight:
                id: tnemvna7iaqxn
              maxLength: 10
            address_1:
              type:
                - string
                - 'null'
              x-stoplight:
                id: 3u8ey0u9zqsld
            timezone:
              type:
                - string
                - 'null'
              example: Europe/London
              description: IANA timezone name for the charging location.
        percentage_added:
          type:
            - number
            - 'null'
          x-stoplight:
            id: zvuglfgetag9l
          example: 30
          readOnly: true
        currency:
          type: string
          x-stoplight:
            id: 8nhuwfq5l8a6o
          example: GBP
          readOnly: true
        savings_cost:
          type:
            - integer
            - 'null'
          x-stoplight:
            id: s2vrbipqvb9cu
          description: Cost Savings in Minor Unit of Currency.
          readOnly: true
        savings_co2_grams:
          type:
            - integer
            - 'null'
          x-stoplight:
            id: gg0rg6z4iyg71
          description: Savings of Carbon in Grams of CO2.
          readOnly: true
        incentive_earned:
          type:
            - integer
            - 'null'
          x-stoplight:
            id: adurlpa9hclyq
          example: 99
          description: Incentive earned in minor unit of currency.
          readOnly: true
        total_co2_grams:
          type:
            - integer
            - 'null'
          x-stoplight:
            id: g8ysr04iatjq0
          description: Estimated total CO2 emissions of this session in grams
        co2_intensity_grams_per_kilowatt_hour:
          type:
            - integer
            - 'null'
          x-stoplight:
            id: u5qskbeasruhu
          description: >-
            Estimated CO2 emissions per unit of electricity in grams per
            kilowatt hour
        co2_intensity_classification:
          x-stoplight:
            id: im03vosce9g8i
          enum:
            - very low
            - low
            - moderate
            - high
            - very high
          description: Classification of the estimated CO2 intensity value. Can be null.
          readOnly: true
        cost_per_kilowatt_hour:
          type:
            - integer
            - 'null'
          x-stoplight:
            id: z3nfwlfzj979a
          description: >-
            Average cost per kilowatt hour of energy delivered during this
            charging session
        total_points:
          type: integer
          x-stoplight:
            id: vdvg1cbjop4h5
          description: Number of smart points earning during this charging session
        total_points_missed:
          type:
            - integer
            - 'null'
          x-stoplight:
            id: sfhzn9kgcwwfi
          description: >-
            Difference between the number of smart points earned in this session
            and the number that would have been earned by Smart charging
        duration_minutes:
          type: integer
          x-stoplight:
            id: 7gkurrm4vhs80
          description: >-
            How long the vehicle was actively charging for, to the nearest
            minute
        grid_energy_delivered_watt_hours:
          type: integer
          x-stoplight:
            id: qqagvf0gkgo6e
          description: >-
            Grid energy delivered during this charging sub-session in watt hours
            (Wh).
          readOnly: true
        solar_energy_delivered_watt_hours:
          type: integer
          x-stoplight:
            id: sdxeigabndakh
          description: >-
            Solar energy delivered during this charging sub-session in watt
            hours (Wh).
          readOnly: true
        labels:
          type:
            - array
            - 'null'
          x-stoplight:
            id: chargingsubsession-labels-field
          items:
            type: string
            enum:
              - OUTSIDE
              - OFF_PEAK
              - SUMMER_PEAK
              - MIXED
              - OTHER
              - PRIMARY
              - AWAY
              - CONED
              - ORU
          description: >-
            Labels categorizing this charging session (e.g., service territory,
            pricing period).
          readOnly: true
        energy_usage:
          x-stoplight:
            id: lrh4jwtk91xcf
          oneOf:
            - type: string
              format: uri
              example: >-
                https://api.ev.energy/v2/charging_sub_sessions/csub01HSH04KDEWF6Z4DB2J77J74K5/energy_usage
              readOnly: true
            - $ref: '#/components/schemas/EnergyUsage'
          description: >-
            A link to more detailed information about energy usage during the
            charging sub-session. Can be expanded.
        schedules:
          x-stoplight:
            id: chargingsubsession-schedules-field
          oneOf:
            - type: string
              format: uri
              example: >-
                https://api.ev.energy/v2/charging_sub_sessions/csub01HSH04KDEWF6Z4DB2J77J74K5/schedules
              readOnly: true
            - type: array
              items:
                $ref: '#/components/schemas/ScheduleInterval'
          description: >-
            A link to schedule information for the charging sub-session. Can be
            expanded.
          readOnly: true
        tariff:
          x-stoplight:
            id: chargingsubsession-tariff-field
          oneOf:
            - type: string
              format: uri
              example: https://api.ev.energy/v2/tariffs/tari01HN2NJ9NMRZBXT1H6FT9N7735
            - $ref: '#/components/schemas/Tariff'
            - type: 'null'
          description: >-
            The electricity import tariff. Expandable with ?expand=tariff.
            Requires tariff:read scope.
          readOnly: true
        grid_energy_delivered:
          type: string
          x-stoplight:
            id: 1g1wxdds6qqpw
          format: decimal
          deprecated: true
          description: Use `grid_energy_delivered_watt_hours` instead
          readOnly: true
        solar_energy_delivered:
          type: string
          x-stoplight:
            id: eqkw6pba7d0qb
          format: decimal
          deprecated: true
          description: Use `solar_energy_delivered_watt_hours` instead.
          readOnly: true
    DispatcherLog:
      title: DispatcherLog
      type: object
      description: Records when a Dispatch Command was sent to an EVSE or Vehicle.
      x-stoplight:
        id: dispatcherlog-schema
      x-tags:
        - Charging Sessions
      properties:
        logged_at:
          type: string
          format: date-time
          description: The date and time when the dispatch command was logged.
          readOnly: true
        charging_sub_session:
          oneOf:
            - type: string
              format: uri
              example: >-
                https://api.ev.energy/v2/charging_sub_sessions/csub01HSH04KDEWF6Z4DB2J77J74K5
            - $ref: '#/components/schemas/ChargingSubSession'
          description: The charging sub-session associated with this dispatch log.
          readOnly: true
        schedule_valid_period_start:
          type: string
          format: date-time
          description: >-
            The start of the validity period for the schedule that generated
            this dispatch command.
          readOnly: true
        schedule_created_at:
          type: string
          format: date-time
          description: When the schedule that generated this dispatch command was created.
          readOnly: true
        internal_command_id:
          type: string
          format: uuid
          description: Internal identifier for tracking the dispatch command.
          example: 12345678-1234-5678-1234-567812345678
          readOnly: true
        device_type:
          type: string
          enum:
            - EVSE
            - VEHICLE
          description: The type of device the Dispatch Command was sent to.
          readOnly: true
        reason_not_sent:
          type:
            - string
            - 'null'
          description: If the dispatch command was not sent, provides a reason.
          readOnly: true
    Tariff:
      title: Tariff
      x-stoplight:
        id: k0xw227ef0tve
      type: object
      examples:
        - id: tari01HN2NJ9NMRZBXT1H6FT9N7735
          url: https://api.ev.energy/v2/tariffs/tari01HN2NJ9NMRZBXT1H6FT9N7735
          supplier: https://api.ev.energy/v2/suppliers/supl01HN2NJ9NMRZBXT1H6FT9N7735
          name: Fangorn Biomass
          currency: GBP
          daily_prices:
            peak:
              price: '0.30'
              times:
                - start: '18:00:00'
                  end: '00:00:00'
            mid_peak:
              price: '0.20'
              times:
                - start: '10:00:00'
                  end: '08:00:00'
            off_peak:
              price: '0.10'
              times:
                - start: '08:00:00'
                  end: '18:00:00'
      description: >-
        Note: daily_prices and type are only available under contract. Please
        reach out to your account manager to find out more.
      x-tags:
        - Tariffs
      required:
        - id
        - url
        - supplier
        - name
        - currency
      properties:
        id:
          type: string
          description: Unique identifier for the given user.
          x-stoplight:
            id: 1fk6mvq7injn8
          pattern: tari[A-Z\d]{26}
          example: tari01HN2NJ9NMRZBXT1H6FT9N7735
          readOnly: true
        url:
          type: string
          x-stoplight:
            id: nd8emclq49gr5
          format: uri
          example: https://api.ev.energy/v2/tariffs/tari01HN2NJ9NMRZBXT1H6FT9N7735
        supplier:
          x-stoplight:
            id: 1oomkhkvwr66e
          oneOf:
            - x-stoplight:
                id: mqrrrcnn0ktor
              type: string
              format: uri
              example: >-
                https://api.ev.energy/v2/suppliers/supl01HN2NJ9NMRZBXT1H6FT9N7735
            - $ref: '#/components/schemas/Supplier'
              x-stoplight:
                id: b5rn27oejidyw
          description: The energy company that supplies this tariff.
        name:
          type: string
          x-stoplight:
            id: cqrz5gmpens4f
          example: Fangorn Biomass
        currency:
          type: string
          x-stoplight:
            id: 7cf0bljsw0n91
          example: GBP
        highlighted:
          type: boolean
          x-stoplight:
            id: r6adrjl5ovn9w
          description: A highlighted tariff is one that is often selected by users.
        type:
          x-stoplight:
            id: 80oqwp13m92is
          enum:
            - FLAT_RATE
            - DUAL_RATE
            - THREE_RATE
            - DYNAMIC
            - EXTERNALLY_MANAGED
            - OTHER
        daily_prices:
          $ref: '#/components/schemas/DailyPrices'
          x-stoplight:
            id: 3wqy398hk7hff
          description: >-
            The times returned here are localised to the timezone the tariff is
            in.

            The timezone is returned in `timezone_name`.
        timezone_name:
          type: string
          x-stoplight:
            id: 0gjuz3e1ffop6
          example: Europe/London
        price_chart_url:
          type:
            - string
            - 'null'
          x-stoplight:
            id: v0566hu2u5kzw
          description: >-
            The url of a website which can display a chart of prices for the
            tariff. This website is an external resource and is not affiliated
            with ev.energy.
          example: https://www.example.com/
    TariffDetail:
      title: TariffDetail
      x-stoplight:
        id: 821z9bgnbzh27
      examples:
        - id: tari01HN2NJ9NMRZBXT1H6FT9N7735
          url: https://api.ev.energy/v2/tariffs/tari01HN2NJ9NMRZBXT1H6FT9N7735
          supplier: https://api.ev.energy/v2/suppliers/supl01HN2NJ9NMRZBXT1H6FT9N7735
          name: Fangorn Biomass
          currency: GBP
          daily_prices:
            peak:
              price: '0.30'
              times:
                - start: '18:00:00'
                  end: '00:00:00'
            mid_peak:
              price: '0.20'
              times:
                - start: '10:00:00'
                  end: '08:00:00'
            off_peak:
              price: '0.10'
              times:
                - start: '08:00:00'
                  end: '18:00:00'
          current_price: 10
          prices: >-
            https://api.ev.energy/v2/tariffs/tari01HN2NJ9NMRZBXT1H6FT9N7735/prices
      description: >-
        Extra fields only included when a single tariff is requested. Note:
        prices field requires tariff:prices:read scope and can be expanded with
        ?expand=prices.
      x-tags:
        - Tariffs
      allOf:
        - type: object
          properties:
            current_price:
              type:
                - integer
                - 'null'
              description: >-
                The price of the tariff at the current time, given in the
                smallest unit of the currency of the tariff. For example, 10
                means 10 pence.
              example: 10
            prices:
              oneOf:
                - type: string
                  format: uri
                  example: >-
                    https://api.ev.energy/v2/tariffs/tari01HN2NJ9NMRZBXT1H6FT9N7735/prices
                - type: array
                  items:
                    $ref: '#/components/schemas/Price'
                - type: 'null'
              description: >-
                Link to prices endpoint by default. When expanded with
                ?expand=prices, returns the past 24 hours of prices. Requires
                tariff:prices:read scope.
              readOnly: true
        - $ref: '#/components/schemas/Tariff'
          x-stoplight:
            id: ezcvpilmqfubp
    Supplier:
      title: Supplier
      x-stoplight:
        id: k3sn46upxffzy
      type: object
      description: An energy company who supplies electricity tariffs.
      required:
        - id
        - url
        - name
        - icon
      properties:
        id:
          type: string
          description: Unique identifier for the given user.
          x-stoplight:
            id: 6igsoygktgubb
          pattern: supl[A-Z\d]{26}
          example: supl01HN2NJ9NMRZBXT1H6FT9N7735
          readOnly: true
        url:
          type: string
          x-stoplight:
            id: qtoajv2ij5q5z
          format: uri
          example: https://api.ev.energy/v2/suppliers/supl01HN2NJ9NMRZBXT1H6FT9N7735
        name:
          type: string
          x-stoplight:
            id: pxtp3m0zz13xr
          example: Rivendell Renewables
        icon:
          type:
            - string
            - 'null'
          x-stoplight:
            id: osh805908zp2s
          format: uri
          example: https://cdn.example.com/rivendell_renewables.jpg
        highlighted:
          type: boolean
          x-stoplight:
            id: n7zbi1p205eh8
          description: A highlighted supplier is one that is often selected by users.
      x-tags:
        - Tariffs
    Times:
      title: Times
      description: Defines a period of time.
      x-stoplight:
        id: dtyput8epu2cw
      type: object
      x-tags:
        - Tariffs
      properties:
        start:
          type: string
          x-stoplight:
            id: mien3bhd76s98
          example: '18:00:00'
          pattern: \d\d:\d\d:\d\d
        end:
          type: string
          x-stoplight:
            id: 223irbojdlrfx
          example: '00:00:00'
          pattern: \d\d:\d\d:\d\d
    PriceSummary:
      title: PriceSummary
      description: A single price for a certain time range.
      x-stoplight:
        id: n0u0sig9yjqhj
      type: object
      examples:
        - price: '0.10'
          times:
            - start: '18:00:00'
              end: '00:00:00'
      x-tags:
        - Tariffs
      properties:
        price:
          type: string
          x-stoplight:
            id: oxf7ofaazu5ow
          example: '0.10'
          description: The price is in major currency units e.g. 0.10 means £0.10.
        times:
          type: array
          x-stoplight:
            id: b7i78btuv6oq8
          items:
            $ref: '#/components/schemas/Times'
            x-stoplight:
              id: 47w8xf59b4ojx
    DailyPrices:
      title: DailyPrices
      description: Information about the tariff's prices for different parts of the day.
      x-stoplight:
        id: 37m4xdbraa025
      type: object
      additionalProperties: false
      minProperties: 1
      maxProperties: 3
      required:
        - peak
      properties:
        peak:
          $ref: '#/components/schemas/PriceSummary'
          x-stoplight:
            id: g1te7e2zuvqtl
        mid_peak:
          $ref: '#/components/schemas/PriceSummary'
          x-stoplight:
            id: 2ga3a8xdzbnoa
        off_peak:
          $ref: '#/components/schemas/PriceSummary'
          x-stoplight:
            id: 6fyjxjmytext2
      x-tags:
        - Tariffs
    VehicleStatusLog:
      title: VehicleStatusLog
      description: Records the state of a Vehicle at a particular point in time.
      x-stoplight:
        id: n7tyx7svea396
      type: object
      x-tags:
        - Vehicles
      properties:
        url:
          type: string
          x-stoplight:
            id: a7b0o2jirts8h
          example: >-
            https://api.ev.energy/v2/vehicles/vhcl01HRFF3SEVSCRAV9B3CHVDFN0H/status_logs/2024-01-01T11:11:11.1111Z/
          format: uri
          readOnly: true
        logged_at:
          type: string
          x-stoplight:
            id: va5gsyhyofk64
          description: The date and time this status information was received and stored.
          format: date-time
          readOnly: true
        sampled_at:
          type: string
          x-stoplight:
            id: cfesy9i68ouu4
          format: date-time
          description: >-
            The date and time when this data was recorded. Likely to be earlier
            than `logged_at`, but how much earlier depends on the integration
            and other factors.
        vehicle:
          x-stoplight:
            id: rfxb8awkjma40
          oneOf:
            - type: string
              x-stoplight:
                id: 63gb0bry2r5jy
              format: uri
              example: https://api.ev.energy/v2/vehicles/vhcl01HRFF3SEVSCRAV9B3CHVDFN0H
            - $ref: '#/components/schemas/Vehicle'
              x-stoplight:
                id: kwo2bmirsfgle
        state_of_charge_percentage:
          type:
            - integer
            - 'null'
          x-stoplight:
            id: ru4src1shqjbe
          example: 70
          description: >-
            How full the vehicle's battery is, as a percentage. Will be null if
            we are unable to get this information from the vehicle's telematics.
          readOnly: true
        is_charging:
          type:
            - boolean
            - 'null'
          x-stoplight:
            id: 98yg16co10o9r
          default: false
          description: >-
            Is the vehicle currently receiving charge? Will be null if we are
            unable to get this information from the vehicle's telematics.
          readOnly: true
        is_plugged_in:
          type:
            - boolean
            - 'null'
          x-stoplight:
            id: 5g6hhsg05ah2a
          default: false
          description: >-
            Is the vehicle currently connected to an EVSE? Will be null if we
            are unable to get this information from the vehicle's telematics.
          readOnly: true
        charge_rate_watts:
          type:
            - integer
            - 'null'
          x-stoplight:
            id: o31p6j9y1fngo
          description: >-
            The current rate of charge being received, in watts. Will be null if
            we are unable to get this information from the Vehicle integration.
    VehicleAPIErrorLog:
      title: VehicleAPIErrorLog
      description: >-
        Records an error that occurred when attempting to communicate with a
        vehicle's telematics API.
      type: object
      x-tags:
        - Vehicles
      properties:
        url:
          type: string
          example: >-
            https://api.ev.energy/v2/vehicles/vhcl01HRFF3SEVSCRAV9B3CHVDFN0H/error_logs/2024-04-17T09:39:45.984584Z/
          format: uri
          readOnly: true
        logged_at:
          type: string
          description: >-
            The date and time when this error was logged by the ev.energy
            system.
          format: date-time
          readOnly: true
        vehicle:
          oneOf:
            - type: string
              format: uri
              example: https://api.ev.energy/v2/vehicles/vhcl01HRFF3SEVSCRAV9B3CHVDFN0H
            - $ref: '#/components/schemas/Vehicle'
        status_code:
          type: integer
          example: 401
          description: >-
            The HTTP status code of the error response from the vehicle
            telematics API.
          readOnly: true
        controller:
          type: string
          example: ENODE
          description: >-
            The vehicle controller/integration that was being used when the
            error occurred.
          readOnly: true
        error_code:
          type: string
          example: AUTHENTICATION_ERROR
          description: >-
            The error code received from the provider or determined by the
            ev.energy system.
          readOnly: true
        error_type:
          type: string
          example: VehicleAPIUnauthorized
          description: >-
            The error type received from the provider or determined by the
            ev.energy system.
          readOnly: true
        request_id:
          type: string
          example: 56rst-z2jku-tty9t-0dn2f-qazow
          description: >-
            The request ID that resulted in this error. Used for tracing and
            debugging.
          readOnly: true
        command:
          type: string
          example: START_CHARGE
          description: The command/method that was being executed when the error occurred.
          readOnly: true
        error_detail:
          type: string
          description: Detailed information about the error.
          readOnly: true
        internal_command_id:
          type: string
          format: uuid
          nullable: true
          example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
          description: >-
            Internal UUID to track the command dispatch. This can be used to
            correlate errors with commands.
          readOnly: true
    VehicleLocationLog:
      title: VehicleLocationLog
      description: >-
        Records when location data was sampled for a vehicle. The actual
        location coordinates are not exposed through this resource.
      type: object
      x-tags:
        - Vehicles
      properties:
        url:
          type: string
          example: >-
            https://api.ev.energy/v2/vehicles/vhcl01HRFF3SEVSCRAV9B3CHVDFN0H/location_logs/2024-04-17T09:39:45.984584Z/
          format: uri
          readOnly: true
        sampled_at:
          type: string
          description: >-
            The date and time when the location data was sampled from the
            vehicle (supplied by the API).
          format: date-time
          readOnly: true
        logged_at:
          type: string
          description: The server time the location event was received at.
          format: date-time
          readOnly: true
        vehicle:
          oneOf:
            - type: string
              format: uri
              example: https://api.ev.energy/v2/vehicles/vhcl01HRFF3SEVSCRAV9B3CHVDFN0H
            - $ref: '#/components/schemas/Vehicle'
        at_home:
          type:
            - boolean
            - 'null'
          description: >-
            Whether the vehicle was at the user's home location when this data
            was sampled. Will be null if the user has no home location
            configured.
          readOnly: true
    VehicleCommandLog:
      title: VehicleCommandLog
      description: Records a command that was sent to a vehicle.
      type: object
      x-tags:
        - Vehicles
      properties:
        url:
          type: string
          example: >-
            https://api.ev.energy/v2/vehicles/vhcl01HRFF3SEVSCRAV9B3CHVDFN0H/command_logs/2024-04-17T09:39:45.984584Z/
          format: uri
          readOnly: true
        logged_at:
          type: string
          description: >-
            The date and time when this command was logged by the ev.energy
            system.
          format: date-time
          readOnly: true
        vehicle:
          oneOf:
            - type: string
              format: uri
              example: https://api.ev.energy/v2/vehicles/vhcl01HRFF3SEVSCRAV9B3CHVDFN0H
            - $ref: '#/components/schemas/Vehicle'
        command:
          type: string
          example: START_CHARGE
          description: The type of command that was sent to the vehicle.
          enum:
            - START_CHARGE
            - STOP_CHARGE
            - WAKE_UP
            - SEND_SCHEDULE
          readOnly: true
        external_command_id:
          type: string
          nullable: true
          example: ext-cmd-12345
          description: External command ID from the vehicle provider.
          readOnly: true
        current_milliamps:
          type: integer
          nullable: true
          example: 32000
          description: >-
            If a start/stop command was sent, this is the current level that was
            sent in milliamps.
          readOnly: true
        internal_command_id:
          type: string
          format: uuid
          nullable: true
          example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
          description: >-
            Internal UUID to track this command dispatch. This links with device
            command logs and error logs.
          readOnly: true
    EVSECommandLog:
      title: EVSECommandLog
      description: Records a command that was sent to an EVSE.
      type: object
      x-tags:
        - EVSEs
      properties:
        url:
          type: string
          example: >-
            https://api.ev.energy/v2/evses/evse01HSH04KDEWF6Z4DB2J77J74K5/command_logs/2024-04-17T09:39:45.984584Z/
          format: uri
          readOnly: true
        logged_at:
          type: string
          description: >-
            The date and time when this command was logged by the ev.energy
            system.
          format: date-time
          readOnly: true
        evse:
          oneOf:
            - type: string
              format: uri
              example: https://api.ev.energy/v2/evses/evse01HSH04KDEWF6Z4DB2J77J74K5
            - $ref: '#/components/schemas/EVSE'
        max_load_target_milliamps:
          type: integer
          nullable: true
          example: 32000
          description: The target maximum load sent to the EVSE, in milliamps.
          readOnly: true
        is_enabled_target:
          type: boolean
          nullable: true
          example: true
          description: The target state sent for is_enabled (i.e. free-vend mode).
          readOnly: true
        always_enabled:
          type: boolean
          nullable: true
          example: false
          description: >-
            Whether the EVSE should always be in is_enabled (i.e. free-vend)
            mode.
          readOnly: true
        reason:
          type: string
          nullable: true
          example: SCHEDULED_CHARGING
          description: The reason the command was sent to the EVSE.
          readOnly: true
          enum:
            - SCHEDULED_CHARGING
            - REFRESH_SCHEDULES
            - STOP_CHARGE
            - START_CHARGE
            - SOLAR_CHARGE_NIGHTTIME_CHARGE_RATE
            - API_TRIGGERED_COMMAND
            - COMMISSIONING
            - CHARGING_SESSION
            - VEHICLE_TO_HOME
            - FREE_VEND
            - MAINTAIN_EVSE_STATE
            - CREATE_HOME_CHARGER
            - LOCKED_MODE
            - SMART_CHARGE_ENABLED_CHANGED
            - SMART_CHARGE_ENABLED
            - SMART_CHARGE_DISABLED
        internal_command_id:
          type: string
          format: uuid
          nullable: true
          example: d4e5f6a7-b8c9-0123-def0-123456789abc
          description: >-
            Internal UUID to track this command dispatch. This links with device
            command logs.
          readOnly: true
    RebateType:
      x-stoplight:
        id: 2b03710588741
      x-internal: true
      description: A resource representing a rebate a user can apply for.
      title: RebateType
      type: object
      example:
        id: rbttB1USP6YGD1VPIDJSHTZARUX11M
        url: https://api.ev.energy/v2/rebate_types/rbttB1USP6YGD1VPIDJSHTZARUX11M
        title: Vehicle Enrollment
        value_description: earn up to $1000
        icon: https://example.com
        description_long: Rebate for purchasing an eligible vehicle.
        description_short: Must be purchased after 11/01/2024
        requirements: >-
          <html><ul><li>Must be eligible for program</li><li>Purchased after
          11/01/2024</li><li>Must be connected to ev.energy</li></ul></html>
        required_evidence:
          - title: string
            description: string
            upload_required: true
            file:
              name: string
              url: https://example.com
            evidence_data:
              - data_type: currency
                title: string
                description: string
                required: true
                value: string
      properties:
        id:
          type: string
          x-stoplight:
            id: k6n634lyg5fsv
          description: Unique identifier for the RebateType
          readOnly: true
        url:
          type: string
          format: uri
          x-stoplight:
            id: 0ks9lhlnvfg52
          readOnly: true
        title:
          type: string
          x-stoplight:
            id: adtz3auav9s1u
          description: Display name.
          readOnly: true
        value_description:
          type: string
          x-stoplight:
            id: 5r665asikzzjh
          description: Short text describing the rebate value.
          example: earn up to $1000
          readOnly: true
        icon:
          type:
            - string
            - 'null'
          format: uri
          x-stoplight:
            id: w293t8idr072i
          description: URI for an icon representing this rebate type.
          readOnly: true
        description_long:
          type:
            - string
            - 'null'
          x-stoplight:
            id: ueb5az5xqtjl6
          description: Describes the rebate type.
          readOnly: true
        description_short:
          type:
            - string
            - 'null'
          x-stoplight:
            id: uak1yg5bk98wp
          description: >-
            One line of text containing important information for the rebate
            type.
          example: Must be purchased after 11/01/2024
          readOnly: true
        requirements:
          type: string
          x-stoplight:
            id: 2d6t5p0n6hycb
          description: HTML string containing detailed eligibility requirements.
          example: >-
            <html><ul><li>Must be eligible for program</li> <li>Purchased after
            11/01/2024</li><li>Must be connected to ev.energy</li></ul></html>
          format: html
          readOnly: true
        required_evidence:
          type: array
          x-stoplight:
            id: 8of2l478ukjm3
          items:
            x-stoplight:
              id: 6e5u5exw3joe9
            oneOf:
              - $ref: '#/components/schemas/RebateEvidenceType'
                x-stoplight:
                  id: i20erk5ipolq0
              - type: string
                x-stoplight:
                  id: g1wu0b22236lk
                format: uri
                example: >-
                  https://api.ev.energy/v2/rebate_evidence_types/rbetB1USP6YGD1VPIDJSHTZARUX11M
    UserRebate:
      type: object
      x-examples:
        Example 1:
          id: rbtuB1USP6YGD1VPIDJSHTZARUX11M
          url: https://api.ev.energy/v2/user_rebates/rbtuB1USP6YGD1VPIDJSHTZARUX11M
      description: Resource representing a user's rebate application.
      x-internal: true
      title: UserRebate
      examples:
        - id: string
          url: https://example.com
          status: PENDING_IN_PROGRESS
          rebate_type:
            id: string
            url: https://example.com
            title: string
            value_description: earn up to $1000
            icon: https://example.com
            description_long: string
            description_short: Must be purchased after 11/01/2024
            requirements: >-
              <html><ul><li>Must be eligible for program</li> <li>Purchased
              after 11/01/2024</li><li>Must be connected to
              ev.energy</li></ul></html>
            required_evidence:
              - title: string
                description: string
                upload_required: true
                file:
                  name: string
                  url: string
                evidence_data:
                  - data_type: currency
                    title: string
                    description: string
                    required: true
                    value: string
      properties:
        id:
          type: string
          readOnly: true
        url:
          type: string
          format: uri
          readOnly: true
        status:
          x-stoplight:
            id: wvn7kh5uuv1qj
          enum:
            - NOT_STARTED
            - PENDING_TYPE_SELECTED
            - PENDING_IN_PROGRESS
            - COMPLETE
          description: >-
            Status of the user's rebate application form. This does not indicate
            if the rebate has been reviewed or approved.
          readOnly: true
        rebate_type:
          oneOf:
            - type: string
              format: uri
              example: >-
                https://api.ev.energy/v2/rebate_types/rbttB1USP6YGD1VPIDJSHTZARUX11M
            - $ref: '#/components/schemas/RebateType'
              x-stoplight:
                id: acdwfilyalhce
    RebateEvidenceType:
      type: object
      description: >-
        Resource representing a type of evidence required for a rebate
        application.
      x-internal: true
      required:
        - title
        - description
        - upload_required
        - evidence_data
      properties:
        id:
          type: string
          example: rbetB1USP6YGD1VPIDJSHTZARUX11M
          pattern: rbet[A-Z\d]{26}
          x-stoplight:
            id: ncokjsarlcxfb
          readOnly: true
        url:
          type: string
          format: uri
          example: >-
            https://api.ev.energy/v2/rebate_evidence_types/rbetB1USP6YGD1VPIDJSHTZARUX11M
          x-stoplight:
            id: kohs4t0m4zpmm
          readOnly: true
        title:
          type: string
        description:
          type:
            - string
            - 'null'
        upload_required:
          type: boolean
          description: Whether we require the user to upload a file.
        file:
          type:
            - object
            - 'null'
          description: File uploaded by user as evidence.
          properties:
            name:
              type: string
              description: File name.
            url:
              type: string
              format: uri
              description: Pre-signed AWS URL for viewing the file.
        evidence_data:
          x-stoplight:
            id: r3bo6o5s1epre
          type: array
          items:
            $ref: '#/components/schemas/RebateEvidenceSupportingData'
            x-stoplight:
              id: 4hrpfdhj8ge1r
    RebateEvidenceSupportingData:
      type: object
      x-examples:
        Example 1:
          data_type: currency
          title: Total project cost
          description: Enter the total amount spent on the project
          required: true
          value: '1000'
      x-internal: true
      description: >-
        Resource representing data required as evidence for a rebate
        application.
      title: RebateEvidenceSupportingData
      examples:
        - data_type: currency
          title: string
          description: string
          required: true
          value: string
      required:
        - data_type
        - title
        - description
        - required
      properties:
        data_type:
          enum:
            - currency
            - string
        title:
          type: string
          example: Invoice
        description:
          type: string
          example: An invoice for solar panel installation
        required:
          type: boolean
          description: Whether this data is required.
        value:
          type:
            - string
            - 'null'
          description: Value entered in the user's application.
    UserRebateCreated:
      title: UserRebateCreated
      x-stoplight:
        id: vsioizeb3m45b
      x-tags:
        - Rebates
      type: object
      properties:
        id:
          type: string
          description: UID of the new UserRebate object.
          readOnly: true
        url:
          type: string
          format: uri
          readOnly: true
      examples:
        - id: rbtuB1USP6YGD1VPIDJSHTZARUX11M
          url: https://api.ev.energy/v2/user_rebates/rbtuB1USP6YGD1VPIDJSHTZARUX11M
      x-internal: true
      description: Resource representing a newly created UserRebate object.
    RebateEvidenceFile:
      title: RebateEvidenceFile
      x-stoplight:
        id: kvj9753dmqj92
      type: object
      description: Resource representing a rebate evidence file
      examples:
        - id: rbefB1USP6YGD1VPIDJSHTZARUX11M
          url: >-
            https://api.ev.energy/v2/user_rebates/rbtuB1USP6YGD1VPIDJSHTZARUX11M/evidence_files/rbefB1USP6YGD1VPIDJSHTZARUX11M
          file_name: test_file.pdf
          rebate_evidence_type: >-
            https://api.ev.energy/v2/rebate_evidence_type/rbetB1USP6YGD1VPIDJSHTZARUX11M
      properties:
        id:
          type: string
          x-stoplight:
            id: 7f44cfxa4egr6
        url:
          type: string
          x-stoplight:
            id: 7qwkme5lhgnlb
        file_name:
          type: string
          x-stoplight:
            id: c5dz294jlrmrq
        rebate_evidence_type:
          oneOf:
            - type: string
              x-stoplight:
                id: r3umoz07mpzcc
              format: uri
              example: >-
                https://api.ev.energy/v2/rebate_evidence_type/rbetB1USP6YGD1VPIDJSHTZARUX11M
            - $ref: '#/components/schemas/RebateEvidenceType'
    EVSEStatusLog:
      title: EVSEStatusLog
      x-stoplight:
        id: k1jcepbthspc4
      description: Records the state of an EVSE at a particular point in time.
      type: object
      x-tags:
        - EVSEs
      properties:
        url:
          type: string
          x-stoplight:
            id: ye730pojkfkqw
          format: uri
          example: >-
            https://api.ev.energy/v2/evse/evse01HSH04KDEWF6Z4DB2J77J74K5/status_logs/2024-01-01T11:11:11.1111Z/
          readOnly: true
        sampled_at:
          type: string
          format: date-time
          x-stoplight:
            id: ux6ka0qqhg775
          description: The date and time this status information was sampled on the EVSE.
        logged_at:
          type: string
          x-stoplight:
            id: nrp35casiiwpj
          format: date-time
          description: >-
            The date and time when this data was recorded. Likely to be later
            than `sampled_at`, but how much later depends on the integration and
            other factors.
        evse:
          x-stoplight:
            id: zxsdj1twrb4ga
          oneOf:
            - type: string
              x-stoplight:
                id: wpmqr467ydjgs
              format: uri
              example: https://api.ev.energy/v2/evses/evse01HSH04KDEWF6Z4DB2J77J74K5
            - $ref: '#/components/schemas/EVSE'
              x-stoplight:
                id: iuv4yclfhtevy
        is_plugged_in:
          type:
            - boolean
            - 'null'
          x-stoplight:
            id: a1bhr7wf8adsn
          description: >-
            Is there currently a vehicle connected to the EVSE? Will be null if
            we are unable to get this information from the EVSE integration.
        is_charging:
          type:
            - boolean
            - 'null'
          x-stoplight:
            id: lycgn0a178rsd
          description: >-
            Is the EVSE currently delivering charge? Will be null if we are
            unable to get this information from the EVSE integration.
        charge_rate_watts:
          type:
            - integer
            - 'null'
          x-stoplight:
            id: 4ofd0d361tfar
          description: >-
            The current rate of charge delivery, in watts. Will be null if we
            are unable to get this information from the EVSE integration.
    InverterStatusLog:
      title: InverterStatusLog
      x-stoplight:
        id: b7supzwxsux7m
      type: object
      description: Records the state of an Inverter at a particular point in time.
      properties:
        url:
          type: string
          x-stoplight:
            id: iny6m2j0rpe8h
          format: uri
          example: https://api.ev.energy/v2/inverters/invtB1USP6YGD1VPIDJSHTZARUX11M
        sampled_at:
          type: string
          x-stoplight:
            id: d81swiengwtdo
          format: date-time
        logged_at:
          type: string
          x-stoplight:
            id: 3fn7ryez1bcc5
          format: date-time
        inverter:
          x-stoplight:
            id: e7p17a763m6eh
          oneOf:
            - $ref: '#/components/schemas/Inverter'
              x-stoplight:
                id: 4ekr8eq0ryihn
            - type: string
              x-stoplight:
                id: itxk6zyma4hsh
              format: uri
        solar_power_watts:
          type: integer
          x-stoplight:
            id: 4t59e4k2oss4f
          example: 1000
          minimum: 0
    InverterMake:
      title: InverterMake
      x-stoplight:
        id: 78z4eiy5a3r9r
      type: object
      description: A resource representing a manufacturer of inverters.
      properties:
        id:
          type: string
          x-stoplight:
            id: jq6w0h1m1vbpg
          description: Unique identifier for the given Inverter Make.
          pattern: imak[A-Z\d]{26}
          example: imakNN2Q3R3TKF9XJQ7851PAUR56UX
          readOnly: true
        url:
          type: string
          x-stoplight:
            id: 54r5b1vx6u96a
          format: uri
          example: >-
            https://api.ev.energy/v2/inverter_makes/imakNN2Q3R3TKF9XJQ7851PAUR56UX
          readOnly: true
        name:
          type: string
          x-stoplight:
            id: 3w08bkz8n0y94
          example: Fronius
          readOnly: true
        icon:
          type:
            - string
            - 'null'
          x-stoplight:
            id: kl74imtzukri5
          format: uri
          example: https://cdn.example.com/fronius.jpg
          readOnly: true
        onboarding_url:
          type:
            - string
            - 'null'
          x-stoplight:
            id: q5mins0a9y2v1
          example: >-
            https://api.ev.energy/v2/inverter_oboarding?user_id=user01HN2NJ9NMRZBXT1H6FT9N7735&make_id=imakWNZ5N0A5D1PR89HJ7STXEWYO58
          description: >-
            If using Client credentials the URL will not contain a user ID. This
            will have to be added by the client so the inverter is created for
            the correct user.
        makes:
          type: string
          x-stoplight:
            id: 6g7aj8jlwzyv4
          example: >-
            https://api.ev.energy/v2/inverter_models/?make_id=imakWNZ5N0A5D1PR89HJ7STXEWYO58
          description: >-
            A pre-constructed link to a list of EVSE models filtered for this
            make.
    InverterModel:
      title: InverterModel
      x-stoplight:
        id: qhsslp7lye0dt
      type: object
      description: A resource representing an inverter model.
      properties:
        id:
          type: string
          x-stoplight:
            id: fuuk833i36yuj
          description: Unique identifier for the given Inverter Model.
          pattern: imod[A-Z\d]{26}
          example: imodOTQRGK9OKMPDU63SYGJ9T6FH3A
          readOnly: true
        url:
          type: string
          x-stoplight:
            id: 1hv29dxaltia2
          format: uri
          example: >-
            https://api.ev.energy/v2/inverter_models/imodOTQRGK9OKMPDU63SYGJ9T6FH3A
          readOnly: true
        name:
          type: string
          x-stoplight:
            id: pv41r0edkcu8x
          example: Symo 5.0
          readOnly: true
        make:
          x-stoplight:
            id: fmnsobruov7ny
          oneOf:
            - type: string
              x-stoplight:
                id: l06n30fz1jlqn
              format: uri
              example: >-
                https://api.ev.energy/v2/inverter_makes/imakNN2Q3R3TKF9XJQ7851PAUR56UX
              behavior: Read Only
            - $ref: '#/components/schemas/InverterMake'
              x-stoplight:
                id: chr8sak7h2r3z
        onboarding_url:
          type:
            - string
            - 'null'
          x-stoplight:
            id: d07y496ptymy4
          example: >-
            https://api.ev.energy/v2/inverter_oboarding?user_id=user01HN2NJ9NMRZBXT1H6FT9N7735&model_id=imodWNZ5N0A5D1PR89HJ7STXEWYO58
          description: >-
            If using Client credentials the URL will not contain a user ID. This
            will have to be added by the client so the inverter is created for
            the correct user.
    Inverter:
      title: Inverter
      x-stoplight:
        id: 58vnw5a7hxzkb
      type: object
      description: A resource that represents a single, physical inverter.
      properties:
        id:
          type: string
          x-stoplight:
            id: n8uuzq9x0ncu6
          description: Unique identifier for the given Inverter.
          pattern: invt[A-Z\d]{26}
          example: invtB1USP6YGD1VPIDJSHTZARUX11M
          readOnly: true
        url:
          type: string
          x-stoplight:
            id: jmhy2p7ocsfxr
          format: uri
          example: https://api.ev.energy/v2/inverters/invtB1USP6YGD1VPIDJSHTZARUX11M
          readOnly: true
        model:
          x-stoplight:
            id: y3gjk18sqo0mi
          oneOf:
            - type: string
              x-stoplight:
                id: lwrbrxezgvxf2
              format: uri
              example: >-
                https://api.ev.energy/v2/inverter_models/imodOTQRGK9OKMPDU63SYGJ9T6FH3A
              behavior: Read Only
            - $ref: '#/components/schemas/InverterModel'
              x-stoplight:
                id: sebp4gt7hvash
        latest_status_log:
          x-stoplight:
            id: r3njotj4kqmtc
          oneOf:
            - $ref: '#/components/schemas/InverterStatusLog'
              x-stoplight:
                id: v165cg5vyay19
            - type:
                - string
                - 'null'
              x-stoplight:
                id: b4ncpsslt6chx
              example: >-
                https://api.ev.energy/v2/inverters/invtB1USP6YGD1VPIDJSHTZARUX11M/status_logs/2024-07-23T16:01:45.994584Z/
        onboarding_url:
          type:
            - string
            - 'null'
          x-stoplight:
            id: 5pxrt53h65i0b
          example: >-
            https://api.ev.energy/v2/inverter_oboarding?inverter_id=invtB1USP6YGD1VPIDJSHTZARUX11M
    SubscriptionOffering:
      title: SubscriptionOffering
      x-stoplight:
        id: ccn8k4qxlvas9
      type: object
      description: A resource that represents a subscription offering.
      examples:
        - id: suboB1USP6YGD1VPIDJSHTZARUX11M
          url: >-
            https://api.ev.energy/v2/subscription_offerings/suboB1USP6YGD1VPIDJSHTZARUX11M
          name: ev.energy Solar Lifetime
      properties:
        id:
          type: string
          description: Unique identifier for the given Subscription Offering.
          pattern: subo[A-Z\d]{26}
          example: suboB1USP6YGD1VPIDJSHTZARUX11M
          readOnly: true
        url:
          type: string
          format: uri
          example: >-
            https://api.ev.energy/v2/subscription_offerings/suboB1USP6YGD1VPIDJSHTZARUX11M
          readOnly: true
        name:
          type: string
          example: ev.energy Solar Lifetime
          x-stoplight:
            id: 3w25bbl1xdn51
    SolarArray:
      title: SolarArray
      x-stoplight:
        id: rlfl4959v1reu
      type: object
      description: A resource that represents a single solar array.
      examples:
        - id: solr01JASZTD3T7N39DTZPBJVXNPKP
          url: https://api.ev.energy/solar_arrays/solr01JASZTD3T7N39DTZPBJVXNPKP
          capacity_watts: 7000
          inverter: https://api.ev.energy/inverters/invtFB08NVS8KADFY6GAQ9C6RMFGUY
          forecast:
            solar_watt_hours_until_midnight: 19
            percent_vehicle_battery_charge_until_midnight: 30
            last_updated_at: '2024-10-16T11:26:16'
          user: https://api.ev.energy/v2/users/user01HN2NJ9NMRZBXT1H6FT9N7735
      required:
        - id
        - url
      properties:
        id:
          type: string
          description: Unique identifier for the given Solar Array.
          pattern: solr[A-Z\d]{26}
          example: solr01JASZTD3T7N39DTZPBJVXNPKP
          readOnly: true
        url:
          type: string
          format: uri
          example: https://api.ev.energy/solar_arrays/solr01JASZTD3T7N39DTZPBJVXNPKP
          readOnly: true
        capacity_watts:
          type: integer
          x-stoplight:
            id: 1j3giw6vdjlw0
          description: Capacity of the solar array in watts.
        inverter:
          x-stoplight:
            id: fray2bfnr0n2h
          oneOf:
            - type:
                - string
                - 'null'
              x-stoplight:
                id: z8vzd46xx1m63
              format: uri
              behavior: Read Only
              example: >-
                https://api.ev.energy/v2/inverters/invtB1USP6YGD1VPIDJSHTZARUX11M
            - type: object
              $ref: '#/components/schemas/Inverter'
              x-stoplight:
                id: s5kn7l8ul5fvz
          description: Reference of the connected inverter.
        forecast:
          type:
            - object
            - 'null'
          x-stoplight:
            id: u7fgf6z3s6cf5
          description: |-
            Forecast data if available to the user.

            Only available to `internal` users.
          properties:
            solar_watt_hours_until_midnight:
              type:
                - integer
                - 'null'
              x-stoplight:
                id: e5ut440y0m72v
              description: >-
                The forecasted charge in watt hours by midnight for the user
                from solar charging alone (approximate value).
              readOnly: true
            percent_vehicle_battery_charge_until_midnight:
              type:
                - integer
                - 'null'
              x-stoplight:
                id: 9jmrw2yid1hiw
              description: >-
                The forecasted percentage point increase in the provided car's
                battery level by midnight from solar charging alone.


                Only available when `vehicle_id` is provided.
              readOnly: true
            last_updated_at:
              type: string
              x-stoplight:
                id: 0mii2q3bcm1db
              format: date-time
              description: The timestamp of when the forecast results were last calculated.
              readOnly: true
        user:
          x-stoplight:
            id: wfde0bpa825qr
          oneOf:
            - type: string
              x-stoplight:
                id: pw66hl86k4bhc
              format: uri
              example: https://api.ev.energy/v2/user/user01HN2NJ9NMRZBXT1H6FT9N7735
            - type: object
              $ref: '#/components/schemas/User'
              x-stoplight:
                id: pqknvo989xkil
    Subscription:
      title: Subscription
      x-stoplight:
        id: ancwwhetgae2r
      type: object
      description: A resource that represents a single subscription.
      examples:
        - id: subsB1USP6YGD1VPIDJSHTZARUX11M
          url: https://api.ev.energy/subscriptions/subsB1USP6YGD1VPIDJSHTZARUX11M
          offering: >-
            https://api.ev.energy/v2/subscription_offerings/suboB1USP6YGD1VPIDJSHTZARUX11M
          user: https://api.ev.energy/v2/user/user01HN2NJ9NMRZBXT1H6FT9N7735
      required:
        - id
        - url
      properties:
        id:
          type: string
          description: Unique identifier for the given Subscription.
          pattern: subs[A-Z\d]{26}
          example: subsB1USP6YGD1VPIDJSHTZARUX11M
          readOnly: true
        url:
          type: string
          format: uri
          example: https://api.ev.energy/subscriptions/subsB1USP6YGD1VPIDJSHTZARUX11M
          readOnly: true
        offering:
          oneOf:
            - type:
                - string
                - 'null'
              format: uri
              behavior: Read Only
              example: >-
                https://api.ev.energy/v2/subscription_offerings/suboB1USP6YGD1VPIDJSHTZARUX11M
            - $ref: '#/components/schemas/SubscriptionOffering'
              x-stoplight:
                id: zy5qr3spvsblg
          description: Reference of the offering.
          x-stoplight:
            id: y0fg0rc0j2u0w
        user:
          oneOf:
            - type: string
              format: uri
              example: https://api.ev.energy/v2/user/user01HN2NJ9NMRZBXT1H6FT9N7735
            - type: object
              $ref: '#/components/schemas/User'
    SupportTicket:
      title: Support Ticket
      x-stoplight:
        id: supportticketschema
      type: object
      description: >-
        A resource that represents a support ticket from a customer support
        system.
      x-tags:
        - Support Tickets
      required:
        - id
        - url
        - external_ticket_id
        - position
        - message_type
        - message
        - created_at
      properties:
        id:
          type: string
          description: Unique identifier for the given support ticket.
          pattern: tick[A-Z\d]{26}
          example: tick01HN2NJ9NMRZBXT1H6FT9N7735
          readOnly: true
        url:
          type: string
          format: uri
          example: >-
            https://api.ev.energy/v2/support_tickets/tick01HN2NJ9NMRZBXT1H6FT9N7735
          readOnly: true
        user:
          oneOf:
            - type: string
              format: uri
              example: https://api.ev.energy/v2/users/user01HN2NJ9NMRZBXT1H6FT9N7735
            - $ref: '#/components/schemas/User'
            - type: 'null'
          description: >-
            Reference to the user who created the ticket. Can be null for
            tickets created through channels where a user account may not exist
            (e.g., pre-signup inquiries, web forms).


            Access control:

            - Tickets with a user are accessible based on user/organization
            permissions

            - Tickets without a user (null) are only accessible to applications
            with access_all_areas permission
          readOnly: true
          nullable: true
        external_ticket_id:
          type: string
          description: External ticket ID from Freshdesk or other support system.
          example: '12345'
          readOnly: true
        position:
          type: integer
          description: The position in the conversation history. 0 is the first message.
          example: 0
          readOnly: true
        message_type:
          allOf:
            - $ref: '#/components/schemas/SupportTicketMessageTypeEnum'
          description: The type of message in the ticket conversation.
          example: INITIAL_REQUEST
          readOnly: true
        subject:
          type:
            - string
            - 'null'
          description: The subject or title of the ticket.
          example: Unable to connect my vehicle
          readOnly: true
        status:
          type:
            - string
            - 'null'
          description: Status name (e.g., Open, Resolved, Closed).
          example: Open
          readOnly: true
        priority:
          type:
            - string
            - 'null'
          description: Priority name (e.g., Low, Medium, High, Urgent).
          example: Medium
          readOnly: true
        source:
          type:
            - string
            - 'null'
          description: Source name (e.g., Email, Phone, Feedback Widget).
          example: Email
          readOnly: true
        human_verified_category:
          oneOf:
            - $ref: '#/components/schemas/SupportTicketCategoryEnum'
            - type: 'null'
          description: Human verified category for the ticket.
          example: VEHICLE
        human_verified_subcategory:
          oneOf:
            - $ref: '#/components/schemas/SupportTicketSubcategoryEnum'
            - type: 'null'
          description: Human verified subcategory for the ticket.
          example: TELEMATICS_ISSUE
        ai_generated_category:
          oneOf:
            - $ref: '#/components/schemas/SupportTicketCategoryEnum'
            - type: 'null'
          description: AI generated category for the ticket.
          example: VEHICLE
        ai_generated_subcategory:
          oneOf:
            - $ref: '#/components/schemas/SupportTicketSubcategoryEnum'
            - type: 'null'
          description: AI generated subcategory for the ticket.
          example: TELEMATICS_ISSUE
        type_deprecated:
          type:
            - string
            - 'null'
          description: Legacy ticket type (phased out for category/subcategory system).
          example: Vehicle API error
          readOnly: true
        tags:
          type: array
          description: List of tags (e.g., ['ai-categorised', 'escalated']).
          items:
            type: string
          example:
            - ai-categorised
          readOnly: true
        message:
          type: string
          description: The message from the agent or customer.
          example: I am having trouble connecting my Tesla to the app.
          readOnly: true
        message_clean:
          type:
            - string
            - 'null'
          description: A cleaned version of the message with all unnecessary text removed.
          example: Having trouble connecting Tesla to app.
          readOnly: true
        conversation_summary:
          type:
            - string
            - 'null'
          description: An AI generated summary of the conversation.
          example: >-
            Customer experiencing issues with Tesla vehicle connection to mobile
            app.
          readOnly: true
        custom_fields:
          type: object
          description: >-
            Additional custom fields from support system (e.g.,
            car_manufacturer, mobile_app, legal_country, membership_level).
          additionalProperties: true
          example:
            car_manufacturer: Tesla
            mobile_app: iOS
          readOnly: true
        attributes:
          type: object
          description: Additional information about the user and their hardware.
          additionalProperties: true
          example:
            evse_model: ChargePoint Home Flex
          readOnly: true
        created_at:
          type: string
          format: date-time
          description: When the ticket was created in the support system.
          example: '2019-08-24T14:15:22Z'
          readOnly: true
        ticket_updated_at:
          type:
            - string
            - 'null'
          format: date-time
          description: When the ticket was last updated in the support system.
          example: '2019-08-24T15:30:00Z'
          readOnly: true
        resolved_at:
          type:
            - string
            - 'null'
          format: date-time
          description: When the ticket was resolved in the support system.
          example: '2019-08-25T10:00:00Z'
          readOnly: true
    SupportTicketMessageTypeEnum:
      title: Support Ticket Message Type
      type: string
      description: The type of message in a support ticket conversation.
      enum:
        - INITIAL_REQUEST
        - CUSTOMER_RESPONSE
        - HUMAN_AGENT_RESPONSE
        - AI_AGENT_RESPONSE
      x-stoplight:
        id: supportticketmessagetypeenum
    SupportTicketCategoryEnum:
      title: Support Ticket Category
      type: string
      description: Main category for a support ticket.
      enum:
        - ACCOUNT
        - CHARGER
        - CHARGING_SESSION
        - MOBILE_APP
        - OTHER
        - SOLAR
        - USABILITY_UX
        - VEHICLE
      x-stoplight:
        id: supportticketcategoryenum
    SupportTicketSubcategoryEnum:
      title: Support Ticket Subcategory
      type: string
      description: Subcategory for a support ticket.
      enum:
        - ACCESSIBILITY
        - ACCURACY
        - ADD_NON_INTEGRATED_VEHICLE
        - ADD_NEW_TARIFF
        - API_ACCESS_TOKEN
        - APP_CRASH_FREEZE
        - APP_OR_EMAIL_NOTIFICATIONS
        - APP_SETTINGS_CONFUSION
        - BOOST_CONFUSION
        - BUSINESS_LEAD_NON_SUPPORT
        - CAMPAIGN_MARKETING_FEEDBACK
        - CARBON_FEED
        - CHARGE_LOCATION
        - CHARGE_PAST_READY_BY_TIME
        - CHARGING_ON_PEAK
        - COMMISSIONING
        - COMPATIBILITY
        - COMPLAINT
        - CONFLICTING_SCHEDULE
        - DASHBOARD_COSMETIC_ISSUE
        - DASHBOARD_UI_ISSUE
        - DATA_EXPORT
        - DELETION
        - DUPLICATE
        - ELIGIBILITY
        - ENERGY_DELIVERED_CALCULATION
        - ERROR_REPORT
        - FEATURE_REQUEST_FEEDBACK
        - FIRMWARE
        - HARDWARE
        - HARDWARE_ISSUE
        - HIDDEN_INCENTIVES
        - INCENTIVES_BILL_CREDITS
        - INCOMPLETE_CHARGE
        - INCORRECT_CHARGE_TIME_DURATION
        - INCORRECT_INCENTIVES_DISPLAYED
        - INCORRECT_KWH_DISPLAYED
        - INCORRECT_LOCATION_DISPLAYED
        - INCORRECT_MESSAGING
        - INCORRECT_PRICE_THRESHOLD
        - INCORRECT_TRIM
        - INVERTER
        - LOCALISATION
        - LOCATION_INCORRECT
        - LOGIN_CREDENTIALS
        - MANUAL_UPLOAD
        - MAX_CHARGE_LIMIT
        - MISSING_SESSIONS
        - MISSING_TARIFF
        - MOBILE_COMPATIBILITY
        - MULTI_VEHICLE
        - NETWORK
        - NO_CHARGE
        - NON_SUPPORT_EXTERNAL
        - NOT_COMPATIBLE
        - MANGED_TARIFF_INTERFERENCE
        - OFFLINE
        - OFF_PEAK_HOURS_CONFUSION
        - ONBOARDING
        - ONLY_CHARGE_OFF_PEAK_OFF
        - OTHER
        - OUTAGE
        - OWNERSHIP_TRANSFER
        - PASSWORD
        - PLATFORM_OUTAGE
        - POOR_UPTIME
        - PRIVACY_CONCERNS
        - REAUTHENTICATION
        - REBATE_REQUEST
        - REFERRAL_PROMO_CODE
        - REFUNDS
        - REFUSING_COMMANDS
        - RELIABILITY
        - REPLACE_VEHICLE
        - REQUEST_TO_DISCONNECT
        - REWARDS
        - REWARDS_INCENTIVES_UI_ISSUE
        - SESSION_RECALCULATION
        - SESSION_START_END_TIME
        - SESSION_START_END_TIME_CONFUSION
        - SMART_CHARGING_CONFUSION
        - SMART_TAB_UI_ISSUE
        - SOLAR_CHARGING_CONFUSION
        - SOLAR_FEED
        - SOLAR_PAYMENT
        - SPAM
        - STATS_COSMETIC_ISSUE
        - STATS_UI_ISSUE
        - SUBSCRIPTION_ISSUE
        - TARIFF_IS_OUTDATED_INCORRECT
        - TARIFF_REQUEST
        - TELEMATICS_ISSUE
        - TIER_SELECTION
        - TRIM
        - UI_ISSUE
        - UNABLE_TO_DETECT_CAR_PLUGGED_IN
        - UTILITY_PARTNER_INQUIRY
        - VEHICLE_DELETION
        - VERIFICATION
        - WRONG_COMPANY
      x-stoplight:
        id: supportticketsubcategoryenum
    ChargingSubSessionCreatedWebhook:
      title: Charging Sub Session Created Webhook
      description: Webhook payload about a charging sub session being created.
      type: object
      properties:
        type:
          type: string
          enum:
            - charging_sub_session.created
        timestamp:
          type: string
          format: date-time
          description: The timestamp of the event described by this webhook
        data:
          type: object
          description: The charging sub session being created
          $ref: '#/components/schemas/ChargingSubSession'
      examples:
        - type: charging_sub_session.created
          timestamp: '2022-11-03T20:26:10.344522Z'
          data:
            id: csub01HSH04KDEWF6Z4DB2J77J74K5
            url: >-
              https://api.ev.energy/v2/charging_sub_sessions/csub01HSH04KDEWF6Z4DB2J77J74K5
            start: '2019-08-24T14:15:22Z'
            end: null
            mode: smart
            vehicle: https://api.ev.energy/v2/vehicles/vhcl01HRFF3SEVSCRAV9B3CHVDFN0H
            evse: https://api.ev.energy/v2/evses/evse01HSH04KDEWF6Z4DB2J77J74K5
            energy_delivered_watt_hours: 0
            cost: 0
            percentage_added: 0
            location:
              name: Home
            currency: GBP
    ChargingSubSessionEndedWebhook:
      title: Charging Sub Session Ended Webhook
      description: Webhook payload about a charging sub session ending.
      type: object
      properties:
        type:
          type: string
          enum:
            - charging_sub_session.ended
        timestamp:
          type: string
          format: date-time
          description: The timestamp of the event described by this webhook
        data:
          type: object
          description: The charging sub session being created
          $ref: '#/components/schemas/ChargingSubSession'
      examples:
        - type: charging_sub_session.ended
          timestamp: '2022-11-03T20:26:10.344522Z'
          data:
            id: csub01HSH04KDEWF6Z4DB2J77J74K5
            url: >-
              https://api.ev.energy/v2/charging_sub_sessions/csub01HSH04KDEWF6Z4DB2J77J74K5
            start: '2019-08-24T14:15:22Z'
            end: '2019-08-24T14:15:22Z'
            mode: smart
            vehicle: https://api.ev.energy/v2/vehicles/vhcl01HRFF3SEVSCRAV9B3CHVDFN0H
            evse: https://api.ev.energy/v2/evses/evse01HSH04KDEWF6Z4DB2J77J74K5
            energy_delivered_watt_hours: 2300
            cost: 634
            percentage_added: 30
            location:
              name: Home
            currency: GBP
    LatLong:
      title: LatLong
      x-stoplight:
        id: odt56dev23ykv
      type: object
      description: Coordinates model used for locations.
      required:
        - latitude
        - longitude
      properties:
        latitude:
          type: number
          x-stoplight:
            id: 7eryq3c1aiai5
          format: float
          example: 51.52576576674041
        longitude:
          type: number
          x-stoplight:
            id: 8hucdnncqdfw6
          format: float
          example: -0.08366433371722264
    Location:
      title: Location
      x-stoplight:
        id: 9k7ayapf18wyp
      type: object
      description: Location model for charging locations.
      properties:
        address_1:
          type:
            - string
            - 'null'
          x-stoplight:
            id: eve53iuk6to54
          description: First line of address.
        address_2:
          type:
            - string
            - 'null'
          x-stoplight:
            id: c1wxsj5ejrfrs
          description: Second line of address.
        postal_code:
          type:
            - string
            - 'null'
          x-stoplight:
            id: ohzpkm1qkjzs0
          description: Postal Code.
        country_code:
          anyOf:
            - $ref: '#/components/schemas/CountryCode'
            - type: 'null'
          x-stoplight:
            id: uqtaapytwllti
          $ref: '#/components/schemas/CountryCode'
        coordinates:
          anyOf:
            - $ref: '#/components/schemas/LatLong'
            - type: 'null'
          x-stoplight:
            id: e6y8g4spdqir8
        tariff:
          oneOf:
            - format: uri
              behavior: Read Only
              x-stoplight:
                id: 4swrj3gf02aml
              type:
                - string
                - 'null'
              example: https://api.ev.energy/v2/tariffs/tari01HN2NJ9NMRZBXT1H6FT9N7735
            - $ref: '#/components/schemas/Tariff'
        city:
          type:
            - string
            - 'null'
          x-stoplight:
            id: ix6tj4s3iziz3
        state:
          type:
            - string
            - 'null'
          x-stoplight:
            id: fiq8gwazoqppv
        evse_site:
          oneOf:
            - type:
                - string
                - 'null'
            - $ref: '#/components/schemas/EVSESite'
          x-stoplight:
            id: b20caaae1b13b
          description: >-
            If null, the user's location is not an EVSE Site. Otherwise, this
            field references the site they are a part of.
    LocationDetail:
      title: Location
      x-stoplight:
        id: fvlycma86o5j8
      description: >-
        Extra fields only included when a single location is requested but
        omitted when locations are listed.
      allOf:
        - type: object
          properties:
            current_carbon_intensity_grams_per_kilowatt_hour:
              type:
                - integer
                - 'null'
              example: 300
              description: >-
                The current carbon intensity associated with the location in
                gCO2/kWh.
        - $ref: '#/components/schemas/Location'
          x-stoplight:
            id: ursbspdg83k4p
    Program:
      title: Program
      x-stoplight:
        id: 2zce2sdge70u3
      type: object
      properties:
        id:
          type: string
          x-stoplight:
            id: 7l9yvno85ksfa
          example: prog01JCK1HPNAANB8WN253G27SFPC
          pattern: prog[A-Z\d]{26}
          readOnly: true
        url:
          type: string
          x-stoplight:
            id: 855ris3jjg779
          example: https://api.ev.energy/v2/programs/prog01JCK1HPNAANB8WN253G27SFPC
          format: uri
          readOnly: true
        name:
          type: string
          x-stoplight:
            id: eu3ro73u1cnoq
          example: CoolCharge
          description: A human-friendly name for the Program.
          readOnly: true
        description:
          type: string
          x-stoplight:
            id: ail6lp7ssilbv
          example: >-
            A program which incentivises charging when it's coolest to charge
            your EV
          description: >-
            A plain text description of the program's incentives and
            requirements.
          readOnly: true
        logo:
          type:
            - string
            - 'null'
          x-stoplight:
            id: w58k5tvrw26vf
          format: uri
          description: URL to download a logo image for the Program.
          readOnly: true
        sponsor_name:
          type: string
          x-stoplight:
            id: z4qsoguqlzrwz
          example: Cool Power
          description: >-
            The name of the organisation which sponsors the program. Often, but
            not always, a utility company.
          readOnly: true
        external_url:
          type: string
          x-stoplight:
            id: im3tsdss0oic8
          format: uri
          example: https://www.example.com/coolcharge
          description: >-
            A publicly accessible URL where individuals can enroll in the
            program.
          readOnly: true
    CountryCode:
      x-stoplight:
        id: rmq63ogmvl57l
      description: ISO 3166-1 2 letter Country Codes.
      type: string
      enum:
        - AD
        - AE
        - AF
        - AG
        - AI
        - AL
        - AM
        - AO
        - AQ
        - AR
        - AS
        - AT
        - AU
        - AW
        - AX
        - AZ
        - BA
        - BB
        - BD
        - BE
        - BF
        - BG
        - BH
        - BI
        - BJ
        - BL
        - BM
        - BN
        - BO
        - BQ
        - BR
        - BS
        - BT
        - BV
        - BW
        - BY
        - BZ
        - CA
        - CC
        - CD
        - CF
        - CG
        - CH
        - CI
        - CK
        - CL
        - CM
        - CN
        - CO
        - CR
        - CU
        - CV
        - CW
        - CX
        - CY
        - CZ
        - DE
        - DJ
        - DK
        - DM
        - DO
        - DZ
        - EC
        - EE
        - EG
        - EH
        - ER
        - ES
        - ET
        - FI
        - FJ
        - FK
        - FM
        - FO
        - FR
        - GA
        - GB
        - GD
        - GE
        - GF
        - GG
        - GH
        - GI
        - GL
        - GM
        - GN
        - GP
        - GQ
        - GR
        - GS
        - GT
        - GU
        - GW
        - GY
        - HK
        - HM
        - HN
        - HR
        - HT
        - HU
        - ID
        - IE
        - IL
        - IM
        - IN
        - IO
        - IQ
        - IR
        - IS
        - IT
        - JE
        - JM
        - JO
        - JP
        - KE
        - KG
        - KH
        - KI
        - KM
        - KN
        - KP
        - KR
        - KW
        - KY
        - KZ
        - LA
        - LB
        - LC
        - LI
        - LK
        - LR
        - LS
        - LT
        - LU
        - LV
        - LY
        - MA
        - MC
        - MD
        - ME
        - MF
        - MG
        - MH
        - MK
        - ML
        - MM
        - MN
        - MO
        - MP
        - MQ
        - MR
        - MS
        - MT
        - MU
        - MV
        - MW
        - MX
        - MY
        - MZ
        - NA
        - NC
        - NE
        - NF
        - NG
        - NI
        - NL
        - 'NO'
        - NP
        - NR
        - NU
        - NZ
        - OM
        - PA
        - PE
        - PF
        - PG
        - PH
        - PK
        - PL
        - PM
        - PN
        - PR
        - PS
        - PT
        - PW
        - PY
        - QA
        - RE
        - RO
        - RS
        - RU
        - RW
        - SA
        - SB
        - SC
        - SD
        - SE
        - SG
        - SH
        - SI
        - SJ
        - SK
        - SL
        - SM
        - SN
        - SO
        - SR
        - SS
        - ST
        - SV
        - SX
        - SY
        - SZ
        - TC
        - TD
        - TF
        - TG
        - TH
        - TJ
        - TK
        - TL
        - TM
        - TN
        - TO
        - TR
        - TT
        - TV
        - TW
        - TZ
        - UA
        - UG
        - UM
        - US
        - UY
        - UZ
        - VA
        - VC
        - VE
        - VG
        - VI
        - VN
        - VU
        - WF
        - WS
        - YE
        - YT
        - ZA
        - ZM
        - ZW
    UsageInterval:
      title: UsageInterval
      x-stoplight:
        id: l5ryo1rtckzwk
      type: object
      properties:
        interval_seconds:
          type: integer
          x-stoplight:
            id: 0921rgwt72umi
          description: The number of seconds that this interval lasts for.
          readOnly: true
        started_at:
          type: string
          x-stoplight:
            id: nskh5yapg8isi
          format: date-time
          description: When this interval began.
          readOnly: true
        total_energy_delivered_watt_hours:
          type: integer
          x-stoplight:
            id: xgy8iwd44uey9
          description: The total number of watt hours delivered during the interval.
          readOnly: true
        energy_delivered_by_price:
          type: object
          $ref: '#/components/schemas/EnergyDeliveredByPrice'
          x-stoplight:
            id: ord85260l5ohu
          description: >-
            Energy delivered during the interval, broken down by the price paid
            for that energy. For example, if half the period was at peak price
            (50p) and half at off-peak price (20p), this field would contain an
            entry for 20p and an entry for 50p with the total energy delivered
            at each price. Note that prices are always quoted in the smallest
            sub-unit of the currency. (Ie. cents for USD, pence for GBP.)
          readOnly: true
    EnergyDeliveredByPrice:
      title: EnergyDeliveredByPrice
      x-stoplight:
        id: og0w93wv2amug
      type: object
      properties:
        price:
          type: string
          x-stoplight:
            id: m8ih5a9un3wln
          description: The price paid for the energy in the smallest unit of the currency.
          example: '21.3'
          format: decimal
        energy_delivered_watt_hours:
          type: integer
          x-stoplight:
            id: 2jqbjpg3bm1fw
          example: 1800
    EnergyUsage:
      title: EnergyUsage
      x-stoplight:
        id: exttmltswp95i
      type: object
      properties:
        url:
          type: string
          x-stoplight:
            id: 2fvbgl487bhtr
          format: uri
          example: >-
            https://api.ev.energy/v2/charging_sub_sessions/csub01HSH04KDEWF6Z4DB2J77J74K5/energy_usage
          readOnly: true
        currency:
          type: string
          x-stoplight:
            id: extwt0qf5oug1
          example: GBP
          description: >-
            The currency that prices for intervals are quoted in. Note that we
            always use the smallest unit of the currency.
          readOnly: true
        charging_sub_session:
          type: string
          x-stoplight:
            id: 2osr7n7cdruzg
          format: uri
          example: >-
            https://api.ev.energy/v2/charging_sub_sessions/csub01HSH04KDEWF6Z4DB2J77J74K5
          readOnly: true
        intervals:
          type: array
          x-stoplight:
            id: u7j59jlc5qhoa
          description: A list of energy usage intervals for this charging sub-session.
          items:
            $ref: '#/components/schemas/UsageInterval'
            x-stoplight:
              id: tqtonvttkj73j
          readOnly: true
        last_updated_at:
          type: string
          x-stoplight:
            id: np08katjt7nse
          format: date-time
          description: The datetime when the energy usages were last updated at.
    Schedules:
      title: Schedules
      x-stoplight:
        id: schedules-schema
      type: object
      properties:
        url:
          type: string
          x-stoplight:
            id: schedules-url-field
          format: uri
          example: >-
            https://api.ev.energy/v2/charging_sub_sessions/csub01HSH04KDEWF6Z4DB2J77J74K5/schedules
          readOnly: true
        charging_sub_session:
          x-stoplight:
            id: schedules-charging-sub-session-field
          oneOf:
            - type: string
              format: uri
              example: >-
                https://api.ev.energy/v2/charging_sub_sessions/csub01HSH04KDEWF6Z4DB2J77J74K5
            - $ref: '#/components/schemas/ChargingSubSession'
          description: >-
            The charging sub-session these schedules belong to. Defaults to a
            url, but can be expanded to the full ChargingSubSession resource via
            the `expand` query parameter.
          readOnly: true
        schedules:
          type: array
          x-stoplight:
            id: schedules-array-field
          description: A list of schedule intervals for this charging sub-session.
          items:
            $ref: '#/components/schemas/ScheduleInterval'
          readOnly: true
    SchedulePlans:
      title: SchedulePlans
      x-stoplight:
        id: scheduleplans-schema
      type: object
      properties:
        url:
          type: string
          x-stoplight:
            id: scheduleplans-url-field
          format: uri
          example: >-
            https://api.ev.energy/v2/charging_sub_sessions/csub01HSH04KDEWF6Z4DB2J77J74K5/schedule_plans
          readOnly: true
        charging_sub_session:
          x-stoplight:
            id: scheduleplans-charging-sub-session-field
          oneOf:
            - type: string
              format: uri
              example: >-
                https://api.ev.energy/v2/charging_sub_sessions/csub01HSH04KDEWF6Z4DB2J77J74K5
            - $ref: '#/components/schemas/ChargingSubSession'
          description: >-
            The charging sub-session these schedule plans belong to. Defaults to
            a url, but can be expanded to the full ChargingSubSession resource
            via the `expand` query parameter.
          readOnly: true
        schedule_plans:
          type: array
          x-stoplight:
            id: scheduleplans-array-field
          description: A list of schedule plans for this charging sub-session.
          items:
            $ref: '#/components/schemas/SchedulePlan'
          readOnly: true
    SchedulePlan:
      title: SchedulePlan
      x-stoplight:
        id: scheduleplan-schema
      type: object
      description: >-
        A schedule plan containing the parameters used to generate charging
        schedules.
      properties:
        id:
          type: string
          pattern: scpl[A-Z\d]{26}
          example: scpl01HSH04KDEWF6Z4DB2J77J74K5
          description: Unique identifier for this schedule plan.
          readOnly: true
        created_at:
          type: string
          format: date-time
          example: '2024-01-01T02:00:00Z'
          description: When this schedule plan was created.
          readOnly: true
        ready_by_time:
          type: string
          format: date-time
          example: '2024-01-01T08:00:00Z'
          description: The target time by which charging should be complete.
          readOnly: true
        price_threshold_minor_unit:
          type:
            - integer
            - 'null'
          example: 1500
          description: >-
            Price threshold in minor currency units (e.g., cents/pence)
            multiplied by 100. For example, 1500 represents 15 pence (£0.15),
            and 50 represents 0.5 pence (£0.005). Null if no threshold set.
          readOnly: true
        power_on_current_milliamps:
          type: integer
          example: 32000
          description: The charging current in milliamps when power is on.
          readOnly: true
        power_off_current_milliamps:
          type: integer
          example: 0
          description: The current in milliamps when power is off (typically 0).
          readOnly: true
        seconds_to_charge:
          type: integer
          example: 10800
          description: The number of seconds required to complete charging.
          readOnly: true
        vehicle_charge_level_watt_hours:
          type:
            - integer
            - 'null'
          example: 25000
          description: >-
            The vehicle's battery level in watt-hours at the time the plan was
            created. Null if unknown.
          readOnly: true
        estimated_charge_rate_watts:
          type: integer
          example: 7400
          description: The estimated charging rate in watts.
          readOnly: true
        estimated_charge_rate_source:
          type:
            - string
            - 'null'
          enum:
            - CURRENT_SESSION_EVSE_DATA_LOGS
            - CURRENT_SESSION_VEHICLE_DATA_LOGS
            - ENERGY_TRANSFER_PERIODS
            - DEFAULT_CHARGE_RATE
            - MAX_EVSE_CHARGE_RATE
            - MAX_VEHICLE_CHARGE_RATE
            - null
          description: >-
            The source of data used for estimating charge rate. Null if not
            specified.
          readOnly: true
        watt_hours_to_charge:
          type: integer
          example: 22000
          description: The total energy required to complete charging in watt-hours.
          readOnly: true
        min_charge_limit_percent:
          type: integer
          minimum: 0
          maximum: 100
          example: 0
          description: The minimum charge limit as a percentage (0-100).
          readOnly: true
        max_charge_limit_percent:
          type: integer
          minimum: 0
          maximum: 100
          example: 80
          description: The maximum charge limit as a percentage (0-100).
          readOnly: true
    IncentiveScheme:
      title: IncentiveScheme
      x-stoplight:
        id: cpbs8fjv6im02
      type: object
      description: >-
        Incentive Schemes define a set of rules for how an elgible User can earn
        monetary Incentives.
      examples:
        - id: incs01JE3ZY9Z2C0E087C942B9WKBC
          name: Off-Peak Charging Incentives
          description: Earn $0.10 per kWh when charging off-peak
          visible: false
          available: true
      properties:
        id:
          type: string
          x-stoplight:
            id: vhmk3bdoa8huq
          description: 'Prefix: "incs"'
        name:
          type: string
          x-stoplight:
            id: 7mgwvz9noxw95
          description: Name to be displayed to the User.
        description:
          type: string
          x-stoplight:
            id: os9xb6d0ixpze
          description: Describes the rules of how the User earns this Incentive.
        visible:
          type: boolean
          x-stoplight:
            id: n1x53ghdj5w1l
          default: false
          description: Should this Incentive Scheme be visible to the User in the App.
        available:
          type: boolean
          x-stoplight:
            id: 22wt4xjkdysqs
          default: true
          description: >-
            Is this Incentive available for the User to earn.

            Some Incentive Schemes can only be earned a limitted number of times
            per User or Device.

            E.g. A Sign Up Incentive that can only be earned once per Device.

            This will also be False if it is outside the active period of the
            Incentive Scheme.
    EVSESite:
      title: EVSESite
      x-stoplight:
        id: hj5gp87erpiaj
      type: object
      description: >-
        Represents a place with one or more EVSEs installed which can be
        accessed by multiple users.
      properties:
        id:
          type: string
          pattern: site[A-Z\d]{26}
          examples:
            - site01JX2SZ0WAFTDYVYY0JRAYREY7
          readOnly: true
        url:
          type: string
          x-stoplight:
            id: 2td2a5p9hf82h
          format: uri
          example: https://api.ev.energy/v2/evse_sites/site01JX2SZ0WAFTDYVYY0JRAYREY7
          readOnly: true
        evses:
          type: array
          description: A list of all EVSEs that are currently associated with this site.
          items:
            type: string
            format: uri
            examples:
              - https://api.ev.energy/v2/evses/evse01HSH04KDEWF6Z4DB2J77J74K5
          readOnly: true
        cpms_connection:
          type:
            - string
            - 'null'
          description: >-
            The type of ChargePoint Management System that this site is
            connected to, if there is one.
          enum:
            - null
            - CHARGEPOINT
            - SWTCH
          readOnly: true
        cpms_connection_display_name:
          type:
            - string
            - 'null'
          x-stoplight:
            id: pv8f3x7og19vz
          description: >-
            A human-readable name for the Chargepoint Management System that the
            site is connected to.
          example: ChargePoint
        user_connected:
          type:
            - boolean
            - 'null'
          description: >-
            When authenticated as a specific user (eg. via the Authorisation
            Code grant type) or when the EvEnergy-User header is set to a valid
            user ID, this field will indicate whether the user is currently
            connected to this EVSE Site's CPMS. If the request is not made in
            the context of a user, or the site does not have a CPMS connection,
            this field will be null.
          readOnly: true
    VehicleReconnectionUrl:
      title: VehicleReconnectionUrl
      x-stoplight:
        id: wqaapbeunof9d
      type: object
      examples:
        - url: >-
            https://app.ev.energy/vehicle-onboarding/start/56091b3b-86e9-4e7c-a825-f99e5d131234
          expiry: '2022-11-03T20:26:10.344522Z'
      description: >-
        A URL for a user to re-authenticate their vehicle alongside it's
        metadata.
      properties:
        url:
          type: string
          x-stoplight:
            id: iqtzes73vsw23
          format: uri
          example: >-
            https://app.ev.energy/vehicle-onboarding/start/56091b3b-86e9-4e7c-a825-f99e5d131234
          readOnly: true
        expires_at:
          type: string
          x-stoplight:
            id: sx2jjwzbz3xw8
          format: date-time
          example: '2022-11-03T20:26:10.344522Z'
          readOnly: true
    CarbonFeed:
      title: CarbonFeed
      type: object
      description: >-
        A carbon feed representing a source of carbon intensity data for a
        specific region or grid.
      x-tags:
        - Carbon
      required:
        - id
        - url
        - name
      properties:
        id:
          type: string
          description: Unique identifier for the carbon feed.
          pattern: cabf[A-Z\d]{26}
          example: cabf01HN2NJ9NMRZBXT1H6FT9N7735
          readOnly: true
        url:
          type: string
          format: uri
          example: https://api.ev.energy/v2/carbon_feeds/cabf01HN2NJ9NMRZBXT1H6FT9N7735
          readOnly: true
        name:
          type: string
          description: Human-readable name for the carbon feed.
          example: UK National Grid
          readOnly: true
    CarbonIntensities:
      title: CarbonIntensities
      type: object
      description: A collection of carbon intensity data points for a specific carbon feed.
      properties:
        url:
          type: string
          format: uri
          example: >-
            https://api.ev.energy/v2/carbon_feeds/cabf01HN2NJ9NMRZBXT1H6FT9N7735/carbon_intensities
          readOnly: true
        carbon_feed:
          type: string
          format: uri
          example: https://api.ev.energy/v2/carbon_feeds/cabf01HN2NJ9NMRZBXT1H6FT9N7735
          readOnly: true
        carbon_intensities:
          type: array
          description: A list of carbon intensity data points.
          items:
            $ref: '#/components/schemas/CarbonIntensity'
          readOnly: true
    CarbonIntensity:
      title: CarbonIntensity
      type: object
      description: >-
        A carbon intensity data point representing CO2 emissions per unit of
        electricity generated.
      x-tags:
        - Carbon
      required:
        - started_at
        - interval_seconds
        - co2_intensity_grams_per_kilowatt_hour
        - created_at
      properties:
        started_at:
          type: string
          format: date-time
          description: When this interval began.
          example: '2024-01-15T10:00:00Z'
          readOnly: true
        interval_seconds:
          type: integer
          description: The number of seconds that this interval lasts for.
          example: 1800
          readOnly: true
        co2_intensity_grams_per_kilowatt_hour:
          type: integer
          description: Carbon intensity in gCO2/kWh.
          example: 245
          readOnly: true
        created_at:
          type: string
          format: date-time
          description: When this record was created (ISO 8601 datetime).
          example: '2024-01-15T09:45:00Z'
          readOnly: true
    Price:
      title: Price
      type: object
      description: A price for a specific time interval.
      x-tags:
        - Tariffs
      required:
        - started_at
        - interval_seconds
        - price_minor_units
      properties:
        started_at:
          type: string
          format: date-time
          description: When this price interval began (ISO 8601 datetime).
          example: '2024-01-15T10:00:00Z'
          readOnly: true
        interval_seconds:
          type: integer
          description: The duration of this price interval in seconds.
          example: 1800
          readOnly: true
        price_minor_units:
          type: integer
          description: The price in minor currency units (e.g., pence for GBP).
          example: 10
          readOnly: true
    CPMSProvider:
      title: CPMSProvider
      x-stoplight:
        id: 6umwxba432j4u
      type: object
      description: Represents a ChargePoint Management System provider.
      properties:
        id:
          x-stoplight:
            id: c10wtmnfwy7rs
          enum:
            - CHARGEPOINT
            - SWTCH
        url:
          type: string
          x-stoplight:
            id: j02k9205h7ana
          example: https://api.ev.energy/v2/cpms_providers/CHARGEPOINT/
        name:
          type: string
          x-stoplight:
            id: t3267kwxlbt58
        icon:
          type:
            - string
            - 'null'
          x-stoplight:
            id: 28fvch6qvdwba
          format: uri
    Notification:
      title: Notification
      x-stoplight:
        id: 0c2vlk3m9s1v2
      description: Something that the user should be informed about.
      type: object
      examples:
        - id: notf67O36PLTFDB57M0E5L33JZLGM0
          url: https://api.ev.energy/notifications/notf67O36PLTFDB57M0E5L33JZLGM0
          message_id: ERR0123
          category: ACTIONABLE
          event_time: '2019-08-24T14:15:22Z'
          short_text_title: Your car is disconnected
          short_text_body: We need to reconnect to keep smart charging your car
          detail_page_title: Your car is disconnected
          detail_page_body: >-
            Your car has been disconnected. This happens when your password is
            reset. We need you to re-authorise ev.energy to access your account
            in order for us to keep managing your charging. Blah blah blah.
          external_link: http://example.com
          external_button_label: More info
          read_at: '2019-08-24T14:20:22Z'
          resolved_at: '2019-08-25T14:15:22Z'
      required:
        - id
        - url
        - message_id
        - category
        - event_time
        - short_text_title
        - short_text_body
      properties:
        id:
          type: string
          x-stoplight:
            id: vvof3tqd1omyl
          pattern: notf[A-Z\d]{26}
          example: notf67O36PLTFDB57M0E5L33JZLGM0
          description: Unique identifier for the Notification
        url:
          type: string
          x-stoplight:
            id: kqf46ta6fazwm
          format: uri
          example: https://api.ev.energy/notifications/notf67O36PLTFDB57M0E5L33JZLGM0
        message_id:
          type: string
          x-stoplight:
            id: dmp2sm8ey9bmp
          description: Internal identifier for this notification type. E.g. 'ERR0023'
        category:
          x-stoplight:
            id: t5w0ni5o5gb2r
          description: Category of this notification type
          enum:
            - ACTIONABLE
            - SERVICE
            - RETRY
            - MARKETING
            - INTERNAL
        event_time:
          type: string
          x-stoplight:
            id: ygzbrrfql6azt
          format: date-time
          description: The timestamp of the event described by this notification
        short_text_title:
          type: string
          x-stoplight:
            id: jcs33lkxxko8q
          description: Short title for the notification
          maxLength: 33
        short_text_body:
          type: string
          x-stoplight:
            id: xhk6rkma6ulhn
          description: Short description of the event being notified
          maxLength: 49
        detail_page_title:
          type: string
          x-stoplight:
            id: oab21e04pl82s
          description: Title of a help page giving more information about this notification
        detail_page_body:
          type: string
          x-stoplight:
            id: n3iyv2xsx9wkt
          description: Text of a help page giving more information about this notification
        external_link:
          type:
            - string
            - 'null'
          x-stoplight:
            id: b4bvguesu7eiu
          description: URL of a web page giving further information about this notification
          format: uri
        external_button_label:
          type: string
          x-stoplight:
            id: m4utragtd956r
          description: >-
            Text to be displayed on a button leading to the external_link
            location
        read_at:
          type: string
          x-stoplight:
            id: nzhiegj91k11k
          format: date-time
          description: When the user examined the contents of this notification
        resolved_at:
          type: string
          x-stoplight:
            id: t5rkwkndib4fa
          format: date-time
          description: When the problem associated with this notification was resolved
    RFC9547ProblemDetail:
      title: RFC 9547 Problem Detail
      x-stoplight:
        id: q4k0t6octnv92
      x-tags:
        - problems
      type: object
      required:
        - title
        - detail
      properties:
        type:
          type: string
          format: uri
          example: https://api.ev.energy/v2/problems/example-problem/
        status:
          type: number
          example: 400
        title:
          type: string
          example: Short description
        detail:
          type: string
          example: Long, more specific description.
        instance:
          type: string
          format: uri
          example: https://api.ev.energy/v2/users/user01HN2P75GBNFRJPCZJXEFVXH5E
        notification:
          $ref: '#/components/schemas/Notification'
          x-stoplight:
            id: nfsuibs2y03aw
      examples:
        - type: https://api.ev.energy/v2/problems/example-problem/
          status: 400
          title: Short description
          detail: Long, more specific description.
          instance: https://api.ev.energy/v2/users/user01HN2P75GBNFRJPCZJXEFVXH5E
          notification:
            id: notf01HTHKTXVB77901324BCQPF1RB
            url: https://api.ev.energy/notifications/notf01HTHKTXVB77901324BCQPF1RB
            message_id: ERR0123
            category: ACTIONABLE
            event_time: '2019-08-24T14:15:22Z'
            short_text_title: Your car is disconnected
            short_text_body: We need to reconnect to keep smart charging your car
            detail_page_title: Your car is disconnected
            detail_page_body: >-
              Your car has been disconnected. This happens when your password is
              reset. We need you to re-authorise ev.energy to access your
              account in order for us to keep managing your charging. Blah blah
              blah.
            external_link: http://example.com
            external_button_label: More info
            read_at: '2019-08-24T14:20:22Z'
            resolved_at: '2019-08-25T14:15:22Z'
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://api.ev.energy/o/token/
          refreshUrl: https://api.ev.energy/o/token/
          scopes:
            carbon:read: ''
            evse:read: ''
            evse:write: ''
            vehicle:read: ''
            user:read: ''
            charging_session:read: ''
            tariff:read: ''
            tariff:prices:read: ''
            user:write: ''
            inverter:read: ''
            inverter:write: ''
            vehicle:write: ''
            charging_session:write: ''
            solar:write: ''
            solar:read: ''
            subscription:read: ''
            debug:read: ''
        authorizationCode:
          authorizationUrl: https://api.ev.energy/o/authorize/
          tokenUrl: https://api.ev.energy/o/token/
          refreshUrl: https://api.ev.energy/o/token/
          scopes: {}
  requestBodies: {}
  parameters:
    previous:
      name: page_before
      description: Return results from the page after this ID.
      in: query
      required: false
      schema:
        type: string
        pattern: '[a-z]{4}[A-Z\d]{26}'
        example: xmpl01HNFZM7Q8FXASZXYZ6XM3TQRR
    next:
      name: page_after
      description: Return results from the page before this ID.
      in: query
      required: false
      schema:
        type: string
        pattern: '[a-z]{4}[A-Z\d]{26}'
        example: xmpl01HNFZM7Q8FXASZXYZ6XM3TQRR
    page:
      name: page
      description: The page number to return results for.
      in: query
      required: false
      schema:
        type: number
        example: 2
    page_size:
      name: page_size
      description: Specify the number of results to return per page.
      in: query
      required: false
      schema:
        type: integer
        default: 25
        minimum: 1
        maximum: 100
        example: 10
    expand:
      name: expand
      in: query
      schema:
        type: string
        example: user
      description: Specify a url field to expand into a nested resource.
    expand-on-user:
      name: expand
      in: query
      schema:
        type: array
        items:
          type: string
          enum:
            - default_location.tariff
            - default_location.tariff.supplier
            - default_location.evse_site
      explode: true
      description: Specify a url field to expand into a nested resource.
    expand-on-evse:
      name: expand
      in: query
      schema:
        type: array
        items:
          type: string
          enum:
            - user
            - model
            - model.make
            - latest_status_log
      explode: true
      description: Specify a url field to expand into a nested resource.
    expand-on-dispatcherlog:
      name: expand
      in: query
      schema:
        type: array
        items:
          type: string
          enum:
            - charging_sub_session
      explode: true
      description: Specify a url field to expand into a nested resource.
    expand-on-evsemodel:
      name: expand
      in: query
      schema:
        type: array
        items:
          type: string
          enum:
            - make
      explode: true
      description: Specify a url field to expand into a nested resource.
    expand-on-evsestatuslog:
      name: expand
      in: query
      schema:
        type: array
        items:
          type: string
          enum:
            - evse
            - evse.model
            - evse.model.make
            - evse.user
      explode: true
      description: Specify a url field to expand into a nested resource.
    expand-on-vehicle:
      name: expand
      in: query
      schema:
        type: array
        items:
          type: string
          enum:
            - user
            - trim
            - trim.model
            - trim.model.make
            - latest_status_log
      explode: true
      description: Specify a url field to expand into a nested resource.
    expand-on-vehicletrim:
      name: expand
      in: query
      schema:
        type: array
        items:
          type: string
          enum:
            - model
            - model.make
      explode: true
      description: Specify a url field to expand into a nested resource.
    expand-on-vehiclemodel:
      name: expand
      in: query
      schema:
        type: array
        items:
          type: string
          enum:
            - make
      explode: true
      description: Specify a url field to expand into a nested resource.
    expand-on-vehiclestatuslog:
      name: expand
      in: query
      schema:
        type: array
        items:
          type: string
          enum:
            - vehicle
            - vehicle.trim
            - vehicle.trim.model
            - vehicle.trim.model.make
            - vehicle.user
      explode: true
      description: Specify a url field to expand into a nested resource.
    expand-on-vehicleapierrorlog:
      name: expand
      in: query
      schema:
        type: array
        items:
          type: string
          enum:
            - vehicle
            - vehicle.trim
            - vehicle.trim.model
            - vehicle.trim.model.make
            - vehicle.user
      explode: true
      description: Specify a url field to expand into a nested resource.
    expand-on-vehiclelocationlog:
      name: expand
      in: query
      schema:
        type: array
        items:
          type: string
          enum:
            - vehicle
            - vehicle.trim
            - vehicle.trim.model
            - vehicle.trim.model.make
            - vehicle.user
      explode: true
      description: Specify a url field to expand into a nested resource.
    expand-on-vehiclecommandlog:
      name: expand
      in: query
      schema:
        type: array
        items:
          type: string
          enum:
            - vehicle
            - vehicle.trim
            - vehicle.trim.model
            - vehicle.trim.model.make
            - vehicle.user
      explode: true
      description: Specify a url field to expand into a nested resource.
    expand-on-evsecommandlog:
      name: expand
      in: query
      schema:
        type: array
        items:
          type: string
          enum:
            - evse
            - evse.model
            - evse.model.make
            - evse.user
      explode: true
      description: Specify a url field to expand into a nested resource.
    expand-on-tariff:
      name: expand
      in: query
      schema:
        type: array
        items:
          type: string
          enum:
            - supplier
            - prices
      explode: true
      description: >-
        Specify a url field to expand into a nested resource. The prices
        expansion requires tariff:prices:read scope.
    expand-on-carbonintensity:
      name: expand
      in: query
      schema:
        type: array
        items:
          type: string
          enum:
            - carbon_feed
      explode: true
      description: Specify a url field to expand into a nested resource.
    expand-on-chargingsubsession:
      name: expand
      in: query
      schema:
        type: array
        items:
          type: string
          enum:
            - evse
            - evse.latest_status_log
            - evse.model
            - evse.model.make
            - evse.user
            - vehicle
            - vehicle.latest_status_log
            - vehicle.trim
            - vehicle.trim.model
            - vehicle.trim.model.make
            - vehicle.user
            - energy_usage
            - schedules
            - tariff
            - tariff.supplier
      explode: true
      description: Specify a url field to expand into a nested resource.
    expand-on-chargingsubsession-schedules:
      name: expand
      in: query
      schema:
        type: array
        items:
          type: string
          enum:
            - charging_sub_session
      explode: true
      description: Specify a url field to expand into a nested resource.
    expand-on-chargingsubsession-scheduleplans:
      name: expand
      in: query
      schema:
        type: array
        items:
          type: string
          enum:
            - charging_sub_session
      explode: true
      description: Specify a url field to expand into a nested resource.
    expand-on-chargingsubsession-energyusage:
      name: expand
      in: query
      schema:
        type: array
        items:
          type: string
          enum:
            - charging_sub_session
      explode: true
      description: Specify a url field to expand into a nested resource.
    expand-on-solararray:
      name: expand
      in: query
      schema:
        type: array
        items:
          type: string
          enum:
            - user
            - inverter
      explode: true
      description: Specify a url field to expand into a nested resource.
    expand-on-subscription:
      name: expand
      in: query
      schema:
        type: array
        items:
          type: string
          enum:
            - user
            - offering
      explode: true
      description: Specify a url field to expand into a nested resource.
    expand-on-inverter:
      name: expand
      in: query
      schema:
        type: array
        items:
          type: string
          enum:
            - model
            - model.make
            - latest_status_log
      explode: true
      description: Specify a url field to expand into a nested resource.
    expand-on-invertermodel:
      name: expand
      in: query
      schema:
        type: array
        items:
          type: string
          enum:
            - make
      explode: true
      description: Specify a url field to expand into a nested resource.
    expand-on-rebatetype:
      name: expand
      in: query
      schema:
        type: array
        items:
          type: string
          enum:
            - required_evidence
      explode: true
      description: Specify a url field to expand into a nested resource.
    expand-on-userrebate:
      name: expand
      in: query
      schema:
        type: array
        items:
          type: string
          enum:
            - rebate_type
            - rebate_type.required_evidence
      explode: true
      description: Specify a url field to expand into a nested resource.
    expand-on-rebateevidencefile:
      name: expand
      in: query
      schema:
        type: array
        items:
          type: string
          enum:
            - rebate_evidence_type
      explode: true
      description: Specify a url field to expand into a nested resource.
    expand-on-supportticket:
      name: expand
      in: query
      schema:
        type: array
        items:
          type: string
          enum:
            - user
      explode: true
      description: Specify a url field to expand into a nested resource.
    expand-on-schedule:
      name: expand
      in: query
      schema:
        type: array
        items:
          type: string
          enum:
            - charging_sub_session
      explode: true
      description: Specify a url field to expand into a nested resource.
    vehicle_id:
      name: vehicle_id
      in: path
      required: true
      schema:
        type: string
        pattern: vhcl[A-Z\d]{26}
        example: vhcl01HRFF3SEVSCRAV9B3CHVDFN0H
      description: The ID of the specific vehicle to retrieve.
    evse_id:
      name: evse_id
      in: path
      required: true
      schema:
        type: string
        pattern: evse[A-Z\d]{26}
        example: evse01HSH04KDEWF6Z4DB2J77J74K5
      description: The ID of the specific EVSE to retrieve.
    user_id:
      name: user_id
      in: path
      required: true
      schema:
        type: string
        pattern: ^(user[A-Z\d]{26})$
        examples:
          - user01HN2NJ9NMRZBXT1H6FT9N7735
          - me
      description: The ID of the specific user to retrieve.
    vehicle_trim_id:
      name: vehicle_trim_id
      in: path
      required: true
      schema:
        type: string
        pattern: trim[A-Z\d]{26}
        example: trim01HRFHBCM7VBSWRPVYFBQMH2BR
      description: The ID of the specific vehicle trim to retrieve.
    vehicle_model_id:
      name: vehicle_model_id
      in: path
      required: true
      schema:
        type: string
        pattern: vmod[A-Z\d]{26}
        example: vmod01HSBR8Z36GD7A46K7M4R12VG0
      description: The ID of the specific vehicle model to retrieve.
    vehicle_make_id:
      name: vehicle_make_id
      in: path
      required: true
      schema:
        type: string
        pattern: vmak[A-Z\d]{26}
        example: vmak01HRFHBCM7VBSWRPVYFBQMH2BR
      description: The ID of the specific vehicle make to retrieve.
    evse_model_id:
      name: evse_model_id
      in: path
      required: true
      schema:
        type: string
        pattern: emod[A-Z\d]{26}
        example: emod01HS9A05HDZKZ5GCW92HH6GJYN
      description: The ID of the specific EVSE model to retrieve.
    evse_make_id:
      name: evse_make_id
      in: path
      required: true
      schema:
        type: string
        pattern: emak[A-Z\d]{26}
        example: emak01HSB50J37V3Q5BKXSXTM64K7K
      description: The ID of the specific EVSE make to retrieve.
    supplier_id:
      name: supplier_id
      in: path
      required: true
      schema:
        type: string
        pattern: supl[A-Z\d]{26}
        example: supl01HN2NJ9NMRZBXT1H6FT9N7735
      description: The ID of the specific supplier to retrieve.
    tariff_id:
      name: tariff_id
      in: path
      schema:
        type: string
        pattern: tari[A-Z\d]{26}
        example: tari01HN2NJ9NMRZBXT1H6FT9N7735
      required: true
      description: The ID of the specific tariff to retrieve.
    supplier_id_query:
      name: supplier_id
      in: query
      required: false
      schema:
        type: string
      description: The ID of the supplier to filter by.
    available_for_user_id:
      name: available_for_user_id
      in: query
      schema:
        type: string
        pattern: user[A-Z\d]{26}
        example: user01HN2NJ9NMRZBXT1H6FT9N7735
      description: >-
        Filter to only return resources available in the user's region and
        program.
    include_optional_tariff:
      name: include_optional
      in: query
      schema:
        type: string
        enum:
          - daily_prices
        example: daily_prices
      allowReserved: false
      allowEmptyValue: false
      description: Include optional tariffs.
    version-2:
      name: EvEnergy-Version
      description: Specify the version of this endpoint to use.
      required: false
      in: header
      schema:
        type: number
        enum:
          - 2
    Accept-Language:
      name: Accept-Language
      in: header
      required: false
      schema:
        type: string
      description: Indicates the natural language and locale that the client prefers.
    evse_id_q:
      name: evse_id
      in: query
      schema:
        type: string
        pattern: evse[A-Z\d]{26}
        example: evse01HSH04KDEWF6Z4DB2J77J74K5
      description: Filter to only resources related to the given EVSE.
    vehicle_id_q:
      name: vehicle_id
      in: query
      schema:
        type: string
        pattern: vhcl[A-Z\d]{26}
        example: vhcl01HRFF3SEVSCRAV9B3CHVDFN0H
      description: Filter to only resources related to the given Vehicle.
    notification_id:
      name: notification_id
      description: The ID of the specific notification to retrieve.
      in: path
      required: true
      schema:
        type: string
        pattern: notf[A-Z\d]{26}
        example: notf67O36PLTFDB57M0E5L33JZLGM0
    support_ticket_id:
      name: support_ticket_id
      description: The ID of the specific support ticket to retrieve.
      in: path
      required: true
      schema:
        type: string
        pattern: tick[A-Z\d]{26}
        example: tick01HN2NJ9NMRZBXT1H6FT9N7735
    carbon_feed_id:
      name: carbon_feed_id
      description: Uniquely identify a specific carbon feed.
      in: path
      schema:
        type: string
        pattern: cabf[A-Z\d]{26}
        example: cabf01HN2NJ9NMRZBXT1H6FT9N7735
      required: true
    charging_sub_session_id:
      name: charging_sub_session_id
      description: Uniquely identify a specific charging sub-session.
      in: path
      schema:
        type: string
        pattern: csub[A-Z\d]{26}
        example: csub01HSH04KDEWF6Z4DB2J77J74K5
      required: true
    user_id_q:
      name: user_id
      in: query
      required: false
      schema:
        type: string
        example: me
      description: Filter collection to only resources owned by a specific user.
    sampled_at__gte:
      name: sampled_at__gte
      in: query
      schema:
        type: string
        format: date-time
        example: '2024-04-17T09:39:45.984584Z'
      description: Filters for logs sampled at or after this datetime.
    sampled_at__lte:
      name: sampled_at__lte
      in: query
      schema:
        type: string
        format: date-time
        example: '2024-04-17T09:39:45.984584Z'
      description: Filters for logs sampled at or before this datetime.
    logged_at__gte:
      name: logged_at__gte
      in: query
      schema:
        type: string
        format: date-time
        example: '2024-04-17T09:39:45.984584Z'
      description: Filters for logs logged at or after this datetime.
    logged_at__lte:
      name: logged_at__lte
      in: query
      schema:
        type: string
        format: date-time
        example: '2024-04-17T09:39:45.984584Z'
      description: Filters for logs logged at or before this datetime.
    energy_delivered_watt_hours__gte:
      name: energy_delivered_watt_hours__gte
      in: query
      schema:
        type: integer
        example: 500
      description: Filters for values greater than or equal to a value.
    energy_delivered_watt_hours__lte:
      name: energy_delivered_watt_hours__lte
      in: query
      schema:
        type: integer
        example: 500
      description: Filters for values less than or equal to a value.
    energy_delivered_watt_hours__gt:
      name: energy_delivered_watt_hours__gt
      in: query
      schema:
        type: integer
        example: 0
      description: Filters for values greater than a value.
    is_finished:
      name: is_finished
      in: query
      required: false
      schema:
        type: boolean
        example: false
      description: Filters for sessions that are finished.
    mode:
      name: mode
      in: query
      required: false
      schema:
        type: string
        example: SMART
        enum:
          - SMART
          - BOOST
          - UNMANAGED_HOME
          - UNMANAGED_OTG
          - MANAGED_OTG
      description: Filters sessions to only return sessions with this mode.
    user:
      name: EvEnergy-User
      description: >-
        If the client is authenticated using Client Credentials, setting
        EvEnergy-User to a valid user ID allows requests to be made as if you
        were directly authenticated as that user.
      in: header
      required: false
      schema:
        type: string
        pattern: user[A-Z\d]{26}
        example: user01HN2NJ9NMRZBXT1H6FT9N7735
    inverter_make_id_q:
      name: make_id
      in: query
      required: false
      schema:
        type: string
        example: imakWNZ5N0A5D1PR89HJ7STXEWYO58
      description: The ID of an Inverter Make to filter by.
    evse_make_id_q:
      name: make_id
      in: query
      required: false
      schema:
        type: string
        example: emak01HS8FRMXGE3566EDXCMWGW5W4
      description: The ID of an EVSE Make to filter by.
    vehicle_make_id_q:
      name: make_id
      in: query
      required: false
      schema:
        type: string
        example: vmak01HN2NV5DY9C262PQKG75GHN8K
      description: The ID of a Vehicle Make to filter by
    vehicle_model_id_q:
      name: model_id
      in: query
      required: false
      schema:
        type: string
        example: vmod01HN2NV5DY9C262PQKG75GHN8K
      description: The ID of a Vehicle Model to filter by.
    user_id_onboarding:
      name: user_id
      in: query
      required: true
      schema:
        type: string
        pattern: user[A-Z\d]{26}
        example: user01HN2NJ9NMRZBXT1H6FT9N7735
      description: The ID of a user to onboard a device for.
    evenergy-user-required:
      name: EvEnergy-User
      in: header
      required: false
      description: >-
        This endpoints requires a user ID to be specified via this header when
        using Client Credentials authentication.
      schema:
        type: string
        pattern: user[A-Z\d]{26}
        example: user01HN2NJ9NMRZBXT1H6FT9N7735
    client_id:
      name: client_id
      in: query
      required: true
      schema:
        type: string
        example: sandbox-cc-id
        minLength: 1
      description: Your client ID, used to identify GET requests made in a user's browser.
    rebate_evidence_file_id:
      description: Unique identifier for a Rebate evidence file
      name: rebate_evidence_file_id
      in: path
      required: true
      schema:
        type: string
        pattern: rbef[A-Z\d]{26}
        example: rbefB1USP6YGD1VPIDJSHTZARUX11M
    user_rebate_id:
      description: Unique identifier for a User's rebate application
      name: user_rebate_id
      in: path
      required: true
      schema:
        type: string
        pattern: rbtu[A-Z\d]{26}
        example: rbtuB1USP6YGD1VPIDJSHTZARUX11M
    evse_site_id:
      description: Unique identifier for a single EVSE Site.
      name: evse_site_id
      in: path
      required: true
      schema:
        type: string
        example: site01JX2SZ0WAFTDYVYY0JRAYREY7
        pattern: site[A-Z\d]{26}
    program_id:
      name: program_id
      in: path
      required: true
      schema:
        type: string
      description: The ID of the specific Program to retrieve.
  responses:
    Problem401Unauthorized:
      description: You need to authorise requests to access this resource.
      content:
        application/problem+json:
          schema:
            type: object
            required:
              - title
              - detail
            properties:
              status:
                type: number
                example: 401
              title:
                type: string
                example: Unauthorized
              detail:
                type: string
                example: Authentication credentials were not provided.
      headers:
        EvEnergy-Version:
          $ref: '#/components/headers/version-2'
        X-RateLimit-Limit:
          $ref: '#/components/headers/x-ratelimit-limit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/x-ratelimit-remaining'
        RetryAfter:
          $ref: '#/components/headers/retry-after'
    Problem403Forbidden:
      description: You do not have permission to perform this action.
      content:
        application/problem+json:
          schema:
            type: object
            required:
              - title
              - detail
            properties:
              status:
                type: number
                example: 403
              title:
                type: string
                example: Forbidden
              detail:
                type: string
                example: You do not have permission to perform this action.
      headers:
        EvEnergy-Version:
          $ref: '#/components/headers/version-2'
        X-RateLimit-Limit:
          $ref: '#/components/headers/x-ratelimit-limit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/x-ratelimit-remaining'
        RetryAfter:
          $ref: '#/components/headers/retry-after'
    Problem404NotFound:
      description: >-
        This resource either does not exist or the client is not authorized to
        access it.
      content:
        application/problem+json:
          schema:
            type: object
            required:
              - title
              - detail
            properties:
              status:
                type: number
                example: 404
              title:
                type: string
                example: Not found
              detail:
                type: string
                example: Resource does not exist or cannot be accessed.
      headers:
        EvEnergy-Version:
          $ref: '#/components/headers/version-2'
        X-RateLimit-Limit:
          $ref: '#/components/headers/x-ratelimit-limit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/x-ratelimit-remaining'
        RetryAfter:
          $ref: '#/components/headers/retry-after'
    Problem405MethodNotAllowed:
      description: Could not satisfy this HTTP method.
      content:
        application/problem+json:
          schema:
            type: object
            required:
              - title
              - detail
            properties:
              status:
                type: number
                example: 405
              title:
                type: string
                example: Method Not Allowed
              detail:
                type: string
                example: Could not satisfy this HTTP method.
      headers:
        EvEnergy-Version:
          $ref: '#/components/headers/version-2'
        X-RateLimit-Limit:
          $ref: '#/components/headers/x-ratelimit-limit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/x-ratelimit-remaining'
        RetryAfter:
          $ref: '#/components/headers/retry-after'
    Problem406NotAcceptable:
      description: Could not satisfy the request Accept header.
      content:
        application/problem+json:
          schema:
            type: object
            required:
              - title
              - detail
            properties:
              status:
                type: number
                example: 406
              title:
                type: string
                example: Not Acceptable
              detail:
                type: string
                example: Could not satisfy the request Accept header.
      headers:
        EvEnergy-Version:
          $ref: '#/components/headers/version-2'
        X-RateLimit-Limit:
          $ref: '#/components/headers/x-ratelimit-limit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/x-ratelimit-remaining'
        RetryAfter:
          $ref: '#/components/headers/retry-after'
    Problem400BadRequestList:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/RFC9547ProblemDetail'
          examples:
            Invalid Pagination Parameter:
              $ref: '#/components/examples/ProblemInvalidPaginationParameter'
            Unsupported Version:
              $ref: '#/components/examples/ProblemUnsupportedVersion'
      description: A problem with the request's parameters prevented it being fulfilled.
      headers:
        EvEnergy-Version:
          $ref: '#/components/headers/version-2'
        X-RateLimit-Limit:
          $ref: '#/components/headers/x-ratelimit-limit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/x-ratelimit-remaining'
        RetryAfter:
          $ref: '#/components/headers/retry-after'
    Problem400BadRequestRetrieve:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/RFC9547ProblemDetail'
          examples:
            Unsupported Version:
              $ref: '#/components/examples/ProblemUnsupportedVersion'
      description: A problem with the request's parameters prevented it being fulfilled.
      headers:
        EvEnergy-Version:
          $ref: '#/components/headers/version-2'
        X-RateLimit-Limit:
          $ref: '#/components/headers/x-ratelimit-limit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/x-ratelimit-remaining'
    Problem400BadRequestCreate:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/RFC9547ProblemDetail'
          examples:
            Request failed validation:
              $ref: '#/components/examples/ProblemValidationFailedVehicle'
      description: A problem with the request's parameters prevented it being fulfilled.
      headers:
        EvEnergy-Version:
          $ref: '#/components/headers/version-2'
        X-RateLimit-Limit:
          $ref: '#/components/headers/x-ratelimit-limit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/x-ratelimit-remaining'
        RetryAfter:
          $ref: '#/components/headers/retry-after'
    Problem429TooManyRequests:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/RFC9547ProblemDetail'
          examples:
            Example 1:
              value:
                type: https://api.ev.energy/v2/problems/rate-limit-exceeded/
                status: 429
                title: Too Many Requests
                detail: Request was rate limited. Try again in 42 seconds
      description: The client has exceeded its rate limit.
      headers:
        EvEnergy-Version:
          $ref: '#/components/headers/version-2'
        Retry-After:
          $ref: '#/components/headers/retry-after'
        X-RateLimit-Limit:
          $ref: '#/components/headers/x-ratelimit-limit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/x-ratelimit-remaining'
  headers:
    link:
      description: Provides links to the previous and next pages of data, if they exist.
      example: >-
        <https://api.ev.energy/v2/vehicles?page_size=25&page_before=vhcl01HRFF3SEVSCRAV9B3CHVDFN0H>;
        rel="previous",
        <https://api.ev.energy/v2/vehicles?page_size=25&page_after=vhcl01HRFF3SEVSCRAV9B3CHVDFN0H>;
        rel="next"
      schema:
        type: string
    link-timestamps:
      description: Provides links to the previous and next pages of data, if they exist.
      example: >-
        <https://api.ev.energy/v2/vehicles?page_size=25&page_before=2024-04-18T08:53:52.225655Z>;
        rel="previous",
        <https://api.ev.energy/v2/vehicles?page_size=25&page_after=2024-04-18T08:53:52.225655Z>;
        rel="next"
      schema:
        type: string
    link-pages:
      description: Provides links to the previous and next pages of data, if they exist.
      example: >-
        <about:blank>; rel="previous",
        <https://api.ev.energy/v2/examples/?page=2&page_size=25>; rel="next"
      schema:
        type: string
    version-2:
      description: >-
        Indicates the version of the API that generated this response. If
        EvEnergy-Version was not specified in the request, this will be your
        OAuth application's default version.
      schema:
        type: number
        enum:
          - 2
    x-ratelimit-limit:
      description: >-
        The maximum number of requests that can be made to this endpoint per
        hour. Defaults to 1000 but may vary per client.
      schema:
        type: number
        default: 1000
    x-ratelimit-remaining:
      description: >-
        The number of requests remaining until this client's rate limit is
        reached.
      schema:
        type: number
        default: 999
    retry-after:
      description: >-
        The number of seconds until this client's requests will not be rate
        limited.
      schema:
        type: number
        default: 3600
  examples:
    ProblemInvalidPaginationParameter:
      value:
        type: https://api.ev.energy/v2/problems/pagination-parameters/
        status: 400
        title: Invalid pagination parameter
        detail: 'Invalid value for pagination parameter: page_size'
    ProblemUnsupportedVersion:
      value:
        type: https://api.ev.energy/v2/problems/pagination-parameters/
        status: 400
        title: Unsupported version
        detail: 'Unsupported version requested: 3.0'
    ProblemValidationFailedVehicle:
      value:
        type: https://api.ev.energy/v2/problems/validation-failed-create-vehicle/
        status: 400
        title: Request failed validation.
        detail: 'Error on fields: user, trim'
        field_errors:
          user:
            - This field is required.
          trim:
            - Invalid hyperlink - Object does not exist.
    UserRebate:
      value:
        id: string
        url: https://example.com
        rebate_type:
          id: string
          url: https://example.com
          title: string
          value_description: earn up to $1000
          icon: https://example.com
          description_long: string
          description_short: Must be purchased after 11/01/2024
          requirements: >-
            <html><ul><li>Must be eligible for program</li> <li>Purchased after
            11/01/2024</li><li>Must be connected to ev.energy</li></ul></html>
          required_evidence:
            - title: string
              description: string
              upload_required: true
              file:
                name: string
                url: https://example.com
              evidence_data:
                - data_type: currency
                  title: string
                  description: string
                  required: true
                  value: string
    RebateType:
      value:
        id: rbttB1USP6YGD1VPIDJSHTZARUX11M
        url: https://api.ev.energy/v2/rebate_types/rbttB1USP6YGD1VPIDJSHTZARUX11M
        title: Vehicle Enrollment
        value_description: earn up to $1000
        icon: https://example.com
        description_long: Rebate for purchasing an eligible vehicle.
        description_short: Must be purchased after 11/01/2024
        requirements: >-
          <html><ul><li>Must be eligible for program</li><li>Purchased after
          11/01/2024</li><li>Must be connected to ev.energy</li></ul></html>
        required_evidence:
          - title: string
            description: string
            upload_required: true
            file:
              name: string
              url: https://example.com
            evidence_data:
              - data_type: currency
                title: string
                description: string
                required: true
                value: string
    RebateEvidenceFile:
      value:
        id: rbefB1USP6YGD1VPIDJSHTZARUX11M
        url: >-
          https://api.ev.energy/v2/rebate_evidence_files/rbefB1USP6YGD1VPIDJSHTZARUX11M
        file_name: test_file.pdf
        rebate_evidence_type: >-
          https://api.ev.energy/v2/rebate_evidence_types/rbetB1USP6YGD1VPIDJSHTZARUX11M
    RebateEvidenceUploadStart:
      value:
        id: rbefB1USP6YGD1VPIDJSHTZARUX11M
        url: >-
          https://api.ev.energy/v2/rebate_evidence_files/rbefB1USP6YGD1VPIDJSHTZARUX11M
        presigned_url: >-
          https://cdn.app.ev.energy/evenergy-development-rebates-evidence-files/user_rebates/rbtuB1USP6YGD1VPIDJSHTZARUX11M/test_file-57e02f14d0c64900bfa5c64972799c51.pdf?AWSAccessKeyId=DummyKeyID&Signature=bmLFDDk%2FuEjCB8yqYI%2FojRTZEMc%3D&Expires=1732224896
x-internal: false
security:
  - oauth2: []
tags:
  - name: Carbon
    description: Endpoints for interacting with carbon intensity data.
  - name: Charging Sessions
    description: Endpoints related to records of charging.
  - name: CSV
    description: >-
      Endpoints that return CSV responses only and are not linkable to other
      endpoint data.
  - name: EVSEs
    description: Endpoints for interacting with EVSEs.
  - name: Notifications
    description: Endpoints for communicating notifications.
  - name: Programs
    description: Endpoints related to incentivised charging programs.
  - name: Rebates
    description: Endpoints for interacting with rebates.
  - name: Root
    description: The root endpoint which lists all the top-level collections.
  - name: Schedules
    description: Schema definitions for charging schedules.
  - name: Sites
    description: Endpoints for interacting with sites containing multiple EVSEs.
  - name: Solar
    description: Endpoints for interacting with solar arrays and inverters.
  - name: Subscriptions
    description: Endpoints for interacting with user subscriptions.
  - name: Support Tickets
    description: Endpoints for interacting with customer support tickets.
  - name: Tariffs
    description: Endpoints related to energy suppliers and their tariffs.
  - name: Users
    description: Endpoints for interacting with users.
  - name: Vehicles
    description: Endpoints for interacting with vehicles.
  - name: Webhooks
    description: Endpoints for configuring and managing webhooks.
