Submit questionnaire answers for a walk instance (multipart/form-data)
POST /walk/v1/walks/submit
Operation id: submitWalkQuestionnaire
Description
Submits the questionnaire answers for an in-progress walk instance. The request must be sent as multipart/form-data.
All four required fields must be present. Missing any required field returns HTTP 400.
Authentication: X-reflexis-csrf-token-X required.
Request Headers
| Header | Required | Description |
|---|---|---|
X-reflexis-csrf-token-X | Yes | Session authentication token |
Content-Type | Yes | Must be multipart/form-data |
Response Structure
Success envelope: { "status": "OK", "response": <object> } from questionnaire submission (no message). Inner fields vary (completion status, scoring, etc.) and are snake_case in JSON.
{
"response": { },
"status": "OK"
}
| Field | Description |
|---|---|
response | Normalized submission result from questionnaire upload processing |
Answers Format
The answers field must be a stringified JSON array of answer objects:
[
{ "question_id": "Q1", "answer": "Yes" },
{ "question_id": "Q2", "answer": "3" }
]
Error Scenarios
| Scenario | HTTP Status | Message |
|---|---|---|
Missing X-reflexis-csrf-token-X header | 400 | X-reflexis-csrf-token-X header is mandatory |
| Invalid or expired token | 401 | Invalid or expired token |
| Missing required field | 400 | <field_name> is mandatory — each mandatory param is checked individually; first failure returns HTTP 400 (errorCode: E110) |
| Questionnaire validation failed | 200 | HTTP 200 status: "ER", error is a JSON array of localized validation messages (questionnaire validation) |
| Internal server error | 500 | Error while processing request. Here is the error : <error details> |
Error Codes Reference
| Code | HTTP | Description |
|---|---|---|
E112 | 400 | X-reflexis-csrf-token-X header is mandatory |
E101 | 400 | Domain id is mandatory (session payload) |
E202 | 401 | User session is invalid (MyWork) |
E204 | 401 | Invalid or expired token |
E110 | 400 | Missing required multipart field (submit-questionnaire operation) |
E500 | 500 | Unhandled server error |
| — | 200 | Validation failures after mandatory checks: status: "ER", error only (no errorCode) |
Tags: WalkSubmit
Security
- AuthTokenHeader (apiKey)
- Session authentication token validated server-side against the user session store. Required on every request. Absence returns HTTP 400; invalid/expired token returns HTTP 401.
Responses
200 — Walk submitted. Returns response from questionnaire submission (completion metadata).
Application-level errors are returned as HTTP 200 with status: "ER".
Content type: application/json
400 — Invalid or missing required request parameter.
Content type: application/json
401 — Missing or invalid X-reflexis-csrf-token-X session token.
Content type: application/json
500 — Unexpected server-side error.
Content type: application/json
Request body
Required: Yes
multipart/form-data
Schema
Walk submission form data. All required fields must be present.
| Property | Type | Required | Description |
|---|---|---|---|
model_id | string | Yes | Required. Walk template/model identifier. |
category_id | string | Yes | Required. Category identifier associated with the model. |
form_trace_id | string | Yes | Required. Walk instance trace ID identifying the in-progress walk to submit. Obtained from GET /walk/v1/walks/ or the create walk response. |
answers | string | Yes | Required. Stringified JSON array of questionnaire answers. Each element must contain at minimum question_id and answer. Example: json [{"question_id":"Q1","answer":"Yes"},{"question_id":"Q2","answer":"3"}] |
{
"type": "object",
"description": "Walk submission form data. All required fields must be present.",
"required": [
"model_id",
"category_id",
"form_trace_id",
"answers"
],
"properties": {
"model_id": {
"type": "string",
"description": "**Required.** Walk template/model identifier."
},
"category_id": {
"type": "string",
"description": "**Required.** Category identifier associated with the model."
},
"form_trace_id": {
"type": "string",
"description": "**Required.** Walk instance trace ID identifying the in-progress walk to submit.\nObtained from `GET /walk/v1/walks/` or the create walk response.\n"
},
"answers": {
"type": "string",
"description": "**Required.** Stringified JSON array of questionnaire answers. Each element\nmust contain at minimum `question_id` and `answer`.\n\nExample:\n```json\n[{\"question_id\":\"Q1\",\"answer\":\"Yes\"},{\"question_id\":\"Q2\",\"answer\":\"3\"}]\n```\n",
"example": "[{\"question_id\":\"Q1\",\"answer\":\"Yes\"}]"
}
}
}
Response models
200 — Walk submitted. Returns response from questionnaire submission (completion metadata).
Application-level errors are returned as HTTP 200 with status: "ER".
Content type: application/json
Schema
Successful response envelope for Walk APIs.
Named key (most GET endpoints): { "status": "OK", "<resource_key>": <payload> } — e.g. walk_categories, walks, scheduled_walks, walk_types, walk_questions, walk_stores, walk_details, walk_permissions, walk_users. There is no message property.
Default key (multipart POST — create / schedule / submit): { "status": "OK", "response": <object> }.
Nested objects and arrays are emitted in snake_case (internal camelCase field names are normalized in responses).
| Property | Type | Required | Description |
|---|---|---|---|
status | string | Yes | |
response | object | No | Generic JSON object — structure varies by endpoint and config type. |
walk_categories | array | No | |
walks | object | No | Generic JSON object — structure varies by endpoint and config type. |
scheduled_walks | object | No | Generic JSON object — structure varies by endpoint and config type. |
walk_types | array | No | |
walk_questions | object | No | Generic JSON object — structure varies by endpoint and config type. |
walk_stores | object | No | Generic JSON object — structure varies by endpoint and config type. |
walk_details | object | No | Generic JSON object — structure varies by endpoint and config type. |
walk_permissions | object | No | Generic JSON object — structure varies by endpoint and config type. |
walk_users | array | No |
{
"type": "object",
"description": "Successful response envelope for Walk APIs.\n\n**Named key (most GET endpoints):** `{ \"status\": \"OK\", \"<resource_key>\": <payload> }` — e.g. `walk_categories`,\n`walks`, `scheduled_walks`, `walk_types`, `walk_questions`, `walk_stores`, `walk_details`, `walk_permissions`,\n`walk_users`. There is **no** `message` property.\n\n**Default key (multipart POST — create / schedule / submit):** `{ \"status\": \"OK\", \"response\": <object> }`.\n\nNested objects and arrays are emitted in **snake_case** (internal camelCase field names are normalized in responses).\n",
"example": {
"status": "OK",
"walks": {
"walk_list": [],
"last_fetch_time": 1710000000000
}
},
"required": [
"status"
],
"properties": {
"status": {
"type": "string",
"enum": [
"OK"
]
},
"response": {
"type": "object",
"description": "Generic JSON object — structure varies by endpoint and config type."
},
"walk_categories": {
"type": "array",
"items": {
"type": "object",
"description": "A single walk category object.",
"properties": {
"domain_id": {
"type": "integer",
"description": "Domain identifier for the category."
},
"category_name": {
"type": "string",
"description": "Display name of the walk category."
},
"category_id": {
"type": "string",
"description": "Unique category identifier."
},
"category_type": {
"type": "string",
"description": "Category type code (e.g. `\"W\"` for walk)."
},
"category_desc": {
"type": "string",
"description": "Category description."
},
"creator_name": {
"type": "string",
"description": "Username of the category creator."
},
"permission": {
"type": "string",
"description": "Comma-separated permission flags (e.g. `\"1,1,1,1\"`)."
},
"created_by": {
"type": "string",
"description": "Login ID of the creator."
}
}
}
},
"walks": {
"type": "object",
"description": "Generic JSON object — structure varies by endpoint and config type."
},
"scheduled_walks": {
"type": "object",
"description": "Generic JSON object — structure varies by endpoint and config type."
},
"walk_types": {
"type": "array",
"items": {}
},
"walk_questions": {
"type": "object",
"description": "Generic JSON object — structure varies by endpoint and config type."
},
"walk_stores": {
"type": "object",
"description": "Generic JSON object — structure varies by endpoint and config type."
},
"walk_details": {
"type": "object",
"description": "Generic JSON object — structure varies by endpoint and config type."
},
"walk_permissions": {
"type": "object",
"description": "Generic JSON object — structure varies by endpoint and config type."
},
"walk_users": {
"type": "array",
"items": {}
}
}
}
400 — Invalid or missing required request parameter.
Content type: application/json
Schema
Error envelope shape depends on how the error is produced:
- HTTP 200 — business or validation failure after the request is accepted:
{ "status": "ER", "error": "<string or JSON>" }(noerrorCode). - HTTP 4xx/5xx — structured API error:
{ "status": "ER", "errorCode": "<code>", "response": "<localized message>" }.
See the global Error Codes Reference in this spec for errorCode values.
| Property | Type | Required | Description |
|---|---|---|---|
status | string | Yes | |
errorCode | string | No | Structured error code (Walk or shared session codes; see Error Codes Reference). |
response | string | No | Human-readable message when errorCode is present (HTTP 4xx/5xx responses). |
error | oneOf | No | Payload for HTTP 200 error bodies (string, array, or object). |
{
"type": "object",
"description": "Error envelope shape depends on how the error is produced:\n\n- **HTTP 200** — business or validation failure after the request is accepted:\n `{ \"status\": \"ER\", \"error\": \"<string or JSON>\" }` (no `errorCode`).\n- **HTTP 4xx/5xx** — structured API error:\n `{ \"status\": \"ER\", \"errorCode\": \"<code>\", \"response\": \"<localized message>\" }`.\n\nSee the global **Error Codes Reference** in this spec for `errorCode` values.\n",
"example": {
"status": "ER",
"errorCode": "E110",
"response": "model_id is mandatory"
},
"required": [
"status"
],
"properties": {
"status": {
"type": "string",
"enum": [
"ER"
]
},
"errorCode": {
"type": "string",
"description": "Structured error code (Walk or shared session codes; see **Error Codes Reference**)."
},
"response": {
"type": "string",
"description": "Human-readable message when `errorCode` is present (HTTP 4xx/5xx responses)."
},
"error": {
"description": "Payload for HTTP 200 error bodies (string, array, or object).",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {}
},
{
"type": "object"
}
]
}
}
}
Example:
{
"status": "ER",
"errorCode": "E110",
"response": "model_id is mandatory"
}
401 — Missing or invalid X-reflexis-csrf-token-X session token.
Content type: application/json
Schema
Error envelope shape depends on how the error is produced:
- HTTP 200 — business or validation failure after the request is accepted:
{ "status": "ER", "error": "<string or JSON>" }(noerrorCode). - HTTP 4xx/5xx — structured API error:
{ "status": "ER", "errorCode": "<code>", "response": "<localized message>" }.
See the global Error Codes Reference in this spec for errorCode values.
| Property | Type | Required | Description |
|---|---|---|---|
status | string | Yes | |
errorCode | string | No | Structured error code (Walk or shared session codes; see Error Codes Reference). |
response | string | No | Human-readable message when errorCode is present (HTTP 4xx/5xx responses). |
error | oneOf | No | Payload for HTTP 200 error bodies (string, array, or object). |
{
"type": "object",
"description": "Error envelope shape depends on how the error is produced:\n\n- **HTTP 200** — business or validation failure after the request is accepted:\n `{ \"status\": \"ER\", \"error\": \"<string or JSON>\" }` (no `errorCode`).\n- **HTTP 4xx/5xx** — structured API error:\n `{ \"status\": \"ER\", \"errorCode\": \"<code>\", \"response\": \"<localized message>\" }`.\n\nSee the global **Error Codes Reference** in this spec for `errorCode` values.\n",
"example": {
"status": "ER",
"errorCode": "E110",
"response": "model_id is mandatory"
},
"required": [
"status"
],
"properties": {
"status": {
"type": "string",
"enum": [
"ER"
]
},
"errorCode": {
"type": "string",
"description": "Structured error code (Walk or shared session codes; see **Error Codes Reference**)."
},
"response": {
"type": "string",
"description": "Human-readable message when `errorCode` is present (HTTP 4xx/5xx responses)."
},
"error": {
"description": "Payload for HTTP 200 error bodies (string, array, or object).",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {}
},
{
"type": "object"
}
]
}
}
}
500 — Unexpected server-side error.
Content type: application/json
Schema
Error envelope shape depends on how the error is produced:
- HTTP 200 — business or validation failure after the request is accepted:
{ "status": "ER", "error": "<string or JSON>" }(noerrorCode). - HTTP 4xx/5xx — structured API error:
{ "status": "ER", "errorCode": "<code>", "response": "<localized message>" }.
See the global Error Codes Reference in this spec for errorCode values.
| Property | Type | Required | Description |
|---|---|---|---|
status | string | Yes | |
errorCode | string | No | Structured error code (Walk or shared session codes; see Error Codes Reference). |
response | string | No | Human-readable message when errorCode is present (HTTP 4xx/5xx responses). |
error | oneOf | No | Payload for HTTP 200 error bodies (string, array, or object). |
{
"type": "object",
"description": "Error envelope shape depends on how the error is produced:\n\n- **HTTP 200** — business or validation failure after the request is accepted:\n `{ \"status\": \"ER\", \"error\": \"<string or JSON>\" }` (no `errorCode`).\n- **HTTP 4xx/5xx** — structured API error:\n `{ \"status\": \"ER\", \"errorCode\": \"<code>\", \"response\": \"<localized message>\" }`.\n\nSee the global **Error Codes Reference** in this spec for `errorCode` values.\n",
"example": {
"status": "ER",
"errorCode": "E110",
"response": "model_id is mandatory"
},
"required": [
"status"
],
"properties": {
"status": {
"type": "string",
"enum": [
"ER"
]
},
"errorCode": {
"type": "string",
"description": "Structured error code (Walk or shared session codes; see **Error Codes Reference**)."
},
"response": {
"type": "string",
"description": "Human-readable message when `errorCode` is present (HTTP 4xx/5xx responses)."
},
"error": {
"description": "Payload for HTTP 200 error bodies (string, array, or object).",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {}
},
{
"type": "object"
}
]
}
}
}
Example:
{
"status": "ER",
"errorCode": "E500",
"response": "Unexpected server error."
}