API docsAPI docs
  • English
  • zh-CN
  • English
  • zh-CN
    • 概述
    • 请求 & 响应
    • 获取Auth Token
    • 使用 Auth Token
    • Api Example
    • 区域API
    • 部门API
    • 职位API
    • 人员API
    • 离职API
    • 设备API
    • 考勤记录API
    • 考勤报表API

考勤记录API

列表

请求

  • Method: GET
  • Url: /iclock/api/transactions/
  • Headers:
    • Content-Type: application/json
    • Authorization: "JWT ey.........oQi98"
  • Query Parameters
参数描述
page显示第几页
page_size显示该页数据的条数
emp_code使用该字段进行查询
terminal_sn使用该字段进行查询
terminal_alias使用该字段进行查询
start_time使用该字段进行查询,示例:?start_time=2022-07-04 10:00:00
end_time使用该字段进行查询,示例:?end_time=2022-07-05 10:00:00

响应

{
    "count": 6,
    "next": null,
    "previous": null,
    "msg": "",
    "code": 0,
    "data": [
        {
            "id": 1,
            "emp_code": "11111111122",
            "first_name": "",
            "last_name": "",
            "department": "Department",
            "position": "Position",
            "punch_time": "2020-06-05 00:00:00",
            "punch_state": "0",
            "punch_state_display": "Check In",
            "verify_type": 0,
            "verify_type_display": "Password",
            "work_code": "",
            "gps_location": "",
            "area_alias": null,
            "terminal_sn": "",
            "temperature": 0.0,
            "terminal_alias": null,
            "upload_time": "2020-06-05 08:47:59"
        },
        ......
    ]
}

读取

请求

  • Method: GET

  • Url: /iclock/api/transactions/{id}/

  • Headers:

    • Content-Type: application/json
    • Authorization: "JWT ey.........oQi98"
  • Path Parameters

参数描述
id必填

响应

- **Url:** /iclock/api/transactions/1/
{
    "id": 1,
    "emp_code": "11111111122",
    "first_name": "",
    "last_name": "",
    "department": "Department",
    "position": "Position",
    "punch_time": "2020-06-05 00:00:00",
    "punch_state": "0",
    "punch_state_display": "Check In",
    "verify_type": 0,
    "verify_type_display": "Password",
    "work_code": "",
    "gps_location": "",
    "area_alias": null,
    "terminal_sn": "",
    "temperature": 0.0,
    "terminal_alias": null,
    "upload_time": "2020-06-05 08:47:59"
}

删除

请求

  • Method: DELETE

  • Url: /iclock/api/transactions/{id}/

  • Headers:

    • Content-Type: application/json
    • Authorization: "JWT ey.........oQi98"
  • Path Parameters

参数描述
id必填

响应

None

导出

请求

  • Method: GET
  • Url: /iclock/api/transactions/export/
  • Headers:
    • Content-Type: application/json
    • Authorization: "JWT ey.........oQi98"
  • Query Parameters
参数描述
export_type必填, csv, txt, xls
page导出哪一页
page_size导出每页的数据
emp_code导出的人员编号
terminal_sn导出的设备序列号
terminal_alias导出的设备名
start_time导出的起始时间
end_time导出的结束时间

响应

response type: bytes
b'id,em......-06-05 08:48:00\r\n'
Prev
设备API
Next
考勤报表API