Client Account Settings

Client Account Settings

Client account settings define the configuration and features available to a client account. Settings are versioned with effective dates to track changes over time.

Endpoints

Method Endpoint Description
GET /client-accounts/{id}/settings List all settings versions for a client account
GET /client-accounts/{id}/settings/current Get current active settings
POST/PUT/PATCH /client-accounts/{id}/settings Create or update settings

Attributes

Attribute Type Description
id integer The unique identifier of the settings
created_at datetime When the settings were created
created_by_id integer The ID of the user who created the settings
client_account_id integer The ID of the client account
active_from date Date from which these settings are active
active_to date Date until which these settings are active
start_date date Start date of the client account
plan string Subscription plan type
accounting_currency_code integer Currency code for accounting
vat_registration_date date Date of VAT registration
vat_liable boolean Whether the account is liable for VAT
vat_return_frequency integer Frequency of VAT returns
payroll_active boolean Whether payroll is active
payroll_frequency string Frequency of payroll processing
payroll_date integer Day of month for payroll processing
project_module boolean Whether project module is enabled
bank_integration_module boolean Whether bank integration is enabled
payroll_module boolean Whether payroll module is enabled
annual_report_module boolean Whether annual report module is enabled
autonomy_level string Level of account autonomy

Example Response

{
    "id": 1,
    "created_at": "2023-05-10T12:00:00Z",
    "created_by_id": 1,
    "client_account_id": 1,
    "active_from": "2023-01-01",
    "active_to": null,
    "start_date": "2023-01-01",
    "plan": "ENTERPRISE",
    "accounting_currency_code": 978,
    "vat_registration_date": "2023-01-01",
    "vat_liable": true,
    "vat_return_frequency": 3,
    "payroll_active": true,
    "payroll_frequency": "MONTHLY",
    "payroll_date": 25,
    "project_module": true,
    "bank_integration_module": true,
    "payroll_module": true,
    "annual_report_module": true,
    "autonomy_level": "FULL"
}

Creating/Updating Settings

When creating or updating settings:

  1. If no active_from date is provided, today’s date is used
  2. The system handles three scenarios:
    • No settings exist for the given date: Creates new settings
    • Settings exist with the same active_from date: Updates existing settings
    • Settings exist from an earlier date: Creates new settings and sets active_to on the previous settings

Example Update Request

{
    "active_from": "2023-06-01",
    "plan": "ENTERPRISE",
    "vat_liable": true,
    "project_module": true,
    "bank_integration_module": true,
    "payroll_module": false,
    "annual_report_module": true,
    "autonomy_level": "FULL"
}

Notes

  • The client_account_id must be one of the eligible client accounts for the authenticated user.
  • Settings are versioned using active_from and active_to dates.
  • When creating new settings, the created_by_id is automatically set to the authenticated user’s ID.
  • The current settings endpoint returns the settings version active for the current date.
  • All dates are returned in ISO 8601 format.
  • When updating settings, you don’t need to provide all fields - only the ones you want to change.
  • The active_to date is managed automatically by the system and should not be provided in requests.
  • Currency codes follow the ISO 4217 standard (e.g., 978 for EUR).

Relaterte artikler