Submit survey answers and change feed status

POST /task/v1/feeds/{feed_key}/survey

Operation id: submitFeedSurvey

Description

Submits survey answers and atomically changes the feed status to feed_status. Survey answer fields (e.g. q_1001, q_1002) are passed transparently to the service. File attachments are supported via multipart.

Feed identification modes same as GET survey (Mode A: positive feed_key; Mode B: feed_key=-1).

Response variants:

  • Success → {status: OK, message: "Survey submitted successfully."}
  • Validation failure (answer-level) → HTTP 200 with {status: ER, response: "...", error_list: {q_xxx: "..."}}
  • Server error → HTTP 500

Language resolution same as GET survey endpoint.

Tags: MyWorkFeeds

Parameters

Path parameters

NameTypeRequiredDescription
feed_keyintegerYesUnique numeric feed identifier

Security

  • AuthTokenHeader (apiKey)
    • Session authentication token validated server-side against the user session store.

Responses

200 — Success → {status: OK, message: "Survey submitted successfully."}.

Validation error → {status: ER, response: "...", error_list: {field: message}}.

Content type: application/json

400 — - E128 — feed_status is mandatory

  • E113 — requested_user_id is mandatory (Mode B only: feed_key ≤ 0)
  • E129 — feed_key ≤ 0 and requested_unit_id or cluster_id missing
  • E600 — file blocked by the kernel security filter (unsafe/unsupported content)
  • E601 — request rejected by the kernel security filter (generic)

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

Request body

Required: Yes

multipart/form-data

Schema

PropertyTypeRequiredDescription
feed_statusstringYesTarget feed status: C=Complete, F=Force-Close (mandatory — E128 if missing)
requested_user_idstringNoUser ID of the store user on whose behalf the survey is submitted. Used as userId in service call; also resolves locale, userName, timeZoneLong, and unitOrgLevel. - Mode A (feed_key > 0): optional — auto-resolved from the feed record when omitted. - Mode B (feed_key ≤ 0): mandatory — E105 if missing.
cluster_idstringNoCluster identifier. Required when feed_key ≤ 0 (Mode B)
cluster_child_idstringNoCluster child identifier for Mode B
requested_unit_idstringNoUnit ID of target user. Required when feed_key ≤ 0 (Mode B)
{
  "type": "object",
  "required": [
    "feed_status"
  ],
  "properties": {
    "feed_status": {
      "type": "string",
      "description": "Target feed status: C=Complete, F=Force-Close (mandatory — E128 if missing)",
      "enum": [
        "C",
        "F"
      ]
    },
    "requested_user_id": {
      "type": "string",
      "description": "User ID of the store user on whose behalf the survey is submitted.\nUsed as `userId` in service call; also resolves locale, `userName`, `timeZoneLong`, and `unitOrgLevel`.\n\n- **Mode A** (`feed_key > 0`): optional — auto-resolved from the feed record when omitted.\n- **Mode B** (`feed_key ≤ 0`): mandatory — E105 if missing.\n"
    },
    "cluster_id": {
      "type": "string",
      "description": "Cluster identifier. **Required when feed_key ≤ 0** (Mode B)"
    },
    "cluster_child_id": {
      "type": "string",
      "description": "Cluster child identifier for Mode B"
    },
    "requested_unit_id": {
      "type": "string",
      "description": "Unit ID of target user. **Required when feed_key ≤ 0** (Mode B)"
    }
  }
}

Response models

200 — Success → {status: OK, message: "Survey submitted successfully."}.

Validation error → {status: ER, response: "...", error_list: {field: message}}.

Content type: application/json

Schema

JSON object (structure varies by endpoint).

{
  "type": "object",
  "description": "JSON object (structure varies by endpoint)."
}

400 — - E128 — feed_status is mandatory

  • E113 — requested_user_id is mandatory (Mode B only: feed_key ≤ 0)
  • E129 — feed_key ≤ 0 and requested_unit_id or cluster_id missing
  • E600 — file blocked by the kernel security filter (unsafe/unsupported content)
  • E601 — request rejected by the kernel security filter (generic)

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"
}