{
    "info": {
        "_postman_id": "8b5b2bc247e4fa6a077e8efbca50067f",
        "name": "Hifisys Hifisys CRM & Lead Automation Platform",
        "description": "Complete Zoho CRM-grade customer relationship platform and API suite. Unifies multi-channel lead capture, contact & account management, configurable visual sales pipelines, automated workflow triggers, multi-tenant REST APIs, and revenue 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/leads",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "api",
                                "v1",
                                "leads"
                            ]
                        },
                        "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": "Endpoints",
            "item": [
                {
                    "name": "Create / Upsert Lead (Authenticated Server-to-Server)",
                    "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/leads",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "api",
                                "v1",
                                "leads"
                            ]
                        },
                        "description": "Creates a new CRM lead or safely merges with an existing open lead matching the normalized email address, runs configured lead automation rules, and returns the persisted lead reference code.\n\nRequired Scope: `leads:write`",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"name\": \"Sample Name\",\n    \"email\": \"Sample Email\",\n    \"phone\": \"Sample Phone\",\n    \"company\": \"Sample Company\",\n    \"message\": \"Hello, can you help me check available pricing plans?\",\n    \"product_slug\": \"Sample Product_slug\",\n    \"interested_option\": \"Sample Interested_option\",\n    \"campaign\": \"Sample Campaign\",\n    \"utm_source\": \"Sample Utm_source\",\n    \"utm_medium\": \"Sample Utm_medium\",\n    \"utm_campaign\": \"Sample Utm_campaign\"\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"
                            }
                        }
                    ]
                },
                {
                    "name": "List Client-Scoped Leads",
                    "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/leads",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "api",
                                "v1",
                                "leads"
                            ]
                        },
                        "description": "Returns paginated leads strictly created by the authenticated API client. Never exposes leads owned by other API clients or internal channels.\n\nRequired Scope: `leads: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": "Public Lead Intake Endpoint (Rate-Limited, Write-Only)",
                    "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/public/leads",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "api",
                                "v1",
                                "public",
                                "leads"
                            ]
                        },
                        "description": "Rate-limited (20 req/min) write-only public endpoint for website forms and landing page widgets. Validates input, applies honeypot protection, and returns only a lead confirmation reference.\n\nRequired Scope: `public`",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"name\": \"Sample Name\",\n    \"email\": \"Sample Email\",\n    \"phone\": \"Sample Phone\",\n    \"company\": \"Sample Company\",\n    \"product_slug\": \"Sample Product_slug\",\n    \"message\": \"Hello, can you help me check available pricing plans?\"\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": "crm-lead-automation-platform",
            "type": "string"
        },
        {
            "key": "api_version",
            "value": "v1",
            "type": "string"
        }
    ]
}