Skip to content

User Management

The Users API allows creating, updating, listing, bulk-importing, deleting, and clearing user profiles across edge devices.

Endpoints Overview

MethodEndpointDescription
GET/api/usersRetrieve a paginated list of user records
POST/api/usersCreate a new user or update an existing user
GET/api/users/{pin}Retrieve a single user profile by PIN
DELETE/api/users/{pin}Delete a user by PIN and sync with devices
POST/api/users/importBulk import or update multiple users
DELETE/api/users/clearDelete specific or all users from location

List Users

GET /api/users

Retrieve a paginated list of user records assigned to the authenticated location.

Query Parameters

ParameterTypeRequiredDefaultOptions / EnumsDescription
pageIntegerNo1>= 1Page number.
limitIntegerNo151 to 100Number of items per page.
searchStringNonullAny stringSearch by first_name, last_name, or pin.
privilegeIntegerNonull0 (User), 2 (Enroller), 6 (Manager), 14 (Super Admin)Filter by user privilege level.
is_activeBooleanNonulltrue, falseFilter by active status.
includeStringNonullbiometricsPass "biometrics" to include enrolled biometric templates.

Response Attributes

Pagination Response Wrap

AttributeTypeDescription
dataArray[UserResponse]Array of user records.
totalIntegerTotal count of filtered users.
pageIntegerCurrent page index.
limitIntegerLimit per page.
total_pagesIntegerCalculated total page count.
has_nextBooleanNext page availability.
has_prevBooleanPrevious page availability.

UserResponse Attributes

AttributeTypeOptions / EnumsDescription
idIntegerNoneUnique internal user database ID.
location_idIntegerNoneLocation ID.
locationLocationBasic | NullNoneBasic location summary object (id, name).
pinInteger1 to 99999999User PIN / Badge ID.
first_nameString | NullNoneUser first name.
last_nameString | NullNoneUser last name.
card_noString | NullNoneRFID / Proximity card number string.
passwordInteger | NullNumericDevice keypad verification password.
is_activeBooleantrue, falseActive status flag.
start_timeString (ISO 8601) | NullDatetime / DateAccess validity start date/time.
end_timeString (ISO 8601) | NullDatetime / DateAccess validity expiration date/time.
privilegeInteger0 (User), 2 (Enroller), 6 (Manager), 14 (Super Admin)Device privilege level.
groupInteger0 to 99Access control group.
super_authorizeInteger0, 1Super authorize permissions flag.
has_biometricBooleantrue, falseIndicates whether enrolled fingerprint or face templates exist.
biometric_templatesArray[BiometricTemplateResponse] | NullNoneDetailed template list (included if include=biometrics).
created_atString (ISO 8601)NoneTimestamp when created.
updated_atString (ISO 8601) | NullNoneTimestamp when last updated.

Response Example

json
{
  "data": [
    {
      "id": 84,
      "location_id": 1,
      "location": {
        "id": 1,
        "name": "Headquarters Office"
      },
      "pin": 10042,
      "first_name": "John",
      "last_name": "Doe",
      "card_no": "0001234567",
      "password": 1234,
      "is_active": true,
      "start_time": null,
      "end_time": null,
      "privilege": 0,
      "group": 0,
      "super_authorize": 0,
      "has_biometric": true,
      "biometric_templates": null,
      "created_at": "2026-03-01T10:00:00Z",
      "updated_at": "2026-08-26T12:00:00Z"
    }
  ],
  "total": 1,
  "page": 1,
  "limit": 15,
  "total_pages": 1,
  "has_next": false,
  "has_prev": false
}

Create or Update User

POST /api/users

Create a new user or update an existing user identified by PIN. Automatically generates device sync commands.

Request Body Parameters (TenantUserCreate)

ParameterTypeRequiredDefaultOptions / EnumsDescription
pinIntegerYesNone1 to 99999999User PIN / Badge number.
first_nameStringRequired for NEW usersnullAny textUser first name.
last_nameStringNonullAny textUser last name.
card_noStringNonullAny textProximity card number.
passwordIntegerNonullNumericKeypad password.
is_activeBooleanNotruetrue, falseActive status.
start_timeStringNonullYYYY-MM-DD or ISO DatetimeAccess start date.
end_timeStringNonullYYYY-MM-DD or ISO DatetimeAccess expiration date.
privilegeIntegerNo00 (User), 2 (Enroller), 6 (Manager), 14 (Super Admin)Device privilege level.
groupIntegerNo00 to 99Access control group.
super_authorizeIntegerNo00, 1Super authorization flag.

Response Attributes

Returns the created/updated UserResponse object.


Response Example

json
{
  "pin": 10042,
  "first_name": "John",
  "last_name": "Doe",
  "card_no": "0001234567",
  "password": 1234,
  "privilege": 0,
  "is_active": true
}
json
{
  "id": 84,
  "location_id": 1,
  "location": {
    "id": 1,
    "name": "Headquarters Office"
  },
  "pin": 10042,
  "first_name": "John",
  "last_name": "Doe",
  "card_no": "0001234567",
  "password": 1234,
  "is_active": true,
  "start_time": null,
  "end_time": null,
  "privilege": 0,
  "group": 0,
  "super_authorize": 0,
  "has_biometric": false,
  "biometric_templates": null,
  "created_at": "2026-08-26T17:51:00Z",
  "updated_at": null
}

Get User Details

GET /api/users/{pin}

Retrieve single user profile by PIN.

Path Parameters

ParameterTypeRequiredDescription
pinIntegerYesUser PIN number.

Query Parameters

ParameterTypeRequiredDefaultOptionsDescription
includeStringNonullbiometricsInclude enrolled biometric templates.

Response Attributes

Returns UserResponse object.


Response Example

json
{
  "id": 84,
  "location_id": 1,
  "pin": 10042,
  "first_name": "John",
  "last_name": "Doe",
  "card_no": "0001234567",
  "password": 1234,
  "is_active": true,
  "start_time": null,
  "end_time": null,
  "privilege": 0,
  "group": 0,
  "super_authorize": 0,
  "has_biometric": true,
  "created_at": "2026-08-26T17:51:00Z",
  "updated_at": null,
  "biometric_templates": [
    {
      "id": 102,
      "user_pin": 10042,
      "bio_type": "fingerprint",
      "finger_id": 1,
      "valid": 1,
      "created_at": "2026-08-26T17:52:00Z"
    }
  ]
}

Delete User

DELETE /api/users/{pin}

Delete user by PIN and dispatch delete user commands to connected devices.

Path Parameters

ParameterTypeRequiredDescription
pinIntegerYesUser PIN number to delete.

Response Example

json
{}

Bulk Import Users

POST /api/users/import

Import or update multiple users in a single request with batched device synchronization.

Request Body Parameters

Array of user objects (List[dict]).

ParameterTypeRequiredDefaultDescription
pinInteger | StringYesNoneUser PIN number.
first_nameStringYes (for new users)NoneUser first name.
last_nameStringNonullUser last name.
card_noStringNonullCard number.
passwordIntegerNonullKeypad password.
is_activeBooleanNotrueActive status.
privilegeIntegerNo0Privilege level (0, 2, 6, 14).

Response Attributes

AttributeTypeDescription
messageStringSummary message string.
processed_countIntegerTotal number of successfully processed users.
error_countIntegerTotal number of errors encountered.
processed_usersArray[UserResponse]Array of processed UserResponse objects.
errorsArray[Object]Array of error objects containing user_data and error details.

Response Example

json
[
  {
    "pin": 10042,
    "first_name": "John",
    "last_name": "Doe",
    "card_no": "0001234567",
    "password": 1234,
    "privilege": 0
  },
  {
    "pin": 10043,
    "first_name": "Jane",
    "last_name": "Smith",
    "privilege": 0
  }
]
json
{
  "message": "Bulk import completed. 2 users processed, 0 errors.",
  "processed_count": 2,
  "error_count": 0,
  "processed_users": [
    {
      "id": 84,
      "location_id": 1,
      "pin": 10042,
      "first_name": "John",
      "last_name": "Doe",
      "is_active": true,
      "privilege": 0
    },
    {
      "id": 85,
      "location_id": 1,
      "pin": 10043,
      "first_name": "Jane",
      "last_name": "Smith",
      "is_active": true,
      "privilege": 0
    }
  ],
  "errors": []
}

Clear Users

DELETE /api/users/clear

Delete specific users (by array of PINs) or ALL users from location and create delete device commands.

Request Body Parameters (UserClearRequest)

ParameterTypeRequiredDefaultDescription
pinsArray[Integer] | NullNonullArray of user PIN numbers to clear. If omitted or null, ALL users in location are cleared.

Response Attributes

AttributeTypeDescription
messageStringExecution outcome message.
users_deletedIntegerNumber of users soft-deleted/deactivated.
devices_affectedIntegerNumber of edge devices targeted for command push.
commands_createdIntegerNumber of device delete commands created.

Response Example

json
{
  "pins": [10042, 10043]
}
json
{
  "message": "Cleared 2 users and created 6 delete commands for 3 devices",
  "users_deleted": 2,
  "devices_affected": 3,
  "commands_created": 6
}

Enterprise Biometric Gateway Infrastructure