API docsAPI docs
  • English
  • zh-CN
  • English
  • zh-CN
    • Overview
    • Request & Response
    • Get Auth Token
    • Use Auth Token
    • Api Example
    • Area
    • Department
    • Position
    • Employee
    • Resign
    • Device
    • Transaction
    • Transaction Report

Transaction

List

Request

  • Method: GET
  • Url: /iclock/api/transactions/
  • Headers:
    • Content-Type: application/json
    • Authorization: "JWT ey.........oQi98"
  • Query Parameters
ParameterDescription
pageWhich page is displayed
page_sizeShow the number of data on this page
emp_codeUse this field to query
terminal_snUse this field to query
terminal_aliasUse this field to query
start_timeUse this field to query, example: ?start_time=2022-07-04 10:00:00
end_timeUse this field to query, example: ?end_time=2022-07-04 10:00:00

Response

{
    "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"
        },
        ......
    ]
}

Read

Request

  • Method: GET

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

  • Headers:

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

ParameterDescription
idrequired

Response

- **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"
}

Delete

Request

  • Method: DELETE

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

  • Headers:

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

ParameterDescription
idrequired

Response

None

Export

Request

  • Method: GET
  • Url: /iclock/api/transactions/export/
  • Headers:
    • Content-Type: application/json
    • Authorization: "JWT ey.........oQi98"
  • Query Parameters
ParameterDescription
export_typerequired, csv, txt, xls
pageWhich page need export
page_sizeHow many data need export per page
emp_codeexport this field
terminal_snexport this field
terminal_aliasexport this field
start_timeexport time start of this field
end_timeexport time end of this field

Response

response type: bytes
b'id,em......-06-05 08:48:00\r\n'
Prev
Device
Next
Transaction Report