Session Settings
This guide explains how to interact with the admin manage the session settings crud.
Show Session Settings
Endpoint
- Method: GET
- URL:
/v1/admin/settings/session-settings
Request Headers
| Header | Value | Required |
|---|---|---|
| Content-Type | application/json | Yes |
| Accept | application/json | Yes |
| Authorization | Bearer token | Yes |
Success Response
{
"success": true,
"message": "تم جلب البيانات بنجاح.",
"data": {
"delayPeriodBeforeSessionCancel": 1,
"periodTimeBetweenSession": 1,
"waitingPeriodCoachForApproveToDirectSession": 1,
"waitingPeriodCustomerForPayToDirectSession": 2,
"allowedNumberToCancelSessions": 4,
"canCustomerViewRecordedSessions": true,
"canCoachViewRecordedSessions": true
},
"statusCode": 200
}
Error Response
Unauthorized (401)
{
"success": false,
"message": "يجب عليك تسجيل الدخول",
"data": [],
"statusCode": 401
}
Update Session Settings
Endpoint
- Method: PATCH
- URL:
/v1/admin/settings/session-settings
Request Headers
| Header | Value | Required |
|---|---|---|
| Content-Type | application/json | Yes |
| Accept | application/json | Yes |
| Authorization | Bearer token | Yes |
Request Body
| Parameter | Type | Description | Required |
|---|---|---|---|
| delay_period_before_session_cancel | string | Setting's delay period before session cancel | No |
| period_time_between_session | string | Setting's period time between session | No |
| waiting_period_coach_for_approve_to_direct_session | string | Setting's waiting coach approve direct session | No |
| waiting_period_customer_for_pay_to_direct_session | string | Setting's waiting customer pay direct session | No |
| allowed_number_to_cancel_sessions | string | Setting's allowed_number_to_cancel_sessions | No |
| can_customer_view_recorded_sessions | string | Setting's can customer view sessions recorded | No |
| can_coach_view_recorded_sessions | string | Setting's can coach view sessions recorded | No |
Success Response
{
"success": true,
"message": "تم حفظ البيانات بنجاح.",
"data": {
"delayPeriodBeforeSessionCancel": 1,
"periodTimeBetweenSession": 1,
"waitingPeriodCoachForApproveToDirectSession": 1,
"waitingPeriodCustomerForPayToDirectSession": 2,
"allowedNumberToCancelSessions": 4,
"canCustomerViewRecordedSessions": true,
"canCoachViewRecordedSessions": true
},
"statusCode": 200
}
Error Response
Unauthorized (401)
{
"success": false,
"message": "يجب عليك تسجيل الدخول",
"data": [],
"statusCode": 401
}