List user preferences (optional keys filter)

GET /mywork/v1/user-preferences

Operation id: getUserPreferences

Description

Returns preferences for the authenticated user from MW_USER_PREF.

v1 allowlists TASK_PINS (ordered list of feed keys). Pins are scoped to the user's home unit (org-structure), not the current session unit. Clients must not send domainId / userId / unitId — those come from the session.

Optional keys query (CSV) filters the map (e.g. keys=TASK_PINS).

Pinning capacity is gated by system code PULSE_SETUP / TASK_PIN_COUNT (default 25; 0 disables adds — see pin helpers).

See devdocs/api/nextgen/task-execution/MYWORK_API_CONTRACT_UserPreferences.md.


Error Scenarios

ScenarioHTTPError CodeMessage
Missing X-reflexis-csrf-token-X header400E112X-reflexis-csrf-token-X header is mandatory
Invalid or expired token401E204 / E202Invalid session / token
Home unit id blank400E107Unit id is mandatory
Unable to fetch preference500E359Unable to fetch preference

Error Codes Reference

CodeDescription
E107Home unit id blank
E112X-reflexis-csrf-token-X header is mandatory
E202 / E204Invalid or expired session / token
E359Unable to fetch preference

Tags: MyWorkUserPreferences

Parameters

Query parameters

NameTypeRequiredDescription
keysstringNoOptional CSV of preference keys to return (e.g. TASK_PINS)

Security

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

Responses

200 — Success — map of preferences under user_preferences

Content type: application/json

400 — Invalid or missing request parameter

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 — map of preferences under user_preferences

Content type: application/json

Schema

PropertyTypeRequiredDescription
statusstringYes
user_preferencesobjectYesPreference map; TASK_PINS value is an ordered array of feed key integers
{
  "type": "object",
  "required": [
    "status",
    "user_preferences"
  ],
  "properties": {
    "status": {
      "type": "string",
      "enum": [
        "OK"
      ]
    },
    "user_preferences": {
      "type": "object",
      "description": "Preference map; `TASK_PINS` value is an ordered array of feed key integers"
    }
  }
}

Example:

{
  "status": "OK",
  "user_preferences": {
    "TASK_PINS": [
      101,
      202
    ]
  }
}

400 — Invalid or missing request parameter

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