User details from token

GET /v1/user-details

Operation id: v1UserDetails

Description

Domain header note: if x-reflexis-domain-x is provided it must match the token's domain, otherwise 401. This is stricter than other /v1 endpoints which allow cross-domain queries.

Tags: Kernel NextGen APIs

Parameters

Query parameters

NameTypeRequiredDescription
auth_tokenstringNo

Header parameters

NameTypeRequiredDescription
x-reflexis-auth-token-xstringNoAuthentication token (or use auth_token query param)
x-reflexis-domain-xstringNoDomain id string; optional — defaults to token domain

Responses

200 — OK — envelope object: user_details; data includes the authenticated user's detail fields plus currentUnit: a full organization unit object for the user's current unit (all fields as stored in the system), or null if not resolved or empty. This is not a fixed minimal unit shape.

Content type: application/json

401 — Authentication failed. The request is missing a token, the token is invalid, or the token has expired.

Content type: application/json

500 — An unexpected error occurred while processing the request.

Content type: application/json

Response models

200 — OK — envelope object: user_details; data includes the authenticated user's detail fields plus currentUnit: a full organization unit object for the user's current unit (all fields as stored in the system), or null if not resolved or empty. This is not a fixed minimal unit shape.

Content type: application/json

Schema

Single-resource envelope — object, url, data, fetched_at

PropertyTypeRequiredDescription
objectstringNo
urlstringNo
dataobjectNoPayload from kernel services (additionalProperties vary)
fetched_atstring (date-time)No
{
  "type": "object",
  "description": "Single-resource envelope — `object`, `url`, `data`, `fetched_at`",
  "properties": {
    "object": {
      "type": "string"
    },
    "url": {
      "type": "string"
    },
    "data": {
      "type": "object",
      "description": "Payload from kernel services (additionalProperties vary)"
    },
    "fetched_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}

401 — Authentication failed. The request is missing a token, the token is invalid, or the token has expired.

Content type: application/json

Schema

Structured error envelope returned by external gateway endpoints (/v1/api/*). Wraps a single error object with type, code, human-readable message, the offending param (when applicable), and an optional documentation URL.

PropertyTypeRequiredDescription
errorobjectNo
{
  "type": "object",
  "description": "Structured error envelope returned by external gateway endpoints (`/v1/api/*`).\nWraps a single `error` object with `type`, `code`, human-readable `message`, the offending\n`param` (when applicable), and an optional documentation URL.\n",
  "properties": {
    "error": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "description": "High-level error category (for example `unauthorized`, `invalid_parameter`, `validation_error`).",
          "example": "invalid_parameter"
        },
        "code": {
          "type": "string",
          "description": "Machine-readable error code; clients should branch on this rather than `message`.",
          "example": "invalid_parameter"
        },
        "message": {
          "type": "string",
          "description": "Human-readable description of the error.",
          "example": "One or more request parameters are invalid."
        },
        "param": {
          "type": "string",
          "description": "Name of the request parameter or field that caused the error, when applicable.",
          "example": "page_number",
          "nullable": true
        },
        "doc_url": {
          "type": "string",
          "description": "Optional URL to documentation describing the error.",
          "example": "https://{APP_URL}/kernel/errors/invalid_parameter",
          "nullable": true
        }
      }
    }
  }
}

500 — An unexpected error occurred while processing the request.

Content type: application/json

Schema

Structured error envelope returned by external gateway endpoints (/v1/api/*). Wraps a single error object with type, code, human-readable message, the offending param (when applicable), and an optional documentation URL.

PropertyTypeRequiredDescription
errorobjectNo
{
  "type": "object",
  "description": "Structured error envelope returned by external gateway endpoints (`/v1/api/*`).\nWraps a single `error` object with `type`, `code`, human-readable `message`, the offending\n`param` (when applicable), and an optional documentation URL.\n",
  "properties": {
    "error": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "description": "High-level error category (for example `unauthorized`, `invalid_parameter`, `validation_error`).",
          "example": "invalid_parameter"
        },
        "code": {
          "type": "string",
          "description": "Machine-readable error code; clients should branch on this rather than `message`.",
          "example": "invalid_parameter"
        },
        "message": {
          "type": "string",
          "description": "Human-readable description of the error.",
          "example": "One or more request parameters are invalid."
        },
        "param": {
          "type": "string",
          "description": "Name of the request parameter or field that caused the error, when applicable.",
          "example": "page_number",
          "nullable": true
        },
        "doc_url": {
          "type": "string",
          "description": "Optional URL to documentation describing the error.",
          "example": "https://{APP_URL}/kernel/errors/invalid_parameter",
          "nullable": true
        }
      }
    }
  }
}