API Sync
Mobile app connectivity monitoring — sync status and heartbeat endpoints
Last updated: Feb 09, 2026
API Sync
Endpoints for mobile app connectivity monitoring. Used by the admin panel's System → API Sync page to show connection status.
Note: Requires authentication. All authenticated API requests automatically update the sync heartbeat via the TrackApiSync middleware.
Get Sync Status
Get current sync/connectivity status.
GET /api/v1/system/api-sync/status
Headers: Authorization: Bearer {token}
Response: 200 OK
{
"connected": true,
"sync_enabled": true,
"last_sync_at": "2026-02-09T10:30:00",
"last_status": "success",
"last_message": "All data synchronized",
"last_checked_at": "2026-02-09T10:35:00"
}
Note:connectedistrueif a heartbeat was received within the last 120 seconds.
Send Heartbeat
Report mobile app connectivity and sync status to the server.
POST /api/v1/system/api-sync/heartbeat
Headers: Authorization: Bearer {token}
Request Body:
{
"connected": true,
"sync_enabled": true,
"last_status": "success",
"last_message": "Synchronized 42 products",
"last_sync_at": "2026-02-09T10:30:00"
}
Request Fields
| Field | Type | Required | Description |
|---|---|---|---|
connected | boolean | Yes | Whether the app considers itself connected |
sync_enabled | boolean | No | Whether auto-sync is enabled in the app |
last_status | string | No | Status of the last sync operation |
last_message | string | No | Descriptive message about the last sync |
last_sync_at | datetime | No | Timestamp of the last sync operation |
200 OK
{
"success": true
}