# Meter

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /meters/{meterIdentification}:
    get:
      summary: Meter
      deprecated: false
      description: >-
        This action allows to the details of a meter.


        The required scope is `meters`.


        By default only active meter could be fetch. To get deactivated meter
        include param `deactivated=true`
      operationId: Meter
      tags:
        - Meters from Enectiva
        - Meters from Enectiva
      parameters:
        - name: meterIdentification
          in: path
          description: >-
            See [meter
            identification](https://apidocs.enectiva.cz/introduction-1363538m0.md#meter-identification)
          required: true
          example: '{{meterIdentification}}'
          schema:
            type: string
        - 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/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                      attributes:
                        type: object
                        properties:
                          identification_code:
                            type: string
                          name:
                            type: string
                          external_id:
                            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
                          measurement_type:
                            type: string
                          data_source:
                            type: string
                          address:
                            type: string
                        required:
                          - identification_code
                          - name
                          - external_id
                          - energy_code
                          - energy_name
                          - unit
                          - status
                          - last_measured_at
                          - entity_id
                          - import_id
                          - measurement_type
                          - data_source
                          - address
                        x-apidog-orders:
                          - identification_code
                          - name
                          - external_id
                          - energy_code
                          - energy_name
                          - unit
                          - status
                          - last_measured_at
                          - entity_id
                          - import_id
                          - measurement_type
                          - data_source
                          - address
                      type:
                        type: string
                    required:
                      - id
                      - attributes
                      - type
                    x-apidog-orders:
                      - id
                      - attributes
                      - type
                required:
                  - data
                x-apidog-orders:
                  - data
              example:
                data:
                  id: '293'
                  attributes:
                    identification_code: '1234'
                    name: Main electricity meter
                    external_id: custom_client_id
                    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: reading
                    data_source: imported
                    address: Viktora Huga 6
                  type: meters
          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
        '404':
          description: Not Found
          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: '404'
                        title: Not Found
                required:
                  - errors
          headers: {}
          x-apidog-name: Record Not Found
        '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
        '409':
          description: Conflict
          content:
            application/vnd.api+json:
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        detail:
                          type: string
                        meta:
                          properties:
                            conflicting_resources:
                              items:
                                properties:
                                  href:
                                    type: string
                                required:
                                  - href
                                type: object
                                x-apidog-orders:
                                  - href
                              type: array
                          type: object
                          x-apidog-orders:
                            - conflicting_resources
                        status:
                          type: string
                        title:
                          type: string
                      type: object
                      x-apidog-orders:
                        - detail
                        - meta
                        - status
                        - title
                      required:
                        - detail
                        - meta
                        - status
                        - title
                    type: array
                type: object
                x-apidog-orders:
                  - errors
                examples:
                  - errors:
                      - detail: >-
                          Multiple meters found with external_id 'METER_001'.
                          Use Enectiva ID instead.
                        meta:
                          conflicting_resources:
                            - href: https://api.enectiva.cz/meters/123
                            - href: https://api.enectiva.cz/meters/456
                        status: '409'
                        title: Conflict
                required:
                  - errors
          headers: {}
          x-apidog-name: Conflict
        '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: ly06bUNtVnsuyw72ADLZ0
                schemeIds:
                  - Access token
            required: true
            use:
              id: ly06bUNtVnsuyw72ADLZ0
            scopes:
              ly06bUNtVnsuyw72ADLZ0: {}
      x-apidog-folder: Meters from Enectiva
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/1003855/apis/api-19188104-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: []

```
