Skip to main content

System Settings

2 API calls in this section.

Get System Settings

System Configuration / System Settings
GET/system-settings?language=en

Retrieve system settings. Requires system admin access. Headers: - Authorization: Bearer token for authentication (required) - X-API-Key: Alternative authentication method using API key Query Parameters: - language (optional): Language code for localized response messages (e.g., 'en') The general bucket includes language settings such as default_system_language and tenant_available_languages.

Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request GET "$ONDI_BASE_URL/system-settings?language=en" \2  --header "Authorization: Bearer {{access_token}}"

Query parameters

languageOptional
query string

en

Language code for response localization (Optional, default: en)

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Responses

Success Response200OK
Response body
json
1{2  "success": true,3  "message": "System settings retrieved successfully",4  "system_settings": {5    "general": {6      "default_system_language": {7        "settings": {8          "default_language": "en"9        },10        "description": "Default language used as the system-wide localization fallback"11      },12      "tenant_available_languages": {13        "settings": {14          "available_languages": [15            "en",16            "ar",17            "ku",18            "fa"19          ],20          "language_names": {21            "en": "English",22            "ar": "Arabic",23            "ku": "Kurdish",24            "fa": "Farsi"25          }26        },27        "description": "Languages available for tenant and app language configuration"28      }29    }30  }31}
Error - Unauthorized401Unauthorized
Response body
json
1{2  "success": false,3  "message": "Unauthorized"4}
Error - Forbidden (Not System Admin)403Forbidden
Response body
json
1{2  "success": false,3  "message": "Unauthorized access"4}
Error - Database Error500Internal Server Error
Response body
json
1{2  "success": false,3  "message": "Database error"4}
Success (200 OK)200
Response body
json
1{2  "success": true,3  "message": "System settings retrieved successfully",4  "system_settings": {5    "general": {6      "default_system_language": {7        "settings": {8          "default_language": "en"9        },10        "description": "Default language used as the system-wide localization fallback"11      },12      "tenant_available_languages": {13        "settings": {14          "available_languages": [15            "en",16            "ar",17            "ku",18            "fa"19          ]20        },21        "description": "Languages available for tenant and app language configuration"22      }23    }24  }25}

Update System Settings

System Configuration / System Settings
PUT/system-settings?language=en

Update system settings. Requires system admin access. Headers: - Authorization: Bearer token for authentication (required) - Content-Type: application/json (required) - X-API-Key: Alternative authentication method using API key Query Parameters: - language (optional): Language code for localized response messages (e.g., 'en') Request Body: - setting_key (required) - settings (required) If setting_key = default_system_language, settings must be: If setting_key = tenant_available_languages, settings must be: If setting_key = phone_login, settings must be: If setting_key = storefront_custom_domain_vercel, settings must be: Field purpose: - api_token: authenticates Edge Function calls to Vercel for add, verify, inspect, and delete domain operations. - project_id: tells the backend which Vercel project owns the storefront custom domains. - team_id: needed when the Vercel project belongs to a team/workspace instead of a personal account. - deploy_hook_url: optional fallback used by the admin redeploy action when you want deploy-hook based rebuilds. Rules: - api_token is required. - project_id is required. - team_id is optional. - deploy_hook_url is optional but must be a valid URL when present.

Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request PUT "$ONDI_BASE_URL/system-settings?language=en" \2  --header "Authorization: Bearer {{access_token}}" \3  --header "Content-Type: application/json" \4  --header "Content-Type: application/json" \5  --data '{6  "setting_key": "storefront_custom_domain_vercel",7  "settings": {8    "api_token": "vercel_api_token_here",9    "project_id": "prj_123456789",10    "team_id": "team_123456789",11    "deploy_hook_url": "https://api.vercel.com/v1/integrations/deploy/prj_123456789/trigger",12    "environment": "staging"13  }14}'
Request body
json
1{2  "setting_key": "storefront_custom_domain_vercel",3  "settings": {4    "api_token": "vercel_api_token_here",5    "project_id": "prj_123456789",6    "team_id": "team_123456789",7    "deploy_hook_url": "https://api.vercel.com/v1/integrations/deploy/prj_123456789/trigger",8    "environment": "staging"9  }10}

Query parameters

languageOptional
query string

en

Language code for response localization (Optional, default: en)

Request body fields

setting_keyExample
string

Example field from the request body.

settingsExample
object

Example field from the request body.

settings.api_tokenExample
string

Example field from the request body.

settings.project_idExample
string

Example field from the request body.

settings.team_idExample
string

Example field from the request body.

settings.deploy_hook_urlExample
string

Example field from the request body.

settings.environmentExample
string

Example field from the request body.

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Content-TypeOptional
header string

application/json

Responses

Success Response200OK
Response body
json
1{2  "success": true,3  "message": "System settings updated successfully",4  "systemSettings": {5    "id": "uuid",6    "settings": {},7    "is_active": true,8    "created_at": "timestamp",9    "updated_at": "timestamp",10    "updated_by": "uuid"11  }12}
Error - Unauthorized401Unauthorized
Response body
json
1{2  "success": false,3  "message": "Unauthorized"4}
Error - Forbidden (Not System Admin)403Forbidden
Response body
json
1{2  "success": false,3  "message": "Unauthorized access"4}
Error - Database Error500Internal Server Error
Response body
json
1{2  "success": false,3  "message": "Database error"4}
Success (200 OK)200
Response body
json
1{2  "success": true,3  "message": "System settings updated successfully",4  "system_settings": {5    "id": "uuid",6    "setting_key": "default_system_language",7    "settings": {8      "default_language": "en"9    },10    "is_active": true11  }12}