{
    "info": {
        "_postman_id": "cd4cc3bd4245adc1cabf07c4179b5e47",
        "name": "Hifisys HRMS API",
        "description": "Complete enterprise human resource management API for employee lifecycle, attendance, leaves, payroll, payslips, work logs, and analytics.\n\nOfficial REST API Postman Collection for Hifisys Enterprise Platform. Managed dynamically.",
        "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
    },
    "item": [
        {
            "name": "Authentication & Health",
            "item": [
                {
                    "name": "Verify API Key Authentication",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "X-API-Key",
                                "value": "{{api_key}}",
                                "type": "text"
                            },
                            {
                                "key": "Accept",
                                "value": "application/json",
                                "type": "text"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/api/v1/hrms/employees",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "api",
                                "v1",
                                "hrms",
                                "employees"
                            ]
                        },
                        "description": "Validates that your API key is active, properly provisioned, and has appropriate scopes."
                    },
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "exec": [
                                    "pm.test(\"Status code is 200\", function () {",
                                    "    pm.expect(pm.response.code).to.be.oneOf([200, 201]);",
                                    "});",
                                    "pm.test(\"Response is valid JSON with success field\", function () {",
                                    "    var jsonData = pm.response.json();",
                                    "    pm.expect(jsonData).to.be.an(\"object\");",
                                    "    pm.expect(jsonData).to.have.property(\"success\");",
                                    "});",
                                    "pm.test(\"Headers contain quota or rate limit info\", function () {",
                                    "    if (pm.response.headers.has(\"X-Quota-Monthly\")) {",
                                    "        pm.expect(pm.response.headers.get(\"X-Quota-Monthly\")).to.not.be.empty;",
                                    "    }",
                                    "});"
                                ],
                                "type": "text/javascript"
                            }
                        }
                    ]
                }
            ]
        },
        {
            "name": "Employees",
            "item": [
                {
                    "name": "List Company Employees",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "X-API-Key",
                                "value": "{{api_key}}",
                                "type": "text"
                            },
                            {
                                "key": "Accept",
                                "value": "application/json",
                                "type": "text"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/api/v1/hrms/employees",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "api",
                                "v1",
                                "hrms",
                                "employees"
                            ]
                        },
                        "description": "Returns a paginated list of company employees with department, designation, and employment status.\n\nRequired Scope: `employees:read`"
                    },
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "exec": [
                                    "pm.test(\"Status code is 200 or 201\", function () {",
                                    "    pm.expect(pm.response.code).to.be.oneOf([200, 201]);",
                                    "});",
                                    "pm.test(\"Response is valid JSON with success flag\", function () {",
                                    "    var json = pm.response.json();",
                                    "    pm.expect(json).to.be.an(\"object\");",
                                    "    pm.expect(json).to.have.property(\"success\");",
                                    "    pm.expect(json.success).to.be.true;",
                                    "});",
                                    "pm.test(\"Rate limit and Quota headers present\", function () {",
                                    "    if (pm.response.headers.has(\"X-Quota-Monthly\")) {",
                                    "        pm.expect(pm.response.headers.get(\"X-Quota-Monthly\")).to.not.be.empty;",
                                    "    }",
                                    "});"
                                ],
                                "type": "text/javascript"
                            }
                        }
                    ]
                }
            ]
        },
        {
            "name": "Attendance",
            "item": [
                {
                    "name": "Attendance Clock-In",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "X-API-Key",
                                "value": "{{api_key}}",
                                "type": "text"
                            },
                            {
                                "key": "Accept",
                                "value": "application/json",
                                "type": "text"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json",
                                "type": "text"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/api/v1/hrms/attendance/clock-in",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "api",
                                "v1",
                                "hrms",
                                "attendance",
                                "clock-in"
                            ]
                        },
                        "description": "Records employee punch-in timestamp, location coordinates/mode, and IP address.\n\nRequired Scope: `attendance:write`",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"employee_id\": \"1\",\n    \"work_mode\": \"Sample Work_mode\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "exec": [
                                    "pm.test(\"Status code is 200 or 201\", function () {",
                                    "    pm.expect(pm.response.code).to.be.oneOf([200, 201]);",
                                    "});",
                                    "pm.test(\"Response is valid JSON with success flag\", function () {",
                                    "    var json = pm.response.json();",
                                    "    pm.expect(json).to.be.an(\"object\");",
                                    "    pm.expect(json).to.have.property(\"success\");",
                                    "    pm.expect(json.success).to.be.true;",
                                    "});",
                                    "pm.test(\"Rate limit and Quota headers present\", function () {",
                                    "    if (pm.response.headers.has(\"X-Quota-Monthly\")) {",
                                    "        pm.expect(pm.response.headers.get(\"X-Quota-Monthly\")).to.not.be.empty;",
                                    "    }",
                                    "});"
                                ],
                                "type": "text/javascript"
                            }
                        }
                    ]
                }
            ]
        }
    ],
    "variable": [
        {
            "key": "base_url",
            "value": "https://hifisys.com",
            "type": "string"
        },
        {
            "key": "api_key",
            "value": "YOUR_API_KEY",
            "type": "string"
        },
        {
            "key": "product_slug",
            "value": "hrms-api",
            "type": "string"
        },
        {
            "key": "api_version",
            "value": "v1",
            "type": "string"
        }
    ]
}