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

# List Market Partner Bills

> Return DSO (grid usage) and MSO (metering service) invoices with additional information. Use query parameters to filter the result.



## OpenAPI

````yaml /lumx_openapi.yaml get /v3/marketpartners/marketpartner_bills/
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/marketpartners/marketpartner_bills/:
    get:
      tags:
        - marketpartners
      summary: List Market Partner Bills
      description: >-
        Return DSO (grid usage) and MSO (metering service) invoices with
        additional information. Use query parameters to filter the result.
      operationId: marketpartners_marketpartner_bills_list
      parameters:
        - in: query
          name: market_partner
          schema:
            type: string
          description: MPID of the market partner that issued the invoice.
        - in: query
          name: remittance_advice_number
          schema:
            type: string
          description: Remittance advice number associated with the invoice.
      responses:
        '200':
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MarketpartnerInvoice'
              examples:
                ListBillsSuccessful:
                  value:
                    - market_partner: '9900080000007'
                      metering_point: DE1234567890123456789012345678901
                      invoice_number: INV2020061001
                      sum_amount: 1500.75
                      invoice_date: '2020-06-10'
                      target_date: '2020-07-10'
                      is_self_billed: true
                      remittance_advice_number: ADV202005313468XXXX
                      invoice_positions:
                        - position_number: 11
                          article_number: '9990001000334'
                          article_description: Abgabe KWKG
                          energy_amount: '1170.000'
                          energy_amount_unit: KWH
                          time_amount: null
                          time_amount_unit: null
                          bill_subperiod_start: '2020-01-01'
                          bill_subperiod_end: '2020-06-04'
                          total_amount_netto: '2.64'
                          reduction: null
                          calculation_base_price: '0.00226000'
                          calculation_base_price_unit: null
                          tax_percentage: '19.0000'
                          reduction_type: null
                          reduction_percent: null
                          correction_factor: null
                          common_invoice_positions: []
                      tax_differentiated_sums:
                        '16':
                          gross_prepaid_amount: 200
                          prepaid_tax_amount: 32
                          gross_to_pay_per_tax_rate: 118
                          tax_amount: 18.88
                        '19':
                          gross_prepaid_amount: 300
                          prepaid_tax_amount: 57
                          gross_to_pay_per_tax_rate: 243
                          tax_amount: 46.17
                      bill_period_start: '2020-05-01'
                      bill_period_end: '2020-05-31'
                      invoice_type: MVR
                      parent_invoice_number: null
                  summary: List bills successful
          description: ''
components:
  schemas:
    MarketpartnerInvoice:
      type: object
      properties:
        market_partner:
          type: string
          title: Marktpartner ID
          readOnly: true
          description: MPID of the market partner that issued the invoice.
        metering_point:
          type: string
          description: Market location identifier associated with this invoice.
        invoice_number:
          type: string
          description: Unique identifier of the market partner invoice.
        remittance_advice_number:
          type: string
          readOnly: true
          description: Payment reference number, if one has been assigned.
        invoice_date:
          type: string
          format: date
          description: Invoice date.
        sum_amount:
          type: number
          format: double
          nullable: true
          description: Invoice amount in euros before differentiation by tax rate.
        target_date:
          type: string
          format: date
          nullable: true
          description: Invoice due date, if available.
        invoice_positions:
          type: array
          items:
            $ref: '#/components/schemas/MarketPartnerInvoicePosition'
          description: Invoice positions associated with this invoice.
        tax_differentiated_sums:
          type: object
          additionalProperties:
            type: object
            additionalProperties:
              type: number
              format: double
              nullable: true
          readOnly: true
          description: Amounts aggregated by tax rate for this invoice.
        is_self_billed:
          type: boolean
          readOnly: true
          description: Whether the invoice is self-billed.
        bill_period_start:
          type: string
          format: date
          description: Start of the billing period.
        bill_period_end:
          type: string
          format: date
          description: End of the billing period.
        invoice_type:
          allOf:
            - $ref: '#/components/schemas/InvoiceTypeEnum'
          description: |-
            Type of invoice.

            * `ABS` - Abschlagsrechnung
            * `ABR` - Abschlussrechnung
            * `JVR` - Turnusrechnung
            * `MVR` - Monatsrechnung
            * `MMM` - Mehr-/Mindermengenabrechnung
            * `WIM` - Rechnung für WiM
            * `ZVR` - Zwischenrechnung
            * `13I` - Integrierte 13.Rechnung 
            * `13R` - 13. Rechnung
        parent_invoice_number:
          type: string
          nullable: true
          description: Original invoice number when this invoice is a cancellation.
      required:
        - bill_period_end
        - bill_period_start
        - invoice_date
        - invoice_number
        - invoice_positions
        - invoice_type
        - is_self_billed
        - market_partner
        - metering_point
        - parent_invoice_number
        - remittance_advice_number
        - sum_amount
        - target_date
        - tax_differentiated_sums
    MarketPartnerInvoicePosition:
      type: object
      properties:
        position_number:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
        article_number:
          type: string
          title: BDEW Artikelnummer
          maxLength: 35
        article_description:
          type: string
          title: Beschreibung der Artikelnummer
          maxLength: 256
        energy_amount:
          type: string
          format: decimal
          pattern: ^-?\d{0,12}(?:\.\d{0,3})?$
          nullable: true
          title: Energetische Mengenangabe
        energy_amount_unit:
          nullable: true
          title: Einheit für energetische Mengenangabe
          oneOf:
            - $ref: '#/components/schemas/EnergyAmountUnitEnum'
            - $ref: '#/components/schemas/NullEnum'
        time_amount:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
          nullable: true
          title: Zeitliche Mengenangaben
        time_amount_unit:
          nullable: true
          title: Einheit von zeitliche Mengenangaben
          oneOf:
            - $ref: '#/components/schemas/TimeAmountUnitEnum'
            - $ref: '#/components/schemas/NullEnum'
        bill_subperiod_start:
          type: string
          format: date
        bill_subperiod_end:
          type: string
          format: date
        total_amount_netto:
          type: string
          format: decimal
          pattern: ^-?\d{0,7}(?:\.\d{0,2})?$
          title: Positionsbetrag (ohne USt.)
        reduction:
          type: string
          format: decimal
          pattern: ^-?\d{0,7}(?:\.\d{0,2})?$
          nullable: true
          title: Gesamtzu- oder abschlagsbetrag
        calculation_base_price:
          type: string
          format: decimal
          pattern: ^-?\d{0,7}(?:\.\d{0,8})?$
          title: Berechnungspreis
        calculation_base_price_unit:
          nullable: true
          title: Einheit vom Berechnungspreis
          oneOf:
            - $ref: '#/components/schemas/CalculationBasePriceUnitEnum'
            - $ref: '#/components/schemas/NullEnum'
        tax_percentage:
          type: string
          format: decimal
          pattern: ^-?\d{0,3}(?:\.\d{0,4})?$
          title: Umsatzsteuer der Position
        reduction_type:
          type: string
          nullable: true
          title: Abschlag oder Zuschlag
          maxLength: 256
        reduction_percent:
          type: string
          nullable: true
          title: Prozentangabe des Abschlags
          maxLength: 256
        correction_factor:
          type: string
          format: decimal
          pattern: ^-?\d{0,6}(?:\.\d{0,6})?$
          nullable: true
          title: Korrekturfaktor
        common_invoice_positions:
          type: array
          items:
            type: integer
          readOnly: true
      required:
        - article_description
        - article_number
        - bill_subperiod_end
        - bill_subperiod_start
        - calculation_base_price
        - common_invoice_positions
        - position_number
        - tax_percentage
        - total_amount_netto
    InvoiceTypeEnum:
      enum:
        - ABS
        - ABR
        - JVR
        - MVR
        - MMM
        - WIM
        - ZVR
        - 13I
        - 13R
      type: string
      description: |-
        * `ABS` - Abschlagsrechnung
        * `ABR` - Abschlussrechnung
        * `JVR` - Turnusrechnung
        * `MVR` - Monatsrechnung
        * `MMM` - Mehr-/Mindermengenabrechnung
        * `WIM` - Rechnung für WiM
        * `ZVR` - Zwischenrechnung
        * `13I` - Integrierte 13.Rechnung 
        * `13R` - 13. Rechnung
    EnergyAmountUnitEnum:
      enum:
        - KWH
        - KWT
        - KVR
        - K3
        - H87
      type: string
      description: |-
        * `KWH` - Kilowattstunde
        * `KWT` - Kilowatt
        * `KVR` - kVar - Kilovolt-amp-reaktiv
        * `K3` - kVarh - Kilovolt-amp-Std-reaktiv
        * `H87` - Stück
    NullEnum:
      enum:
        - null
    TimeAmountUnitEnum:
      enum:
        - ANN
        - DAY
        - MON
      type: string
      description: |-
        * `ANN` - Jahr
        * `DAY` - Tag
        * `MON` - Monat
    CalculationBasePriceUnitEnum:
      enum:
        - ANN
        - DAY
        - MON
      type: string
      description: |-
        * `ANN` - Jahr
        * `DAY` - Tag
        * `MON` - Monat

````

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