Home / Documentation / Mobile & Researcher API
Mobile & Researcher API

Researcher / Mobile User Flow

A published guide from Survanta's public documentation.

Tenant User Mobile Flow

Overview

This guide summarizes the supported tenant-user mobile API flow, from login to listing tasks or surveys, submitting a response, reviewing owned responses, and completing a field task. Retired researcher-only authentication and task routes are not used.

Step 1 — Sign In

  1. Open the Survanta app and enter your registered email and password.
  2. Call POST /api/mobile/auth/login; success returns a JWT and expiresAtUtc.
  3. Send Authorization: Bearer <jwt> to protected endpoints.

Step 2 — Review Your Dashboard

The client can compose its dashboard from these APIs:

  • GET /api/mobile/tasks for the current user's field tasks.
  • GET /api/mobile/surveys for active authenticated-visible tenant surveys and per-user response statistics.
  • GET /api/Notifications/unread-count for the unread notification count.

Tap any item to navigate directly to its detail screen.

Step 3 — View a Task

  1. Tap Tasks in the bottom navigation bar (or tap a task from the Home screen).
  2. The API returns task id, title, coordinates, taskDate, isDone, completedAt, optional surveyId, and canStartSurvey.
  3. Filter by fromDate, toDate, or isDone; optional page/pageSize slices the ordered result with a maximum page size of 100.
  4. There is no mobile task-acceptance or In-Progress transition endpoint.

Step 4 — Open the Associated Survey

  1. Use the task's surveyId only when canStartSurvey is true, or choose a survey from GET /api/mobile/surveys.
  2. Load the runtime from GET /api/mobile/surveys/{surveyId}.
  3. The centralized access policy remains authoritative; a task never grants survey access by itself.

Step 5 — Fill in and Submit the Survey

  1. Work through each question in the questionnaire. Questions may include:
    • Multiple-choice selections
    • Text entry fields
    • Rating scales
    • Yes/No toggles
  2. Use Next and Back to move between sections if the survey has multiple pages.
  3. Client-side draft/offline saving is not supplied by these server endpoints.
  4. Submit to POST /api/mobile/surveys/{surveyId}/submissions with a stable clientSubmissionId and required location/consent data.
  5. Treat the API response as the authoritative submission result.

Owned responses are available from GET /api/mobile/submissions; details provide server-calculated canEdit and nonEditableReason.

Step 6 — Mark the Task as Complete

  1. Return to the task detail screen.
  2. Call POST /api/mobile/tasks/{id}/complete with optional completion GPS data.
  3. Success sets isDone; the list can then be filtered with isDone=true or false.

Step 7 — Check Notifications

Throughout the flow, you may receive push or in-app notifications for:

  • New task assignments
  • Reminders for upcoming deadlines
  • Confirmation of successful survey submissions
  • Messages from your organization's administrator

Tap a notification to navigate directly to the related screen.

Step 8 — Sign Out

When finished, the client should optionally remove its registered device token, then delete the JWT from secure local storage. No server-side mobile logout/revocation endpoint exists.

Summary of the Full Flow

Step Action Result
1 Sign in JWT and expiry returned
2 Load APIs Tasks, surveys, and unread count available
3 Review task Assigned task contract loaded; no acceptance transition
4 Open survey Authorized runtime displayed
5 Submit survey Idempotent response result returned
6 Complete task isDone becomes true on success
7 Sign out Local JWT removed; issued token is not server-revoked

Support

Please log in or create an account to chat with our support team.