Game Loom
  1. Survey
Game Loom
  • Game Loom
    • πŸ‘‹ Welcome to Game Loom
  • Getting started
    • Introduction
    • πŸ‘€ Authentication
  • User Registration
    • Introduction
    • Single user registration
      POST
    • Bulk Register Users
      POST
  • Notifications
    • Overview
    • Receiving Event Notifications via Webhooks
    • Get All notifications for specific user
      GET
  • Rewards
    • Overview
    • Points
      • Record user point event
      • Get user points
      • Get Specific user point
    • Levels
      • Record user level event
      • Get user levels
      • Get Specific user level
    • Badges
      • Award badge to user
      • Get user badges
      • Get Specific user badge
  • Challenges (Gamification elements)
    • Introduction
    • Leaderboard
      • Get available leaderboards for user
      • Submit score to a leaderboard
      • Get user's leaderboard participation history
      • Get leaderboard details
      • Get leaderboard ranking
      • Get user's record for a leaderboard
      • Get user's entry history for a leaderboard
    • Survey
      • Overview
      • Get available surveys for user
        GET
      • Start a new survey participation
        POST
      • Get detailed user participation
        GET
      • Get user's survey participation history
        GET
      • Abandon survey participation
        DELETE
      • Save individual answer to survey question
        POST
      • Submit completed survey
        PUT
      • Submit Survey with answers (One-Step Submission)
        POST
    • Open Challenge
      • Overview
      • Get available open challenges for user
      • Complete an open challenge
      • Get user's open challenge participation history
      • Get user open challenge by ID
    • Schemas
      • Survey Schame
  1. Survey

Abandon survey participation

DELETE
api/v1/user/{userkey}/surveys/{userSurveyId}
Marks an in-progress survey participation as abandoned, preserving any submitted answers while preventing the user from continuing or completing the survey.

Description#

This endpoint allows a user to abandon a survey they have started or opened without completing.
Once abandoned, the survey can no longer be continued or submitted, but all existing data is retained for analytics and reporting purposes.

Usage Examples#

Abandon survey: User explicitly chooses to exit without completing
Cancel participation: User decides not to finish the survey
Cleanup incomplete surveys: Remove partially started surveys from the active list

Path Parameters#

NameTypeDescription
userKeystringUnique identifier of the user (derived from authentication context)
idUUIDUnique identifier of the user survey participation

Status Transitions#

Current StatusResult
NotStartedTransitions directly to Abandoned
InProgressPreserves partial answers and transitions to Abandoned
Completed❌ Not allowed (returns 400 Bad Request)
AbandonedNo change (idempotent operation)

Response#

The response includes:
Updated survey participation with status set to Abandoned
Preserved answer history
Final timestamps
Progress data maintained for analytics

Data Preservation#

All submitted answers are retained
Participation timestamps remain unchanged
Analytics and reporting data are preserved
No data loss occurs during abandonment

Use Cases#

User decides not to complete a survey
Accidental survey start cleanup
Improving user experience by reducing clutter
Analyzing survey abandonment patterns

Common Errors#

Error CodeDescription
USER_SURVEY_NOT_FOUNDInvalid survey ID or user does not have access
CANNOT_ABANDON_COMPLETED_SURVEYSurvey participation has already been completed

Request

Path Params

Responses

🟒200Success
application/json
Body

Request Request Example
Shell
JavaScript
Java
Swift
curl --location -g --request DELETE 'api/v1/user/{{user-key}}/surveys/'
Response Response Example
{
    "id": "string",
    "surveyId": "string",
    "userKey": "string",
    "companyId": "string",
    "status": 0,
    "startedAt": "string",
    "completedAt": "string",
    "updatedDate": "string",
    "createdDate": "string",
    "surveyName": "string",
    "surveyDescription": "string",
    "surveyStartDate": "string",
    "surveyEndDate": "string",
    "totalQuestions": 0,
    "answeredQuestions": 0,
    "progressPercentage": 0,
    "questions": [
        {
            "id": "string",
            "surveyId": "string",
            "questionType": 0,
            "question": "string",
            "orderQuestion": 0,
            "choices": [
                "string"
            ],
            "createdDate": "string",
            "updatedDate": "string",
            "localizedQuestions": {
                "ar": "string",
                "en": "string"
            },
            "localizedChoices": {
                "ar": [
                    "string"
                ],
                "en": [
                    "string"
                ]
            }
        }
    ],
    "answers": [
        {
            "id": "string",
            "questionId": "string",
            "question": "string",
            "answer": "string",
            "answeredAt": "string"
        }
    ]
}
Modified atΒ 2025-12-23 20:48:24
Previous
Get user's survey participation history
Next
Save individual answer to survey question
Built with