Profiles

Update a profile's settings

Partial update: only the fields sent change. Company and address fields feed the sender block of new documents; the *NumberPrefix and *Count fields drive numbering (count is the last number handed out). baseCurrency cannot change once journal entries exist (400). A key pinned to another profile, or a request scoped via X-Profile-Id to another profile, gets 404. Permission profiles.update; needs a read-write key.

put/profiles/{id}

Request

  • Base URL: https://api.lumabill.ch/v1
  • URL: https://api.lumabill.ch/v1/profiles/{id}
  • Auth: HTTP bearer

Request body

companyNamestring
streetstring
addressLinestring

Second address line

zipstring
citystring
countryCodestring
emailstring
phonestring
contactPersonstring
uidstring
vatRegisteredboolean
defaultTaxRatenumber
paymentDeadlineDaysinteger
defaultCurrency'CHF' | 'EUR' | 'USD' | 'GBP' | 'JPY' | 'CAD' | 'AUD' | 'SEK' | 'NOK' | 'DKK' | 'HUF'

ISO 4217 code of a currency the API converts (ESTV/BAZG rates). The same list applies to every currency field of the API.

baseCurrency'CHF' | 'EUR' | 'USD' | 'GBP' | 'JPY' | 'CAD' | 'AUD' | 'SEK' | 'NOK' | 'DKK' | 'HUF'

ISO 4217 code of a currency the API converts (ESTV/BAZG rates). The same list applies to every currency field of the API.

defaultLanguage'de' | 'fr' | 'it' | 'en'
defaultInvoiceFooterstring
invoiceNumberPrefixstring
invoiceCountinteger
offerNumberPrefixstring
offerCountinteger
creditNotePrefixstring
creditNoteCountinteger
clientNumberPrefixstring
clientCountinteger
productNumberPrefixstring
productCountinteger
defaultRevenueAccountCodestring
roundTotalTonumber
hideZeroTaxboolean
logoUrlstring
currencyDefaultsobject
fxGainAccountIdstring uuid nullable

An active income / expense account of this profile in the base currency (400 INVALID_FX_ACCOUNT); null = 6960 Kursdifferenzen

fxLossAccountIdstring uuid nullable

Same rules as fxGainAccountId, for exchange losses

fxValuationPolicy'stichtag' | 'niederstwert'

400 INVALID_FX_VALUATION_POLICY for any other value

fxVatRateMethodobject nullable

Replaces the stored map; null clears it (daily everywhere). Keys YYYY, values daily / monthly (400 INVALID_FX_VAT_RATE_METHOD). Art. 45 Abs. 5 MWSTV: the method in force can only change for a year without foreign-currency documents yet, else 409 FX_VAT_RATE_METHOD_LOCKED with years.

Example request

{
  "countryCode": "CH",
  "defaultCurrency": "CHF",
  "baseCurrency": "CHF"
}

Response

The updated profile

idstring uuid required
isDefaultboolean
companyNamestring required
streetstring nullable
zipstring nullable
citystring nullable
countryCodestring nullable
emailstring nullable
phonestring nullable
contactPersonstring nullable
ibanstring nullable

IBAN of the default currency slot in currencyDefaults

currencyDefaultsobject nullable

Per-currency IBAN, payment template and QR preference, keyed by currency code

logoUrlstring nullable
uidstring nullable
vatRegisteredboolean
vatMethodstring nullable
defaultTaxRatenumber double
defaultCurrency'CHF' | 'EUR' | 'USD' | 'GBP' | 'JPY' | 'CAD' | 'AUD' | 'SEK' | 'NOK' | 'DKK' | 'HUF'

ISO 4217 code of a currency the API converts (ESTV/BAZG rates). The same list applies to every currency field of the API.

baseCurrency'CHF' | 'EUR' | 'USD' | 'GBP' | 'JPY' | 'CAD' | 'AUD' | 'SEK' | 'NOK' | 'DKK' | 'HUF'

ISO 4217 code of a currency the API converts (ESTV/BAZG rates). The same list applies to every currency field of the API.

defaultLanguagestring
paymentDeadlineDaysinteger
defaultInvoiceFooterstring nullable
invoiceNumberPrefixstring nullable
invoiceCountinteger

Last invoice number handed out; the next invoice gets count + 1

offerNumberPrefixstring nullable
offerCountinteger
creditNotePrefixstring nullable
creditNoteCountinteger
clientNumberPrefixstring nullable
clientCountinteger
productNumberPrefixstring nullable
productCountinteger
defaultRevenueAccountCodestring nullable
roundTotalTonumber nullable
hideZeroTaxboolean
fxGainAccountIdstring uuid nullable

FX result account for exchange gains; null = 6960 Kursdifferenzen

fxLossAccountIdstring uuid nullable

FX result account for exchange losses; null = 6960 Kursdifferenzen

fxValuationPolicy'stichtag' | 'niederstwert'

Default policy of the year-end FX revaluation

fxVatRateMethodobject

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.

bookkeepingMode'simple' | 'double'
createdAtstring date-time required
updatedAtstring date-time

Example response

{
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "companyName": "Sandrini Consulting GmbH",
  "street": "Seestrasse 100",
  "zip": "6003",
  "city": "Luzern",
  "countryCode": "CH",
  "uid": "CHE-123.456.789 MWST",
  "defaultTaxRate": 8.1,
  "defaultCurrency": "CHF",
  "baseCurrency": "CHF",
  "defaultLanguage": "de",
  "paymentDeadlineDays": 30,
  "defaultRevenueAccountCode": "3400",
  "fxVatRateMethod": {
    "2027": "monthly"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.