Appearance
User - Settings
Base URL:
https://your-domain.com
Admin endpoints for system settings. All endpoints require admin authentication.
Get Settings
Retrieve all system settings.
| Property | Value |
|---|---|
| Endpoint | Get Settings |
| Method | GET |
| URL | /api/v1/settings |
| Authentication | Bearer Token |
Request Headers:
| Header | Value | Required |
|---|---|---|
Accept | application/json | Yes |
Authorization | Bearer your-auth-token | Yes |
Query Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
isp_id | integer | Yes | ISP ID |
branch_id | integer | Yes | Branch ID |
Request Body: None
Success Response (200 OK):
json
{
"success": true,
"data": {
"general": {
"app_name": "Zal Ultra",
"currency": "BDT",
"timezone": "Asia/Dhaka"
},
"billing": {
"grace_period_days": 3,
"auto_disable_expired": true
},
"notifications": {
"sms_enabled": true,
"email_enabled": true
}
}
}Error Response (401 Unauthorized):
json
{
"success": false,
"message": "Unauthenticated"
}Get App Settings
Retrieve application-specific settings for the frontend.
| Property | Value |
|---|---|
| Endpoint | Get App Settings |
| Method | GET |
| URL | /api/v1/settings/app |
| Authentication | Bearer Token |
Query Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
isp_id | integer | Yes | ISP ID |
branch_id | integer | Yes | Branch ID |
Success Response (200 OK):
json
{
"success": true,
"data": {
"app_name": "Zal Ultra",
"app_logo": "https://your-domain.com/logo.png",
"currency": "BDT",
"currency_symbol": "৳",
"date_format": "Y-m-d",
"time_format": "H:i:s"
}
}Get Settings By Group
Retrieve settings for a specific group (e.g., general, billing, notifications).
| Property | Value |
|---|---|
| Endpoint | Get Settings By Group |
| Method | GET |
| URL | /api/v1/settings/group/{group_name} |
| Authentication | Bearer Token |
Path Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
group_name | string | Yes | Settings group name (general, billing, notifications, sms, email, radius) |
Query Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
isp_id | integer | Yes | ISP ID |
branch_id | integer | Yes | Branch ID |
Success Response (200 OK):
json
{
"success": true,
"data": {
"grace_period_days": 3,
"auto_disable_expired": true,
"invoice_prefix": "INV",
"payment_methods": ["Cash", "Bkash", "Bank Transfer"]
}
}Error Response (404 Not Found):
json
{
"success": false,
"message": "Settings group not found"
}Update Settings
Update multiple settings at once.
| Property | Value |
|---|---|
| Endpoint | Update Settings |
| Method | PUT |
| URL | /api/v1/settings/update |
| Authentication | Bearer Token |
Request Headers:
| Header | Value | Required |
|---|---|---|
Content-Type | application/json | Yes |
Accept | application/json | Yes |
Authorization | Bearer your-auth-token | Yes |
Request Body:
json
{
"isp_id": 1,
"branch_id": 1,
"user_id": 1,
"settings": {
"app_name": "My ISP",
"currency": "BDT",
"grace_period_days": 5
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
isp_id | integer | Yes | ISP ID |
branch_id | integer | Yes | Branch ID |
user_id | integer | Yes | Admin user ID |
settings | object | Yes | Key-value pairs of settings |
Success Response (200 OK):
json
{
"success": true,
"message": "Settings updated successfully"
}Error Response (403 Forbidden):
json
{
"success": false,
"message": "You do not have permission to update settings"
}Update Single Setting
Update a single setting by key.
| Property | Value |
|---|---|
| Endpoint | Update Single Setting |
| Method | PUT |
| URL | /api/v1/settings/update-single |
| Authentication | Bearer Token |
Request Body:
json
{
"isp_id": 1,
"branch_id": 1,
"user_id": 1,
"key": "grace_period_days",
"value": "5"
}| Parameter | Type | Required | Description |
|---|---|---|---|
isp_id | integer | Yes | ISP ID |
branch_id | integer | Yes | Branch ID |
user_id | integer | Yes | Admin user ID |
key | string | Yes | Setting key |
value | mixed | Yes | New value |
Success Response (200 OK):
json
{
"success": true,
"message": "Setting updated successfully"
}Error Response (404 Not Found):
json
{
"success": false,
"message": "Setting key not found"
}