Save simple survey draft for a feed

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

Operation id: saveFeedSurveyDraft

Tags: MyWorkFeeds

Parameters

Path parameters

NameTypeRequiredDescription
feed_keyintegerYesUnique numeric feed identifier

Security

  • ApiKeyHeader (apiKey)
    • APIGEE API key header validated by VerifyAPIKey policy.
  • 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

PropertyTypeRequiredDescription
survey_typestringNo
responsesstringNoJSON 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_attachmentsstringNoComma-separated question IDs
requested_unit_idstringNo
cluster_idstringNo
cluster_child_idstringNo
{
  "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

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

409 — E339 — survey template changed since draft was created

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

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