# List meters

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /meters:
    get:
      summary: List meters
      deprecated: false
      description: >-
        This action allows to list meters of a specific customer. Only active
        meters are returned by default. To query only for deactivated meters
        include parameter `deactivated=true`. Virtual meters are not included.


        This endpoint is paginated, see [Limit &
        pagination](https://apidocs.enectiva.cz/introduction-1363538m0.md#limit--pagination)
        for details. By default, at most 1000 records are returned.


        The required scope is `meters`.
      operationId: List meters
      tags:
        - Meters from Enectiva
        - Meters from Enectiva
      parameters:
        - name: deactivated
          in: query
          description: Switches the scope to deactivated meters
          required: false
          schema:
            type: boolean
        - name: Accept
          in: header
          description: e.g. application/vnd.api+json
          required: true
          example: application/vnd.api+json
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        attributes:
                          type: object
                          properties:
                            name:
                              type: string
                            energy_code:
                              type: string
                            energy_name:
                              type: string
                            unit:
                              type: string
                            status:
                              type: string
                            last_measured_at:
                              type: string
                            entity_id:
                              type: integer
                            import_id:
                              type: string
                            external_id:
                              type: string
                            deactivated_at:
                              type: string
                          required:
                            - name
                            - energy_code
                            - energy_name
                            - status
                            - deactivated_at
                            - unit
                            - entity_id
                          x-apidog-orders:
                            - name
                            - energy_code
                            - energy_name
                            - unit
                            - status
                            - last_measured_at
                            - entity_id
                            - import_id
                            - external_id
                            - deactivated_at
                        type:
                          type: string
                      required:
                        - id
                        - attributes
                        - type
                      x-apidog-orders:
                        - id
                        - attributes
                        - type
                required:
                  - data
                x-apidog-orders:
                  - data
              examples:
                '1':
                  summary: With data
                  value:
                    data:
                      - id: '293'
                        attributes:
                          identification_code: '1234'
                          name: Main electricity meter
                          energy_code: el
                          energy_name: electricity
                          unit: kWh
                          status: active
                          last_measured_at: '2023-12-06T23:04:00.000Z'
                          entity_id: 12345
                          import_id: 40AABB_007
                          measurement_type: profile
                          data_source: manual
                          address: Viktora Huga 6
                        type: meters
                      - id: '294'
                        attributes:
                          identification_code: '9876'
                          name: Main water meter
                          external_id: WA001
                          energy_code: wa
                          energy_name: water
                          unit: m³
                          status: active
                          entity_id: 12345
                          measurement_type: reading
                          data_source: manual
                          address: null
                        type: meters
                      - id: '295'
                        attributes:
                          identification_code: null
                          name: Secondary water meter
                          energy_code: wa
                          energy_name: water
                          status: deactivated
                          deactivated_at: '2021-12-31T23:00:00.000Z'
                          unit: m³
                          entity_id: 12345
                          measurement_type: reading
                          data_source: imported
                          address: null
                        type: meters
                '2':
                  summary: Empty
                  value:
                    data: []
          headers: {}
          x-apidog-name: OK
        '401':
          description: Unauthorized
          content:
            application/vnd.api+json:
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        detail:
                          type: string
                        status:
                          type: string
                        title:
                          type: string
                      type: object
                      x-apidog-orders:
                        - detail
                        - status
                        - title
                      required:
                        - detail
                        - status
                        - title
                    type: array
                type: object
                x-apidog-orders:
                  - errors
                examples:
                  - errors:
                      - detail: The provided token has expired
                        status: '401'
                        title: Unauthorized
                required:
                  - errors
          headers: {}
          x-apidog-name: Unauthorized
        '403':
          description: Forbidden
          content:
            application/vnd.api+json:
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        detail:
                          type: string
                        status:
                          type: string
                        title:
                          type: string
                      type: object
                      x-apidog-orders:
                        - detail
                        - status
                        - title
                      required:
                        - detail
                        - status
                        - title
                    type: array
                type: object
                x-apidog-orders:
                  - errors
                examples:
                  - errors:
                      - detail: The access token does not have `meters` scope
                        status: '403'
                        title: Forbidden
                required:
                  - errors
          headers: {}
          x-apidog-name: Forbidden
        '406':
          description: Not Acceptable
          content:
            application/vnd.api+json:
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        detail:
                          type: string
                        status:
                          type: string
                        title:
                          type: string
                      type: object
                      x-apidog-orders:
                        - detail
                        - status
                        - title
                      required:
                        - detail
                        - status
                        - title
                    type: array
                type: object
                x-apidog-orders:
                  - errors
                examples:
                  - errors:
                      - detail: >-
                          Unsupported Accept header value in the request. The
                          endpoint expects the request to include header
                          `Accept: application/vnd.api+json`
                        status: '406'
                        title: Not Acceptable
                required:
                  - errors
          headers: {}
          x-apidog-name: Not Acceptable
        '429':
          description: Too Many Requests
          content:
            application/vnd.api+json:
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        status:
                          type: string
                        title:
                          type: string
                      type: object
                      x-apidog-orders:
                        - status
                        - title
                      required:
                        - status
                        - title
                    type: array
                type: object
                x-apidog-orders:
                  - errors
                examples:
                  - errors:
                      - status: '429'
                        title: Too Many Requests
                required:
                  - errors
          headers: {}
          x-apidog-name: Too Many Requests
        '500':
          description: Internal Server Error
          content:
            application/vnd.api+json:
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        detail:
                          type: string
                        status:
                          type: string
                        title:
                          type: string
                      type: object
                      x-apidog-orders:
                        - detail
                        - status
                        - title
                      required:
                        - detail
                        - status
                        - title
                    type: array
                type: object
                x-apidog-orders:
                  - errors
                examples:
                  - errors:
                      - detail: Something went wrong
                        status: '500'
                        title: Internal Server Error
                required:
                  - errors
          headers: {}
          x-apidog-name: Server Error
      security:
        - Access token: []
          x-apidog:
            schemeGroups:
              - id: Bj_jQV7IXo03VpzrWxrEH
                schemeIds:
                  - Access token
            required: true
            use:
              id: Bj_jQV7IXo03VpzrWxrEH
            scopes:
              Bj_jQV7IXo03VpzrWxrEH: {}
      x-apidog-folder: Meters from Enectiva
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/1003855/apis/api-19188103-run
components:
  schemas: {}
  securitySchemes:
    Access token:
      type: jwt
      scheme: bearer
      bearerFormat: JWT
      x-apidog:
        addTokenTo: header
        headerPrefix: Bearer
    Import token:
      type: jwt
      scheme: bearer
      bearerFormat: JWT
      x-apidog:
        addTokenTo: header
        headerPrefix: Bearer
    Login token:
      type: jwt
      scheme: bearer
      bearerFormat: JWT
      x-apidog:
        addTokenTo: header
        headerPrefix: Bearer
    Access  or  Import token:
      type: jwt
      scheme: bearer
      bearerFormat: JWT
      x-apidog:
        addTokenTo: header
        headerPrefix: Bearer
servers:
  - url: https://api.enectiva.cz
    description: https://api.enectiva.cz
security: []

```
