Update the organisation settings
Admin only. Patches organisation, receipt, tax, or server fields and returns the saved row. An empty body is a no-op, but a bad base currency or a server with no address is refused.
PUT
/api/v1/settingsAuthorization
AuthorizationBearer token (JWT) · headerrequiredJWT from POST /api/v1/auth/login sent as Authorization Bearer.
Request body
requiredapplication/jsonnamestringmin length 1 · max length 200
legal_namestringmax length 200
phonestringmax length 50
emailstringmax length 200
addressstringmax length 500
tinstringmax length 100
vat_numberstringmax length 100
nda_license_nostringmax length 100
premise_nostringmax length 100
receipt_headerstringmax length 500
receipt_footerstringmax length 500
return_policystringmax length 2000
show_vat_breakdownbooleanshow_pharmacist_on_receiptbooleandefault_low_stock_thresholdintegermin 0 · max 100000
expiry_warning_daysstringmatches ^\s*\d+\s*(,\s*\d+\s*)*$
auto_print_receiptbooleandefault_copiesintegermin 1 · max 20
tax_enabledbooleantax_ratenumbermin 0 · max 1
base_currencystringmatches ^[A-Z]{3}$
rate_staleness_daysintegermin 1 · max 90
server_modestringAllowed:
hostedcustomserver_urlstringmax length 2000
Responses
200
The settings as saved
idstringrequirednamestringrequiredlegal_namestringrequiredlogo_keystringrequiredlogo_urlstringrequiredphonestringrequiredemailstringrequiredaddressstringrequiredtinstringrequiredvat_numberstringrequirednda_license_nostringrequiredpremise_nostringrequiredreceipt_headerstringrequiredreceipt_footerstringrequiredreturn_policystringrequiredshow_vat_breakdownbooleanrequiredshow_pharmacist_on_receiptbooleanrequireddefault_low_stock_thresholdintegerrequiredmin -9007199254740991 · max 9007199254740991
expiry_warning_daysstringrequiredauto_print_receiptbooleanrequireddefault_copiesintegerrequiredmin -9007199254740991 · max 9007199254740991
tax_enabledbooleanrequiredtax_ratenumberrequiredbase_currencystringrequiredrate_staleness_daysintegerrequiredmin -9007199254740991 · max 9007199254740991
server_modestringrequiredAllowed:
hostedcustomserver_urlstringrequiredupdated_bystring | nullrequiredupdated_atstring | nullrequired400
Invalid settings, unknown or inactive base currency, or a custom server without an address
detailstringrequired401
Not authenticated
detailstringrequired403
Caller is not an admin
detailstringrequired