System Modules
3 API calls in this section.
List System Modules
/system-modules?language=enRetrieve a list of system modules. Requires super 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')
1curl --request GET "$ONDI_BASE_URL/system-modules?language=en" \2 --header "Authorization: Bearer {{access_token}}"Query parameters
languageOptionalen
Language code for response localization (Optional, default: en)
Headers
AuthorizationOptionalBearer {{access_token}}
Responses
1{2 "success": true,3 "message": "System modules retrieved successfully",4 "modules": [5 {6 "id": "1",7 "name": "User Management",8 "description": "User management module for creating and managing users",9 "version": "1.0.0",10 "is_active": true,11 "is_enabled": true,12 "created_at": "2023-01-01T00:00:00Z",13 "updated_at": "2023-01-01T00:00:00Z"14 },15 {16 "id": "2",17 "name": "Role Management",18 "description": "Role management module for creating and managing roles",19 "version": "1.0.0",20 "is_active": true,21 "is_enabled": true,22 "created_at": "2023-01-01T00:00:00Z",23 "updated_at": "2023-01-01T00:00:00Z"24 }25 ]26}1{2 "success": false,3 "message": "Unauthorized"4}1{2 "success": false,3 "message": "Internal server error"4}Get System Module
/system-modules/:moduleCode?language=enRetrieve details of a specific system module by its module code. Includes full configuration including settings schema, default settings, features, dependencies, and UI config. Headers: - Authorization: Bearer token for authentication (required) - X-API-Key: Alternative authentication method using API key Path Parameters: - moduleCode: Code of the system module to retrieve (e.g., 'storefront', 'delivery', 'warehouse') Query Parameters: - language (optional): Language code for localized response messages (e.g., 'en')
1curl --request GET "$ONDI_BASE_URL/system-modules/:moduleCode?language=en" \2 --header "Authorization: Bearer {{access_token}}"Path parameters
moduleCodeRequiredstorefront
Code of the module to retrieve (e.g., delivery, warehouse, storefront)
Query parameters
languageOptionalen
Language code for response localization (Optional, default: en)
Headers
AuthorizationOptionalBearer {{access_token}}
Responses
1{2 "success": true,3 "message": "Module retrieved successfully",4 "module": {5 "id": "uuid",6 "module_code": "storefront",7 "name": "Store front",8 "description": "E-commerce storefront module",9 "version": "1.0.0",10 "dependencies": [11 "warehouse"12 ],13 "features": [14 "product_catalog",15 "shopping_cart"16 ],17 "is_active": true,18 "is_enabled": true,19 "settings_schema": {},20 "default_settings": {},21 "icon": "https://...",22 "ui_config": {},23 "name_multilingual": {24 "en": "Store front",25 "ar": "واجهة المتجر"26 },27 "description_multilingual": {28 "en": "E-commerce...",29 "ar": "..."30 }31 },32 "payment_methods": []33}Update System Module
/system-modules/:moduleCode?language=enUpdate a system module. Requires super admin access. Supports updating module properties including name, description, version, active status, and enabled status. Headers: - Authorization: Bearer token for authentication (required) - Content-Type: application/json (required) - X-API-Key: Alternative authentication method using API key Path Parameters: - moduleCode: Code of the system module to update (e.g., 'delivery', 'warehouse', 'storefront') Query Parameters: - language (optional): Language code for localized response messages (e.g., 'en')
1curl --request PUT "$ONDI_BASE_URL/system-modules/:moduleCode?language=en" \2 --header "Authorization: Bearer {{access_token}}" \3 --header "Content-Type: application/json" \4 --header "Content-Type: application/json" \5 --data '{6 "name": {7 "en": "Updated Module Name",8 "ar": "اسم الوحدة المحدث"9 },10 "description": {11 "en": "Updated description",12 "ar": "الوصف المحدث"13 },14 "version": "1.0.1",15 "features": [16 "new_feature",17 "existing_feature"18 ],19 "dependencies": [20 "other_module"21 ],22 "default_settings": {23 "setting1": "value1",24 "setting2": true25 },26 "ui_config": {27 "dashboard_widgets": [28 "widget1",29 "widget2"30 ],31 "menu_position": 132 },33 "is_active": true,34 "is_enabled": true35}'1{2 "name": {3 "en": "Updated Module Name",4 "ar": "اسم الوحدة المحدث"5 },6 "description": {7 "en": "Updated description",8 "ar": "الوصف المحدث"9 },10 "version": "1.0.1",11 "features": [12 "new_feature",13 "existing_feature"14 ],15 "dependencies": [16 "other_module"17 ],18 "default_settings": {19 "setting1": "value1",20 "setting2": true21 },22 "ui_config": {23 "dashboard_widgets": [24 "widget1",25 "widget2"26 ],27 "menu_position": 128 },29 "is_active": true,30 "is_enabled": true31}Path parameters
moduleCodeRequiredstorefront
Code of the module to update (e.g., delivery, warehouse, storefront)
Query parameters
languageOptionalen
Language code for response localization (Optional, default: en)
Request body fields
nameExampleExample field from the request body.
name.enExampleExample field from the request body.
name.arExampleExample field from the request body.
descriptionExampleExample field from the request body.
description.enExampleExample field from the request body.
description.arExampleExample field from the request body.
versionExampleExample field from the request body.
featuresExampleExample field from the request body.
dependenciesExampleExample field from the request body.
default_settingsExampleExample field from the request body.
default_settings.setting1ExampleExample field from the request body.
default_settings.setting2ExampleExample field from the request body.
ui_configExampleExample field from the request body.
ui_config.dashboard_widgetsExampleExample field from the request body.
ui_config.menu_positionExampleExample field from the request body.
is_activeExampleExample field from the request body.
is_enabledExampleExample field from the request body.
Headers
AuthorizationOptionalBearer {{access_token}}
Content-TypeOptionalapplication/json
Responses
1{2 "success": true,3 "message": "System module updated successfully",4 "module": {5 "id": "1",6 "name": "Updated Module Name",7 "description": "Updated description",8 "version": "1.0.1",9 "is_active": true,10 "is_enabled": true,11 "created_at": "2023-01-01T00:00:00Z",12 "updated_at": "2023-06-15T12:30:45Z"13 }14}1{2 "success": false,3 "message": "Unauthorized"4}1{2 "success": false,3 "message": "Module not found"4}1{2 "success": false,3 "message": "Internal server error"4}