Contents
Overview
The Settings APIs allow you to retrieve and update company-level and finance-specific configurations.
These APIs provide flexibility to:
- Fetch all settings or specific configuration values
- Update one or more settings in a single request
- Manage finance settings and default GL accounts
Permissions and Access Control
Access to Company and CSP settings is controlled based on user roles and permissions.
Admin + CSP Role
Users with both Admin and CSP roles have full access to:
- Company settings
- CSP settings
Users can:
- Retrieve settings (GET)
- Update settings (PUT)
Admin Role Only
Users with only the admin role have full access to Company settings.
Users can:
- Retrieve settings (GET)
- Update settings (PUT)
Note: These users do not have access to CSP-specific settings.
Read-Only Access
Users with read-only permissions can:
- Retrieve Company settings
- Retrieve CSP settings
Users cannot update any settings.
Get Company Settings
Retrieves company settings based on user permissions.
Query Parameters
keys (optional): Comma-separated list of setting keys to retrieve.
Example
| GET /api/v1/settings?keys=enable_customer_notes,enable_mfa |
Example Request
| GET /api/v1/settings |
Example Response
|
{ "enable_customer_notes": false, "mfa_enabled": true, "auto_renew": true } |
Example Response (Filtered)
|
{ "enable_customer_notes": false, "enable_mfa": true } |
Refer to List Company Settings | Ordway
Update Company Settings
Updates one or more company settings.
Endpoint
| PUT /api/v1/settings |
Example Request
|
{ "enable_customer_notes": false } |
Example Response
|
{ "message": "Settings updated successfully", "settings_not_found": [], "not_allowed_to_update": [] } |
Example – Invalid Settings
|
{ "message": "Settings updated successfully", "settings_not_found": ["invalid_setting"], "not_allowed_to_update": [] } |
Example – Restricted Settings
|
{ "message": "Settings updated successfully", "settings_not_found": [], "not_allowed_to_update": ["enable_debit_memo"] } |
Refer to Update Company Settings | Ordway
Get Finance Settings
Retrieves finance settings along with default GL accounts.
Example Request
| GET /api/v1/settings/finance |
Example Response
|
{ "finance": { "enabled": true, "je_auto_generation": true, "exchange_rate_source": 1 }, "default_GL_Accounts": { "credits": "1050", "income_account": "4000" } } |
Refer to Get Finance Settings | Ordway
Update Finance Settings
Updates finance settings and default GL accounts.
Endpoint
| PUT /api/v1/settings/finance |
Example Request
|
{ "finance": { "je_auto_generation": false }, "default_GL_Accounts": { "credits": "1051" } } |
Example Response
|
{ "message": "Finance settings updated successfully", "settings_not_found": { "finance": [], "default_gl_accounts": [] } } |
Refer to Update Finance Settings | Ordway
Important Notes
- Only authorized users can retrieve or update settings
- Invalid setting keys are returned in settings_not_found
- Restricted settings are listed in not_allowed_to_update
- Updates are partially applied when some fields are invalid or restricted
Comments
0 comments
Please sign in to leave a comment.