# Delete a reading by time

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /import/readings/{customerId}/{importId}/{suit}:
    delete:
      summary: Delete a reading by time
      deprecated: false
      description: >-
        This endpoint allows to delete a previously created reading based on the
        meter identification + reading time. The `time` field must conform to
        format defined in RFC3339 and must be truncated to whole seconds to be
        matched.


        Please, be aware that


        1. the deletion takes some time to propagate to the GUI (it should not
        be longer than the import period of the meter) and

        2. only readings created recently (last few weeks) can be deleted by
        this endpoint
      tags:
        - Readings to Enectiva
      parameters:
        - name: customerId
          in: path
          description: ''
          required: true
          example: '{{customerId}}'
          schema:
            type: string
        - name: importId
          in: path
          description: ''
          required: true
          example: '{{importId}}'
          schema:
            type: string
        - name: suit
          in: path
          description: ''
          required: true
          example: '{{suit}}'
          schema:
            type: string
        - name: Accept
          in: header
          description: ''
          required: true
          example: application/vnd.api+json
          schema:
            type: string
        - name: Content-Type
          in: header
          description: ''
          required: true
          example: application/vnd.api+json
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: object
                  properties:
                    type:
                      type: string
                    attributes:
                      type: object
                      properties:
                        time:
                          type: string
                      required:
                        - time
                      x-apidog-orders:
                        - time
                  required:
                    - type
                    - attributes
                  x-apidog-orders:
                    - type
                    - attributes
              required:
                - data
              x-apidog-orders:
                - data
            example:
              data:
                type: reading_deletions
                attributes:
                  time: '2025-08-25T12:00:00Z'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      attributes:
                        type: object
                        properties:
                          customer_uuid:
                            type: string
                          import_id:
                            type: string
                          sender:
                            type: string
                          state:
                            type: number
                          suit:
                            type: string
                          suspicious:
                            type: boolean
                          time:
                            type: string
                          unit:
                            type: string
                        required:
                          - customer_uuid
                          - import_id
                          - sender
                          - state
                          - suit
                          - suspicious
                          - time
                          - unit
                        x-apidog-orders:
                          - customer_uuid
                          - import_id
                          - sender
                          - state
                          - suit
                          - suspicious
                          - time
                          - unit
                      id:
                        type: integer
                      type:
                        type: string
                    required:
                      - attributes
                      - id
                      - type
                    x-apidog-orders:
                      - attributes
                      - id
                      - type
                  01K3TAV20E7ZVA622AYH3ZC48X:
                    type: string
                required:
                  - data
                  - 01K3TAV20E7ZVA622AYH3ZC48X
                x-apidog-orders:
                  - data
                  - 01K3TAV20E7ZVA622AYH3ZC48X
              example:
                data:
                  attributes:
                    customer_uuid: 11e7e767-6f74-4994-b607-158ff7f7445e
                    import_id: 40AABB_007
                    sender: test_script_01
                    state: 123456.78
                    suit: default
                    suspicious: false
                    time: '2015-11-18T09:54:23+01:00'
                    unit: kW
                  id: 1
                  type: readings
          headers: {}
          x-apidog-name: Success
        '401':
          description: ''
          content:
            application/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: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        status:
                          type: string
                        title:
                          type: string
                      x-apidog-orders:
                        - status
                        - title
                      required:
                        - title
                        - status
                required:
                  - errors
                x-apidog-orders:
                  - errors
              example:
                errors:
                  - status: '404'
                    title: Not Found
          headers: {}
          x-apidog-name: Record Not Found
        '406':
          description: ''
          content:
            application/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:
                        - detail
                        - status
                        - title
                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
        '415':
          description: ''
          content:
            application/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:
                        - detail
                        - status
                        - title
                required:
                  - errors
                x-apidog-orders:
                  - errors
              example:
                errors:
                  - detail: Content-Type header must be "application/vnd.api+json".
                    status: '415'
                    title: Unsupported Media Type
          headers: {}
          x-apidog-name: Unsupported Media Type
        '429':
          description: ''
          content:
            application/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:
                        - detail
                        - status
                        - title
                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: ''
          content:
            application/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:
                        - detail
                        - status
                        - title
                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:
            required: true
            schemeGroups:
              - id: '-g5rq8DIZz2-eGweLzov_'
                schemeIds:
                  - Access  or  Import token
            use:
              id: '-g5rq8DIZz2-eGweLzov_'
      x-apidog-folder: Readings to Enectiva
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/1003855/apis/api-20879938-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: []

```
