Skip to main content

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

HeaderValueRequired
Content-Typeapplication/jsonYes
Acceptapplication/jsonYes
AuthorizationBearer tokenYes

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

HeaderValueRequired
Content-Typeapplication/jsonYes
Acceptapplication/jsonYes
AuthorizationBearer tokenYes

Request Body

ParameterTypeDescriptionRequired
delay_period_before_session_cancelstringSetting's delay period before session cancelNo
period_time_between_sessionstringSetting's period time between sessionNo
waiting_period_coach_for_approve_to_direct_sessionstringSetting's waiting coach approve direct sessionNo
waiting_period_customer_for_pay_to_direct_sessionstringSetting's waiting customer pay direct sessionNo
allowed_number_to_cancel_sessionsstringSetting's allowed_number_to_cancel_sessionsNo
can_customer_view_recorded_sessionsstringSetting's can customer view sessions recordedNo
can_coach_view_recorded_sessionsstringSetting's can coach view sessions recordedNo

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
}