Appearance
Submit All Answers
Submit all quiz answers at once for a user.
Overview
This endpoint allows submitting all answers to a quiz in a single request. It marks the quiz as completed and returns the updated answer object with scores.
Method: POST
Endpoints by Quiz Type
| Quiz Type | Endpoint |
|---|---|
| Anonymous | /api/v1/namespaces/:namespaceId/quizzes/:quizId/users/anonymous/answers/submit |
| In-App | /api/v1/namespaces/:namespaceId/quizzes/:quizId/users/inapp/answers/submit |
| Invited | /api/v1/namespaces/:namespaceId/quizzes/:quizId/users/:invitedUserUUID/answers/submit |
See Quiz Types to understand the differences between anonymous, in-app, and invited quizzes.
Request
Path Parameters
| Parameter | Type | Required | Quiz Type | Description |
|---|---|---|---|---|
namespaceId | string | ✅ | All | Namespace unique ID |
quizId | string | ✅ | All | Quiz unique ID |
invitedUserUUID | string | ✅ | Invited | Invited user unique ID |
Body Parameters
| Field | Type | Required | Quiz Type | Description |
|---|---|---|---|---|
anonymousUserId | string | ✅ | Anonymous | Anonymous user identifier |
sessionId | string | ✅ | In-App | In-app session identifier |
answers | object | ✅ | All | Object mapping question IDs to answer values (see Answer Formats) |
language | string | ✅ | All | Language code (en for English, es for Spanish) |
customParams | string | ❌ | All | Optional custom parameters |
Answer Formats
The answers object supports two formats for the 8 core financial health questions (fhn1 through fhn8):
| Format | Type | Description | Example |
|---|---|---|---|
| UUID | string | Answer option UUID | "fhn1": "4b7e6d70-fd93-494a-874d-ea783f825289" |
| Code | number | Answer option code (1-4, 1-5, or 1-6) | "fhn1": 1 |
The code format is more compact, while the UUID format provides unambiguous answer identification.
Finding Answer IDs/Codes: Use the Get Quiz Public Info endpoint to retrieve the quiz's questions and their available answer options. Each answer option includes both an
id(UUID) and acode(number).
Example Request Bodies
json
{
"anonymousUserId": "anon_12345",
"answers": {
"fhn1": "4b7e6d70-fd93-494a-874d-ea783f825289",
"fhn2": "4acca62e-7160-4261-b02b-94100f8199ba",
"fhn3": "a03752af-39e6-40d8-8349-0aed34900052",
"fhn4": "6c5b3b7a-cb7c-46b3-8537-dcecb8265de2",
"fhn5": "f327a7a8-6ea3-4f4d-8991-930bdfff4e86",
"fhn6": "ceac0b4b-98f1-49e0-aeab-a2abdef04987",
"fhn7": "5b36f97c-2b2d-45dd-9eb0-756424dd55f4",
"fhn8": "7d4692e2-6420-4948-a144-f15f5bc1b6da"
},
"language": "en"
}json
{
"sessionId": "session_abc123",
"answers": {
"fhn1": "d5334746-ef47-481b-afa7-adbba827228f",
"fhn2": "e7106b5d-7f22-425d-998c-a053403718a1",
"fhn3": "2c480031-bbe8-427c-afd6-227da22814a4",
"fhn4": "f45aa68a-d0ef-4a6d-a30b-854146f310ae",
"fhn5": "6bee101a-5159-47c1-88cd-2ce26e327fbd",
"fhn6": "e5f738e0-9352-4f1a-ab73-0367d7681480",
"fhn7": "f8b37b3c-e27c-43f8-984f-b628f458f501",
"fhn8": "b3dd065b-8806-4bda-a664-6efd234ddb5d"
},
"language": "en"
}json
{
"sessionId": "session_abc123",
"answers": {
"fhn1": 5,
"fhn2": 5,
"fhn3": 5,
"fhn4": 5,
"fhn5": 1,
"fhn6": 3,
"fhn7": 3,
"fhn8": 5
},
"language": "en"
}json
{
"answers": {
"fhn1": "cb2b7af9-6b10-4096-b3db-b637de9f8680",
"fhn2": "a1e1fbcc-b11e-4b06-bc1e-9b1c0e8aa2ea",
"fhn3": "d249df3e-df2d-42f6-af48-9ad6ed98c49d",
"fhn4": "c4b1b782-db9d-4630-a904-0e28f5392e3c",
"fhn5": "6bee101a-5159-47c1-88cd-2ce26e327fbd",
"fhn6": "0418b14d-ec78-48d8-a23d-359de286875f",
"fhn7": "a06bdd29-391a-41d8-956d-0308e17d0f41",
"fhn8": "43df430a-95d5-47e7-8e7b-ae8ec6e71e4a"
},
"language": "en"
}Response
Example Responses
json
{
"answers": {
"id": "quiz1234-anon_12345",
"userId": "anon_12345",
"quizId": "quiz1234",
"activityDate": {
"_seconds": 1768499412,
"_nanoseconds": 602000000
},
"qAnswers": {
"fhn1": "d5334746-ef47-481b-afa7-adbba827228f",
"fhn2": "e7106b5d-7f22-425d-998c-a053403718a1",
"fhn3": "2c480031-bbe8-427c-afd6-227da22814a4",
"fhn4": "f45aa68a-d0ef-4a6d-a30b-854146f310ae",
"fhn5": "f327a7a8-6ea3-4f4d-8991-930bdfff4e86",
"fhn6": "0418b14d-ec78-48d8-a23d-359de286875f",
"fhn7": "a06bdd29-391a-41d8-956d-0308e17d0f41",
"fhn8": "b3dd065b-8806-4bda-a664-6efd234ddb5d"
},
"isCompleted": true,
"completionStatus": 3,
"isAnonymous": true,
"score": 30,
"spend_score": 0,
"save_score": 0,
"borrow_score": 70,
"plan_score": 50,
"indicator_scores": {
"fhn1": 0,
"fhn2": 0,
"fhn3": 0,
"fhn4": 0,
"fhn5": 40,
"fhn6": 100,
"fhn7": 100,
"fhn8": 0
},
"customData": ""
},
"anonymousUserId": "anon_12345"
}json
{
"answers": {
"id": "quizid1234-session_abc123",
"userId": "session_abc123",
"quizId": "quizid1234",
"activityDate": {
"_seconds": 1768499412,
"_nanoseconds": 602000000
},
"qAnswers": {
"fhn1": "d5334746-ef47-481b-afa7-adbba827228f",
"fhn2": "e7106b5d-7f22-425d-998c-a053403718a1",
...
},
"isCompleted": true,
"completionStatus": 3,
"isAnonymous": false,
"score": 30,
"spend_score": 0,
"save_score": 0,
"borrow_score": 70,
"plan_score": 50,
"indicator_scores": {
"fhn1": 0,
"fhn2": 0
...
},
"customData": ""
}
}json
{
"answers": {
"id": "quiz1234-user_abcd12345",
"userId": "user_abcd12345",
"quizId": "quiz1234",
"activityDate": {
"_seconds": 1768499412,
"_nanoseconds": 602000000
},
"qAnswers": {
"fhn1": "d5334746-ef47-481b-afa7-adbba827228f",
"fhn2": "e7106b5d-7f22-425d-998c-a053403718a1",
...
},
"isCompleted": true,
"completionStatus": 3,
"isAnonymous": false,
"score": 30,
"spend_score": 0,
"save_score": 0,
"borrow_score": 70,
"plan_score": 50,
"indicator_scores": {
"fhn1": 0,
"fhn2": 0,
...
},
"customData": ""
}
}Response Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique answer document ID (format: quizId-userId) |
userId | string | User identifier |
quizId | string | Quiz identifier |
activityDate | object | Timestamp of last activity |
qAnswers | object | Object containing all submitted answers (questionId → answerId) |
isCompleted | boolean | true when quiz is completed |
completionStatus | number | 1 = initialized, 2 = in progress, 3 = completed |
isAnonymous | boolean | true for anonymous quizzes, false for invited and in-app |
score | number | Overall financial health score (0-100) |
spend_score | number | Spend indicator score (0-100) |
save_score | number | Save indicator score (0-100) |
borrow_score | number | Borrow indicator score (0-100) |
plan_score | number | Plan indicator score (0-100) |
indicator_scores | object | Individual question scores (questionId → score) |
customData | string | Custom data stored with the response |
anonymousUserId | string | Returned only for anonymous quizzes |
Note: Since this is an unauthenticated endpoint, the response only includes non-identifiable question data (e.g.,
fhnprefixed questions). Questions containing personally identifiable information are excluded from the response.
Error Responses
400 Bad Request– If the quiz has ended
json
{
"error": "quiz has ended",
"errorCode": "quiz/ended"
}400 Bad Request– If the quiz type doesn't match the endpoint
json
{
"error": "quiz only takes non anonymous submissions",
"errorCode": "quiz/not_anonymous"
}404 Not Found– If the namespace does not exist
json
{
"error": "namespace not found",
"errorCode": "namespace/not_found"
}404 Not Found– If the quiz does not exist
json
{
"error": "quiz not found",
"errorCode": "quiz/not_found"
}404 Not Found– If the answer document doesn't exist (user must call initQuiz first)
json
{
"error": "Answer document not found. User must call initQuiz first.",
"errorCode": "request/not_found"
}404 Not Found– If the invited user does not exist (for invited quizzes)
json
{
"error": "user does not exist",
"errorCode": "users/not_found"
}403 Forbidden– If the invited user is not part of the quiz (for invited quizzes)
json
{
"error": "user is not part of the quiz",
"errorCode": "users/unauthorized"
}400 Bad Request– If an invalid answer ID or code is provided
json
{
"error": "Invalid answer for fhn1: not a valid answer code",
"errorCode": "parameters/invalid"
}422 Unprocessable Entity– If required parameters are missing or validation fails
json
{
"validationErrors": {
"body": {
"answers": {
"message": "\"answers\" is required"
}
}
}
}