{"id":4771,"date":"2026-10-12T17:44:46","date_gmt":"2026-10-12T14:44:46","guid":{"rendered":"https:\/\/modulus.help\/kb\/?post_type=docs&#038;p=4771"},"modified":"2026-10-12T17:51:42","modified_gmt":"2026-10-12T14:51:42","slug":"api-list-attendance-logs","status":"publish","type":"docs","link":"https:\/\/modulus.help\/kb\/docs\/documentation\/personnel-apis-v1\/api-list-attendance-logs\/","title":{"rendered":"API: List Attendance Logs"},"content":{"rendered":"<p>The purpose of this API is to retrieve employee attendance logs within a specified date range, with an optional employee filter. Results are ordered by log_date_time ascending.<\/p>\n<h4>Request<\/h4>\n<table style=\"width: auto;\">\n<thead>\n<tr>\n<th style=\"text-align: left;\">Property<\/th>\n<th style=\"text-align: left;\">Value<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>API Name<\/td>\n<td>AttendanceLog<\/td>\n<\/tr>\n<tr>\n<td>URL<\/td>\n<td>https:\/\/your_account.modulus.biz\/api\/hr\/v1\/AttendanceLog<\/td>\n<\/tr>\n<tr>\n<td>Method<\/td>\n<td>GET<\/td>\n<\/tr>\n<tr>\n<td>Source<\/td>\n<td>Third Party Server<\/td>\n<\/tr>\n<tr>\n<td>Recipient<\/td>\n<td>modulus\u00ae Server<\/td>\n<\/tr>\n<tr>\n<td>Accept<\/td>\n<td>application\/json<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>Request Headers<\/h4>\n<table style=\"width: auto;\">\n<thead>\n<tr>\n<th style=\"text-align: left;\">Header<\/th>\n<th style=\"text-align: left;\">Required<\/th>\n<th style=\"text-align: left;\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Authorization<\/td>\n<td>Yes<\/td>\n<td>Bearer token for authentication. Format: Bearer &lt;token&gt;<\/td>\n<\/tr>\n<tr>\n<td>Accept<\/td>\n<td>Yes<\/td>\n<td>application\/json<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>Query String Parameters<\/h4>\n<table style=\"width: auto;\">\n<thead>\n<tr>\n<th style=\"text-align: left;\">Parameter<\/th>\n<th style=\"text-align: left;\">Required<\/th>\n<th style=\"text-align: left;\">Type<\/th>\n<th style=\"text-align: left;\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>employee_code<\/td>\n<td>No<\/td>\n<td>String<\/td>\n<td>Filter by employee code. If omitted, logs for all employees are returned.<\/td>\n<\/tr>\n<tr>\n<td>date_from<\/td>\n<td>Yes<\/td>\n<td>Date<\/td>\n<td>Start date in YYYY-MM-DD format (inclusive).<\/td>\n<\/tr>\n<tr>\n<td>date_to<\/td>\n<td>Yes<\/td>\n<td>Date<\/td>\n<td>End date in YYYY-MM-DD format (inclusive). May equal date_from.<\/td>\n<\/tr>\n<tr>\n<td>page_number<\/td>\n<td>No<\/td>\n<td>Integer<\/td>\n<td>Page number. Default = 1.<\/td>\n<\/tr>\n<tr>\n<td>page_size<\/td>\n<td>No<\/td>\n<td>Integer<\/td>\n<td>Number of records per page. Default = 50.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>Responses<\/h4>\n<table style=\"width: auto;\">\n<thead>\n<tr>\n<th style=\"text-align: left;\">HTTP Status<\/th>\n<th style=\"text-align: left;\">result<\/th>\n<th style=\"text-align: left;\">title<\/th>\n<th style=\"text-align: left;\">message<\/th>\n<th style=\"text-align: left;\">object<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>200 OK<\/td>\n<td>true<\/td>\n<td>Success<\/td>\n<td>Attendance logs listed successfully.<\/td>\n<td>meta_data and data<\/td>\n<\/tr>\n<tr>\n<td>200 OK<\/td>\n<td>true<\/td>\n<td>Success<\/td>\n<td>No attendance logs found matching your conditions.<\/td>\n<td>meta_data and empty data array<\/td>\n<\/tr>\n<tr>\n<td>400 Bad Request<\/td>\n<td>false<\/td>\n<td>Invalid Request<\/td>\n<td>date_to is required.<br \/>\ndate_from is required.<\/td>\n<td>null<\/td>\n<\/tr>\n<tr>\n<td>400 Bad Request<\/td>\n<td>false<\/td>\n<td>Invalid Request<\/td>\n<td>date_from must be earlier than or equal to date_to.<\/td>\n<td>null<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>Example 1 &#8211; All Employees<\/h4>\n<table style=\"font-size: 14px;\">\n<tbody>\n<tr>\n<td style=\"font-weight: bold;\">Request<\/td>\n<td style=\"border: 1px solid #ddd; padding: 8px; width: 80%;\">\n<pre>curl --request GET 'https:\/\/your_account.modulus.biz\/api\/hr\/v1\/AttendanceLog?date_from=2026-09-01&amp;date_to=2026-09-30&amp;page_number=1&amp;page_size=50' \\\n--header 'Accept: application\/json' \\\n--header 'Authorization: Bearer &lt;token&gt;'<\/pre>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"font-weight: bold;\">200 OK<\/td>\n<td style=\"border: 1px solid #ddd; padding: 8px; width: 80%;\">\n<pre>{\n  \"result\": true,\n  \"title\": \"Success\",\n  \"message\": \"Attendance logs listed successfully.\",\n  \"object\": {\n    \"meta_data\": {\n      \"page_count\": 3,\n      \"page_number\": 1,\n      \"page_size\": 50,\n      \"record_count\": 127\n    },\n    \"data\": [\n      {\n        \"employee_code\": \"0001\",\n        \"log_date_time\": \"2026-09-15 08:57\",\n        \"collected_on\": \"2026-09-15 08:57:33\",\n        \"source\": \"GPS\",\n        \"status\": \"PROCESSED\",\n        \"direction\": \"IN\",\n        \"device\": null,\n        \"location\": {\n          \"id\": 3,\n          \"name\": \"Cairo HQ\"\n        },\n        \"coordinate\": {\n          \"longitude\": 31.2357123,\n          \"latitude\": 30.0444196\n        },\n        \"notes\": null\n      },\n      {\n        \"employee_code\": \"0002\",\n        \"log_date_time\": \"2026-09-15 09:02\",\n        \"collected_on\": \"2026-09-15 09:02:18\",\n        \"source\": \"DEVICE\",\n        \"status\": \"PROCESSED\",\n        \"direction\": \"IN\",\n        \"device\": {\n          \"id\": 8,\n          \"label\": \"Main Entrance\"\n        },\n        \"location\": {\n          \"id\": 3,\n          \"name\": \"Cairo HQ\"\n        },\n        \"coordinate\": null,\n        \"notes\": null\n      }\n    ]\n  }\n}<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>Example 2 &#8211; One Employee<\/h4>\n<table style=\"font-size: 14px;\">\n<tbody>\n<tr>\n<td style=\"font-weight: bold;\">Request<\/td>\n<td style=\"border: 1px solid #ddd; padding: 8px; width: 80%;\">\n<pre>curl --request GET 'https:\/\/your_account.modulus.biz\/api\/hr\/v1\/AttendanceLog?employee_code=0001&amp;date_from=2026-09-01&amp;date_to=2026-09-30&amp;page_number=1&amp;page_size=50' \\\n--header 'Accept: application\/json' \\\n--header 'Authorization: Bearer &lt;token&gt;'<\/pre>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"font-weight: bold;\">200 OK<\/td>\n<td style=\"border: 1px solid #ddd; padding: 8px; width: 80%;\">\n<pre>{\n  \"result\": true,\n  \"title\": \"Success\",\n  \"message\": \"Attendance logs listed successfully.\",\n  \"object\": {\n    \"meta_data\": {\n      \"page_count\": 1,\n      \"page_number\": 1,\n      \"page_size\": 50,\n      \"record_count\": 1\n    },\n    \"data\": [\n      {\n        \"employee_code\": \"0001\",\n        \"log_date_time\": \"2026-09-15 08:57\",\n        \"collected_on\": \"2026-09-15 08:57:33\",\n        \"source\": \"GPS\",\n        \"status\": \"PROCESSED\",\n        \"direction\": \"IN\",\n        \"device\": null,\n        \"location\": {\n          \"id\": 3,\n          \"name\": \"Cairo HQ\"\n        },\n        \"coordinate\": {\n          \"longitude\": 31.2357123,\n          \"latitude\": 30.0444196\n        },\n        \"notes\": null\n      }\n    ]\n  }\n}<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>Example 3 &#8211; No Matching Logs<\/h4>\n<table style=\"font-size: 14px;\">\n<tbody>\n<tr>\n<td style=\"font-weight: bold;\">Request<\/td>\n<td style=\"border: 1px solid #ddd; padding: 8px; width: 80%;\">\n<pre>curl --request GET 'https:\/\/your_account.modulus.biz\/api\/hr\/v1\/AttendanceLog?employee_code=9999&amp;date_from=2026-09-01&amp;date_to=2026-09-30' \\\n--header 'Accept: application\/json' \\\n--header 'Authorization: Bearer &lt;token&gt;'<\/pre>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"font-weight: bold;\">200 OK<\/td>\n<td style=\"border: 1px solid #ddd; padding: 8px; width: 80%;\">\n<pre>{\n  \"result\": true,\n  \"title\": \"Success\",\n  \"message\": \"No attendance logs found matching your conditions.\",\n  \"object\": {\n    \"meta_data\": {\n      \"page_count\": 0,\n      \"page_number\": 1,\n      \"page_size\": 50,\n      \"record_count\": 0\n    },\n    \"data\": []\n  }\n}<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>Example 4 &#8211; Missing Date<\/h4>\n<table style=\"font-size: 14px;\">\n<tbody>\n<tr>\n<td style=\"font-weight: bold;\">Request<\/td>\n<td style=\"border: 1px solid #ddd; padding: 8px; width: 80%;\">\n<pre>curl --request GET 'https:\/\/your_account.modulus.biz\/api\/hr\/v1\/AttendanceLog?date_from=2026-09-01' \\\n--header 'Accept: application\/json' \\\n--header 'Authorization: Bearer &lt;token&gt;'<\/pre>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"font-weight: bold;\">400 Bad Request<\/td>\n<td style=\"border: 1px solid #ddd; padding: 8px; width: 80%;\">\n<pre>{\n  \"result\": false,\n  \"title\": \"Invalid Request\",\n  \"message\": \"date_to is required.\",\n  \"object\": null\n}<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>Example 5 &#8211; Invalid Date Range<\/h4>\n<table style=\"font-size: 14px;\">\n<tbody>\n<tr>\n<td style=\"font-weight: bold;\">Request<\/td>\n<td style=\"border: 1px solid #ddd; padding: 8px; width: 80%;\">\n<pre>curl --request GET 'https:\/\/your_account.modulus.biz\/api\/hr\/v1\/AttendanceLog?date_from=2026-09-30&amp;date_to=2026-09-01' \\\n--header 'Accept: application\/json' \\\n--header 'Authorization: Bearer &lt;token&gt;'<\/pre>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"font-weight: bold;\">400 Bad Request<\/td>\n<td style=\"border: 1px solid #ddd; padding: 8px; width: 80%;\">\n<pre>{\n  \"result\": false,\n  \"title\": \"Invalid Request\",\n  \"message\": \"date_from must be earlier than or equal to date_to.\",\n  \"object\": null\n}<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>Response Fields<\/h4>\n<table style=\"width: auto;\">\n<thead>\n<tr>\n<th style=\"text-align: left;\">Field<\/th>\n<th style=\"text-align: left;\">Type<\/th>\n<th style=\"text-align: left;\">Nullable<\/th>\n<th style=\"text-align: left;\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>employee_code<\/td>\n<td>String<\/td>\n<td>No<\/td>\n<td>Employee code; leading zeros are significant.<\/td>\n<\/tr>\n<tr>\n<td>log_date_time<\/td>\n<td>DateTime<\/td>\n<td>No<\/td>\n<td>Effective log date\/time, YYYY-MM-DD HH:mm.<\/td>\n<\/tr>\n<tr>\n<td>collected_on<\/td>\n<td>DateTime<\/td>\n<td>No<\/td>\n<td>Collection\/receipt date\/time, YYYY-MM-DD HH:mm:ss.<\/td>\n<\/tr>\n<tr>\n<td>source<\/td>\n<td>String<\/td>\n<td>No<\/td>\n<td>Attendance log source.<\/td>\n<\/tr>\n<tr>\n<td>status<\/td>\n<td>String<\/td>\n<td>No<\/td>\n<td>Current processing status.<\/td>\n<\/tr>\n<tr>\n<td>direction<\/td>\n<td>String<\/td>\n<td>No<\/td>\n<td>Punch direction.<\/td>\n<\/tr>\n<tr>\n<td>device<\/td>\n<td>Object<\/td>\n<td>Yes<\/td>\n<td>Device reference {id, label}.<\/td>\n<\/tr>\n<tr>\n<td>location<\/td>\n<td>Object<\/td>\n<td>Yes<\/td>\n<td>Location reference {id, name}.<\/td>\n<\/tr>\n<tr>\n<td>coordinate<\/td>\n<td>Object<\/td>\n<td>Yes<\/td>\n<td>GPS coordinate {longitude, latitude}.<\/td>\n<\/tr>\n<tr>\n<td>notes<\/td>\n<td>String<\/td>\n<td>Yes<\/td>\n<td>Log notes.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>Allowed Values<\/h4>\n<table style=\"width: auto;\">\n<thead>\n<tr>\n<th style=\"text-align: left;\">Field<\/th>\n<th style=\"text-align: left;\">Values<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>source<\/td>\n<td>DEVICE, IMPORT, MANUAL, GPS, APP<\/td>\n<\/tr>\n<tr>\n<td>status<\/td>\n<td>PENDING, SKIPPED, PROCESSED, DISABLED, HOLD, SUSPECT<\/td>\n<\/tr>\n<tr>\n<td>direction<\/td>\n<td>NA, IN, OUT<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>Integration Notes<\/h4>\n<ul>\n<li>Both date parameters are required and inclusive; single-day requests are valid.<\/li>\n<li>Results are ordered by log_date_time ascending.<\/li>\n<li>Date\/time values use the configured modulus\u00ae account timezone.<\/li>\n<li>device, location, and coordinate can be null.<\/li>\n<li>Empty results return an empty data array with pagination metadata.<\/li>\n<\/ul>\n","protected":false},"featured_media":0,"parent":3773,"menu_order":2,"comment_status":"closed","ping_status":"closed","template":"","doc_tag":[],"comment_count":0,"_links":{"self":[{"href":"https:\/\/modulus.help\/kb\/wp-json\/wp\/v2\/docs\/4771"}],"collection":[{"href":"https:\/\/modulus.help\/kb\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/modulus.help\/kb\/wp-json\/wp\/v2\/types\/docs"}],"replies":[{"embeddable":true,"href":"https:\/\/modulus.help\/kb\/wp-json\/wp\/v2\/comments?post=4771"}],"version-history":[{"count":6,"href":"https:\/\/modulus.help\/kb\/wp-json\/wp\/v2\/docs\/4771\/revisions"}],"predecessor-version":[{"id":4790,"href":"https:\/\/modulus.help\/kb\/wp-json\/wp\/v2\/docs\/4771\/revisions\/4790"}],"up":[{"embeddable":true,"href":"https:\/\/modulus.help\/kb\/wp-json\/wp\/v2\/docs\/3773"}],"next":[{"title":"API: List Employees","link":"https:\/\/modulus.help\/kb\/docs\/documentation\/personnel-apis-v1\/api-list-employees\/","href":"https:\/\/modulus.help\/kb\/wp-json\/wp\/v2\/docs\/4778"}],"prev":[{"title":"API: List Attendance Devices","link":"https:\/\/modulus.help\/kb\/docs\/documentation\/personnel-apis-v1\/api-list-attendance-devices\/","href":"https:\/\/modulus.help\/kb\/wp-json\/wp\/v2\/docs\/3453"}],"wp:attachment":[{"href":"https:\/\/modulus.help\/kb\/wp-json\/wp\/v2\/media?parent=4771"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/modulus.help\/kb\/wp-json\/wp\/v2\/doc_tag?post=4771"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}