Skip to content

Accounts

The Accounts API provides core accounts management operations.

Profile Information

Endpoint: GET /api/core/account/profile/{username?}?pscope={pscope?}
Description: Returns the profile of the specified user. When username is omitted, the caller’s own profile is returned. Inspecting another user requires the sys_administrator role.

HTTP
curl {{host}}/api/core/account/profile \
    -H "Authorization: Token {{token}}" \
Response
Text Only
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
```json
{
  "success": true,
  "message": "",
  "requestID": "",
  "executed_at": "2050-01-01T00:00:00.123456Z",
  "data": {
    "instance": {
      "kv.v.api.version": "0000",
      "kv.v.api.url": "http://app.platformaerp.com",
      "kv.v.owner.name": "paanda"
    },
    "user": {
      "username": "[email protected]",
      "emailconfirmed": false,
      "phonenumber": "123231435311",
      "team_id": "84a43f6b-7e3c-b7cd-a68b-48da22024540",
      "team_name": "edokumenty-90-zarzad",
      "user_app_name": "erp",
      "user_first_name": "test",
      "user_last_name": "test1",
      "user_home": null,
      "user_color": "#FD9BBF",
      "user_short": "TT",
      "user_currency": "EUR",
      "user_properties": {
        "root": {
          "test": "value",
          "test2": "value"
        }
      }
    },
    "teams": [
      {
        "team_id": "75d2c7f1-5e35-c366-b686-48da3c3cb2f0",
        "team_short": "90Z",
        "team_name": "edokumenty-90-ZARZAD-1",
        "teamuser_lvl": null,
        "team_type": "internal"
      },
      {
        "team_id": "d58de8a6-4173-e311-b9e9-001a64689f03",
        "team_short": "COM",
        "team_name": "Common",
        "teamuser_lvl": null,
        "team_type": "internal"
      }
    ],
    "apps": [
      "app-client",
      "cenniki"
    ],
    "roles": [
      "app_administrator",
      "app_app-client"
    ]
  }
}
```

Response overview:

You can use pscope query parameter to access specific parts of the profile data:

  • pscope=user — Primary user object only.
  • pscope=teams,roles,apps all the data

Datasets:

  • data.instance — Basic instance metadata (tenant, region, hosting info).
  • data.user — Primary user object (username, email confirmation, team, preferred colors, initials, etc.).
  • data.teams[] — Teams the user belongs to.
  • data.roles[] — Roles assigned to the user.
  • data.apps[] — Applications the user can access.

Update Account Profile

Updates selected profile fields. You can update your own profile; modifying another user requires sys_administrator.

Endpoint: POST /api/core/account/profile-update

HTTP
1
2
3
curl -X POST {{host}}/api/core/account/profile-update \
    -H "Authorization: Token {{token}}" \
    -d '{"phonenumber": "+48603999111", "user_color": "#FFAA00"}'

Supported body properties:

  • phonenumber
  • team_id
  • user_currency
  • user_first_name
  • user_last_name
  • user_color (HEX value)
  • user_short
  • user_properties (JSON object for custom properties)

Account Directory

Endpoint: GET /api/core/account/browse
Requires: sys_administrator

HTTP
curl {{host}}/api/core/account/browse \
    -H "Authorization: Token {{token}}" \
Response
Text Only
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
```json
{
  "success": true,
  "message": "Account List",
  "requestID": "",
  "executed_at": "2050-01-01T00:00:00.123456Z",
  "data": {
    "items": [
      {
        "id": "A83D6E10-03C0-4687-BB3F-7AF9DE04427D",
        "username": "[email protected]",
        "phonenumber": "123231435311",
        "emailconfirmed": false,
        "lockoutenabled": true,
        "islocked": false,
        "isactive": true,
        "lockoutend": "2024-08-04T21:12:12.713039+00:00",
        "lockoutending": "2024-08-04T21:12:12.713039Z",
        "lastActivity": "2050-01-01T00:00:00.123",
        "team_id": "84a43f6b-7e3c-b7cd-a68b-48da22024540",
        "team_name": "edokumenty-90-zarzad",
        "user_currency": "EUR",
        "user_home": null,
        "user_app_name": "erp",
        "teams": 6,
        "roles": 65,
        "user_first_name": "test",
        "user_last_name": "test1",
        "user_color": "#FD9BBF",
        "user_avatar": null,
        "user_short": "TT"
      },
      {
        "id": "ff9f04dc-a7db-4948-9475-9a848e764f01",
        "username": "[email protected]",
        "phonenumber": "+48603099113",
        "emailconfirmed": false,
        "lockoutenabled": true,
        "islocked": false,
        "isactive": true,
        "lockoutend": null,
        "lockoutending": null,
        "lastActivity": "2050-01-01T00:00:00.123",
        "team_id": "d58de8a6-4173-e311-b9e9-001a64689f03",
        "team_name": "Common",
        "user_currency": "pln",
        "user_home": null,
        "user_app_name": "erp",
        "teams": 5,
        "roles": 69,
        "user_first_name": "TEst",
        "user_last_name": "test1",
        "user_color": "#B2E79D",
        "user_avatar": null,
        "user_short": "TT"
      }
    ],
    "stats": {
      "count": 19,
      "locked": 0,
      "last_week": 3,
      "today": 2
    }
  }
}
```

Copy Accounts Roles and Teams

Duplicates the roles and teams from one user to another.

Endpoint: POST /api/core/account/copy/{source_username}/{target_username}
Requires: sys_administrator

HTTP
curl -X POST {{host}}/api/core/account/copy/{{source_username}}/{{target_username}} \
    -H "Authorization: Token {{token}}"

Lock or Unlock an Account

Locking prevents authentication; unlocking restores access.

Requires: sys_administrator

Lock account

HTTP
curl -X POST {{host}}/api/core/account/lock/{{username}} \
    -H "Authorization: Token {{token}}"

Unlock account

HTTP
curl -X POST {{host}}/api/core/account/unlock/{{username}} \
    -H "Authorization: Token {{token}}"

Cancel an Account

Cancels (deactivates) the specified user and triggers corresponding business events.

Endpoint: POST /api/core/account/cancel/{username}
Requires: sys_administrator

HTTP
curl -X POST {{host}}/api/core/account/cancel/{{username}} \
    -H "Authorization: Token {{token}}"

Business object hook:

  • [app].[user_cancel] — Invoked automatically so that you can attach custom cleanup logic.

Set Application Context

Overrides the default application context for the user . Endpoint: POST /api/core/account/context/{app_name}/{username?}

HTTP
curl -X POST {{host}}/api/core/account/context/{{app_name}}/{{username}} \
    -H "Authorization: Token {{token}}"
  • username is optional; when omitted the current user context is updated.

Use these endpoints together to onboard, manage, or suspend users programmatically, keeping audit trails inside the platform.