# Latest data point

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /import/data_points/{customerId}/{importId}/{suit}/latest:
    get:
      summary: Latest data point
      deprecated: false
      description: >-
        Latest data point endpoint is an equivalent to latest reading endpoint
        with analogous semantics.
      operationId: Latest data point
      tags:
        - Data points to Enectiva
        - Data points to Enectiva
      parameters:
        - name: customerId
          in: path
          description: >-
            UUID of the customer, available in the token management section in
            Enectiva
          required: true
          example: '{{customerId}}'
          schema:
            type: string
        - name: importId
          in: path
          description: series ID in question
          required: true
          example: '{{importId}}'
          schema:
            type: string
        - name: suit
          in: path
          description: >-
            identifier to distinguish multiple series from a single device
            (using the same `importId`), `default` by default
          required: true
          example: '{{suit}}'
          schema:
            type: string
        - 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: integer
                      attributes:
                        type: object
                        properties:
                          time:
                            type: string
                          value:
                            type: number
                          import_id:
                            type: string
                          customer_uuid:
                            type: string
                          sender:
                            type: string
                          suit:
                            type: string
                        required:
                          - time
                          - value
                          - import_id
                          - customer_uuid
                          - sender
                          - suit
                        x-apidog-orders:
                          - time
                          - value
                          - import_id
                          - customer_uuid
                          - sender
                          - suit
                      type:
                        type: string
                    required:
                      - id
                      - attributes
                      - type
                    x-apidog-orders:
                      - id
                      - attributes
                      - type
                required:
                  - data
                x-apidog-orders:
                  - data
              example:
                data:
                  id: 1
                  attributes:
                    time: '2016-01-07T05:23:41+01:00'
                    value: 550011.34
                    import_id: temp_01
                    customer_uuid: 11e7e767-6f74-4994-b607-158ff7f7445e
                    sender: test_script_01
                    suit: default
                  type: data_points
          headers: {}
          x-apidog-name: OK
        '401':
          description: Unauthorized
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        detail:
                          type: string
                        status:
                          type: string
                        title:
                          type: string
                      x-apidog-orders:
                        - detail
                        - status
                        - title
                      required:
                        - title
                        - detail
                        - status
                required:
                  - errors
                x-apidog-orders:
                  - errors
              example:
                errors:
                  - detail: Access token is invalid.
                    status: '401'
                    title: Unauthorized
          headers: {}
          x-apidog-name: Unauthorized
        '404':
          description: Not Found
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        detail:
                          type: string
                        status:
                          type: string
                        title:
                          type: string
                      x-apidog-orders:
                        - detail
                        - status
                        - title
                      required:
                        - title
                        - status
                        - detail
                required:
                  - errors
                x-apidog-orders:
                  - errors
              example:
                errors:
                  - detail: Requested resource has not been found
                    status: '404'
                    title: Not found
          headers: {}
          x-apidog-name: Record Not Found
        '406':
          description: Not Acceptable
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        detail:
                          type: string
                        status:
                          type: string
                        title:
                          type: string
                      x-apidog-orders:
                        - detail
                        - status
                        - title
                      required:
                        - title
                        - detail
                        - status
                required:
                  - errors
                x-apidog-orders:
                  - errors
              example:
                errors:
                  - detail: Accept HTTP header must be "application/vnd.api+json".
                    status: '406'
                    title: Not acceptable
          headers: {}
          x-apidog-name: Not Acceptable
        '429':
          description: Too Many Requests
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        detail:
                          type: string
                        status:
                          type: string
                        title:
                          type: string
                      x-apidog-orders:
                        - detail
                        - status
                        - title
                      required:
                        - title
                        - status
                        - detail
                required:
                  - errors
                x-apidog-orders:
                  - errors
              example:
                errors:
                  - detail: You have exceeded the number of allowed requests.
                    status: '429'
                    title: Too Many Requests
          headers: {}
          x-apidog-name: Too Many Requests
        '500':
          description: Internal Server Error
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        detail:
                          type: string
                        status:
                          type: string
                        title:
                          type: string
                      x-apidog-orders:
                        - detail
                        - status
                        - title
                      required:
                        - title
                        - status
                        - detail
                required:
                  - errors
                x-apidog-orders:
                  - errors
              example:
                errors:
                  - detail: Something went wrong
                    status: '500'
                    title: Internal Server Error
          headers: {}
          x-apidog-name: Server Error
      security:
        - Access  or  Import token: []
          x-apidog:
            schemeGroups:
              - id: r1FamPhgXhA1_RzuLZPWI
                schemeIds:
                  - Access  or  Import token
            required: true
            use:
              id: r1FamPhgXhA1_RzuLZPWI
            scopes:
              r1FamPhgXhA1_RzuLZPWI: {}
      x-apidog-folder: Data points to Enectiva
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/1003855/apis/api-19188098-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: []

```
