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:
- The administrator accesses the configuration panel
- The frontend calls this endpoint with an administrator token
- The server validates permissions and retrieves the configuration
- Returns the current configuration parameters
- 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
- 200
- 401
- 500
General configuration obtained
Unauthorized - Invalid JWT token or missing administrator permissions
Internal Server Error