Skip to main content

Get general system configuration

GET 

/company/settings/

Returns the general platform configuration, including company name, timezone, and default language.

Purpose:

  • Provide access to the system's central configuration
  • Allow management of global parameters
  • Synchronize configuration across different services

Use Cases:

  • System administration panel
  • Platform initial setup
  • Global parameters synchronization
  • Configuration migration between environments

Typical Flow:

  1. The administrator accesses the configuration panel
  2. The frontend calls this endpoint with an administrator token
  3. The server validates permissions and retrieves the configuration
  4. Returns the current configuration parameters
  5. The frontend displays the configuration interface

Considerations:

  • Requires administrator permissions (JWT with admin role)
  • Changes affect the entire platform
  • The timezone must be valid (e.g., Europe/Madrid)
  • Supported languages are Spanish (es) and English (en)

Implementation Example:

// Example consumption from admin frontend
async function loadSystemSettings() {
try {
const response = await fetch('/company/settings/', {
headers: {
'Authorization': `Bearer ${adminToken}`
}
});

if (response.ok) {
const settings = await response.json();
renderSettingsForm(settings);
} else {
showError('You do not have administrator permissions');
}
} catch (error) {
console.error('Error loading system settings:', error);
}
}

Responses

General configuration obtained