{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/lumabill-ch/json-schema/lumabill-ch-profile-schema.json",
  "title": "Profile",
  "description": "camelCase, as the API returns it (the earlier snake_case description of this schema never matched the response). Read endpoints also merge the account's subscription fields (plan, status) into the object.\n",
  "x-generated": "2026-11-17",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/lumabill-ch-openapi.yaml#/components/schemas/Profile",
  "type": "object",
  "required": [
    "id",
    "companyName",
    "createdAt"
  ],
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "isDefault": {
      "type": "boolean"
    },
    "companyName": {
      "type": "string"
    },
    "street": {
      "type": [
        "string",
        "null"
      ]
    },
    "zip": {
      "type": [
        "string",
        "null"
      ]
    },
    "city": {
      "type": [
        "string",
        "null"
      ]
    },
    "countryCode": {
      "type": [
        "string",
        "null"
      ]
    },
    "email": {
      "type": [
        "string",
        "null"
      ]
    },
    "phone": {
      "type": [
        "string",
        "null"
      ]
    },
    "contactPerson": {
      "type": [
        "string",
        "null"
      ]
    },
    "iban": {
      "type": [
        "string",
        "null"
      ],
      "description": "IBAN of the default currency slot in `currencyDefaults`"
    },
    "currencyDefaults": {
      "type": [
        "object",
        "null"
      ],
      "description": "Per-currency IBAN, payment template and QR preference, keyed by currency code",
      "additionalProperties": true
    },
    "logoUrl": {
      "type": [
        "string",
        "null"
      ]
    },
    "uid": {
      "type": [
        "string",
        "null"
      ]
    },
    "legalForm": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "einzelfirma",
        "kollektivgesellschaft",
        "kommanditgesellschaft",
        "ag",
        "gmbh",
        "genossenschaft",
        "verein",
        "stiftung",
        "other"
      ],
      "description": "Rechtsform; null until set. Decides the year-end checklist (Anhang, Gewinnverwendung)."
    },
    "shareCapital": {
      "type": [
        "number",
        "null"
      ],
      "description": "Aktien-, Stamm- or Genossenschaftskapital in CHF; null for sole proprietorships and partnerships"
    },
    "registeredOffice": {
      "type": [
        "string",
        "null"
      ],
      "description": "Sitz (municipality)"
    },
    "governingPersons": {
      "type": "array",
      "description": "Organe (board, management, partners, owner) for the signature block and the GV documents",
      "items": {
        "$ref": "#/$defs/GoverningPerson"
      }
    },
    "auditOptingOut": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "Opting-out of the limited audit (art. 727a para. 2 CO); null = not answered"
    },
    "vatRegistered": {
      "type": "boolean"
    },
    "vatMethod": {
      "type": [
        "string",
        "null"
      ]
    },
    "defaultTaxRate": {
      "type": "number",
      "format": "double"
    },
    "defaultCurrency": {
      "$ref": "#/$defs/Currency"
    },
    "baseCurrency": {
      "$ref": "#/$defs/Currency"
    },
    "defaultLanguage": {
      "type": "string"
    },
    "paymentDeadlineDays": {
      "type": "integer"
    },
    "defaultInvoiceFooter": {
      "type": [
        "string",
        "null"
      ]
    },
    "invoiceNumberPrefix": {
      "type": [
        "string",
        "null"
      ]
    },
    "invoiceCount": {
      "type": "integer",
      "description": "Last invoice number handed out; the next invoice gets count + 1"
    },
    "offerNumberPrefix": {
      "type": [
        "string",
        "null"
      ]
    },
    "offerCount": {
      "type": "integer"
    },
    "creditNotePrefix": {
      "type": [
        "string",
        "null"
      ]
    },
    "creditNoteCount": {
      "type": "integer"
    },
    "clientNumberPrefix": {
      "type": [
        "string",
        "null"
      ]
    },
    "clientCount": {
      "type": "integer"
    },
    "productNumberPrefix": {
      "type": [
        "string",
        "null"
      ]
    },
    "productCount": {
      "type": "integer"
    },
    "defaultRevenueAccountCode": {
      "type": [
        "string",
        "null"
      ]
    },
    "roundTotalTo": {
      "type": [
        "number",
        "null"
      ]
    },
    "hideZeroTax": {
      "type": "boolean"
    },
    "fxGainAccountId": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid",
      "description": "FX result account for exchange gains; null = 6960 Kursdifferenzen"
    },
    "fxLossAccountId": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid",
      "description": "FX result account for exchange losses; null = 6960 Kursdifferenzen"
    },
    "fxValuationPolicy": {
      "type": "string",
      "enum": [
        "stichtag",
        "niederstwert"
      ],
      "description": "Default policy of the year-end FX revaluation"
    },
    "fxVatRateMethod": {
      "type": "object",
      "description": "MWST exchange rate method by the first calendar year it applies: `daily` (ESTV/BAZG Tageskurs, the default) or `monthly` (Monatsmittelkurs). The entry with the greatest year up to a document's year wins.\n",
      "additionalProperties": {
        "type": "string",
        "enum": [
          "daily",
          "monthly"
        ]
      }
    },
    "bookkeepingMode": {
      "type": "string",
      "enum": [
        "simple",
        "double"
      ]
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time"
    }
  },
  "$defs": {
    "Currency": {
      "type": "string",
      "description": "ISO 4217 code of a currency the API converts (ESTV/BAZG rates). The same list applies to every currency field of the API.\n",
      "enum": [
        "CHF",
        "EUR",
        "USD",
        "GBP",
        "JPY",
        "CAD",
        "AUD",
        "SEK",
        "NOK",
        "DKK",
        "HUF"
      ]
    },
    "GoverningPerson": {
      "type": "object",
      "required": [
        "name",
        "role",
        "signing"
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "role": {
          "type": "string",
          "enum": [
            "vr_praesident",
            "vr_mitglied",
            "geschaeftsfuehrer",
            "gesellschafter",
            "aktionaer",
            "inhaber",
            "vorstand"
          ]
        },
        "signing": {
          "type": "boolean",
          "description": "Signs the annual financial statements and the GV documents"
        },
        "sharesHeld": {
          "type": [
            "number",
            "null"
          ],
          "description": "Shares or capital contributions held (Universalversammlung protocol)"
        }
      }
    }
  }
}