Discussions

Ask a Question
Back to All

Create Invoice with contact: integration code missing (ignored or error on our side?)

Hi,

we create invoices via api and in the json for the invoice we also submit client information. The client will be created (also as a sub organization when the company with the same tax id already exists, which we like a lot).

We are facing the problem that the value for the integration_code will be ignored during the import/generation of the client: the created client has a value of null when we get the client record via api and also in the web user interface the field of the integration code is empty.

Is that not supported or do we have an error in our json which will not be rejected or reported as an error?

Thanks in advance!

Thomas

{
  "send_after_import": false,
  "invoice": {
    "type": "IssuedInvoice",
    "contact": {
      "name": "Testfirma default GmbH - Unterorganisation 2",
      "taxcode": "38188/01406",
      "address": "Musterstrasse 999",
      "address2": "Abteilung XYZ",
      "postalcode": "000001235",
      "city": "Musterstadt-Dorf2",
      "province": "Test-Bundesland",
      "country": "de",
      "email": "[email protected]",
      "pin_value": "38188/01406",
      "pin_scheme": "9930",
      "integration_code": "123456789XX2",
      "transport_type_code": "b2brouter",
      "document_type_code": "pdf.a.invoice.with.xml.cii.cross_industry_invoice.facturx.en16931"
    },
    "bank_account": {
      "type": "iban",
      "iban": "DEXXXXXX",
      "bic": "1ABMILDE123"
    },
    "terms": "custom",
    "invoice_lines_attributes": [
      {
       "position": 1,
        "unit": 5,
        "quantity": 0,
        "price": 0,
        "description": "** Mozartsaal **",
        "extension_amount": 0,
        "taxes_attributes": [
          {
            "name": "Umsatzsteuer",
            "category": "S",
            "percent": 19
          }
        ]
      },
      {
       "position": 2,
        "unit": 5,
        "quantity": 0,
        "price": 0,
        "description": "*** Mozartsaal - Technik ***",
        "extension_amount": 0,
        "taxes_attributes": [
          {
            "name": "Umsatzsteuer",
            "category": "S",
            "percent": 19
          }
        ]
      },
      {
       "position": 3,
        "unit": 1,
        "quantity": 3,
        "price": 30,
        "description": "Mikrofon (3 Tage)",
        "extension_amount": 270,
        "taxes_attributes": [
          {
            "name": "Umsatzsteuer",
            "category": "S",
            "percent": 19
          }
        ],
        "notes": "Super tolle Mikrofone. Zusatztexte..."
      },
      {
       "position": 4,
        "unit": 1,
        "quantity": 3,
        "price": 50,
        "description": "Lautsprecher (3 Tage)",
        "extension_amount": 450,
        "taxes_attributes": [
          {
            "name": "Umsatzsteuer",
            "category": "S",
            "percent": 19
          }
        ],
        "notes": "Super tolle Lautsprecher für die Mikrofone. Zusatztexte..."
      },
      {
       "position": 5,
        "unit": 5,
        "quantity": 0,
        "price": 0,
        "description": "** Musensaal **",
        "extension_amount": 0,
        "taxes_attributes": [
          {
            "name": "Umsatzsteuer",
            "category": "S",
            "percent": 19
          }
        ]
      },
      {
       "position": 6,
        "unit": 5,
        "quantity": 0,
        "price": 0,
        "description": "*** Musensaal - Technik ***",
        "extension_amount": 0,
        "taxes_attributes": [
          {
            "name": "Umsatzsteuer",
            "category": "S",
            "percent": 19
          }
        ]
      },
      {
       "position": 7,
        "unit": 1,
        "quantity": 3,
        "price": 30,
        "description": "Mikrofon (3 Tage)",
        "extension_amount": 270,

        "taxes_attributes": [
          {
            "name": "Umsatzsteuer",
            "category": "S",
            "percent": 19
          }
        ],
        "notes": "Super tolle Mikrofone. Zusatztexte..."
      },
      {
       "position": 8,
        "unit": 1,
        "quantity": 3,
        "price": 50,
        "description": "Lautsprecher (3 Tage)",
        "extension_amount": 450,

        "taxes_attributes": [
          {
            "name": "Umsatzsteuer",
            "category": "S",
            "percent": 19
          }
        ],
        "notes": "Super tolle Lautsprecher für die Mikrofone. Zusatztexte..."
      }
    ],
    "apply_taxes_to_charge": false,
    "charge_is_reimbursable_expense": false,
    "number": "4440000-TEST3",
    "date": "2025-03-27",
    "due_date": "2025-05-04",
    "ponumber": "Bestellnummer 123456",
    "file_reference": "100. Schmerzkongress 2025 (31.10.2025-04.11.2025)",
    "sales_order_reference": "60% Vorauszahlung vor VA",
    "language": "de",
    "currency": "EUR",
    "payment_method": 4,
    "bank_account_id": 2061,
    "reminder_for_payment": true,
    "payment_reminder_days": 15,
    "extra_info": "Zusatzinformation / Rechnungshinweise",
    "client_email_override": "[email protected],[email protected]",
    "company_email_override": "[email protected]",
    "contact_person": "John Doe"
  }
}