Employees
Employee information. Important fields here are first name and last name for display on the device. The 'pin' is the number with which they will appear on the device, and the 'code' is the password to validate their identity. This contains all information for the employee or user who will use the device for access control (acc) or attendance tracking (att).
Endpointsβ
List all employeesβ
GET
/public/v2/employees
Responsesβ
- 200: OK
Create employeeβ
POST
/public/v2/employees
Request Body (application/json)β
{
"employee": {
"id": 0,
"name": "string",
"lastname": "string",
"email": "string",
"pin": "string",
"code": "string",
"company_id": 0
}
}
Fields:
- employee (object)
Responsesβ
- 201: Created
Show employeeβ
GET
/public/v2/employees/{id}
Parametersβ
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | string | Yes |
Responsesβ
- 200: OK
Update employeeβ
PUT
/public/v2/employees/{id}
Parametersβ
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | string | Yes |
Request Body (application/json)β
{
"employee": {
"id": 0,
"name": "string",
"lastname": "string",
"email": "string",
"pin": "string",
"code": "string",
"company_id": 0
}
}
Fields:
- employee (object)
Responsesβ
- 200: OK