{"id":4558,"date":"2025-11-11T17:55:55","date_gmt":"2025-11-11T15:55:55","guid":{"rendered":"https:\/\/modulus.help\/kb\/?post_type=docs&#038;p=4558"},"modified":"2025-11-17T11:49:22","modified_gmt":"2025-11-17T09:49:22","slug":"api-list-employee-schedules","status":"publish","type":"docs","link":"https:\/\/modulus.help\/kb\/docs\/documentation\/personnel-apis-v1\/api-list-employee-schedules\/","title":{"rendered":"API: List Employee Schedules"},"content":{"rendered":"<p>The purpose of this API is to retrieve employee schedules within a specified date range, with optional filters.<\/p>\n<h4>Request<\/h4>\n<table style=\"width: auto;\">\n<tr>\n<th style=\"text-align: left;\">API Name<\/th>\n<td>Schedule<\/td>\n<\/tr>\n<tr>\n<th style=\"text-align: left;\">URL<\/th>\n<td>\n      https:\/\/your_account.modulus.biz\/api\/hr\/v1\/Schedule<\/td>\n<\/tr>\n<tr>\n<th style=\"text-align: left;\">Method<\/th>\n<td>GET<\/td>\n<\/tr>\n<tr>\n<th style=\"text-align: left;\">Source<\/th>\n<td>Third Party Server<\/td>\n<\/tr>\n<tr>\n<th style=\"text-align: left;\">Recipient<\/th>\n<td>modulus\u00ae Server<\/td>\n<\/tr>\n<tr>\n<th style=\"text-align: left;\">Content Type<\/th>\n<td>application\/json<\/td>\n<\/tr>\n<tr>\n<th style=\"text-align: left;\">Accept<\/th>\n<td>application\/json<\/td>\n<\/tr>\n<\/table>\n<h4>Request Headers<\/h4>\n<table style=\"width: auto;\">\n<tr>\n<th>Header<\/th>\n<th>Required<\/th>\n<th>Description<\/th>\n<\/tr>\n<tr>\n<td>Authorization<\/td>\n<td>Yes<\/td>\n<td>Bearer token for authentication.<br \/>\nFormat: Bearer &lt;token&gt;<\/td>\n<\/tr>\n<\/table>\n<h4>Query String Parameters<\/h4>\n<table style=\"width: auto;\">\n<thead>\n<tr>\n<th>Parameter<\/th>\n<th>Required<\/th>\n<th>Type<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>date_from<\/td>\n<td>Yes<\/td>\n<td>Date<\/td>\n<td>Start date in format YYYY-MM-DD.<\/td>\n<\/tr>\n<tr>\n<td>date_to<\/td>\n<td>Yes<\/td>\n<td>Date<\/td>\n<td>End date in format YYYY-MM-DD. Must be later than date_from.<\/td>\n<\/tr>\n<tr>\n<td>employee_code<\/td>\n<td>No<\/td>\n<td>Number<\/td>\n<td>Restricts result to a specific employee.<\/td>\n<\/tr>\n<tr>\n<td>has_punch<\/td>\n<td>No<\/td>\n<td>Boolean<\/td>\n<td>Set to 1 to include only employees who have punch-in\/out records.<\/td>\n<\/tr>\n<tr>\n<td>include_schedule<\/td>\n<td>No<\/td>\n<td>Boolean<\/td>\n<td>If 1, includes full schedule details for each employee.<\/td>\n<\/tr>\n<tr>\n<td>min_expected_minutes<\/td>\n<td>No<\/td>\n<td>Number<\/td>\n<td>Filters employees with expected working minutes above this value.<\/td>\n<\/tr>\n<tr>\n<td>max_expected_minutes<\/td>\n<td>No<\/td>\n<td>Number<\/td>\n<td>Filters employees with expected working minutes below this value.<\/td>\n<\/tr>\n<tr>\n<td>page_number<\/td>\n<td>No<\/td>\n<td>Number<\/td>\n<td>Page number of the result set. Default = 1.<\/td>\n<\/tr>\n<tr>\n<td>page_size<\/td>\n<td>No<\/td>\n<td>Number<\/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>HTTP Status<\/th>\n<th>result<\/th>\n<th>title<\/th>\n<th>message<\/th>\n<th>object<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td colspan=\"5\" style=\"text-align:center; font-weight:bold; background:#eee;\">\n        Success Responses<\/td>\n<\/tr>\n<tr>\n<td>200 OK<\/td>\n<td>true<\/td>\n<td>Success<\/td>\n<td>Schedules listed successfully.<\/td>\n<td>\n<pre>{\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    \"department_name\": \"QA\/QC\",\n    \"location_name\": \"Cairo HQ\",\n    \"position_name\": \"Manager QC\",\n    \"schedules\": [\n      {\n        \"date\": \"2025-01-05\",\n        \"attended_from\": \"2025-01-05 09:00\",\n        \"attended_to\": \"2025-01-05 17:00\",\n        \"expected_from\": \"2025-01-05 09:00\",\n        \"expected_to\": \"2025-01-05 17:00\",\n        \"shift_nature\": \"Attended\"\n      }\n    ]\n  }\n]\n}<\/pre>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"5\" style=\"text-align:center; font-weight:bold; background:#eee;\">\n        Failure Responses<\/td>\n<\/tr>\n<tr>\n<td>400 Bad Request<\/td>\n<td>false<\/td>\n<td>Error<\/td>\n<td>X is required.<\/td>\n<td>null<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>Example 1<\/h4>\n<table style=\"width: auto;\" style=\"font-size: 14px;\">\n<tbody>\n<tr>\n<td style=\"font-weight: bold;\">\n        Request<\/td>\n<td style=\"border: 1px solid #ddd; padding: 8px;  width: 80%;\">\n<pre>\ncurl --request GET 'https:\/\/your_account.modulus.biz\/api\/hr\/v1\/Schedule?date_from=2025-01-01&date_to=2025-01-02&include_schedule=1' \\\n--header 'Accept: application\/json' \\\n--header 'Content-Type: application\/json' \\\n--header 'Authorization: Bearer y78hewy2387898978732814jewjkj32u489u'\n<\/pre>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"font-weight: bold;\">\n        200 OK<\/td>\n<td style=\"border: 1px solid #ddd; padding: 8px; width: 80%;\">\n<pre>\n{\n\"result\": true,\n\"title\": \"Success\",\n\"message\": \"Schedules 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      \"department_name\": \"QA\/QC\",\n      \"location_name\": \"Cairo HQ\",\n      \"position_name\": \"Manager QC\",\n      \"schedules\": [\n        {\n          \"date\": \"2025-01-01\",\n          \"attended_from\": \"2025-01-01 09:00\",\n          \"attended_to\": \"2025-01-01 17:00\",\n          \"expected_from\": \"2025-01-01 09:00\",\n          \"expected_to\": \"2025-01-01 17:00\",\n          \"shift_nature\": \"Attended\"\n        }\n      ]\n    }\n  ]\n}\n}\n<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>Example 2<\/h4>\n<table style=\"width: auto;\" style=\"font-size: 14px;\">\n<tbody>\n<tr>\n<td style=\"font-weight: bold;\">\n        Request<\/td>\n<td style=\"border: 1px solid #ddd; padding: 8px; width: 80%;\">\n<pre>\ncurl --request GET 'https:\/\/your_account.modulus.biz\/api\/hr\/v1\/Schedule?date_from=2025-01-01&date_to=2025-01-02&include_schedule=1&page_number=2' \\\n--header 'Accept: application\/json' \\\n--header 'Content-Type: application\/json' \\\n--header 'Authorization: Bearer y78hewy2387898978732814jewjkj32u489u'\n<\/pre>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"font-weight: bold;\">\n        200 OK<\/td>\n<td style=\"border: 1px solid #ddd; padding: 8px; width: 80%;\">\n<pre>\n{\n\"result\": true,\n\"title\": \"Success\",\n\"message\": \"No data found match your conditions.\",\n\"object\": null\n}\n<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>Example 3<\/h4>\n<table style=\"width: auto;\" style=\"font-size: 14px;\">\n<tbody>\n<tr>\n<td style=\"font-weight: bold;\">\n        Request<\/td>\n<td style=\"border: 1px solid #ddd; padding: 8px; width: 80%;\">\n<pre>\ncurl --request GET 'https:\/\/your_account.modulus.biz\/api\/hr\/v1\/Schedule?date_from=2025-01-01' \\\n--header 'Accept: application\/json' \\\n--header 'Content-Type: application\/json' \\\n--header 'Authorization: Bearer y78hewy2387898978732814jewjkj32u489u'\n<\/pre>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"font-weight: bold;\">\n        400 Bad Request<\/td>\n<td style=\"border: 1px solid #ddd; padding: 8px; width: 80%;\">\n<pre>\n{\n\"result\": false,\n\"title\": \"Error\",\n\"message\": \"date_to is required\",\n\"object\": null\n}\n<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\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\/4558"}],"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=4558"}],"version-history":[{"count":3,"href":"https:\/\/modulus.help\/kb\/wp-json\/wp\/v2\/docs\/4558\/revisions"}],"predecessor-version":[{"id":4583,"href":"https:\/\/modulus.help\/kb\/wp-json\/wp\/v2\/docs\/4558\/revisions\/4583"}],"up":[{"embeddable":true,"href":"https:\/\/modulus.help\/kb\/wp-json\/wp\/v2\/docs\/3773"}],"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=4558"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/modulus.help\/kb\/wp-json\/wp\/v2\/doc_tag?post=4558"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}