Retrieve simple-type survey questions for a feed
GET /task/v1/feeds/{feed_key}/survey
Operation id: getFeedSurvey
Description
Retrieves simple-type survey questions attached to a feed for the given button status. Simple surveys only — COMPLEX and FORM types return E338.
Feed Identification Modes
| Mode | Condition | Required Parameters |
|---|---|---|
| Mode A | feed_key > 0 | Positive feed_key in path; others optional context overrides |
| Mode B | feed_key ≤ 0 (use -1) | Both requested_unit_id and cluster_id required (→ E129 if either missing) |
Path Parameters
| Parameter | Type | Required | Constraints | Description |
|---|---|---|---|---|
feed_key | Integer | Yes | Any integer | Use a positive value for Mode A; pass -1 for Mode B. |
Language Resolution Priority
requested_lang_code(if provided in request)- Locale from
requested_user_idkernel user-details lookup (ifrequested_lang_codeabsent andrequested_user_idpresent) - Session
langCodeas fallback (always available)
Language lookup failure (bad
requested_user_id) is non-fatal — logs a warning and falls back to session langCode. Error messages to the client always use sessionlangCode, regardless of the resolved service language.
Response Fields — form_array[*]
| Field | Type | Description |
|---|---|---|
question_id | Integer | Unique question identifier |
question_text | String | Question displayed to the user |
question_type | String | Input type: RADIO, CHECKBOX, TEXT, NUMBER, DATE, DROPDOWN |
mandatory | Boolean | true if the question must be answered before status change |
options[] | Array | For choice-type questions only (RADIO, CHECKBOX, DROPDOWN). Each: option_id (Integer), option_text (String) |
Error Scenarios
| Scenario | HTTP | Error Code | Message |
|---|---|---|---|
Missing / invalid X-reflexis-csrf-token-X | 401 | E202 | User session is invalid |
btn_status is blank or absent | 400 | E127 | btn_status is mandatory |
feed_key ≤ 0 and requested_unit_id or cluster_id missing | 400 | E129 | Either feed_key (> 0) or both unit_id and cluster_id must be provided. |
| Service returned null (feed not found / internal error) | 200 | E404 | No data found |
| Service returned empty array (no simple survey / complex/form type) | 200 | E338 | No survey data available. Either survey is Complex type, Form type, or no survey is attached. |
| Unexpected server-side error | 500 | E302 | Internal server error |
Error Codes Reference
| Code | Description |
|---|---|
E127 | btn_status is mandatory |
E129 | Feed identifier mode conflict (Mode B missing required params) |
E202 | User session is invalid |
E302 | Internal server error |
E338 | No simple survey available (complex/form type or none attached) |
E404 | No data found |
Tags: MyWorkFeeds
Parameters
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
feed_key | integer | Yes | Unique numeric feed identifier |
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
btn_status | string | Yes | Action trigger type: C=Completion survey, F=Force-Close survey (mandatory — E127 if missing) |
cluster_child_id | string | No | Cluster child identifier (Mode B optional context) |
cluster_id | string | No | Cluster identifier. Required when feed_key ≤ 0 (Mode B) |
requested_dept_id | string | No | Department ID of the target user |
requested_lang_code | string | No | Language code for service response — overrides session language when present |
requested_profile_id | string | No | Profile ID of the target user |
requested_unit_id | string | No | Unit ID of the target user. Required when feed_key ≤ 0 (Mode B) |
requested_user_id | string | No | User ID of the data owner — used for locale resolution and service context |
Security
- AuthTokenHeader (apiKey)
- Session authentication token validated server-side against the user session store.
Responses
200 — Success — {status: OK, form_array[]}.
No data → E404. No simple survey (complex/form type or none) → E338.
Content type: application/json
400 — - E127 — btn_status is mandatory
- E129 — feed_key ≤ 0 and required_unit_id or cluster_id missing
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
Response models
200 — Success — {status: OK, form_array[]}.
No data → E404. No simple survey (complex/form type or none) → E338.
Content type: application/json
Schema
JSON object (structure varies by endpoint).
{
"type": "object",
"description": "JSON object (structure varies by endpoint)."
}
Example:
{
"status": "OK",
"form_array": [
{
"question_id": 1,
"question_text": "Was the task completed satisfactorily?",
"question_type": "RADIO",
"mandatory": true,
"options": [
{
"option_id": 1,
"option_text": "Yes"
},
{
"option_id": 2,
"option_text": "No"
}
]
}
]
}
400 — - E127 — btn_status is mandatory
- E129 — feed_key ≤ 0 and required_unit_id or cluster_id missing
Content type: application/json
Schema
| Property | Type | Required | Description |
|---|---|---|---|
status | string | Yes | Always "ER" for error responses |
errorCode | string | Yes | Application-level error code (e.g. E202, E105, E404) |
response | string | Yes | Human-readable error message |
{
"type": "object",
"example": {
"status": "ER",
"errorCode": "E202",
"response": "User session is invalid"
},
"required": [
"status",
"errorCode",
"response"
],
"properties": {
"status": {
"type": "string",
"description": "Always \"ER\" for error responses",
"enum": [
"ER"
]
},
"errorCode": {
"type": "string",
"description": "Application-level error code (e.g. E202, E105, E404)"
},
"response": {
"type": "string",
"description": "Human-readable error message"
}
}
}
401 — Missing or invalid X-reflexis-csrf-token-X session token
Content type: application/json
Schema
| Property | Type | Required | Description |
|---|---|---|---|
status | string | Yes | Always "ER" for error responses |
errorCode | string | Yes | Application-level error code (e.g. E202, E105, E404) |
response | string | Yes | Human-readable error message |
{
"type": "object",
"example": {
"status": "ER",
"errorCode": "E202",
"response": "User session is invalid"
},
"required": [
"status",
"errorCode",
"response"
],
"properties": {
"status": {
"type": "string",
"description": "Always \"ER\" for error responses",
"enum": [
"ER"
]
},
"errorCode": {
"type": "string",
"description": "Application-level error code (e.g. E202, E105, E404)"
},
"response": {
"type": "string",
"description": "Human-readable error message"
}
}
}
Example:
{
"status": "ER",
"errorCode": "E202",
"response": "User session is invalid"
}
500 — Unexpected server-side error
Content type: application/json
Schema
| Property | Type | Required | Description |
|---|---|---|---|
status | string | Yes | Always "ER" for error responses |
errorCode | string | Yes | Application-level error code (e.g. E202, E105, E404) |
response | string | Yes | Human-readable error message |
{
"type": "object",
"example": {
"status": "ER",
"errorCode": "E202",
"response": "User session is invalid"
},
"required": [
"status",
"errorCode",
"response"
],
"properties": {
"status": {
"type": "string",
"description": "Always \"ER\" for error responses",
"enum": [
"ER"
]
},
"errorCode": {
"type": "string",
"description": "Application-level error code (e.g. E202, E105, E404)"
},
"response": {
"type": "string",
"description": "Human-readable error message"
}
}
}
Example:
{
"status": "ER",
"errorCode": "E302",
"response": "Internal server error"
}