Save simple survey draft for a feed
POST /task/v1/feeds/{feed_key}/survey/draft
Operation id: saveFeedSurveyDraft
Tags: MyWorkFeeds
Parameters
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
feed_key | integer | Yes | Unique numeric feed identifier |
Security
- AuthTokenHeader (apiKey)
- Session authentication token validated server-side against the user session store.
Responses
200 — Draft saved — draft_meta returned
Content type: application/json
401 — Invalid or expired X-reflexis-csrf-token-X token (HTTP 401)
Content type: application/json
409 — E339 — survey template changed since draft was created
Content type: application/json
500 — Unexpected server-side error
Content type: application/json
Request body
Required: Yes
multipart/form-data
Schema
| Property | Type | Required | Description |
|---|---|---|---|
survey_type | string | No | |
responses | string | No | JSON string of flat question responses, e.g. {"Q1":"09/04/2026","Q2":"1,2"}. Send as raw text in the multipart part (no URL encoding). Legacy nested {"Q1":{"value":"..."}} is accepted on POST but stored flat. When omitted or blank, existing text answers are kept (file-only or remove_attachments POST). When non-blank (including {}), the text-answer map is fully replaced. |
remove_attachments | string | No | Comma-separated question IDs |
requested_unit_id | string | No | |
cluster_id | string | No | |
cluster_child_id | string | No |
{
"type": "object",
"properties": {
"survey_type": {
"type": "string",
"enum": [
"C",
"F"
],
"default": "C"
},
"responses": {
"type": "string",
"description": "JSON string of flat question responses, e.g. {\"Q1\":\"09/04/2026\",\"Q2\":\"1,2\"}. Send as raw text in the multipart part (no URL encoding). Legacy nested {\"Q1\":{\"value\":\"...\"}} is accepted on POST but stored flat. When omitted or blank, existing text answers are kept (file-only or remove_attachments POST). When non-blank (including {}), the text-answer map is fully replaced.\n"
},
"remove_attachments": {
"type": "string",
"description": "Comma-separated question IDs"
},
"requested_unit_id": {
"type": "string"
},
"cluster_id": {
"type": "string"
},
"cluster_child_id": {
"type": "string"
}
}
}
Response models
200 — Draft saved — draft_meta returned
Content type: application/json
Schema
JSON object (structure varies by endpoint).
{
"type": "object",
"description": "JSON object (structure varies by endpoint)."
}
401 — Invalid or expired X-reflexis-csrf-token-X token (HTTP 401)
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. E204, E112, E302) |
response | string | Yes | Human-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"
}
409 — E339 — survey template changed since draft was created
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. E204, E112, E302) |
response | string | Yes | Human-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"
}
}
}
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. E204, E112, E302) |
response | string | Yes | Human-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"
}