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



## OpenAPI

````yaml /lumx_openapi.yaml post /v3/consumers/create/
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/consumers/create/:
    post:
      tags:
        - consumers
      operationId: consumers_create_create
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConsumerRegistration'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/ConsumerRegistration'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/ConsumerRegistration'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConsumerRegistrationResponse'
          description: ''
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: array
                  items:
                    type: string
                example:
                  email:
                    - Enter a valid email address.
                  non_field_errors:
                    - Invalid combination of fields.
              examples:
                TheUsernameIsNotUnique:
                  value:
                    username:
                      - The username is not unique
                  summary: The username is not unique
                TheEmailAddressUsingAsUsernameIsNotUnique:
                  value:
                    email:
                      - The email address using as username is not unique
                  summary: The email address using as username is not unique
                PreviousProviderNotSet:
                  value:
                    previous_provider:
                      - previous provider not set
                  summary: Previous provider not set
                MarketPartnerIDNotFound:
                  value:
                    previous_provider:
                      - Market partner ID not found
                  summary: Market partner ID not found
                DeliveryStartHasToBeTwoWeeksInFuture:
                  value:
                    preferred_delivery_start:
                      - Delivery start has to be two weeks in future
                  summary: Delivery start has to be two weeks in future
                DeliveryStartCanOnlyBeSixWeeksInPast:
                  value:
                    preferred_delivery_start:
                      - Delivery start can only be six weeks in past
                  summary: Delivery start can only be six weeks in past
                ProductNotExists:
                  value:
                    product_name:
                      - Product not exists
                  summary: Product not exists
                Product"<productName>"NotAllowedForIsBusiness=<bool>:
                  value:
                    product_name:
                      - >-
                        Product "<product_name>" not allowed for
                        is_business=<bool>
                  summary: Product "<product_name>" not allowed for is_business=<bool>
                TerminationDateMustBeProvided:
                  value:
                    former_supplier_contract_termination_date:
                      - termination date must be provided
                  summary: Termination date must be provided
                InvalidDate:
                  value:
                    former_supplier_contract_termination_date:
                      - invalid date
                  summary: Invalid date
                TerminationDateCannotBeMoreThan5WeeksInThePast:
                  value:
                    former_supplier_contract_termination_date:
                      - cannot be in the more than 5 weeks in the past
                  summary: Termination date cannot be more than 5 weeks in the past
                BankDataFirstNameIsRequiredForPrivateConsumer:
                  value:
                    bank_data_first_name:
                      - bank data first name is required for private consumer
                  summary: Bank data first name is required for private consumer
                IBANIsNotCorrect:
                  value:
                    bank_data_iban:
                      - IBAN is not correct.
                  summary: IBAN is not correct
                IBANIsRequiredIfBICIsUsed:
                  value:
                    bank_data_iban:
                      - This field is required if bank_data_bic is used
                  summary: IBAN is required if BIC is used
                IBANIsNotPermittedForTheGivenPaymentMethod:
                  value:
                    bank_data_iban:
                      - This field is not permitted for the given payment method
                  summary: IBAN is not permitted for the given payment method
                BICIsNotCorrect:
                  value:
                    bank_data_bic:
                      - BIC is not correct
                  summary: BIC is not correct
                TheSEPADateMustBeInPastOrToday:
                  value:
                    sepa_date:
                      - the sepa_date must be in past or today
                  summary: The SEPA date must be in past or today
                SEPADateIsRequiredForPaymentMethod:DirectDebit:
                  value:
                    sepa_date:
                      - 'Required for payment_method: direct_debit'
                  summary: 'SEPA date is required for payment method: direct_debit'
                PaymentMethodNotSupportedBySalespartner<salespartnerId>:
                  value:
                    payment_method:
                      - Not supported by salespartner <salespartner_id>
                  summary: >-
                    Payment method not supported by salespartner
                    <salespartner_id>
                MaskedCreditCardFieldIsRequiredForPaymentMethod:
                  value:
                    masked_credit_card:
                      - field is required for payment method
                  summary: Masked credit card field is required for payment method
                MaskedCreditCardDoesNotMatchExpectedPattern:
                  value:
                    masked_credit_card:
                      - does not match expected pattern
                  summary: Masked credit card does not match expected pattern
                NumberOfDigitsAtEndOfMaskedCreditCardMustBeBetween2And4:
                  value:
                    masked_credit_card:
                      - >-
                        number of digits at end of number must be between 2 and
                        4
                  summary: >-
                    Number of digits at end of masked credit card must be
                    between 2 and 4
                OnlyTheEndOfTheMaskedCreditCardStringMayContainDigits:
                  value:
                    masked_credit_card:
                      - only the end of the string may contain digits
                  summary: >-
                    Only the end of the masked credit card string may contain
                    digits
                CreditCardValidityDateHasWrongFormat.UseOneOfTheseFormatsInstead:YYYY-MM:
                  value:
                    credit_card_validity_date:
                      - >-
                        Date has wrong format. Use one of these formats instead:
                        YYYY-MM
                  summary: >-
                    Credit card validity date has wrong format. Use one of these
                    formats instead: YYYY-MM
                CreditCardValidityDateMustBeInTheFuture:
                  value:
                    credit_card_validity_date:
                      - date must be in the future
                  summary: Credit card validity date must be in the future
                SAASContractIDNotUnique:
                  value:
                    saas_contract_id:
                      - saas_contract_id not unique
                  summary: SAAS contract ID not unique
                SAASCustomerIDIsRequired:
                  value:
                    saas_customer_id:
                      - saas_customer_id is required
                  summary: SAAS customer ID is required
                ConsumerWithTheSAASCustomerIDAlreadyExists:
                  value:
                    saas_customer_id:
                      - consumer with the saas_customer_id already exists
                  summary: Consumer with the SAAS customer ID already exists
                ProducerWithTheSAASCustomerIDAlreadyExists:
                  value:
                    saas_customer_id:
                      - producer with the saas_customer_id already exists
                  summary: Producer with the SAAS customer ID already exists
                TheOrderDateCannotBeInFuture:
                  value:
                    order_date:
                      - The date cannot be in future
                  summary: The order date cannot be in future
                CompanyNameIsRequiredForCompanies:
                  value:
                    company_name:
                      - For companies the company name is required
                  summary: Company name is required for companies
                CompanyNameShallBeGivenOnlyForBusinessCustomers:
                  value:
                    company_name:
                      - Company name shall be given only for business customers
                  summary: Company name shall be given only for business customers
                ZipcodeNotFoundInDatabase:
                  value:
                    detail:
                      - Zipcode not found in database
                  summary: Zipcode not found in database
                NoCompanyNameGivenButBusinessCustomerToBeCreated:
                  value:
                    detail:
                      - >-
                        No company name given but business customer to be
                        created!
                  summary: No company name given but business customer to be created
                MeterIdentIsLongerThan16Characters:
                  value:
                    meter_id:
                      - Meter ident is longer than 16 characters.
                  summary: Meter ident is longer than 16 characters
                MeterIdentContainsOnly4OrLessCharacters:
                  value:
                    meter_id:
                      - Meter ident contains only 4 or less characters.
                  summary: Meter ident contains only 4 or less characters
                OnlyCharactersFoundInMeterIdent,InvalidIdent:
                  value:
                    meter_id:
                      - Only characters found in meter ident, invalid ident
                  summary: Only characters found in meter ident, invalid ident
                IllegalCharacter(s)Found:<listOfCharacters>:
                  value:
                    meter_id:
                      - 'Illegal character(s) found: <list of characters>'
                  summary: 'Illegal character(s) found: <list of characters>'
                IllegalString(s)Found:<listOfStrings>:
                  value:
                    meter_id:
                      - 'Illegal string(s) found: <list of strings>'
                  summary: 'Illegal string(s) found: <list of strings>'
                MarketLocationID<maloId>IsNotAString:
                  value:
                    meteringpoint_id:
                      - market location ID <malo_id> is not a string
                  summary: Market location ID <malo_id> is not a string
                MarketLocationID<maloId>MustBe11CharactersLong,ButLengthIs<length>Characters:
                  value:
                    meteringpoint_id:
                      - >-
                        market location ID <malo_id> must be 11 characters long,
                        but length is <length> characters
                  summary: >-
                    Market location ID <malo_id> must be 11 characters long, but
                    length is <length> characters
                MarketLocationIDMayOnlyContainNumbers:
                  value:
                    meteringpoint_id:
                      - market location ID may only contain numbers
                  summary: Market location ID may only contain numbers
                MarketLocationIDMayOnlyStartWithTheNumbers1-9:
                  value:
                    meteringpoint_id:
                      - market location ID may only start with the numbers 1-9
                  summary: Market location ID may only start with the numbers 1-9
                MarketLocationIDCheckDigitMustHaveValue<rightValue>Not<wrongValue>:
                  value:
                    meteringpoint_id:
                      - >-
                        market location ID check digit must have value
                        <right_value> not <wrong_value>
                  summary: >-
                    Market location ID check digit must have value <right_value>
                    not <wrong_value>
                CreditChecksAreNotYetEnabledForYou.PleaseContactOurSalesRepresentativeForMoreInformation:
                  value:
                    perform_credit_check:
                      - >-
                        Credit checks are not yet enabled for you. Please
                        contact our sales representative for more information.
                  summary: >-
                    Credit checks are not yet enabled for you. Please contact
                    our sales representative for more information
                CreditCheckWasNotSuccessful:
                  value:
                    perform_credit_check:
                      - credit check was not successful
                  summary: Credit check was not successful
                CreditCheckIsNotPossibleForCompanies:
                  value:
                    perform_credit_check:
                      - Credit check is not possible for companies
                  summary: Credit check is not possible for companies
          description: >-
            DRF validation errors from the selected runtime registration
            serializer.
components:
  schemas:
    ConsumerRegistration:
      type: object
      description: you need to set "salespartner" context
      properties:
        masked_credit_card:
          type: string
          maxLength: 16
        credit_card_validity_date:
          type: string
          format: date
        sepa_date:
          type: string
          format: date
        sepa_reference:
          type: string
        payment_method:
          allOf:
            - $ref: '#/components/schemas/PaymentMethodEnum'
          default: direct_debit
        deliv_address_street:
          type: string
        deliv_address_house_number:
          type: string
          maxLength: 10
        deliv_address_addition:
          type: string
        deliv_address_zipcode:
          type: string
          maxLength: 5
        deliv_address_city:
          type: string
        bill_address_street:
          type: string
        bill_address_house_number:
          type: string
          maxLength: 10
        bill_address_addition:
          type: string
        bill_address_zipcode:
          type: string
          maxLength: 5
        bill_address_city:
          type: string
        is_business:
          type: boolean
        is_small_business:
          type: boolean
        company_name:
          type: string
        salutation:
          $ref: '#/components/schemas/SalutationEnum'
        title:
          default: ''
          oneOf:
            - $ref: '#/components/schemas/TitleEnum'
            - $ref: '#/components/schemas/BlankEnum'
        first_name:
          type: string
        last_name:
          type: string
        birthday:
          type: string
          format: date
        telephone:
          type: string
        email:
          type: string
          format: email
        accounting_email:
          type: string
          format: email
        tax_number:
          type: string
          maxLength: 13
        preferred_delivery_start:
          type: string
        subscription_reason:
          $ref: '#/components/schemas/SubscriptionReasonEnum'
        meter_id:
          type: string
        meteringpoint_id:
          type: string
        bank_data_first_name:
          type: string
        bank_data_last_name:
          type: string
        bank_data_iban:
          type: string
        bank_data_bic:
          type: string
        saas_customer_id:
          type: string
          maxLength: 32
        saas_contract_id:
          type: string
          maxLength: 64
        third_party_salespartner:
          type: string
        free_amount:
          type: integer
          minimum: 0
        consumption_before_battery_installation:
          type: integer
          minimum: 0
        order_date:
          type: string
          format: date
        tariff_type:
          type: string
        username:
          type: string
          maxLength: 50
        saas_customer_lead_id:
          type: string
          maxLength: 255
        has_intelligent_meter:
          type: boolean
          nullable: true
        order_smart_meter:
          type: boolean
          nullable: true
        order_smart_meter_provider_id:
          type: string
          nullable: true
        source:
          type: string
          nullable: true
        product_specifics:
          type: object
          additionalProperties: {}
        former_supplier_contract_terminated:
          type: boolean
          default: false
        former_supplier_contract_termination_date:
          type: string
          format: date
          nullable: true
        previous_provider:
          type: string
        annual_consumption:
          type: integer
        former_supplier_first_name:
          type: string
        former_supplier_last_name:
          type: string
        perform_credit_check:
          type: boolean
          default: false
        contract_relationships:
          type: array
          items:
            $ref: '#/components/schemas/ContractRelationship'
      required:
        - annual_consumption
        - deliv_address_city
        - deliv_address_house_number
        - deliv_address_street
        - deliv_address_zipcode
        - email
        - first_name
        - is_business
        - last_name
        - salutation
        - subscription_reason
        - tariff_type
    ConsumerRegistrationResponse:
      type: object
      properties:
        consumer_id:
          type: string
        contract_id:
          type: string
        contract_relationships:
          type: array
          items:
            type: string
      required:
        - consumer_id
        - contract_id
    PaymentMethodEnum:
      enum:
        - credit_card_display_only
        - direct_debit
        - bank_transfer
        - credit_card
        - no_payment_method
      type: string
      description: |-
        * `credit_card_display_only` - Kreditkarte (nur Anzeige)
        * `direct_debit` - SEPA Einzugsermächtigung
        * `bank_transfer` - Überweisung
        * `credit_card` - Kreditkarte
        * `no_payment_method` - Keine Zahlmethode
    SalutationEnum:
      enum:
        - Frau
        - Herr
        - Eheleute
        - Divers
      type: string
      description: |-
        * `Frau` - Frau
        * `Herr` - Herr
        * `Eheleute` - Eheleute
        * `Divers` - Divers
    TitleEnum:
      enum:
        - Dr.
        - Prof.
        - Prof. Dr.
      type: string
      description: |-
        * `` - Titel
        * `Dr.` - Dr.
        * `Prof.` - Prof.
        * `Prof. Dr.` - Prof. Dr.
    BlankEnum:
      enum:
        - ''
    SubscriptionReasonEnum:
      enum:
        - E01
        - E02
        - E03
      type: string
      description: |-
        * `E01` - Ein-/Auszug (Umzug)
        * `E02` - Einzug/Neuanlage
        * `E03` - Wechsel
    ContractRelationship:
      type: object
      properties:
        target_contract_id:
          type: string
        relationship_type:
          $ref: '#/components/schemas/RelationshipTypeEnum'
        valid_from:
          type: string
          format: date
      required:
        - relationship_type
        - target_contract_id
    RelationshipTypeEnum:
      enum:
        - contract_is_paid_by
        - contract_is_terminated_together_with
        - is_private_complement
      type: string
      description: |-
        * `contract_is_paid_by` - bezahlt von
        * `contract_is_terminated_together_with` - gekündigt bei Kündigung von
        * `is_private_complement` - Privater Anteil

````

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