> ## 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.

# Get the detailed execution status of an electricity energy prices job

> This url is used to download the JSON file containing the detailed execution status for the job.

A job can have the following states:
  - ERROR
  - DONE
  - IN_PROGRESS
  - SUBMITTED

Jobs are deleted from the Home system after 60 days

This API also returns the detailed execution status for jobs in DONE state.




## OpenAPI

````yaml /api-reference/elec-tariff-api.yaml get /v2/electricity-prices-jobs/{job-id}
openapi: 3.0.1
info:
  title: Tariffs 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:
  /v2/electricity-prices-jobs/{job-id}:
    get:
      tags:
        - Electricity energy prices Bulk
      summary: Get the detailed execution status of an electricity energy prices job
      description: >
        This url is used to download the JSON file containing the detailed
        execution status for the job.


        A job can have the following states:
          - ERROR
          - DONE
          - IN_PROGRESS
          - SUBMITTED

        Jobs are deleted from the Home system after 60 days


        This API also returns the detailed execution status for jobs in DONE
        state.
      operationId: electricity-prices-job-details
      parameters:
        - name: job-id
          in: path
          description: the job id of job to inspect
          required: true
          schema:
            type: string
        - name: view
          in: query
          description: >
            The overview option return a global execution report about the job
            execution.


            In addition, the details option returns a detailed execution report
            of each ran operation in the job
          example: overview
          required: true
          schema:
            type: string
            enum:
              - overview
              - details
            default: overview
      responses:
        '200':
          description: Job detail in success
          content:
            application/octet-stream:
              schema:
                $ref: '#/components/schemas/BulkElecPriceDetailedExecutionStatus'
            application/json:
              schema:
                $ref: '#/components/schemas/BulkElecPriceDetailedExecutionStatus'
        '400':
          description: Functional Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content: {}
        '404':
          description: Not Found
          content: {}
        '500':
          description: Server error
          content: {}
components:
  schemas:
    BulkElecPriceDetailedExecutionStatus:
      required:
        - _links
        - archive
        - state
      type: object
      properties:
        _links:
          $ref: '#/components/schemas/JobElecPriceLinks'
        archive:
          type: string
          description: |
            Name of the archive associated with this job execution.
          example: myOperationsArchive.tar.gz
        state:
          $ref: '#/components/schemas/BulkElecPriceExecutionState'
        report:
          $ref: '#/components/schemas/BulkElecPriceDetailExecutionReport'
    ErrorResponse:
      required:
        - errorCode
        - errorDescription
      type: object
      properties:
        errorCode:
          description: The error code.
          type: string
        errorDescription:
          type: string
          description: The error description
      description: ErrorResponse
    JobElecPriceLinks:
      required:
        - self
      type: object
      properties:
        self:
          $ref: '#/components/schemas/JobElecPriceLinkSelf'
    BulkElecPriceExecutionState:
      properties:
        current:
          type: string
          description: |
            current state of the bulk job.
          enum:
            - ERROR
            - DONE
            - IN_PROGRESS
            - SUBMITTED
          example: DONE
        history:
          $ref: '#/components/schemas/ExecutionElecPriceStateHistory'
    BulkElecPriceDetailExecutionReport:
      properties:
        error:
          $ref: '#/components/schemas/ErrorElecPriceDescriptionJob'
        overview:
          $ref: '#/components/schemas/ExecutionElecPriceReportOverview'
        files:
          type: array
          items:
            $ref: '#/components/schemas/BulkElecPriceDetailExecutionFileReport'
    JobElecPriceLinkSelf:
      required:
        - href
      type: object
      properties:
        href:
          type: string
          example: https://<DATANUMIA_ROOT_URL>/electricity-prices-jobs/{job-id}
    ExecutionElecPriceStateHistory:
      description: contain all the state change timestamp for a job
      example: |
        {
          "SUBMITTED"   : "2017-07-21T17:32:28Z",
          "IN_PROGRESS" : "2017-07-21T17:34:28Z",
          "DONE"        : "2017-07-21T17:34:58Z"
        }
      additionalProperties:
        $ref: '#/components/schemas/ExecutionElecPriceStateMapItem'
    ErrorElecPriceDescriptionJob:
      required:
        - code
        - message
      type: object
      properties:
        code:
          type: string
          enum:
            - INVALID_ARCHIVE_FORMAT
        message:
          type: string
    ExecutionElecPriceReportOverview:
      properties:
        nbOperationsTotal:
          type: integer
          description: |
            number of executed smt operations
          example: 146
        nbOperationsOK:
          type: integer
          description: |
            number of succedd smt operations
          example: 146
        nbOperationsKO:
          type: integer
          description: |
            number of failed smt operations
          example: 0
    BulkElecPriceDetailExecutionFileReport:
      properties:
        file:
          type: string
          description: file name in the archive
          example: test.json
        error:
          $ref: '#/components/schemas/ErrorElecPriceDescriptionFile'
        content:
          $ref: '#/components/schemas/BulkElecPriceDetailExecutionFileReportContent'
    ExecutionElecPriceStateMapItem:
      type: object
      properties:
        jobState:
          type: string
          description: |
            current state of the bulk job.
          enum:
            - ERROR
            - DONE
            - IN_PROGRESS
            - SUBMITTED
          example: IN_PROGRESS
        ts:
          type: string
          description: >
            Timestamp of the state  change in Home as defined by RFC 3339,
            section 5.6 using the following format: full-date'T'partial-time'Z'
          format: date-time
          example: '2017-07-21T17:32:28Z'
    ErrorElecPriceDescriptionFile:
      required:
        - code
        - message
      type: object
      properties:
        code:
          type: string
          enum:
            - INVALID_FILE_FORMAT
        message:
          type: string
    BulkElecPriceDetailExecutionFileReportContent:
      properties:
        elecStatus:
          type: array
          anyOf:
            - $ref: '#/components/schemas/ElecPriceBulkStatus'
            - $ref: '#/components/schemas/StandingChargeBulkStatus'
            - $ref: '#/components/schemas/StandingChargeByTypeBulkStatus'
    ElecPriceBulkStatus:
      type: object
      properties:
        status:
          $ref: '#/components/schemas/Status'
        energyPriceDto:
          $ref: '#/components/schemas/ElecPriceDto'
    StandingChargeBulkStatus:
      type: object
      properties:
        status:
          $ref: '#/components/schemas/Status'
        standingChargeDto:
          $ref: '#/components/schemas/StandingChargeDto'
    StandingChargeByTypeBulkStatus:
      type: object
      properties:
        status:
          $ref: '#/components/schemas/Status'
        standingChargeDto:
          $ref: '#/components/schemas/StandingChargeByTypeDto'
    Status:
      required:
        - code
        - message
      type: object
      properties:
        code:
          description: The code. Refer to the code table for more details
          type: string
          example: SITE_NOT_FOUND
        message:
          type: string
          example: the site is already associated to another person
    ElecPriceDto:
      type: object
      required:
        - beginDate
        - generationTs
        - supplyContractParameters
        - pricesByTariffHeading
        - currency
      properties:
        beginDate:
          description: >
            Functional start date for the energy price.


            The supported format is as defined by RFC 3339, section 5.6
            restricted to : full-date
          type: string
          format: date
          example: '2021-07-21'
        generationTs:
          description: >
            This date is used to historize energy price content at for a given
            ts.


            When there are multiple energy price with the same ts value, the one
            with the most recent generationTs is used.


            The supported format is as defined by RFC 3339, section 5.6
            restricted to : full-date'T'partial-time'Z'
          example: '2022-05-17T14:28:37Z'
          type: string
          format: date-time
        supplyContractParameters:
          description: >-
            Contract parameters associated with the prices (e.g. tariff, option,
            subscribed power)
          type: object
          example:
            SUBSCRIBED_POWER: '9'
            TARIFF: OFFRE_TARIFAIRE
            TARIFF_OPTION: OPTION_TARIFAIRE_ELEC
        pricesByTariffHeading:
          description: Electricity prices categorized by tariff heading in kWh
          type: object
          example:
            HP: '0.22284'
            HC: '0.16152'
          properties:
            '':
              type: string
        currency:
          description: Currency in which the prices are sent
          format: ISO-4217
          type: string
          example: EUR
    StandingChargeDto:
      type: object
      required:
        - beginDate
        - generationTs
        - supplyContractParameters
        - standingCharge
        - currency
      properties:
        beginDate:
          description: >
            Functional start date for the standing charges.


            The supported format is as defined by RFC 3339, section 5.6
            restricted to : full-date
          type: string
          format: date
          example: '2021-07-21'
        generationTs:
          description: >
            This date is used to historize standing charges content at for a
            given ts.


            When there are multiple standing charges with the same ts value, the
            one with the most recent generationTs is used.


            The supported format is as defined by RFC 3339, section 5.6
            restricted to : full-date'T'partial-time'Z'
          example: '2022-05-17T14:28:37Z'
          type: string
          format: date-time
        supplyContractParameters:
          description: Contract parameters associated with the standing charge prices
          type: object
          example:
            SUBSCRIBED_POWER: '9'
            TARIFF: OFFRE_TARIFAIRE
            TARIFF_OPTION: OPTION_TARIFAIRE_ELEC
        standingCharge:
          description: Standing charge yearly prices
          type: string
          example: '0.22284'
        currency:
          description: Currency in which the prices are sent
          format: ISO-4217
          type: string
          example: EUR
    StandingChargeByTypeDto:
      type: object
      required:
        - beginDate
        - generationTs
        - supplyContractParameters
        - standingChargesByType
        - currency
      properties:
        beginDate:
          description: >
            Functional start date for the standing charges.


            The supported format is as defined by RFC 3339, section 5.6
            restricted to : full-date
          type: string
          format: date
          example: '2021-07-21'
        generationTs:
          description: >
            This date is used to historize standing charges content at for a
            given ts.


            When there are multiple standing charges with the same ts value, the
            one with the most recent generationTs is used.


            The supported format is as defined by RFC 3339, section 5.6
            restricted to : full-date'T'partial-time'Z'
          example: '2022-05-17T14:28:37Z'
          type: string
          format: date-time
        supplyContractParameters:
          description: Contract parameters associated with the standing charge prices
          type: object
          example:
            SUBSCRIBED_POWER: '9'
            TARIFF: OFFRE_TARIFAIRE
            TARIFF_OPTION: OPTION_TARIFAIRE_ELEC
        standingChargesByType:
          description: Standing charge yearly prices by type
          type: object
          example:
            STANDING_CHARGE_FEE: '0.22284'
            GREEN_ENERGY_FEE: '0.16152'
        currency:
          description: Currency in which the prices are sent
          format: ISO-4217
          type: string
          example: EUR

````