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

# Get v3offer calculator

> The offer calculator is a device for our salespartners to create individual offers for a given tariff and given parameters.

It returns prices for all price items of the tariff, as well as the yearly, monthly and one-time
total amount for the end customer. It also returns additional information such as the associated internal
costs and other calculation data on which the offer is based. It is up to the front end of the salespartner
which of these data to display to the (potential) end customer.

The set of required input parameters varies by tariff. Formally, only
most input parameters are marked optional. But depending on
the type of tariff, different input parameters are required;

| type of tariff | Required parameters |
| -- | -- |
| Fix price consumer products | *tariff_name*, *zip_code*, *consumption* |
| Spot price consumer products | *tariff_name*, *zip_code*, *months_for_average_prices_and_costs* |
| Producer products | *tariff_name*, *plant_type*, *installed_capacity*, *feed_in_energy_amount*, *months_for_average_prices_and_costs* |


If parameters are missing from input, status 400 will be returned, together with a list of
missing parameters.

For some tariffs, other sets of parameters than listed above may be required.
Lumenaza will communicate this to the sales partner on a per tariff basis

If *zip_code* is required, it may be complemented by the following parts of the
street address: *city*, *street*, *house_number*. If the address data are not
sufficient to determine the distribution net, status 300 is returned, together
with a list of possible street/city-suggestions.



## OpenAPI

````yaml /lumx_openapi.yaml get /v3/offer_calculator/
openapi: 3.0.3
info:
  title: Lumenaza external API
  version: 3.8.0 (v3)
  description: Specification of the Lumenaza external API.
servers:
  - url: https://api.lumenaza.de/
    description: Produktivserver
  - url: https://api.test.lumenaza.de/
    description: Testserver
security: []
tags:
  - name: Community Data API
    description: >-
      The API is used to retrieve master data and measurement data for a
      community. A community is defined by all customers that belong to your
      company.
paths:
  /v3/offer_calculator/:
    get:
      tags:
        - offer_calculator
      description: >-
        The offer calculator is a device for our salespartners to create
        individual offers for a given tariff and given parameters.


        It returns prices for all price items of the tariff, as well as the
        yearly, monthly and one-time

        total amount for the end customer. It also returns additional
        information such as the associated internal

        costs and other calculation data on which the offer is based. It is up
        to the front end of the salespartner

        which of these data to display to the (potential) end customer.


        The set of required input parameters varies by tariff. Formally, only

        most input parameters are marked optional. But depending on

        the type of tariff, different input parameters are required;


        | type of tariff | Required parameters |

        | -- | -- |

        | Fix price consumer products | *tariff_name*, *zip_code*, *consumption*
        |

        | Spot price consumer products | *tariff_name*, *zip_code*,
        *months_for_average_prices_and_costs* |

        | Producer products | *tariff_name*, *plant_type*, *installed_capacity*,
        *feed_in_energy_amount*, *months_for_average_prices_and_costs* |



        If parameters are missing from input, status 400 will be returned,
        together with a list of

        missing parameters.


        For some tariffs, other sets of parameters than listed above may be
        required.

        Lumenaza will communicate this to the sales partner on a per tariff
        basis


        If *zip_code* is required, it may be complemented by the following parts
        of the

        street address: *city*, *street*, *house_number*. If the address data
        are not

        sufficient to determine the distribution net, status 300 is returned,
        together

        with a list of possible street/city-suggestions.
      operationId: offer_calculator_retrieve
      parameters:
        - in: query
          name: city
          schema:
            type: string
            minLength: 1
        - in: query
          name: consumption
          schema:
            type: integer
            minimum: 1
          description: The annual consumption in kWh. Will not be used for ht/nt tariffs.
        - in: query
          name: feed_in_energy_amount
          schema:
            type: integer
            minimum: 0
          description: The amount which is feed into the grid in kWh
        - in: query
          name: house_number
          schema:
            type: string
            minLength: 1
        - in: query
          name: ht_consumption
          schema:
            type: integer
            minimum: 0
          description: The annual ht-consumption in kWh for ht/nt tariffs
        - in: query
          name: installed_capacity
          schema:
            type: integer
            minimum: 0
          description: The capacity of the plant in Wp
        - in: query
          name: months_for_average_prices_and_costs
          schema:
            type: integer
            maximum: 24
            minimum: 1
            default: 12
          description: >-
            The number of past months which are used to calculate average values
            (like day ahead prices)
        - in: query
          name: nt_consumption
          schema:
            type: integer
            minimum: 0
          description: The annual nt-consumption in kWh for ht/nt tariffs
        - in: query
          name: plant_type
          schema:
            enum:
              - solar
              - gas
              - wind
              - water
            type: string
            minLength: 1
          description: |-
            * `solar` - solar
            * `gas` - gas
            * `wind` - wind
            * `water` - water
        - in: query
          name: street
          schema:
            type: string
            minLength: 1
        - in: query
          name: tariff_name
          schema:
            type: string
            minLength: 1
          required: true
        - in: query
          name: zip_code
          schema:
            type: string
            pattern: ^[0-9]{5}$
            minLength: 1
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TariffOutput'
          description: ''
        '300':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MultipleStreetsResponse'
          description: ''
components:
  schemas:
    TariffOutput:
      type: object
      description: >-
        The tariff generally consists of several *offer items*. Information on
        those is

        given in offer_item_price_results. Information on the prices to be paid
        in total is

        given in total_price_results.
      properties:
        tariff_name:
          type: string
        display_tariff_name:
          type: string
        offer_item_price_results:
          type: array
          items:
            $ref: '#/components/schemas/OfferItemPriceResult'
          description: Price information for the individual price items.
        total_price_results:
          type: array
          items:
            $ref: '#/components/schemas/TotalPriceResult'
          description: >-
            Aggregated grand total to pay for the end custumer, based on
            theinput parameters. At least two totals will be returned. One with
            unit=ct/y and one with unit=ct/m. These reflect the calculated total
            amount per year or per month respectively. 


            The yearly amounts are the grand totals of the offer_item_price
            results.Since this a sum of already rounded values, the rounding
            errors can sum up to more than one cent. The yearly totals contain
            all expected payments, with exception of one time fees.


            The monthly totals are given for convenience. Except for rounding,
            they equal the yearly totals divided by 12.


            If there are one time fees, a third entry with unit=ct is returned.
      required:
        - display_tariff_name
        - offer_item_price_results
        - tariff_name
        - total_price_results
    MultipleStreetsResponse:
      type: object
      properties:
        zipcode:
          type: string
        streets:
          type: array
          items:
            type: array
            items:
              type: string
            maxItems: 2
            minItems: 2
      required:
        - streets
        - zipcode
    OfferItemPriceResult:
      type: object
      properties:
        name:
          type: string
        classification:
          type: string
          description: Product item classification of the product item offer.
        display_name:
          type: string
        price_net:
          type: number
          format: double
          description: >-
            Offered net price per unit. In case of a percentage price_net equals
            price_gross. For business products, this net price is rounded to two
            decimals and the rounded value enters in subsequent calculations.
        price_gross:
          type: number
          format: double
          description: >-
            Offered gross price per unit. In case of a percentage price_gross
            equals price_net. For household products (non business products),
            this gross price is rounded to two decimals and the rounded value
            enters in subsequent calculations.
        unit:
          $ref: '#/components/schemas/UnitC46Enum'
        associated_costs:
          type: array
          items:
            $ref: '#/components/schemas/AssociatedCost'
          description: All internal costs associatied to this price item
        item_amount:
          allOf:
            - $ref: '#/components/schemas/ItemAmount'
          description: >-
            Aggregated amount to pay per for the end customer for this price
            item per year (unit=ct/y) or once (unit=ct).
        vat_rate:
          type: number
          format: double
      required:
        - associated_costs
        - classification
        - display_name
        - item_amount
        - name
        - price_gross
        - price_net
        - unit
        - vat_rate
    TotalPriceResult:
      type: object
      properties:
        total_price_net:
          type: integer
        total_price_gross:
          type: integer
        vat_rate:
          type: number
          format: double
        unit:
          $ref: '#/components/schemas/TotalPriceResultUnitEnum'
        total_price_comparison_net:
          type: integer
          nullable: true
          description: Reserved for future use
        total_price_comparison_gross:
          type: integer
          nullable: true
          description: Reserved for future use
      required:
        - total_price_gross
        - total_price_net
        - unit
        - vat_rate
    UnitC46Enum:
      enum:
        - ct/kWh
        - ct
        - ct/y
        - ct/m
        - 1/100
        - kWh
        - m
      type: string
      description: |-
        * `ct/kWh` - cent per kWh
        * `ct` - cent
        * `ct/y` - cent per year
        * `ct/m` - cent per month
        * `1/100` - percent
        * `kWh` - kWh
        * `m` - months
    AssociatedCost:
      type: object
      properties:
        name:
          type: string
        cost_per_unit_net:
          type: number
          format: double
        display_name:
          type: string
        unit:
          $ref: '#/components/schemas/UnitC46Enum'
      required:
        - cost_per_unit_net
        - display_name
        - name
        - unit
    ItemAmount:
      type: object
      properties:
        item_amount_net:
          type: integer
        item_amount_gross:
          type: integer
        unit:
          $ref: '#/components/schemas/ItemAmountUnitEnum'
        calculation_data:
          type: array
          items:
            $ref: '#/components/schemas/CalculationData'
      required:
        - calculation_data
        - item_amount_gross
        - item_amount_net
        - unit
    TotalPriceResultUnitEnum:
      enum:
        - ct/y
        - ct/m
        - ct
      type: string
      description: |-
        * `ct/y` - ct/y
        * `ct/m` - ct/m
        * `ct` - ct
    ItemAmountUnitEnum:
      enum:
        - ct/y
        - ct
      type: string
      description: |-
        * `ct/y` - ct/y
        * `ct` - ct
    CalculationData:
      type: object
      properties:
        name:
          type: string
        value:
          type: number
          format: double
        unit:
          $ref: '#/components/schemas/UnitC46Enum'
      required:
        - name
        - unit
        - value

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.