> ## Documentation Index
> Fetch the complete documentation index at: https://docs.datanumia.com/llms.txt
> Use this file to discover all available pages before exploring further.

# return site indexes

> return sites indexes 
Provided options: 
  - WithActiveContract to filter indexes not allocated to contract at endDate (can be activated on demand). 
  - Invalidation rule which sort indexes by ts and priority. If multiple indexes at the same ts, keep the index with the highest priority. The invalidation rule is mandatory. 
  - If the site corresponding offer family is configured to require consent for smart indexes then only smart indexes collected after the user consent are returned. 
  - If beginDate is equals to endDate then only one index will be returned: the index applicable at the requested date.
  - The disableFilters parameters disable all previously described filters (including the Invalidation rule one)"




## OpenAPI

````yaml /api-reference/elec-index-api.yaml get /api/v2/sites/{site-id}/elec-indexes
openapi: 3.0.1
info:
  title: Indexes lifecycle
  contact:
    email: api@datanumia.com
  license:
    name: License TBD
    url: https://datanumia.com/licenses/LICENSE
  version: v1
servers:
  - url: https://api.home.datanumia.com/api
    description: Production Server
security: []
paths:
  /api/v2/sites/{site-id}/elec-indexes:
    get:
      tags:
        - Elec Indexes
        - Index
      summary: return site indexes
      description: |
        return sites indexes 
        Provided options: 
          - WithActiveContract to filter indexes not allocated to contract at endDate (can be activated on demand). 
          - Invalidation rule which sort indexes by ts and priority. If multiple indexes at the same ts, keep the index with the highest priority. The invalidation rule is mandatory. 
          - If the site corresponding offer family is configured to require consent for smart indexes then only smart indexes collected after the user consent are returned. 
          - If beginDate is equals to endDate then only one index will be returned: the index applicable at the requested date.
          - The disableFilters parameters disable all previously described filters (including the Invalidation rule one)"
      operationId: getIndexes
      parameters:
        - name: site-id
          in: path
          required: true
          schema:
            type: string
        - name: beginDate
          in: query
          description: >-
            Initialized using offer family depth limit configuration if it is
            not specified. If specified it will be reduced using the depthLimit
            configuration
          required: false
          schema:
            type: string
            format: date-time
          example: '2021-01-01T18:48:32.00Z'
        - name: endDate
          in: query
          description: Set to current date if not specified
          required: false
          schema:
            type: string
            format: date-time
          example: '2021-01-01T18:48:32.00Z'
        - name: disableFilters
          in: query
          description: >-
            if set to true, all indexes will be returned (without applying any
            filter).
          required: false
          schema:
            type: boolean
            default: false
        - name: withActiveContract
          in: query
          description: >-
            if set to true, only indexes allocated to the active contract at
            endDate will be returned.
          required: false
          schema:
            type: boolean
            default: false
        - name: nature
          in: query
          description: Filter indexes using the provided nature
          required: false
          schema:
            type: array
            default: []
            items:
              type: string
              enum:
                - LINKY_OK
                - LINKY_INTERPOLE
                - LINKY_SUJET_A_CAUTION
                - DISTRIBUTEUR
                - DISTRIBUTEUR_INVALIDE
                - MKT_SENSOR
                - MKT_SENSOR_INVALIDE
                - STEREO
                - RELEVE_CONFIANCE
                - RELEVE_CONFIANCE_INVALIDE
                - SCORE_RC
                - SCORE_RC_ACQUITTE
                - SCORE_RC_INVALIDE
                - SCORE_RC_INVALIDE_APPLIANCE
                - SCORE
                - SCORE_ACQUITTE
                - SCORE_INVALIDE_EDE
                - SCORE_INVALIDE_ACP
                - SCORE_INVALIDE_USER
                - SCORE_INVALIDE_APPLIANCE
                - SUIVI_CONSO
                - SUIVI_CONSO_INVALIDE
                - ESTI_EDELIA
                - ESTI_ACC
                - ESTI_ACC_INVALIDE
                - RTM
                - SUPPLIER_SMART_INDEX
                - SUPPLIER_SMART_INDEX_SUJET_A_CAUTION
                - MKT_SMART_DISTRIBUTOR
                - MKT_CYCLIC_DISTRIBUTOR
                - MKT_CUSTOMER
                - DTN_CUSTOMER_ACK
                - MKT_ESTIMATION
                - MKT_SMART_DISTRIBUTOR_INVALID
                - MKT_CYCLIC_DISTRIBUTOR_INVALID
                - MKT_ESTIMATION_INVALID
                - DTN_CUSTOMER_ACK_INVALID
                - MKT_CUSTOMER_INVALID
                - SCORE_INVALIDE_TRV_OM
      responses:
        '200':
          description: 'OK - return a list of indexes '
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IndexesDto'
        '404':
          description: Site not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '500':
          description: Unexpected error
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/IndexesDto'
components:
  schemas:
    IndexesDto:
      properties:
        indexes:
          type: array
          items:
            $ref: '#/components/schemas/IndexDto'
    ApiError:
      properties:
        errorCode:
          type: string
        errorDescription:
          type: string
    IndexDto:
      properties:
        ts:
          type: string
          format: date-time
        generationTs:
          type: string
          format: date-time
        nature:
          type: string
          enum:
            - LINKY_OK
            - LINKY_INTERPOLE
            - LINKY_SUJET_A_CAUTION
            - DISTRIBUTEUR
            - DISTRIBUTEUR_INVALIDE
            - MKT_SENSOR
            - MKT_SENSOR_INVALIDE
            - STEREO
            - RELEVE_CONFIANCE
            - RELEVE_CONFIANCE_INVALIDE
            - SCORE_RC
            - SCORE_RC_ACQUITTE
            - SCORE_RC_INVALIDE
            - SCORE_RC_INVALIDE_APPLIANCE
            - SCORE
            - SCORE_ACQUITTE
            - SCORE_INVALIDE_EDE
            - SCORE_INVALIDE_ACP
            - SCORE_INVALIDE_USER
            - SCORE_INVALIDE_APPLIANCE
            - SUIVI_CONSO
            - SUIVI_CONSO_INVALIDE
            - ESTI_EDELIA
            - ESTI_ACC
            - ESTI_ACC_INVALIDE
            - RTM
            - SUPPLIER_SMART_INDEX
            - SUPPLIER_SMART_INDEX_SUJET_A_CAUTION
            - MKT_SMART_DISTRIBUTOR
            - MKT_CYCLIC_DISTRIBUTOR
            - MKT_CUSTOMER
            - DTN_CUSTOMER_ACK
            - MKT_ESTIMATION
            - MKT_SMART_DISTRIBUTOR_INVALID
            - MKT_CYCLIC_DISTRIBUTOR_INVALID
            - MKT_ESTIMATION_INVALID
            - DTN_CUSTOMER_ACK_INVALID
            - MKT_CUSTOMER_INVALID
            - SCORE_INVALIDE_TRV_OM
        type:
          type: string
          enum:
            - RELEVE_BILAN_CONSO
            - FACTURE
            - SENSOR
            - UNMAPPED_INDEX_NATURE
        isBeforeChange:
          type: boolean
        isSmartMeter:
          type: boolean
        indexesByLabel:
          type: object
          additionalProperties:
            type: integer
            format: int64
            description: indexes by label
          description: indexes by label
          example: '{''cadran1'', 1,''cadran2'', 2}'
        indexesByTariffHeading:
          type: object
          additionalProperties:
            type: integer
            format: int64
            description: indexes by tariff headings
          description: indexes by tariff headings
          example: '{''HC'', 1,''HP'', 2}'
      required:
        - indexesByLabel
        - indexesByTariffHeading

````