Skip to main content

System Modules

3 API calls in this section.

List System Modules

System Configuration / System Modules
GET/system-modules?language=en

Retrieve 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')

Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request GET "$ONDI_BASE_URL/system-modules?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 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}
Error - Unauthorized401Unauthorized
Response body
json
1{2  "success": false,3  "message": "Unauthorized"4}
Error - Internal Server Error500Internal Server Error
Response body
json
1{2  "success": false,3  "message": "Internal server error"4}

Get System Module

System Configuration / System Modules
GET/system-modules/:moduleCode?language=en

Retrieve 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')

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

Path parameters

moduleCodeRequired
path string

storefront

Code of the module to retrieve (e.g., delivery, warehouse, storefront)

Query parameters

languageOptional
query string

en

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

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Responses

Success (200 OK)200
Response body
json
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 Configuration / System Modules
PUT/system-modules/:moduleCode?language=en

Update 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')

Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
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}'
Request body
json
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

moduleCodeRequired
path string

storefront

Code of the module to update (e.g., delivery, warehouse, storefront)

Query parameters

languageOptional
query string

en

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

Request body fields

nameExample
object

Example field from the request body.

name.enExample
string

Example field from the request body.

name.arExample
string

Example field from the request body.

descriptionExample
object

Example field from the request body.

description.enExample
string

Example field from the request body.

description.arExample
string

Example field from the request body.

versionExample
string

Example field from the request body.

featuresExample
array<string>

Example field from the request body.

dependenciesExample
array<string>

Example field from the request body.

default_settingsExample
object

Example field from the request body.

default_settings.setting1Example
string

Example field from the request body.

default_settings.setting2Example
boolean

Example field from the request body.

ui_configExample
object

Example field from the request body.

ui_config.dashboard_widgetsExample
array<string>

Example field from the request body.

ui_config.menu_positionExample
number

Example field from the request body.

is_activeExample
boolean

Example field from the request body.

is_enabledExample
boolean

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 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}
Error - Unauthorized401Unauthorized
Response body
json
1{2  "success": false,3  "message": "Unauthorized"4}
Error - Module Not Found404Not Found
Response body
json
1{2  "success": false,3  "message": "Module not found"4}
Error - Internal Server Error500Internal Server Error
Response body
json
1{2  "success": false,3  "message": "Internal server error"4}