Roles

Returns one custom role.

Requires ManageUsers. Built-in roles have no id; read them from the list. Example: GET /api/v1/roles/4.

get/api/v1/roles/{id}

Request

  • Base URL: https://app.flexonthejob.com
  • URL: https://app.flexonthejob.com/api/v1/roles/{id}
  • Auth: HTTP bearer

Path parameters

idinteger required

Custom role id. Example: 4.

Response

The role.

idinteger nullable

Custom role id (use it as customRoleId / in customRoleIds on the user endpoints); null for a built-in role. Example: 4.

namestring

Role name; for a built-in role this is the value to send as role. Example: "Manager".

descriptionstring

What the role is for. Example: "Manager with inventory and location management access".

isBuiltInboolean

True for OrganizationAdmin / Manager / User, which cannot be edited.

rankinteger

Hierarchy rank: OrganizationAdmin 3, Manager 2, User 1; custom roles 0 (they add permissions, not rank).

permissionsstring[]

Permissions the role grants, as FlexPermissions names. Example: ["ViewInventory", "ManageJobs"].

createdAtstring date-time nullable

UTC creation time (ISO-8601); null for built-in roles.

updatedAtstring date-time nullable

UTC last modification time (ISO-8601); null for built-in roles.

Changes

No recorded changes to this operation across all 1 revision of this API.