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

ModeConditionRequired Parameters
Mode Afeed_key > 0Positive feed_key in path; others optional context overrides
Mode Bfeed_key ≤ 0 (use -1)Both requested_unit_id and cluster_id required (→ E129 if either missing)

Path Parameters

ParameterTypeRequiredConstraintsDescription
feed_keyIntegerYesAny integerUse a positive value for Mode A; pass -1 for Mode B.

Language Resolution

The language used for service processing is resolved from the requested_user_id kernel user-details lookup. The locale field from the user's profile is used when present; otherwise the session langCode is used as a fallback. There is no client-side language override — language is always derived from the target user's profile.

Kernel infrastructure failures are non-fatal — a warning is logged and the request proceeds with session langCode. Error messages to the client always use session langCode, regardless of the resolved service language.


Response Fields — form_array[*]

FieldTypeDescription
question_idIntegerUnique question identifier
question_textStringQuestion displayed to the user
question_typeStringInput type: RADIO, CHECKBOX, TEXT, NUMBER, DATE, DROPDOWN
mandatoryBooleantrue if the question must be answered before status change
options[]ArrayFor choice-type questions only (RADIO, CHECKBOX, DROPDOWN). Each: option_id (Integer), option_text (String)

Error Scenarios

ScenarioHTTPError CodeMessage
Missing X-reflexis-csrf-token-X header400E112X-reflexis-csrf-token-X header is mandatory
Invalid or expired token401E204Invalid or expired token
btn_status is blank or absent400E127btn_status is mandatory
requested_user_id is blank or absent400E113requested_user_id is mandatory
requested_user_id does not exist in domain400E404No data found
feed_key ≤ 0 and requested_unit_id or cluster_id missing400E129Either feed_key (> 0) or both unit_id and cluster_id must be provided.
Service returned null (feed not found / internal error)200E404No data found
Service returned empty array (no simple survey / complex/form type)200E338No survey data available. Either survey is Complex type, Form type, or no survey is attached.
Unexpected server-side error500E302Internal server error

Error Codes Reference

CodeDescription
E112X-reflexis-csrf-token-X header is mandatory
E113{param} is mandatory
E127btn_status is mandatory
E129Feed identifier mode conflict (Mode B missing required params)
E204Invalid or expired token
E302Internal server error
E338No simple survey available (complex/form type or none attached)
E404No data found

Tags: MyWorkFeeds

Parameters

Path parameters

NameTypeRequiredDescription
feed_keyintegerYesUnique numeric feed identifier

Query parameters

NameTypeRequiredDescription
btn_statusstringYesAction trigger type: C=Completion survey, F=Force-Close survey (mandatory — E127 if missing)
cluster_child_idstringNoCluster child identifier (Mode B optional context)
cluster_idstringNoCluster identifier. Required when feed_key ≤ 0 (Mode B)
include_responsesstringNoWhen true, adds draft_response/draft_attachment per question and draft_meta; does not modify fld_def_value
requested_unit_idstringNoUnit ID of the target user. Required when feed_key ≤ 0 (Mode B)
requested_user_idstringYesUser ID of the target user. Mandatory — E113 if absent, E404 if not found in domain. Used for kernel validation and locale resolution.

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

  • E113 — requested_user_id is mandatory
  • E404 — requested_user_id does not exist in domain
  • E129 — feed_key ≤ 0 and requested_unit_id or cluster_id missing

Content type: application/json

401 — Invalid or expired X-reflexis-csrf-token-X token (HTTP 401)

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

  • E113 — requested_user_id is mandatory
  • E404 — requested_user_id does not exist in domain
  • E129 — feed_key ≤ 0 and requested_unit_id or cluster_id missing

Content type: application/json

Schema

PropertyTypeRequiredDescription
statusstringYesAlways "ER" for error responses
errorCodestringYesApplication-level error code (e.g. E204, E112, E302)
responsestringYesHuman-readable error message
{
  "type": "object",
  "example": {
    "status": "ER",
    "errorCode": "E204",
    "response": "Invalid or expired token"
  },
  "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. E204, E112, E302)"
    },
    "response": {
      "type": "string",
      "description": "Human-readable error message"
    }
  }
}

401 — Invalid or expired X-reflexis-csrf-token-X token (HTTP 401)

Content type: application/json

Schema

PropertyTypeRequiredDescription
statusstringYesAlways "ER" for error responses
errorCodestringYesApplication-level error code (e.g. E204, E112, E302)
responsestringYesHuman-readable error message
{
  "type": "object",
  "example": {
    "status": "ER",
    "errorCode": "E204",
    "response": "Invalid or expired token"
  },
  "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. E204, E112, E302)"
    },
    "response": {
      "type": "string",
      "description": "Human-readable error message"
    }
  }
}

Example:

{
  "status": "ER",
  "errorCode": "E204",
  "response": "Invalid or expired token"
}

500 — Unexpected server-side error

Content type: application/json

Schema

PropertyTypeRequiredDescription
statusstringYesAlways "ER" for error responses
errorCodestringYesApplication-level error code (e.g. E204, E112, E302)
responsestringYesHuman-readable error message
{
  "type": "object",
  "example": {
    "status": "ER",
    "errorCode": "E204",
    "response": "Invalid or expired token"
  },
  "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. E204, E112, E302)"
    },
    "response": {
      "type": "string",
      "description": "Human-readable error message"
    }
  }
}

Example:

{
  "status": "ER",
  "errorCode": "E302",
  "response": "Internal server error"
}