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

# Post v3producers contracts charges and credits

> This API allows you to charge/credit amounts towards specific customer contracts.

These can be single items or recurring amounts, which will be added to the next customer invoice.

Typical use cases are customer-specific or variable amounts that you want to keep full control over.

An example is bonus payments, which can be granted once as a referral bonus or over
several months/years as a promotional bonus.



## OpenAPI

````yaml /lumx_openapi.yaml post /v3/producers/{userID}/contracts/{contractID}/charges_and_credits/
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/producers/{userID}/contracts/{contractID}/charges_and_credits/:
    post:
      tags:
        - producers
      description: >-
        This API allows you to charge/credit amounts towards specific customer
        contracts.


        These can be single items or recurring amounts, which will be added to
        the next customer invoice.


        Typical use cases are customer-specific or variable amounts that you
        want to keep full control over.


        An example is bonus payments, which can be granted once as a referral
        bonus or over

        several months/years as a promotional bonus.
      operationId: producers_contracts_charges_and_credits_create
      parameters:
        - in: path
          name: contractID
          schema:
            type: string
          required: true
        - in: path
          name: userID
          schema:
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChargesAndCredits'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/ChargesAndCredits'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/ChargesAndCredits'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChargesAndCreditsResponse'
              examples:
                Example1:
                  value:
                    contract_id: CC0001
                    bonus_created:
                      - ABCDEFGH0001:
                          type_of_transaction: credit
                          amount_cent: 1000
                          is_gross: true
                          vat_type: normal
                          due_date: '2022-02-01'
                          input_id: ABCDEFGH0001
                          internal_id: ABCDEFGH0001__1
                          contract_id: CC0001
                          category: non_charging_bonus
                          display_name: Non-charging bonus
                          explanation_text: Diesen Bonus erhalten Sie da Sie noch nicht laden.
                          bookkeeping_account: ''
                          salespartner: salespartner_spid
                      - ABCDEFGH0001:
                          type_of_transaction: credit
                          amount_cent: 1000
                          is_gross: true
                          vat_type: normal
                          due_date: '2022-03-01'
                          input_id: ABCDEFGH0001
                          internal_id: ABCDEFGH0001__2
                          contract_id: CC0001
                          category: non_charging_bonus
                          display_name: Non-charging bonus
                          explanation_text: Diesen Bonus erhalten Sie da Sie noch nicht laden.
                          bookkeeping_account: ''
                          salespartner: salespartner_spid
                  summary: Objects Created
          description: ''
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
              examples:
                Example1:
                  value:
                    amount_cent:
                      - Ensure this value is greater than or equal to 0.
                    execution_cycle:
                      - >-
                        This field required in case when "no_of_executions"
                        greater than 1.
                  summary: Failed values validation
          description: ''
components:
  schemas:
    ChargesAndCredits:
      type: object
      properties:
        type_of_transaction:
          allOf:
            - $ref: '#/components/schemas/TypeOfTransactionEnum'
          description: >-
            Whether the amount shall be charged or credited towards the
            customers.


            * `credit` - credit

            * `charge` - charge
        amount_cent:
          type: integer
          minimum: 0
          description: Monetary Amount in cent. For example "1000" for 10,00 EUR
        is_gross:
          type: boolean
          description: >-
            Identifier for whether it is a net (excl. VAT) or gross (incl. VAT)
            amount
        vat_type:
          allOf:
            - $ref: '#/components/schemas/VatTypeEnum'
          description: >-
            VAT rate for normal is 19% and reduced is 7%. In case of vat
            changes, the value, which is valid at the due date, will be used. 


            * `normal` - normal

            * `reduced` - reduced
        due_date:
          type: string
          format: date
          description: >-
            Defines which customer bill will include the submitted amount: the
            bill which covers a billing period including this due_date will
            contain the submitted amount.
        no_of_executions:
          type: integer
          minimum: 1
          writeOnly: true
          nullable: true
          description: >-
            In case of recurring payments this field defines how many times the
            submitted amount shall beexecuted. The unit (months, years) is
            defined in the field execution_cycle. If left empty, the value
            defaults to 1 and the amount is only executed once.
        execution_cycle:
          writeOnly: true
          nullable: true
          description: >-
            In case the no_of_executions has been set to a value greater than 1,
            this field is used to define the frequency of the executions.


            * `month` - month

            * `year` - year
          oneOf:
            - $ref: '#/components/schemas/ExecutionCycleEnum'
            - $ref: '#/components/schemas/BlankEnum'
            - $ref: '#/components/schemas/NullEnum'
        input_id:
          type: string
          description: Please submit a unique identifier per contract ID
          maxLength: 128
        internal_id:
          type: string
          readOnly: true
          maxLength: 150
        contract_id:
          type: string
          title: Vertragsnummer
          readOnly: true
        category:
          type: string
          description: >-
            Describes the nature of the submitted amount, e. g. "Bonus", and is
            used to group values of the same category on the customer facing
            invoice.
          maxLength: 40
        display_name:
          type: string
          description: Display name which is exposed on the customer invoice
          maxLength: 128
        explanation_text:
          type: string
          nullable: true
          description: >-
            Description text explaining the context of the amount. Its displayed
            on the customer invoice
        bookkeeping_account:
          type: string
          description: >-
            The bookkeeping account for this transaction, which will be reported
            back to you in the accounting file. In case of DATEV it is the
            contra account (Gegenkonto).
          maxLength: 128
        salespartner:
          type: string
          title: Vertriebspartner ID
          readOnly: true
      required:
        - amount_cent
        - category
        - contract_id
        - display_name
        - due_date
        - input_id
        - internal_id
        - is_gross
        - salespartner
        - type_of_transaction
        - vat_type
    ChargesAndCreditsResponse:
      type: object
      properties:
        contract_id:
          type: string
        bonus_created:
          type: array
          items:
            type: object
            additionalProperties:
              $ref: '#/components/schemas/ChargesAndCreditsFromCSVFile'
      required:
        - bonus_created
        - contract_id
    TypeOfTransactionEnum:
      enum:
        - credit
        - charge
      type: string
      description: |-
        * `credit` - credit
        * `charge` - charge
    VatTypeEnum:
      enum:
        - normal
        - reduced
      type: string
      description: |-
        * `normal` - normal
        * `reduced` - reduced
    ExecutionCycleEnum:
      enum:
        - month
        - year
      type: string
      description: |-
        * `month` - month
        * `year` - year
    BlankEnum:
      enum:
        - ''
    NullEnum:
      enum:
        - null
    ChargesAndCreditsFromCSVFile:
      type: object
      properties:
        type_of_transaction:
          allOf:
            - $ref: '#/components/schemas/TypeOfTransactionEnum'
          description: >-
            Whether the amount shall be charged or credited towards the
            customers.


            * `credit` - credit

            * `charge` - charge
        amount_cent:
          type: integer
          minimum: 0
          description: Monetary Amount in cent. For example "1000" for 10,00 EUR
        is_gross:
          type: boolean
          description: >-
            Identifier for whether it is a net (excl. VAT) or gross (incl. VAT)
            amount
        vat_type:
          allOf:
            - $ref: '#/components/schemas/VatTypeEnum'
          description: >-
            VAT rate for normal is 19% and reduced is 7%. In case of vat
            changes, the value, which is valid at the due date, will be used. 


            * `normal` - normal

            * `reduced` - reduced
        due_date:
          type: string
          format: date
          description: >-
            Defines which customer bill will include the submitted amount: the
            bill which covers a billing period including this due_date will
            contain the submitted amount.
        no_of_executions:
          type: integer
          minimum: 1
          writeOnly: true
          nullable: true
          description: >-
            In case of recurring payments this field defines how many times the
            submitted amount shall beexecuted. The unit (months, years) is
            defined in the field execution_cycle. If left empty, the value
            defaults to 1 and the amount is only executed once.
        execution_cycle:
          writeOnly: true
          nullable: true
          description: >-
            In case the no_of_executions has been set to a value greater than 1,
            this field is used to define the frequency of the executions.


            * `month` - month

            * `year` - year
          oneOf:
            - $ref: '#/components/schemas/ExecutionCycleEnum'
            - $ref: '#/components/schemas/BlankEnum'
            - $ref: '#/components/schemas/NullEnum'
        input_id:
          type: string
          description: Please submit a unique identifier per contract ID
          maxLength: 128
        internal_id:
          type: string
          readOnly: true
          maxLength: 150
        contract_id:
          type: string
          title: Vertragsnummer
          description: Contract id of the customer
        category:
          type: string
          description: >-
            Describes the nature of the submitted amount, e. g. "Bonus", and is
            used to group values of the same category on the customer facing
            invoice.
          maxLength: 40
        display_name:
          type: string
          description: Display name which is exposed on the customer invoice
          maxLength: 128
        explanation_text:
          type: string
          nullable: true
          description: >-
            Description text explaining the context of the amount. Its displayed
            on the customer invoice
        bookkeeping_account:
          type: string
          description: >-
            The bookkeeping account for this transaction, which will be reported
            back to you in the accounting file. In case of DATEV it is the
            contra account (Gegenkonto).
          maxLength: 128
        salespartner:
          type: string
          title: Vertriebspartner ID
          readOnly: true
      required:
        - amount_cent
        - category
        - contract_id
        - display_name
        - due_date
        - input_id
        - internal_id
        - is_gross
        - salespartner
        - type_of_transaction
        - vat_type

````

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