Web Analytics

API Name:

rfid_devices/auto_attendance

Register a RFID scan with iFlow. The auto attendance api will try to determin if the scan is a "check in" or "check out" automatically based on the settings from iFlow. Since this is the api that we use for all of our devices, we use the access_token parameter as the device serial and we recommend that you register a big random number as the device serial in iFlow. See here how to register a new rfid device in iFlow. Basically this api will behave as a new RFID device in iFlow.

Quick info:

Full url: https://app.iflow.ro/api/rfid_devices/auto_attendance

Method: GET or POST

Parameters:

access_token

The access token is used to identify a rfid device in iFlow. Generate a random number and register it in iFlow (settings -> rfid devices)

rfid_tag

The rfid code of the user. This should match the rfid code from the user profile in iFlow.

Success reply:

{
    "api_reply": {
        "scan_msg": "",
        "user": {
            "ID": "22221",
            "is_enabled": true,
            "company_id": "13213131",
            "team_id": "3622317",
            "full_name": "Max John",
            "uid": "bs5ae1d06d1a22222fd",
            "avatar_ext": "jpg",
            "email": "[email protected]",
            "updated": "2022-09-02 07:26:54",
            "timezone": "",
            "check_in_reset_limit": 46800,
            "user_type": "admin",
            "projects_add_permission": "0",
            "projects_edit_permission": "0",
            "projects_delete_permission": "0",
            "projects_disable_permission": "0",
            "company_check_in_reset_limit": "46800",
            "default_timezone": "Europe/Bucharest",
            "date_format": "dmy",
            "use_locked_months": "1",
            "use_projects": "1",
            "time_between_check_ins": "60",
            "group_id": null,
            "agent_id": "538",
            "location_id": "1",
            "avatar_url": "uploads/b/s/bs5ae1d06d1a2fd_150x150.jpg?v=20220902072654"
        },
        "event": [
            {
                "ID": "2643859",
                "company_id": "1",
                "user_id": "1",
                "date": "2022-09-02",
                "start_time": "26816",
                "uid_photo_start": "",
                "end_time": null,
                "uid_photo_end": null,
                "terminal_type": "rfid",
                "rfid_agent_id": "538",
                "ip_public": null,
                "gps_status": null,
                "gps_longitude": null,
                "gps_latitude": null,
                "added_by_user_id": "1",
                "added_date_time": "2022-09-02 07:26:56",
                "closed_terminal_type": null,
                "closed_rfid_agent_id": null,
                "closed_ip_public": null,
                "closed_gps_status": null,
                "closed_gps_longitude": null,
                "closed_gps_latitude": null,
                "closed_by_user_id": null,
                "closed_date_time": null,
                "closed_location_id": "1",
                "closed_is_mobile_device": "0",
                "location_id": "1",
                "project_id": null,
                "is_mobile_device": "0",
                "event_type": "check_in",
                "team_id": "367"
            }
        ]
    },
    "td_iflow_version": "5.0"
}

Error reply:

{
  "api_reply": {
    "error": [
      {
        "field_name": "access_token",
        "check_name": "required",
        "message": "access_token is required"
      },
      {
        "field_name": "rfid_tag",
        "check_name": "required",
        "message": "rfid_tag is required"
      }
    ]
  },
  "td_iflow_version": "5.0"
}
{
    "api_reply": {
        "error": [
            {
                "field_name": "time_between_check_ins",
                "check_name": "",
                "message": "You have to wait for 00:04:28 until your next check in"
            }
        ]
    },
    "td_iflow_version": "5.0"
}