Skip to main content

Suspicious Login

This section covers the API endpoints for managing suspicious logins in the admin panel.

List Suspicious Logins

GET /v1/admin/suspicious-logins

Returns a paginated list of all suspicious logins.

Query Parameters

ParameterTypeDescription
search_textstringSearch by customer username, full name, or suspicious description
filter[period]stringFilter by period (first_quarter, second_quarter, third_quarter, fourth_quarter)
sortstringSort by field (prefix with - for descending)
per_pageintegerNumber of items per page. Defaults to 10

Response

{
"success": true,
"message": "تم جلب البيانات بنجاح.",
"data": {
"current_page": 1,
"first_page_url": "http://192.168.0.139:8080/v1/admin/suspicious-logins?page=1",
"from": 1,
"last_page": 234,
"last_page_url": "http://192.168.0.139:8080/v1/admin/suspicious-logins?page=234",
"links": [
{
"url": null,
"label": "« السابق",
"active": false
},
{
"url": "http://192.168.0.139:8080/v1/admin/suspicious-logins?page=1",
"label": "1",
"active": true
},
{
"url": "http://192.168.0.139:8080/v1/admin/suspicious-logins?page=2",
"label": "2",
"active": false
},
{
"url": "http://192.168.0.139:8080/v1/admin/suspicious-logins?page=3",
"label": "3",
"active": false
},
{
"url": "http://192.168.0.139:8080/v1/admin/suspicious-logins?page=4",
"label": "4",
"active": false
},
{
"url": "http://192.168.0.139:8080/v1/admin/suspicious-logins?page=5",
"label": "5",
"active": false
},
{
"url": "http://192.168.0.139:8080/v1/admin/suspicious-logins?page=6",
"label": "6",
"active": false
},
{
"url": "http://192.168.0.139:8080/v1/admin/suspicious-logins?page=7",
"label": "7",
"active": false
},
{
"url": "http://192.168.0.139:8080/v1/admin/suspicious-logins?page=8",
"label": "8",
"active": false
},
{
"url": "http://192.168.0.139:8080/v1/admin/suspicious-logins?page=9",
"label": "9",
"active": false
},
{
"url": "http://192.168.0.139:8080/v1/admin/suspicious-logins?page=10",
"label": "10",
"active": false
},
{
"url": null,
"label": "...",
"active": false
},
{
"url": "http://192.168.0.139:8080/v1/admin/suspicious-logins?page=233",
"label": "233",
"active": false
},
{
"url": "http://192.168.0.139:8080/v1/admin/suspicious-logins?page=234",
"label": "234",
"active": false
},
{
"url": "http://192.168.0.139:8080/v1/admin/suspicious-logins?page=2",
"label": "التالي »",
"active": false
}
],
"next_page_url": "http://192.168.0.139:8080/v1/admin/suspicious-logins?page=2",
"path": "http://192.168.0.139:8080/v1/admin/suspicious-logins",
"per_page": 10,
"prev_page_url": null,
"to": 10,
"total": 2338,
"suspicious_login": [
{
"id": "484aa860-d253-11ef-8f1b-5feddff85e91",
"customer_name": "هند الحجريه",
"customer_avatar": "http://192.168.0.139:8080/storage/27680/IMG_5376.jpeg",
"suspicious_description": "ثم تسجيل الدخول على حسابك بجهازين او دولتين في اقل من ساعة",
"customer_status": true,
"country_name": "غير معروف",
"suspicious_date": "2025-01-14 11:41:00",
"customer_id": "aab11752-aeff-4d79-a0d1-4d88ea8889cf",
"created_at": "2025-01-14 11:41:00"
},
{
"id": "52edd080-d23e-11ef-91d0-47335dcfb214",
"customer_name": "Norah Tareq",
"customer_avatar": "https://i.ibb.co/YhTw0wR/7-512.png",
"suspicious_description": "ثم تسجيل الدخول على حسابك بجهازين او دولتين في اقل من ساعة",
"customer_status": true,
"country_name": "غير معروف",
"suspicious_date": "2025-01-14 09:10:59",
"customer_id": "f155c105-25ce-4bea-9406-6f5a27a31cb4",
"created_at": "2025-01-14 09:10:59"
},
{
"id": "c11eed20-d231-11ef-86af-efa802e88810",
"customer_name": "نجلاء العصيمي",
"customer_avatar": "https://i.ibb.co/YhTw0wR/7-512.png",
"suspicious_description": "ثم تسجيل الدخول على حسابك بجهازين او دولتين في اقل من ساعة",
"customer_status": true,
"country_name": "غير معروف",
"suspicious_date": "2025-01-14 07:41:00",
"customer_id": "4b1126aa-a201-4399-a809-115c0af61608",
"created_at": "2025-01-14 07:41:00"
},
{
"id": "006afc40-d21a-11ef-a7bd-3d461a281912",
"customer_name": "ملاك الرزيقية",
"customer_avatar": "https://i.ibb.co/YhTw0wR/7-512.png",
"suspicious_description": "ثم تسجيل الدخول على حسابك بجهازين او دولتين في اقل من ساعة",
"customer_status": true,
"country_name": "غير معروف",
"suspicious_date": "2025-01-14 04:50:58",
"customer_id": "fd58f940-0db5-11ef-b7a5-4fd25934c54d",
"created_at": "2025-01-14 04:50:58"
},
{
"id": "352d74c0-d217-11ef-9651-89141933a310",
"customer_name": "هياء محمد",
"customer_avatar": "https://i.ibb.co/YhTw0wR/7-512.png",
"suspicious_description": "ثم تسجيل الدخول على حسابك بجهازين او دولتين في اقل من ساعة",
"customer_status": true,
"country_name": "غير معروف",
"suspicious_date": "2025-01-14 04:30:59",
"customer_id": "f47c5ec0-7adf-11ed-8acd-abdfd7169ae0",
"created_at": "2025-01-14 04:30:59"
},
{
"id": "d853ab60-d207-11ef-a280-5583a3afb831",
"customer_name": "Malika Sadik",
"customer_avatar": "https://i.ibb.co/YhTw0wR/7-512.png",
"suspicious_description": "ثم تسجيل الدخول على حسابك بجهازين او دولتين في اقل من ساعة",
"customer_status": true,
"country_name": "غير معروف",
"suspicious_date": "2025-01-14 02:41:00",
"customer_id": "6ba31468-9685-44b8-bb17-d735b104158f",
"created_at": "2025-01-14 02:41:00"
},
{
"id": "b5a58320-d1e7-11ef-8fd9-3d25b5cc4f89",
"customer_name": "Ohoud Alhusainan",
"customer_avatar": "https://i.ibb.co/YhTw0wR/7-512.png",
"suspicious_description": "ثم تسجيل الدخول على حسابك بجهازين او دولتين في اقل من ساعة",
"customer_status": true,
"country_name": "غير معروف",
"suspicious_date": "2025-01-13 22:50:58",
"customer_id": "a81cea4f-ac33-4a0b-8f42-af05e5c7be9a",
"created_at": "2025-01-13 22:50:58"
},
{
"id": "540ed470-d1df-11ef-a526-094ac630cd43",
"customer_name": "نوف الشهراني",
"customer_avatar": "http://192.168.0.139:8080/storage/4766/71CB0676-82AD-419B-9C14-E5F00B67491E.jpeg",
"suspicious_description": "ثم تسجيل الدخول على حسابك بجهازين او دولتين في اقل من ساعة",
"customer_status": true,
"country_name": "غير معروف",
"suspicious_date": "2025-01-13 21:50:58",
"customer_id": "694946a1-62f9-440c-bf97-99050f8d0f12",
"created_at": "2025-01-13 21:50:58"
},
{
"id": "f03599c0-d1dd-11ef-9a1b-adcdd2bc3e5f",
"customer_name": "نوف الشهراني",
"customer_avatar": "http://192.168.0.139:8080/storage/4766/71CB0676-82AD-419B-9C14-E5F00B67491E.jpeg",
"suspicious_description": "ثم تسجيل الدخول على حسابك بجهازين او دولتين في اقل من ساعة",
"customer_status": true,
"country_name": "غير معروف",
"suspicious_date": "2025-01-13 21:41:01",
"customer_id": "694946a1-62f9-440c-bf97-99050f8d0f12",
"created_at": "2025-01-13 21:41:01"
},
{
"id": "f270afa0-d1d6-11ef-9d9a-ef11f43b8c4d",
"customer_name": "Afrah AG",
"customer_avatar": "https://i.ibb.co/YhTw0wR/7-512.png",
"suspicious_description": "ثم تسجيل الدخول على حسابك بجهازين او دولتين في اقل من ساعة",
"customer_status": true,
"country_name": "غير معروف",
"suspicious_date": "2025-01-13 20:50:59",
"customer_id": "fc74e521-ce8b-4b32-96ab-d579cbe93d39",
"created_at": "2025-01-13 20:50:59"
}
]
},
"status_code": 200
}

Get Suspicious Login Statistics

GET /v1/admin/suspicious-logins/statistics

Retrieve statistics about suspicious logins. The response is cached for 60 minutes.

Response

{
"success": true,
"message": "تم جلب البيانات بنجاح.",
"data": {
"suspicious_login_for_customers": "2.3K",
"total_customers_login_this_week": [
{
"name": "اسم العميل",
"avatar": "https://i.ibb.co/YhTw0wR/7-512.png",
"percentage": "3"
},
{
"name": "Hamad Alshabanah",
"avatar": "https://i.ibb.co/YhTw0wR/7-512.png",
"percentage": "1"
},
{
"name": "أسماء عبدالخالق",
"avatar": "https://i.ibb.co/YhTw0wR/7-512.png",
"percentage": "1"
}
],
"customers_countries": [
[
"السعودية",
"120.2%"
],
[
"العراق",
"8.6%"
],
[
"الإمارات",
"7.7%"
],
[
"الجزائر",
"6%"
]
]
},
"status_code": 200
}

Bulk Delete Suspicious Logins

PATCH /v1/admin/suspicious-logins

Delete multiple suspicious logins at once.

Request Body

ParameterTypeDescriptionValidation Rules
idsarrayArray of suspicious login UUIDs to deleteRequired
ids.*stringUUID formatRequired

Response

{
"success": true,
"message": "تم حذف البيانات بنجاح.",
"data": null,
"status_code": 200
}

Authorization

All suspicious login endpoints require admin authorization. The user must have the appropriate permissions to perform these operations.

Notes

  • The statistics endpoint response is cached for 60 minutes
  • Soft deletion is supported for suspicious logins
  • The period filter accepts quarters of the year (first_quarter, second_quarter, third_quarter, fourth_quarter)