Skip to main content
POST
/
api
/
adm
/
companyUsers
/
setLastLoginDate
Set Last Login Date
curl --request POST \
  --url https://localhost:44371/api/adm/companyUsers/setLastLoginDate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{}'
{
  "success": true,
  "code": 200,
  "errorMessage": null,
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}

Description

Updates the last login date for activity monitoring and compliance tracking. This endpoint is typically called automatically by authentication systems when users successfully log in.

Input

  • Body: model (CompanyUserLastLoginCommandRequest, required) — Login tracking information including:
    • userId (guid, required) — Unique identifier of the company user.
    • lastLoginDate (datetime, required) — Login timestamp in UTC ISO 8601 format.

Output

Returns a CompanyUserLastLoginCommandResponse indicating update success.

Example Request

POST /api/admin/company-users/last-login-set
Content-Type: application/json
Authorization: Bearer {token}

{
  "userId": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
  "lastLoginDate": "2025-10-30T14:30:00Z"
}

Example Response

{
  "success": true,
  "code": 200,
  "errorMessage": null
}

Errors

  • 400 Bad Request — Missing required fields or invalid timestamp format.
  • 404 Not Found — No user exists with the specified ID.

Notes

  • Timestamp must be in UTC ISO 8601 format.
  • Used for compliance reporting and inactive user identification.
  • Typically called automatically by authentication systems.

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Body

application/json

The request containing user ID and login timestamp.

Base structure for command requests that modify data. Represents the payload used to update the last login timestamp for a company user.

userId
string<guid>

The identifier of the user whose login time is being recorded.

companyId
string<guid>

The identifier of the company associated with the login update.

Response

Always returned. Check the success property in the response body to determine if the operation succeeded.

Standard response structure containing operation status and error information. Standard command response indicating the result of a data modification. Create response containing the identifier of the newly created entity. Represents the response returned after updating the last login timestamp for a company user.

success
boolean

True if the operation completed successfully; false if an error occurred.

Example:

true

code
enum<string>

Result code indicating the outcome of the operation.

Available options:
Unknown,
Success,
BadRequest,
Unauthorized,
NotFound,
Error
Example:

200

errorMessage
string | null

Human-readable error message when an error occurs.

Example:

null

id
string<guid>

Unique identifier of the newly created entity.

Example:

"3fa85f64-5717-4562-b3fc-2c963f66afa6"