{
    "info": {
        "_postman_id": "6b1f3c2e-9d4a-4e8b-a5c7-0f1e2d3c4b5a",
        "name": "Flexysure Open API v1",
        "description": "Generated from the Flexysure developer portal (https://flexysure.intrepidprojects.co.ke/developers). Release 1.0 of 2026-10-14. Set client_id and client_secret, run Authentication → Get an access token, then call anything else.",
        "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
    },
    "auth": {
        "type": "bearer",
        "bearer": [
            {
                "key": "token",
                "value": "{{access_token}}",
                "type": "string"
            }
        ]
    },
    "variable": [
        {
            "key": "base_url",
            "value": "https://flexysure.intrepidprojects.co.ke/api/v1",
            "type": "string"
        },
        {
            "key": "access_token",
            "value": "",
            "type": "string"
        },
        {
            "key": "client_id",
            "value": "fx_test_simba_demo_0001",
            "type": "string"
        },
        {
            "key": "client_secret",
            "value": "fxs_SimbaDemoSecret_2026_Flexysure_Open_API_key",
            "type": "string"
        },
        {
            "key": "agent_code",
            "value": "KK01",
            "type": "string"
        },
        {
            "key": "agent_key",
            "value": "agentkey-KK01",
            "type": "string"
        },
        {
            "key": "client_no",
            "value": "",
            "type": "string"
        },
        {
            "key": "client_key",
            "value": "",
            "type": "string"
        }
    ],
    "item": [
        {
            "name": "Authentication",
            "item": [
                {
                    "name": "Get an access token",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/oauth/token",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "oauth",
                                "token"
                            ]
                        },
                        "description": "Exchanges a client id and secret for a bearer token (default lifetime 24 hours). Accepts a JSON or form body with `grant_type=client_credentials`, `client_id`, `client_secret` and an optional space-separated `scope`; HTTP Basic client authentication; or, for Insurance Cloud migrations, the body `{\"key\": \"...\", \"passkey\": \"...\"}`. When `scope` is omitted the token carries every scope the client is allowed.\n\nRate limit: 10 requests per minute per IP address.",
                        "auth": {
                            "type": "noauth"
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"grant_type\": \"client_credentials\",\n    \"client_id\": \"{{client_id}}\",\n    \"client_secret\": \"{{client_secret}}\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "const body = pm.response.json();",
                                    "if (body.access_token) { pm.collectionVariables.set(\"access_token\", body.access_token); }"
                                ]
                            }
                        }
                    ],
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "POST",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/oauth/token",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "oauth",
                                        "token"
                                    ]
                                }
                            },
                            "status": "Token issued",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"access_token\": \"e3mT…48 characters…\",\n    \"token_type\": \"Bearer\",\n    \"expires_in\": 86400,\n    \"scope\": \"read quote bind\"\n}"
                        }
                    ]
                }
            ],
            "description": "Flexysure issues short-lived bearer tokens to API clients created on Settings → API keys. Request a token with the OAuth2 client-credentials grant, then send it as `Authorization: Bearer <token>` on every call. Tokens carry scopes; a request outside the token's scopes gets a 403 `insufficient_scope` problem. A token never does more than its key currently allows: removing a scope from the key in Settings applies to tokens already issued. Tokens of a suspended organisation get 401 `tenant_inactive`; a key whose actor user is disabled gets 401 `actor_disabled`. Writes are checked against the acting user's abilities (the agent, the key's actor user, or the key's creator): 403 `actor_forbidden` when that user may not do it. Every response carries `X-Request-Id`; quote it when you contact support.\n\nRun \"Get an access token\" first: it saves the token in {{access_token}}, which every other request sends as a bearer token."
        },
        {
            "name": "Reference data",
            "item": [
                {
                    "name": "Who am I",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/me",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "me"
                            ]
                        },
                        "description": "The client, organisation, scopes and actor behind the current token. Useful as a connectivity check and to learn which scopes a token actually carries.\n\nScope: read.\n\nRate limit: 60 requests per minute per token (per-client override)."
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "GET",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/me",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "me"
                                    ]
                                }
                            },
                            "status": "Client, tenant, scopes, actor and token expiry",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"data\": {\n        \"client\": {\n            \"id\": \"fx_live_…\",\n            \"name\": \"Agency portal\",\n            \"rate_limit_per_minute\": 60\n        },\n        \"tenant\": {\n            \"code\": \"SIMBA\",\n            \"name\": \"Simba Risk Brokers\",\n            \"type\": \"brokerage\",\n            \"paybill\": \"600123\"\n        },\n        \"scopes\": [\n            \"read\",\n            \"quote\",\n            \"bind\"\n        ],\n        \"actor\": {\n            \"id\": 4,\n            \"name\": \"Kevin Kiprop\",\n            \"role\": \"agent\",\n            \"code\": \"KK01\",\n            \"own_records_only\": true\n        },\n        \"token\": {\n            \"expires_at\": \"2026-10-15T09:00:00+03:00\",\n            \"expires_in\": 86000\n        },\n        \"request_id\": \"0f6d…\"\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "List insurers",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/insurers",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "insurers"
                            ],
                            "query": [
                                {
                                    "key": "search",
                                    "value": "savanna",
                                    "description": "Case-insensitive match on short or legal name.",
                                    "disabled": true
                                }
                            ]
                        },
                        "description": "Underwriters the organisation places business with. `insurer_id` values from here are what the quote endpoints accept.\n\nScope: read.\n\nRate limit: 60 requests per minute per token (per-client override)."
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "GET",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/insurers",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "insurers"
                                    ],
                                    "query": [
                                        {
                                            "key": "search",
                                            "value": "savanna",
                                            "description": "Case-insensitive match on short or legal name.",
                                            "disabled": true
                                        }
                                    ]
                                }
                            },
                            "status": "Insurers",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"data\": [\n        {\n            \"id\": 1,\n            \"name\": \"Savanna General\",\n            \"legal_name\": \"Savanna General Insurance Ltd\",\n            \"dmvic_member_id\": 901,\n            \"commission_rate_bps\": 1000,\n            \"status\": \"active\",\n            \"monogram\": \"SG\"\n        }\n    ]\n}"
                        }
                    ]
                },
                {
                    "name": "List branches",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/branches",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "branches"
                            ]
                        },
                        "description": "Scope: read.\n\nRate limit: 60 requests per minute per token (per-client override)."
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "GET",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/branches",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "branches"
                                    ]
                                }
                            },
                            "status": "Branches",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"data\": [\n        {\n            \"id\": 1,\n            \"code\": \"NBO\",\n            \"name\": \"Nairobi HQ\",\n            \"city\": \"Nairobi\"\n        }\n    ]\n}"
                        }
                    ]
                },
                {
                    "name": "List risk managers",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/risk-managers",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "risk-managers"
                            ]
                        },
                        "description": "Staff who own client relationships: principals and account executives. Use their `id` as `risk_manager_id` when saving a client.\n\nScope: read.\n\nRate limit: 60 requests per minute per token (per-client override)."
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "GET",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/risk-managers",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "risk-managers"
                                    ]
                                }
                            },
                            "status": "Users",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"data\": [\n        {\n            \"id\": 2,\n            \"name\": \"Faith Njeri\",\n            \"email\": \"ae.simba@example.test\",\n            \"phone\": \"0711000303\",\n            \"role\": \"account_exec\",\n            \"code\": null,\n            \"branch_id\": 1\n        }\n    ]\n}"
                        }
                    ]
                },
                {
                    "name": "List sales people",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/sales-people",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "sales-people"
                            ]
                        },
                        "description": "Agents and account executives with their agent `code` (what `X-Agent-Code` expects) and branch. Use `id` as `sales_person_id` when saving a client.\n\nScope: read.\n\nRate limit: 60 requests per minute per token (per-client override)."
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "GET",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/sales-people",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "sales-people"
                                    ]
                                }
                            },
                            "status": "Users",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"data\": [\n        {\n            \"id\": 4,\n            \"name\": \"Kevin Kiprop\",\n            \"email\": \"agent.simba@example.test\",\n            \"phone\": \"0711000304\",\n            \"role\": \"agent\",\n            \"code\": \"KK01\",\n            \"branch_id\": 2\n        }\n    ]\n}"
                        }
                    ]
                },
                {
                    "name": "List levies and duties",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/policy/taxes",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "policy",
                                "taxes"
                            ]
                        },
                        "description": "The taxes added to every premium (training levy, policyholders compensation fund, stamp duty). Percent-based items carry `rate_bps`; flat items carry `amount` (whole shillings) and `amount_minor` (cents).\n\nScope: read.\n\nRate limit: 60 requests per minute per token (per-client override)."
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "GET",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/policy/taxes",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "policy",
                                        "taxes"
                                    ]
                                }
                            },
                            "status": "Taxes",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"data\": [\n        {\n            \"id\": 1,\n            \"code\": \"TL\",\n            \"name\": \"Training levy\",\n            \"basis\": \"percent\",\n            \"rate_bps\": 20,\n            \"rate_percent\": 0.2,\n            \"amount\": null,\n            \"amount_minor\": null\n        },\n        {\n            \"id\": 3,\n            \"code\": \"SD\",\n            \"name\": \"Stamp duty\",\n            \"basis\": \"flat\",\n            \"rate_bps\": null,\n            \"rate_percent\": null,\n            \"amount\": 40,\n            \"amount_minor\": 4000\n        }\n    ]\n}"
                        }
                    ]
                },
                {
                    "name": "List motor benefits",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/motor/benefits",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "motor",
                                "benefits"
                            ]
                        },
                        "description": "Distinct benefit names across the organisation's motor products. `id` is a stable hash of the name, so it survives re-seeding.\n\nScope: read.\n\nRate limit: 60 requests per minute per token (per-client override)."
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "GET",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/motor/benefits",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "motor",
                                        "benefits"
                                    ]
                                }
                            },
                            "status": "Benefits",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"data\": [\n        {\n            \"id\": \"3a9c1f0e7b2d\",\n            \"name\": \"Courtesy car 10 days\"\n        },\n        {\n            \"id\": \"b81e…\",\n            \"name\": \"Towing\"\n        }\n    ]\n}"
                        }
                    ]
                },
                {
                    "name": "List product lines and standard products",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/products",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "products"
                            ]
                        },
                        "description": "The four product lines with their quote endpoints, plus the standard products catalogue (personal accident, domestic package, WIBA…) once the organisation has one.\n\nScope: read.\n\nRate limit: 60 requests per minute per token (per-client override)."
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "GET",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/products",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "products"
                                    ]
                                }
                            },
                            "status": "Lines and standard products",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"data\": {\n        \"lines\": [\n            {\n                \"code\": \"motor\",\n                \"name\": \"Motor\",\n                \"quote_endpoint\": \"/api/v1/motor/quote\"\n            }\n        ],\n        \"standard_products\": [\n            {\n                \"id\": 1,\n                \"code\": \"PA\",\n                \"name\": \"Personal accident\",\n                \"description\": \"…\",\n                \"brochure_url\": null,\n                \"product_line\": \"standard\"\n            }\n        ]\n    }\n}"
                        }
                    ]
                }
            ],
            "description": "Look-ups you need before quoting or saving: the organisation's insurers, branches, staff, levies, motor benefits and product lines. All lists are scoped to the organisation that owns the token and returned as `{\"data\": [...]}`. They are small, so none of them paginate."
        },
        {
            "name": "Motor",
            "item": [
                {
                    "name": "Price a vehicle",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Agent-Code",
                                "value": "{{agent_code}}",
                                "disabled": true,
                                "description": "Optional: act as this agent."
                            },
                            {
                                "key": "X-Agent-Key",
                                "value": "{{agent_key}}",
                                "disabled": true
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/motor/quote",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "motor",
                                "quote"
                            ]
                        },
                        "description": "Returns one option per insurer that rates the class, cheapest first. Nothing is stored — use save_quote to keep a quote against a client.\n\nScope: quote.\n\nRate limit: 60 requests per minute per token (per-client override).",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"class\": \"Motor\",\n    \"coverage\": \"Private\",\n    \"scope\": \"Comprehensive\",\n    \"cover_period\": \"annual\",\n    \"year\": 2018,\n    \"value\": 1000000,\n    \"pll\": 4,\n    \"insurer_id\": [\n        1,\n        2\n    ]\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "POST",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/motor/quote",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "motor",
                                        "quote"
                                    ]
                                }
                            },
                            "status": "Options",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"message\": \"2 options found.\",\n    \"quote\": {\n        \"class\": \"Motor\",\n        \"coverage\": \"Private\",\n        \"scope\": \"Comprehensive\",\n        \"vehicle_class\": \"private\",\n        \"cover_type\": \"comprehensive\",\n        \"cover_period\": \"annual\",\n        \"days\": 365,\n        \"start_date\": \"2026-10-14\",\n        \"end_date\": \"2027-10-13\",\n        \"year\": 2018,\n        \"tonnage\": null,\n        \"pll\": 4,\n        \"value\": 1000000,\n        \"value_minor\": 100000000\n    },\n    \"options\": [\n        {\n            \"insurer_id\": 1,\n            \"insurer_name\": \"Savanna General\",\n            \"monogram\": \"SG\",\n            \"motor_product_id\": 11,\n            \"vehicle_class\": \"private\",\n            \"cover_type\": \"comprehensive\",\n            \"rate\": 3.5,\n            \"rate_bps\": 350,\n            \"value\": 1000000,\n            \"value_minor\": 100000000,\n            \"basic_premium\": 35000,\n            \"basic_premium_minor\": 3500000,\n            \"taxes\": [\n                {\n                    \"code\": \"TL\",\n                    \"name\": \"Training levy\",\n                    \"amount\": 70,\n                    \"amount_minor\": 7000\n                },\n                {\n                    \"code\": \"PHCF\",\n                    \"name\": \"Policyholders compensation fund\",\n                    \"amount\": 88,\n                    \"amount_minor\": 8800\n                },\n                {\n                    \"code\": \"SD\",\n                    \"name\": \"Stamp duty\",\n                    \"amount\": 40,\n                    \"amount_minor\": 4000\n                }\n            ],\n            \"taxes_total\": 198,\n            \"taxes_total_minor\": 19800,\n            \"total\": 35198,\n            \"total_minor\": 3519800,\n            \"commission_rate_bps\": 1000,\n            \"benefits\": [\n                {\n                    \"id\": \"3a9c1f0e7b2d\",\n                    \"name\": \"Windscreen up to KES 50,000\"\n                },\n                {\n                    \"id\": \"b81e2c4d5f60\",\n                    \"name\": \"Towing\"\n                }\n            ],\n            \"limits_of_liability\": [\n                {\n                    \"benefit_id\": \"3a9c1f0e7b2d\",\n                    \"item\": \"Windscreen\",\n                    \"limit\": 50000\n                },\n                {\n                    \"benefit_id\": \"b81e2c4d5f60\",\n                    \"item\": \"Towing\",\n                    \"limit\": null\n                }\n            ],\n            \"excess\": \"2.5% of claim, min KES 15,000\",\n            \"pll\": 4,\n            \"tonnage\": null,\n            \"instalments\": [\n                {\n                    \"parts\": 1,\n                    \"amounts\": [\n                        35198\n                    ],\n                    \"amounts_minor\": [\n                        3519800\n                    ]\n                },\n                {\n                    \"parts\": 2,\n                    \"amounts\": [\n                        17599,\n                        17599\n                    ],\n                    \"amounts_minor\": [\n                        1759900,\n                        1759900\n                    ]\n                }\n            ],\n            \"ipf_offers\": [\n                {\n                    \"tenor_months\": 6,\n                    \"deposit\": 7040,\n                    \"deposit_minor\": 704000,\n                    \"instalment\": 5397,\n                    \"instalment_minor\": 539700,\n                    \"apr_bps\": 4200,\n                    \"lender_name\": \"Flexysure Premium Finance\"\n                }\n            ],\n            \"ipf_reason\": null\n        }\n    ]\n}"
                        }
                    ]
                },
                {
                    "name": "Save a quote for a client",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Idempotency-Key",
                                "value": "{{$guid}}",
                                "description": "Unique per write; a new one each send."
                            },
                            {
                                "key": "X-Agent-Code",
                                "value": "{{agent_code}}",
                                "disabled": true,
                                "description": "Optional: act as this agent."
                            },
                            {
                                "key": "X-Agent-Key",
                                "value": "{{agent_key}}",
                                "disabled": true
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/motor/save_quote",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "motor",
                                "save_quote"
                            ]
                        },
                        "description": "Creates or matches the client and stores the quote with every insurer's option (valid for 14 days). Each entry in `quotes[]` is checked against the server price.\n\nScope: quote.\n\nRate limit: 60 requests per minute per token (per-client override).",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"client\": {\n        \"name\": \"Otieno Ouma\",\n        \"email\": \"otieno@example.co.ke\",\n        \"phone\": \"0722000111\",\n        \"idno\": \"30111222\",\n        \"agentcode\": \"KK01\"\n    },\n    \"vehicle\": {\n        \"value\": 1000000,\n        \"year\": 2018,\n        \"reg_no\": \"KDB 456B\",\n        \"coverage\": \"Private\",\n        \"scope\": \"Comprehensive\",\n        \"make\": \"Mazda\",\n        \"model\": \"Demio\"\n    },\n    \"quotes\": [\n        {\n            \"insurer_id\": 1,\n            \"rate\": 3.5,\n            \"basic\": 35000,\n            \"taxes\": 198,\n            \"total\": 35198,\n            \"benefits\": []\n        }\n    ]\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "POST",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/motor/save_quote",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "motor",
                                        "save_quote"
                                    ]
                                }
                            },
                            "status": "Quote saved",
                            "code": 201,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"message\": \"Quote saved.\",\n    \"id\": 88,\n    \"uuid\": \"5b0f…\",\n    \"quote_no\": \"Q-000088\",\n    \"client_no\": \"C-000124\",\n    \"valid_until\": \"2026-10-28\",\n    \"data\": {\n        \"uuid\": \"5b0f…\",\n        \"product_line\": \"motor\",\n        \"status\": \"presented\",\n        \"options\": [\n            {\n                \"option_id\": 301,\n                \"insurer_id\": 1,\n                \"insurer_name\": \"Savanna General\",\n                \"rate\": 3.5,\n                \"total\": 35198,\n                \"total_minor\": 3519800\n            }\n        ]\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "Bind a motor policy",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Idempotency-Key",
                                "value": "{{$guid}}",
                                "description": "Unique per write; a new one each send."
                            },
                            {
                                "key": "X-Agent-Code",
                                "value": "{{agent_code}}",
                                "disabled": true,
                                "description": "Optional: act as this agent."
                            },
                            {
                                "key": "X-Agent-Key",
                                "value": "{{agent_key}}",
                                "disabled": true
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/motor/save",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "motor",
                                "save"
                            ]
                        },
                        "description": "Re-prices with the chosen insurer and compares `policy.premium` (and `total_basic`, `taxes` when sent); a difference over KES 1 is refused with `premium_mismatch`. Then matches or creates the client (risk manager, branch and sales person set on new clients only), stores the quote and raises the policy pending payment with 1–4 instalment debit notes. `client_key` is issued only when the client has no client-area key yet; otherwise it is null with `portal.note`, and existing keys keep working. A replay returns the key as null (`replay_note`). One vehicle per save — add more with POST /api/v1/policies/{uuid}/endorse (`add_vehicle`). Flexysure needs the chassis number (`chassis_no`) for the DMVIC certificate.\n\nScope: bind.\n\nRate limit: 3 requests per 15 seconds per API client (plus the platform limit)..",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"client\": {\n        \"name\": \"Wanjiru Kamau\",\n        \"email\": \"wanjiru@example.co.ke\",\n        \"phone\": \"0712345678\",\n        \"idno\": \"23456789\",\n        \"risk_manager_id\": 2,\n        \"branch_id\": 1,\n        \"sales_person_id\": 4\n    },\n    \"policy\": {\n        \"start_date\": \"2026-10-14\",\n        \"end_date\": \"2027-10-13\",\n        \"insurer_id\": 1,\n        \"class\": \"Motor\",\n        \"coverage\": \"Private\",\n        \"scope\": \"Comprehensive\",\n        \"total_basic\": 35000,\n        \"taxes\": 198,\n        \"premium\": 35198,\n        \"premium_instalments\": 2,\n        \"limits_of_liability\": [\n            {\n                \"benefit_id\": \"3a9c1f0e7b2d\",\n                \"item\": \"Windscreen\",\n                \"limit\": 50000\n            }\n        ]\n    },\n    \"taxes\": [\n        {\n            \"tax_id\": 1,\n            \"rate\": 0.2,\n            \"amount\": 70\n        }\n    ],\n    \"vehicles\": [\n        {\n            \"coverage\": \"Private\",\n            \"regno\": \"KDA 123A\",\n            \"chassis_no\": \"NZE161-3012456\",\n            \"make\": \"Toyota\",\n            \"model\": \"Axio\",\n            \"yom\": 2018,\n            \"value\": 1000000,\n            \"basic_premium\": 35000,\n            \"rate\": 3.5,\n            \"benefits\": []\n        }\n    ]\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "POST",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/motor/save",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "motor",
                                        "save"
                                    ]
                                }
                            },
                            "status": "Policy saved (Insurance Cloud shape plus uuid, policy_no, debit_note, portal)",
                            "code": 201,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"message\": \"Policy saved successfully.\",\n    \"id\": 452,\n    \"uuid\": \"0d7b1f1e-7a2c-4f3b-9a8e-2c1d5f6a7b8c\",\n    \"risknote\": \"RN-000452\",\n    \"policy_no\": \"POL-000452\",\n    \"client_no\": \"C-000123\",\n    \"client_key\": \"fxck_…\",\n    \"status\": \"pending_payment\",\n    \"product_line\": \"motor\",\n    \"start_date\": \"2026-10-14\",\n    \"end_date\": \"2027-10-13\",\n    \"payment_mode\": \"full\",\n    \"instalments\": 2,\n    \"premium\": {\n        \"basic_premium\": 35000,\n        \"basic_premium_minor\": 3500000,\n        \"taxes\": 198,\n        \"taxes_minor\": 19800,\n        \"total\": 35198,\n        \"total_minor\": 3519800\n    },\n    \"debit_note\": {\n        \"number\": \"DN-000452-1/2\",\n        \"due_on\": \"2026-10-14\",\n        \"amount\": 17599,\n        \"amount_minor\": 1759900,\n        \"instalments\": [\n            {\n                \"number\": \"DN-000452-1/2\",\n                \"instalment_no\": 1,\n                \"due_on\": \"2026-10-14\",\n                \"amount\": 17599,\n                \"amount_minor\": 1759900\n            },\n            {\n                \"number\": \"DN-000452-2/2\",\n                \"instalment_no\": 2,\n                \"due_on\": \"2026-11-14\",\n                \"amount\": 17599,\n                \"amount_minor\": 1759900\n            }\n        ]\n    },\n    \"portal\": {\n        \"client_no\": \"C-000123\",\n        \"client_key\": \"fxck_…\"\n    },\n    \"links\": {\n        \"policy\": \"https://app.flexysure.com/api/v1/policies/0d7b1f1e-7a2c-4f3b-9a8e-2c1d5f6a7b8c\"\n    }\n}"
                        }
                    ]
                }
            ],
            "description": "Price, quote and bind motor cover with Insurance Cloud field names. Amounts in requests are whole shillings; responses show whole shillings next to `_minor` cents. The server is authoritative on price: every save re-prices with the current rates and refuses a premium more than KES 1 away with 422 `premium_mismatch` (the body carries the server figures). A save creates or matches the client, stores the quote, raises the policy pending payment (cash and carry) and its debit notes (1–4 instalments), and returns the client-area credentials."
        },
        {
            "name": "Medical",
            "item": [
                {
                    "name": "List inpatient limits",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Agent-Code",
                                "value": "{{agent_code}}",
                                "disabled": true,
                                "description": "Optional: act as this agent."
                            },
                            {
                                "key": "X-Agent-Key",
                                "value": "{{agent_key}}",
                                "disabled": true
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/medical/limits",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "medical",
                                "limits"
                            ]
                        },
                        "description": "Distinct inpatient limits offered by plans on the panel, ascending. Use one as `limit_from`/`limit_to` or `policy.inpatient_limit`.\n\nScope: read.\n\nRate limit: 60 requests per minute per token (per-client override)."
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "GET",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/medical/limits",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "medical",
                                        "limits"
                                    ]
                                }
                            },
                            "status": "Limits",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"data\": [\n        {\n            \"limit\": 1000000,\n            \"limit_minor\": 100000000,\n            \"label\": \"KES 1,000,000\"\n        },\n        {\n            \"limit\": 2000000,\n            \"limit_minor\": 200000000,\n            \"label\": \"KES 2,000,000\"\n        }\n    ]\n}"
                        }
                    ]
                },
                {
                    "name": "Download the member census template",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Agent-Code",
                                "value": "{{agent_code}}",
                                "disabled": true,
                                "description": "Optional: act as this agent."
                            },
                            {
                                "key": "X-Agent-Key",
                                "value": "{{agent_key}}",
                                "disabled": true
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/medical/census-template",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "medical",
                                "census-template"
                            ]
                        },
                        "description": "The .xlsx template for a member list: Members (one row per person, with dropdowns), Categories (limits per staff category), How to fill and Example sheets. Send its rows as members[] and categories[] to the quote and save endpoints.\n\nScope: quote.\n\nRate limit: 60 requests per minute per token (per-client override)."
                    }
                },
                {
                    "name": "Price medical cover",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Agent-Code",
                                "value": "{{agent_code}}",
                                "disabled": true,
                                "description": "Optional: act as this agent."
                            },
                            {
                                "key": "X-Agent-Key",
                                "value": "{{agent_key}}",
                                "disabled": true
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/medical/quote",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "medical",
                                "quote"
                            ]
                        },
                        "description": "One option per plan that accepts the family within the inpatient-limit range, cheapest first. Nothing is stored. With a census of several families: one option per insurer whose plans cover every category and price every family (each with `group` {families, lives, categories[]}), cheapest first, and `excluded` naming the insurers that could not and the families that stopped them.\n\nScope: quote.\n\nRate limit: 60 requests per minute per token (per-client override).",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"principal_age\": 30,\n    \"spouse_age\": 28,\n    \"children\": 2,\n    \"limit_from\": 500000,\n    \"limit_to\": 2000000\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "POST",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/medical/quote",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "medical",
                                        "quote"
                                    ]
                                }
                            },
                            "status": "Options (group options when the census lists several families)",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"message\": \"1 plan found.\",\n    \"quote\": {\n        \"principal_age\": 30,\n        \"spouse_age\": 28,\n        \"children\": 2,\n        \"limit_from\": 500000,\n        \"limit_to\": 2000000\n    },\n    \"options\": [\n        {\n            \"insurer_id\": 1,\n            \"insurer_name\": \"Savanna General\",\n            \"monogram\": \"SG\",\n            \"logo_url\": null,\n            \"plan_id\": 3,\n            \"plan_name\": \"Afya\",\n            \"basic_premium\": 50000,\n            \"basic_premium_minor\": 5000000,\n            \"taxes\": [\n                {\n                    \"code\": \"TL\",\n                    \"name\": \"Training levy\",\n                    \"amount\": 100,\n                    \"amount_minor\": 10000\n                }\n            ],\n            \"taxes_total\": 265,\n            \"taxes_total_minor\": 26500,\n            \"total\": 50265,\n            \"total_minor\": 5026500,\n            \"sum_insured\": 1000000,\n            \"sum_insured_minor\": 100000000,\n            \"commission_rate_bps\": 1000,\n            \"benefits\": [\n                \"Inpatient\",\n                \"Outpatient\"\n            ],\n            \"limits\": {\n                \"inpatient\": 100000000,\n                \"outpatient\": 10000000\n            },\n            \"members\": [\n                {\n                    \"type\": \"principal\",\n                    \"age\": 30,\n                    \"premium\": 20000,\n                    \"premium_minor\": 2000000\n                },\n                {\n                    \"type\": \"spouse\",\n                    \"age\": 28,\n                    \"premium\": 18000,\n                    \"premium_minor\": 1800000\n                }\n            ],\n            \"instalments\": [\n                {\n                    \"parts\": 1,\n                    \"amounts\": [\n                        50265\n                    ],\n                    \"amounts_minor\": [\n                        5026500\n                    ]\n                }\n            ],\n            \"ipf_offers\": null,\n            \"ipf_reason\": null\n        }\n    ]\n}"
                        }
                    ]
                },
                {
                    "name": "Bind a medical policy",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Idempotency-Key",
                                "value": "{{$guid}}",
                                "description": "Unique per write; a new one each send."
                            },
                            {
                                "key": "X-Agent-Code",
                                "value": "{{agent_code}}",
                                "disabled": true,
                                "description": "Optional: act as this agent."
                            },
                            {
                                "key": "X-Agent-Key",
                                "value": "{{agent_key}}",
                                "disabled": true
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/medical/save",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "medical",
                                "save"
                            ]
                        },
                        "description": "Members may be listed in any order; exactly one principal, at most one spouse, any number of children (type also accepts dependant, son, daughter, wife, husband). The plan is the insurer's plan with `inpatient_limit` (or `policy.plan_id`). The policy starts pending payment with 1–4 instalment debit notes. When members[] lists several family_no values (plus optional categories[]), the save binds a group scheme for the client (the employer): the chosen insurer's group option is re-priced from the census, the premium must match within KES 1, and every life joins one policy with its family_no, category and premium. `inpatient_limit` is then optional.\n\nScope: bind.\n\nRate limit: 60 requests per minute per token (per-client override).",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"client\": {\n        \"name\": \"Achieng Odhiambo\",\n        \"phone\": \"0733000111\",\n        \"idno\": \"27000111\",\n        \"risk_manager_id\": 2,\n        \"branch_id\": 1\n    },\n    \"members\": [\n        {\n            \"name\": \"Achieng Odhiambo\",\n            \"type\": \"principal\",\n            \"dob\": \"1996-03-02\",\n            \"product_name\": \"Afya\"\n        },\n        {\n            \"name\": \"Otieno Odhiambo\",\n            \"type\": \"spouse\",\n            \"dob\": \"1998-07-11\"\n        }\n    ],\n    \"policy\": {\n        \"start_date\": \"2026-10-14\",\n        \"end_date\": \"2027-10-13\",\n        \"insurer_id\": 1,\n        \"inpatient_limit\": 1000000,\n        \"outpatient_limit\": 100000,\n        \"basic\": 38000,\n        \"taxes\": 211,\n        \"premium\": 38211\n    },\n    \"taxes\": []\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "POST",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/medical/save",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "medical",
                                        "save"
                                    ]
                                }
                            },
                            "status": "Policy saved (same shape as motor save)",
                            "code": 201,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"message\": \"Policy saved successfully.\",\n    \"id\": 453,\n    \"uuid\": \"9a1c…\",\n    \"risknote\": \"RN-000453\",\n    \"policy_no\": \"POL-000453\",\n    \"client_no\": \"C-000125\",\n    \"client_key\": \"fxck_…\",\n    \"product_line\": \"medical\",\n    \"portal\": {\n        \"client_no\": \"C-000125\",\n        \"client_key\": \"fxck_…\"\n    }\n}"
                        }
                    ]
                }
            ],
            "description": "Family medical cover with Insurance Cloud field names. Limits and premiums in requests are whole shillings. On save the family is re-priced from the members' dates of birth (ages at the cover start date) and the premium must match the server price within KES 1. A member census (members[] with family_no and category, plus categories[]) may replace the ages: several families price a group (corporate) scheme with one option per insurer that can cover every family."
        },
        {
            "name": "Travel",
            "item": [
                {
                    "name": "Price a trip",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Agent-Code",
                                "value": "{{agent_code}}",
                                "disabled": true,
                                "description": "Optional: act as this agent."
                            },
                            {
                                "key": "X-Agent-Key",
                                "value": "{{agent_key}}",
                                "disabled": true
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/travel/quote",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "travel",
                                "quote"
                            ]
                        },
                        "description": "Days are counted departure to return inclusive; the destination country maps to a region (Schengen, Africa, worldwide…) and every plan for that region or worldwide quotes. Nothing is stored.\n\nScope: quote.\n\nRate limit: 60 requests per minute per token (per-client override).",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"rate_type\": \"normal\",\n    \"traveling_from\": \"Kenya\",\n    \"traveling_to\": \"Germany\",\n    \"number_of_travelers\": 2,\n    \"departure_date\": \"2026-11-01\",\n    \"return_date\": \"2026-11-10\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "POST",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/travel/quote",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "travel",
                                        "quote"
                                    ]
                                }
                            },
                            "status": "Options",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"message\": \"1 plan found.\",\n    \"quote\": {\n        \"rate_type\": \"normal\",\n        \"traveling_to\": \"Germany\",\n        \"number_of_travelers\": 2,\n        \"days\": 10,\n        \"region\": \"schengen\"\n    },\n    \"options\": [\n        {\n            \"insurer_id\": 2,\n            \"insurer_name\": \"Kilima Assurance\",\n            \"plan_id\": 7,\n            \"plan_name\": \"Schengen\",\n            \"basic_premium\": 5000,\n            \"basic_premium_minor\": 500000,\n            \"taxes\": [],\n            \"taxes_total\": 63,\n            \"taxes_total_minor\": 6300,\n            \"total\": 5063,\n            \"total_minor\": 506300,\n            \"days\": 10,\n            \"travellers\": 2,\n            \"region\": \"schengen\",\n            \"per_traveller\": 2500,\n            \"per_traveller_minor\": 250000,\n            \"sum_insured\": 4500000,\n            \"sum_insured_minor\": 450000000\n        }\n    ]\n}"
                        }
                    ]
                },
                {
                    "name": "Bind a travel policy",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Idempotency-Key",
                                "value": "{{$guid}}",
                                "description": "Unique per write; a new one each send."
                            },
                            {
                                "key": "X-Agent-Code",
                                "value": "{{agent_code}}",
                                "disabled": true,
                                "description": "Optional: act as this agent."
                            },
                            {
                                "key": "X-Agent-Key",
                                "value": "{{agent_key}}",
                                "disabled": true
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/travel/save",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "travel",
                                "save"
                            ]
                        },
                        "description": "Re-prices the trip for the number of travellers listed and checks `policy.premium` within KES 1. `policy.quoteId` (numeric) or `coverName` picks the plan; otherwise the insurer's cheapest plan. Each traveller needs a passport or ID number.\n\nScope: bind.\n\nRate limit: 60 requests per minute per token (per-client override).",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"client\": {\n        \"name\": \"Kamau Njoroge\",\n        \"phone\": \"0744000222\",\n        \"email\": \"kamau@example.co.ke\"\n    },\n    \"policy\": {\n        \"start_date\": \"2026-11-01\",\n        \"end_date\": \"2026-11-10\",\n        \"insurer_id\": 2,\n        \"basicPremium\": 5000,\n        \"taxes\": 63,\n        \"premium\": 5063,\n        \"sumInsured\": 4500000,\n        \"coverName\": \"Schengen\"\n    },\n    \"travel_info\": {\n        \"departure\": \"2026-11-01\",\n        \"return\": \"2026-11-10\",\n        \"travelling_from\": \"Kenya\",\n        \"travelling_to\": \"Germany\",\n        \"trip_type\": \"single\"\n    },\n    \"travellers\": [\n        {\n            \"name\": \"Kamau Njoroge\",\n            \"dob\": \"1990-01-01\",\n            \"passport_no\": \"AK123456\",\n            \"id_no\": \"22113344\",\n            \"phone\": \"0744000222\",\n            \"beneficiary_name\": \"Wairimu Kamau\",\n            \"beneficiary_passport_id_no\": \"22334455\",\n            \"benefitiary_relationship\": \"Wife\",\n            \"benefitiary_phone_no\": \"0700111222\"\n        }\n    ]\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "POST",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/travel/save",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "travel",
                                        "save"
                                    ]
                                }
                            },
                            "status": "Policy saved (same shape as motor save)",
                            "code": 201,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"message\": \"Policy saved successfully.\",\n    \"id\": 454,\n    \"uuid\": \"c2d4…\",\n    \"risknote\": \"RN-000454\",\n    \"policy_no\": \"POL-000454\",\n    \"client_no\": \"C-000126\",\n    \"client_key\": \"fxck_…\",\n    \"product_line\": \"travel\",\n    \"start_date\": \"2026-11-01\",\n    \"end_date\": \"2026-11-10\"\n}"
                        }
                    ]
                }
            ],
            "description": "Single-trip travel cover with Insurance Cloud field names, including its spellings (`traveling_from`, `benefitiary_relationship`, `benefitiary_phone_no`) — the correct spellings are accepted too. Cover runs from departure to return."
        },
        {
            "name": "Standard products",
            "item": [
                {
                    "name": "List standard products",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Agent-Code",
                                "value": "{{agent_code}}",
                                "disabled": true,
                                "description": "Optional: act as this agent."
                            },
                            {
                                "key": "X-Agent-Key",
                                "value": "{{agent_key}}",
                                "disabled": true
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/standard/products",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "standard",
                                "products"
                            ]
                        },
                        "description": "Every active product with its benefit schedule and each insurer's covers (`plan_id`, cover name, pricing basis). `needs_age` / `needs_sum_insured` say what the quote needs.\n\nScope: read.\n\nRate limit: 60 requests per minute per token (per-client override)."
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "GET",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/standard/products",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "standard",
                                        "products"
                                    ]
                                }
                            },
                            "status": "Products",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"data\": [\n        {\n            \"id\": 4,\n            \"code\": \"PA\",\n            \"name\": \"Personal accident\",\n            \"description\": \"…\",\n            \"brochure_url\": null,\n            \"needs_age\": true,\n            \"needs_sum_insured\": false,\n            \"benefits\": [\n                {\n                    \"name\": \"Death\",\n                    \"limit\": 1000000,\n                    \"limit_minor\": 100000000\n                }\n            ],\n            \"covers\": [\n                {\n                    \"plan_id\": 9,\n                    \"insurer_id\": 1,\n                    \"insurer_name\": \"Savanna General\",\n                    \"cover_name\": \"PA Classic\",\n                    \"pricing\": \"age_band\",\n                    \"rate_bps\": null,\n                    \"ipf_eligible\": false,\n                    \"premium\": null,\n                    \"premium_minor\": null,\n                    \"sum_insured\": 1000000,\n                    \"sum_insured_minor\": 100000000\n                }\n            ]\n        }\n    ]\n}"
                        }
                    ]
                },
                {
                    "name": "Price a standard product",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Agent-Code",
                                "value": "{{agent_code}}",
                                "disabled": true,
                                "description": "Optional: act as this agent."
                            },
                            {
                                "key": "X-Agent-Key",
                                "value": "{{agent_key}}",
                                "disabled": true
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/standard/quote?product_id=",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "standard",
                                "quote"
                            ],
                            "query": [
                                {
                                    "key": "product_id",
                                    "value": ""
                                },
                                {
                                    "key": "insurer_id",
                                    "value": "",
                                    "description": "One insurer, or `insurer_id[]=` for several.",
                                    "disabled": true
                                },
                                {
                                    "key": "age",
                                    "value": "",
                                    "description": "Needed for age-band products.",
                                    "disabled": true
                                },
                                {
                                    "key": "sum_insured",
                                    "value": "",
                                    "description": "Flexysure only. Whole shillings; needed for rate-on-sum-insured products.",
                                    "disabled": true
                                }
                            ]
                        },
                        "description": "Scope: quote.\n\nRate limit: 60 requests per minute per token (per-client override)."
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "GET",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/standard/quote?product_id=",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "standard",
                                        "quote"
                                    ],
                                    "query": [
                                        {
                                            "key": "product_id",
                                            "value": ""
                                        },
                                        {
                                            "key": "insurer_id",
                                            "value": "",
                                            "description": "One insurer, or `insurer_id[]=` for several.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "age",
                                            "value": "",
                                            "description": "Needed for age-band products.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "sum_insured",
                                            "value": "",
                                            "description": "Flexysure only. Whole shillings; needed for rate-on-sum-insured products.",
                                            "disabled": true
                                        }
                                    ]
                                }
                            },
                            "status": "Options",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"message\": \"1 option found.\",\n    \"quote\": {\n        \"product_id\": 4,\n        \"insurer_id\": [\n            1\n        ],\n        \"age\": 30,\n        \"sum_insured\": null\n    },\n    \"options\": [\n        {\n            \"insurer_id\": 1,\n            \"insurer_name\": \"Savanna General\",\n            \"plan_id\": 9,\n            \"plan_name\": \"PA Classic\",\n            \"basic_premium\": 4500,\n            \"basic_premium_minor\": 450000,\n            \"taxes\": [],\n            \"taxes_total\": 60,\n            \"taxes_total_minor\": 6000,\n            \"total\": 4560,\n            \"total_minor\": 456000,\n            \"product_id\": 4,\n            \"product_code\": \"PA\",\n            \"pricing\": \"age_band\",\n            \"age\": 30\n        }\n    ]\n}"
                        }
                    ]
                },
                {
                    "name": "Bind a standard product",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Idempotency-Key",
                                "value": "{{$guid}}",
                                "description": "Unique per write; a new one each send."
                            },
                            {
                                "key": "X-Agent-Code",
                                "value": "{{agent_code}}",
                                "disabled": true,
                                "description": "Optional: act as this agent."
                            },
                            {
                                "key": "X-Agent-Key",
                                "value": "{{agent_key}}",
                                "disabled": true
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/standard/save",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "standard",
                                "save"
                            ]
                        },
                        "description": "Re-prices the product with the chosen insurer (`policy.plan_id` or `coverName` picks the cover) and checks `policy.premium` within KES 1. Age comes from `policy.age` or the client's `dob`. `benefits[]` (limits in shillings, rate in percent) is kept on the policy; otherwise the cover's schedule is used.\n\nScope: bind.\n\nRate limit: 60 requests per minute per token (per-client override).",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"client\": {\n        \"name\": \"Mutua Musyoka\",\n        \"phone\": \"0755000333\",\n        \"dob\": \"1996-01-20\"\n    },\n    \"policy\": {\n        \"product_id\": 4,\n        \"start_date\": \"2026-10-14\",\n        \"end_date\": \"2027-10-13\",\n        \"insurer_id\": 1,\n        \"coverName\": \"PA Classic\",\n        \"basicPremium\": 4500,\n        \"sumInsured\": 1000000,\n        \"taxes\": 60,\n        \"premium\": 4560\n    },\n    \"taxes\": [],\n    \"benefits\": [\n        {\n            \"name\": \"Death\",\n            \"limit\": 1000000,\n            \"rate\": null,\n            \"premium\": 0\n        }\n    ]\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "POST",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/standard/save",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "standard",
                                        "save"
                                    ]
                                }
                            },
                            "status": "Policy saved (same shape as motor save)",
                            "code": 201,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"message\": \"Policy saved successfully.\",\n    \"id\": 455,\n    \"uuid\": \"e7f1…\",\n    \"risknote\": \"RN-000455\",\n    \"policy_no\": \"POL-000455\",\n    \"client_no\": \"C-000127\",\n    \"client_key\": \"fxck_…\",\n    \"product_line\": \"standard\"\n}"
                        }
                    ]
                }
            ],
            "description": "Packaged covers — personal accident, domestic package, WIBA, fire, golfer's and the like — priced flat, by age band or as a rate on the sum insured. Insurance Cloud field names (`coverName`, `basicPremium`, `sumInsured`)."
        },
        {
            "name": "Policies and quotes",
            "item": [
                {
                    "name": "List policies",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Agent-Code",
                                "value": "{{agent_code}}",
                                "disabled": true,
                                "description": "Optional: act as this agent."
                            },
                            {
                                "key": "X-Agent-Key",
                                "value": "{{agent_key}}",
                                "disabled": true
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/policies",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "policies"
                            ],
                            "query": [
                                {
                                    "key": "status",
                                    "value": "",
                                    "disabled": true
                                },
                                {
                                    "key": "product_line",
                                    "value": "",
                                    "disabled": true
                                },
                                {
                                    "key": "insurer_id",
                                    "value": "",
                                    "disabled": true
                                },
                                {
                                    "key": "starting",
                                    "value": "",
                                    "description": "Cover starts on or after (Y-m-d).",
                                    "disabled": true
                                },
                                {
                                    "key": "ending",
                                    "value": "",
                                    "description": "Cover ends on or before (Y-m-d).",
                                    "disabled": true
                                },
                                {
                                    "key": "client_no",
                                    "value": "",
                                    "disabled": true
                                },
                                {
                                    "key": "limit",
                                    "value": "",
                                    "description": "1–100 (default 25).",
                                    "disabled": true
                                },
                                {
                                    "key": "cursor",
                                    "value": "",
                                    "description": "From links.next.",
                                    "disabled": true
                                }
                            ]
                        },
                        "description": "Newest first, cursor-paginated (`?limit=&cursor=`; Insurance Cloud style `?page=&per_page=` also works).\n\nScope: read.\n\nRate limit: 60 requests per minute per token (per-client override)."
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "GET",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/policies",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "policies"
                                    ],
                                    "query": [
                                        {
                                            "key": "status",
                                            "value": "",
                                            "disabled": true
                                        },
                                        {
                                            "key": "product_line",
                                            "value": "",
                                            "disabled": true
                                        },
                                        {
                                            "key": "insurer_id",
                                            "value": "",
                                            "disabled": true
                                        },
                                        {
                                            "key": "starting",
                                            "value": "",
                                            "description": "Cover starts on or after (Y-m-d).",
                                            "disabled": true
                                        },
                                        {
                                            "key": "ending",
                                            "value": "",
                                            "description": "Cover ends on or before (Y-m-d).",
                                            "disabled": true
                                        },
                                        {
                                            "key": "client_no",
                                            "value": "",
                                            "disabled": true
                                        },
                                        {
                                            "key": "limit",
                                            "value": "",
                                            "description": "1–100 (default 25).",
                                            "disabled": true
                                        },
                                        {
                                            "key": "cursor",
                                            "value": "",
                                            "description": "From links.next.",
                                            "disabled": true
                                        }
                                    ]
                                }
                            },
                            "status": "Policies",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"data\": [\n        {\n            \"id\": 452,\n            \"uuid\": \"0d7b1f1e-7a2c-4f3b-9a8e-2c1d5f6a7b8c\",\n            \"policy_no\": \"POL-000452\",\n            \"risk_note_no\": \"RN-000452\",\n            \"product_line\": \"motor\",\n            \"status\": \"active\",\n            \"status_label\": \"Active\",\n            \"client\": {\n                \"client_no\": \"C-000123\",\n                \"name\": \"Wanjiru Kamau\"\n            },\n            \"insurer\": {\n                \"id\": 1,\n                \"name\": \"Savanna General\"\n            },\n            \"vehicle_class\": \"private\",\n            \"cover_type\": \"comprehensive\",\n            \"cover\": \"Comprehensive\",\n            \"cover_name\": null,\n            \"risk\": \"KDA 123A\",\n            \"start_date\": \"2026-10-14\",\n            \"end_date\": \"2027-10-13\",\n            \"payment_mode\": \"full\",\n            \"instalments\": 1,\n            \"sum_insured\": 1000000,\n            \"sum_insured_minor\": 100000000,\n            \"basic_premium\": 35000,\n            \"basic_premium_minor\": 3500000,\n            \"taxes\": 198,\n            \"taxes_minor\": 19800,\n            \"premium\": 35198,\n            \"premium_minor\": 3519800,\n            \"billed\": 35198,\n            \"billed_minor\": 3519800,\n            \"paid\": 35198,\n            \"paid_minor\": 3519800,\n            \"balance\": 0,\n            \"balance_minor\": 0,\n            \"created_by\": 4,\n            \"created_at\": \"2026-10-14T09:30:00+03:00\",\n            \"activated_at\": \"2026-10-14T09:31:04+03:00\",\n            \"cancelled_at\": null\n        }\n    ],\n    \"meta\": {\n        \"limit\": 25,\n        \"has_more\": false,\n        \"count\": 1\n    },\n    \"links\": {\n        \"next\": null\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "Read a policy",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Agent-Code",
                                "value": "{{agent_code}}",
                                "disabled": true,
                                "description": "Optional: act as this agent."
                            },
                            {
                                "key": "X-Agent-Key",
                                "value": "{{agent_key}}",
                                "disabled": true
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/policies/:uuid",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "policies",
                                ":uuid"
                            ],
                            "variable": [
                                {
                                    "key": "uuid",
                                    "value": "",
                                    "description": "Policy uuid (from a save response or the list)."
                                }
                            ]
                        },
                        "description": "The list row plus client details, vehicles, members, travellers, benefits, debit notes, receipts allocated to them, certificates, endorsements, refunds, a claims summary and links.\n\nScope: read.\n\nRate limit: 60 requests per minute per token (per-client override)."
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "GET",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/policies/:uuid",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "policies",
                                        ":uuid"
                                    ],
                                    "variable": [
                                        {
                                            "key": "uuid",
                                            "value": "",
                                            "description": "Policy uuid (from a save response or the list)."
                                        }
                                    ]
                                }
                            },
                            "status": "Policy",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"data\": {\n        \"id\": 452,\n        \"uuid\": \"0d7b1f1e-7a2c-4f3b-9a8e-2c1d5f6a7b8c\",\n        \"policy_no\": \"POL-000452\",\n        \"risk_note_no\": \"RN-000452\",\n        \"product_line\": \"motor\",\n        \"status\": \"active\",\n        \"status_label\": \"Active\",\n        \"client\": {\n            \"client_no\": \"C-000123\",\n            \"name\": \"Wanjiru Kamau\"\n        },\n        \"insurer\": {\n            \"id\": 1,\n            \"name\": \"Savanna General\"\n        },\n        \"vehicle_class\": \"private\",\n        \"cover_type\": \"comprehensive\",\n        \"cover\": \"Comprehensive\",\n        \"cover_name\": null,\n        \"risk\": \"KDA 123A\",\n        \"start_date\": \"2026-10-14\",\n        \"end_date\": \"2027-10-13\",\n        \"payment_mode\": \"full\",\n        \"instalments\": 1,\n        \"sum_insured\": 1000000,\n        \"sum_insured_minor\": 100000000,\n        \"basic_premium\": 35000,\n        \"basic_premium_minor\": 3500000,\n        \"taxes\": 198,\n        \"taxes_minor\": 19800,\n        \"premium\": 35198,\n        \"premium_minor\": 3519800,\n        \"billed\": 35198,\n        \"billed_minor\": 3519800,\n        \"paid\": 35198,\n        \"paid_minor\": 3519800,\n        \"balance\": 0,\n        \"balance_minor\": 0,\n        \"created_by\": 4,\n        \"created_at\": \"2026-10-14T09:30:00+03:00\",\n        \"activated_at\": \"2026-10-14T09:31:04+03:00\",\n        \"cancelled_at\": null,\n        \"limits\": {\n            \"cover_period\": \"annual\",\n            \"days\": 365\n        },\n        \"travel_info\": null,\n        \"vehicles\": [\n            {\n                \"id\": 77,\n                \"reg_no\": \"KDA123A\",\n                \"chassis_no\": \"NZE161-3012456\",\n                \"make\": \"Toyota\",\n                \"model\": \"Axio\",\n                \"year\": 2018,\n                \"on_cover\": true,\n                \"value\": 1000000,\n                \"value_minor\": 100000000\n            }\n        ],\n        \"members\": [],\n        \"travellers\": [],\n        \"benefits\": [],\n        \"debit_notes\": [\n            {\n                \"number\": \"DN-000452\",\n                \"kind\": \"premium\",\n                \"instalment_no\": 1,\n                \"instalment_of\": 1,\n                \"due_on\": \"2026-10-14\",\n                \"status\": \"settled\",\n                \"amount\": 35198,\n                \"amount_minor\": 3519800,\n                \"settled\": 35198,\n                \"settled_minor\": 3519800,\n                \"outstanding\": 0,\n                \"outstanding_minor\": 0\n            }\n        ],\n        \"receipts\": [\n            {\n                \"number\": \"RCT-000311\",\n                \"channel\": \"mpesa\",\n                \"reference\": \"SJK3ABCD12\",\n                \"received_at\": \"2026-10-14T09:31:00+03:00\",\n                \"debit_note\": \"DN-000452\",\n                \"allocated\": 35198,\n                \"allocated_minor\": 3519800\n            }\n        ],\n        \"certificates\": [\n            {\n                \"certificate_no\": \"C12345678\",\n                \"vehicle_id\": 77,\n                \"stage\": 1,\n                \"stage_of\": 1,\n                \"period_from\": \"2026-10-14\",\n                \"period_to\": \"2027-10-13\",\n                \"status\": \"issued\"\n            }\n        ],\n        \"endorsements\": [],\n        \"refunds\": [],\n        \"claims\": {\n            \"count\": 0,\n            \"open\": 0,\n            \"items\": []\n        },\n        \"links\": {\n            \"self\": \"https://app.flexysure.com/api/v1/policies/0d7b1f1e-…\",\n            \"web\": \"https://app.flexysure.com/policies/0d7b1f1e-…\"\n        }\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "Endorse a policy",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Idempotency-Key",
                                "value": "{{$guid}}",
                                "description": "Unique per write; a new one each send."
                            },
                            {
                                "key": "X-Agent-Code",
                                "value": "{{agent_code}}",
                                "disabled": true,
                                "description": "Optional: act as this agent."
                            },
                            {
                                "key": "X-Agent-Key",
                                "value": "{{agent_key}}",
                                "disabled": true
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/policies/:uuid/endorse",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "policies",
                                ":uuid",
                                "endorse"
                            ],
                            "variable": [
                                {
                                    "key": "uuid",
                                    "value": "",
                                    "description": "Policy uuid (from a save response or the list)."
                                }
                            ]
                        },
                        "description": "Mid-term change to an active policy, priced pro rata to expiry with current rates. A positive change raises an endorsement debit note; a negative one a credit and refund. `changes` by type: add_vehicle {reg_no, chassis_no, make, model, year, body_type, value}; remove_vehicle {vehicle_id}; change_value {value, vehicle_id?}; change_cover {cover_type comprehensive|tpo}; change_dates {end_on}; add_member {name, type, dob?, premium}; remove_member {member_id}; other {description, premium_delta}. Amounts in whole shillings.\n\nScope: bind.\n\nRate limit: 60 requests per minute per token (per-client override).",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"type\": \"change_value\",\n    \"effective_on\": \"2027-01-10\",\n    \"changes\": {\n        \"value\": 1200000\n    }\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "POST",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/policies/:uuid/endorse",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "policies",
                                        ":uuid",
                                        "endorse"
                                    ],
                                    "variable": [
                                        {
                                            "key": "uuid",
                                            "value": "",
                                            "description": "Policy uuid (from a save response or the list)."
                                        }
                                    ]
                                }
                            },
                            "status": "Endorsement and the updated policy",
                            "code": 201,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"data\": {\n        \"endorsement\": {\n            \"uuid\": \"1f2e…\",\n            \"number\": \"END-000031\",\n            \"type\": \"change_value\",\n            \"effective_on\": \"2027-01-10\",\n            \"status\": \"issued\",\n            \"narrative\": \"Sum insured KES 1,000,000 → KES 1,200,000\",\n            \"changes\": {\n                \"value\": 1200000\n            },\n            \"debit_note\": \"DN-000460\",\n            \"premium_delta\": 5404,\n            \"premium_delta_minor\": 540400,\n            \"taxes_delta\": 24,\n            \"taxes_delta_minor\": 2400,\n            \"gross_delta\": 5428,\n            \"gross_delta_minor\": 542800\n        },\n        \"policy\": {\n            \"id\": 452,\n            \"uuid\": \"0d7b1f1e-7a2c-4f3b-9a8e-2c1d5f6a7b8c\",\n            \"policy_no\": \"POL-000452\",\n            \"risk_note_no\": \"RN-000452\",\n            \"product_line\": \"motor\",\n            \"status\": \"active\",\n            \"status_label\": \"Active\",\n            \"client\": {\n                \"client_no\": \"C-000123\",\n                \"name\": \"Wanjiru Kamau\"\n            },\n            \"insurer\": {\n                \"id\": 1,\n                \"name\": \"Savanna General\"\n            },\n            \"vehicle_class\": \"private\",\n            \"cover_type\": \"comprehensive\",\n            \"cover\": \"Comprehensive\",\n            \"cover_name\": null,\n            \"risk\": \"KDA 123A\",\n            \"start_date\": \"2026-10-14\",\n            \"end_date\": \"2027-10-13\",\n            \"payment_mode\": \"full\",\n            \"instalments\": 1,\n            \"sum_insured\": 1000000,\n            \"sum_insured_minor\": 100000000,\n            \"basic_premium\": 35000,\n            \"basic_premium_minor\": 3500000,\n            \"taxes\": 198,\n            \"taxes_minor\": 19800,\n            \"premium\": 35198,\n            \"premium_minor\": 3519800,\n            \"billed\": 35198,\n            \"billed_minor\": 3519800,\n            \"paid\": 35198,\n            \"paid_minor\": 3519800,\n            \"balance\": 0,\n            \"balance_minor\": 0,\n            \"created_by\": 4,\n            \"created_at\": \"2026-10-14T09:30:00+03:00\",\n            \"activated_at\": \"2026-10-14T09:31:04+03:00\",\n            \"cancelled_at\": null,\n            \"limits\": {\n                \"cover_period\": \"annual\",\n                \"days\": 365\n            },\n            \"travel_info\": null,\n            \"vehicles\": [\n                {\n                    \"id\": 77,\n                    \"reg_no\": \"KDA123A\",\n                    \"chassis_no\": \"NZE161-3012456\",\n                    \"make\": \"Toyota\",\n                    \"model\": \"Axio\",\n                    \"year\": 2018,\n                    \"on_cover\": true,\n                    \"value\": 1000000,\n                    \"value_minor\": 100000000\n                }\n            ],\n            \"members\": [],\n            \"travellers\": [],\n            \"benefits\": [],\n            \"debit_notes\": [\n                {\n                    \"number\": \"DN-000452\",\n                    \"kind\": \"premium\",\n                    \"instalment_no\": 1,\n                    \"instalment_of\": 1,\n                    \"due_on\": \"2026-10-14\",\n                    \"status\": \"settled\",\n                    \"amount\": 35198,\n                    \"amount_minor\": 3519800,\n                    \"settled\": 35198,\n                    \"settled_minor\": 3519800,\n                    \"outstanding\": 0,\n                    \"outstanding_minor\": 0\n                }\n            ],\n            \"receipts\": [\n                {\n                    \"number\": \"RCT-000311\",\n                    \"channel\": \"mpesa\",\n                    \"reference\": \"SJK3ABCD12\",\n                    \"received_at\": \"2026-10-14T09:31:00+03:00\",\n                    \"debit_note\": \"DN-000452\",\n                    \"allocated\": 35198,\n                    \"allocated_minor\": 3519800\n                }\n            ],\n            \"certificates\": [\n                {\n                    \"certificate_no\": \"C12345678\",\n                    \"vehicle_id\": 77,\n                    \"stage\": 1,\n                    \"stage_of\": 1,\n                    \"period_from\": \"2026-10-14\",\n                    \"period_to\": \"2027-10-13\",\n                    \"status\": \"issued\"\n                }\n            ],\n            \"endorsements\": [],\n            \"refunds\": [],\n            \"claims\": {\n                \"count\": 0,\n                \"open\": 0,\n                \"items\": []\n            },\n            \"links\": {\n                \"self\": \"https://app.flexysure.com/api/v1/policies/0d7b1f1e-…\",\n                \"web\": \"https://app.flexysure.com/policies/0d7b1f1e-…\"\n            }\n        }\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "Preview a cancellation",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Agent-Code",
                                "value": "{{agent_code}}",
                                "disabled": true,
                                "description": "Optional: act as this agent."
                            },
                            {
                                "key": "X-Agent-Key",
                                "value": "{{agent_key}}",
                                "disabled": true
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/policies/:uuid/cancellation-quote",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "policies",
                                ":uuid",
                                "cancellation-quote"
                            ],
                            "query": [
                                {
                                    "key": "effective_on",
                                    "value": "",
                                    "description": "Y-m-d (default today).",
                                    "disabled": true
                                }
                            ],
                            "variable": [
                                {
                                    "key": "uuid",
                                    "value": "",
                                    "description": "Policy uuid (from a save response or the list)."
                                }
                            ]
                        },
                        "description": "What cancelling on `effective_on` would do, without changing anything: unearned premium (pro rata or short-period scale, levies not refunded) and the estimated refund after unpaid premium. `outcome` is `cancel`, `void` (never paid — nothing to refund) or `not_cancellable`.\n\nScope: read.\n\nRate limit: 60 requests per minute per token (per-client override)."
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "GET",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/policies/:uuid/cancellation-quote",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "policies",
                                        ":uuid",
                                        "cancellation-quote"
                                    ],
                                    "query": [
                                        {
                                            "key": "effective_on",
                                            "value": "",
                                            "description": "Y-m-d (default today).",
                                            "disabled": true
                                        }
                                    ],
                                    "variable": [
                                        {
                                            "key": "uuid",
                                            "value": "",
                                            "description": "Policy uuid (from a save response or the list)."
                                        }
                                    ]
                                }
                            },
                            "status": "Breakdown",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"data\": {\n        \"policy_no\": \"POL-000452\",\n        \"status\": \"active\",\n        \"cancellable\": true,\n        \"outcome\": \"cancel\",\n        \"effective_on\": \"2027-01-10\",\n        \"method\": \"pro_rata\",\n        \"cover_days\": 365,\n        \"days_on_risk\": 88,\n        \"remaining_days\": 277,\n        \"months_on_risk\": 3,\n        \"basic_premium\": 35000,\n        \"basic_premium_minor\": 3500000,\n        \"earned\": 8438,\n        \"earned_minor\": 843800,\n        \"unearned_basic\": 26562,\n        \"unearned_basic_minor\": 2656200,\n        \"unearned_levies\": 0,\n        \"unearned_levies_minor\": 0,\n        \"unearned\": 26562,\n        \"unearned_minor\": 2656200,\n        \"billed\": 35198,\n        \"billed_minor\": 3519800,\n        \"paid\": 35198,\n        \"paid_minor\": 3519800,\n        \"estimated_refund\": 26562,\n        \"estimated_refund_minor\": 2656200,\n        \"note\": \"Levies and stamp duty are not refunded…\"\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "Cancel a policy",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Idempotency-Key",
                                "value": "{{$guid}}",
                                "description": "Unique per write; a new one each send."
                            },
                            {
                                "key": "X-Agent-Code",
                                "value": "{{agent_code}}",
                                "disabled": true,
                                "description": "Optional: act as this agent."
                            },
                            {
                                "key": "X-Agent-Key",
                                "value": "{{agent_key}}",
                                "disabled": true
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/policies/:uuid/cancel",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "policies",
                                ":uuid",
                                "cancel"
                            ],
                            "variable": [
                                {
                                    "key": "uuid",
                                    "value": "",
                                    "description": "Policy uuid (from a save response or the list)."
                                }
                            ]
                        },
                        "description": "Cancels an active policy (or voids one never paid): credits the unearned premium, reverses commission on it, cancels certificates and records a refund to the client (or to Flexysure Finance first for a premium-financed policy). Backdating is limited to 30 days; future dates are refused.\n\nScope: bind.\n\nRate limit: 60 requests per minute per token (per-client override).",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"reason\": \"Vehicle sold\",\n    \"effective_on\": \"2027-01-10\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "POST",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/policies/:uuid/cancel",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "policies",
                                        ":uuid",
                                        "cancel"
                                    ],
                                    "variable": [
                                        {
                                            "key": "uuid",
                                            "value": "",
                                            "description": "Policy uuid (from a save response or the list)."
                                        }
                                    ]
                                }
                            },
                            "status": "The cancelled policy with its refunds",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"data\": {\n        \"id\": 452,\n        \"uuid\": \"0d7b1f1e-7a2c-4f3b-9a8e-2c1d5f6a7b8c\",\n        \"policy_no\": \"POL-000452\",\n        \"risk_note_no\": \"RN-000452\",\n        \"product_line\": \"motor\",\n        \"status\": \"cancelled\",\n        \"status_label\": \"Cancelled\",\n        \"client\": {\n            \"client_no\": \"C-000123\",\n            \"name\": \"Wanjiru Kamau\"\n        },\n        \"insurer\": {\n            \"id\": 1,\n            \"name\": \"Savanna General\"\n        },\n        \"vehicle_class\": \"private\",\n        \"cover_type\": \"comprehensive\",\n        \"cover\": \"Comprehensive\",\n        \"cover_name\": null,\n        \"risk\": \"KDA 123A\",\n        \"start_date\": \"2026-10-14\",\n        \"end_date\": \"2027-10-13\",\n        \"payment_mode\": \"full\",\n        \"instalments\": 1,\n        \"sum_insured\": 1000000,\n        \"sum_insured_minor\": 100000000,\n        \"basic_premium\": 35000,\n        \"basic_premium_minor\": 3500000,\n        \"taxes\": 198,\n        \"taxes_minor\": 19800,\n        \"premium\": 35198,\n        \"premium_minor\": 3519800,\n        \"billed\": 35198,\n        \"billed_minor\": 3519800,\n        \"paid\": 35198,\n        \"paid_minor\": 3519800,\n        \"balance\": 0,\n        \"balance_minor\": 0,\n        \"created_by\": 4,\n        \"created_at\": \"2026-10-14T09:30:00+03:00\",\n        \"activated_at\": \"2026-10-14T09:31:04+03:00\",\n        \"cancelled_at\": null,\n        \"limits\": {\n            \"cover_period\": \"annual\",\n            \"days\": 365\n        },\n        \"travel_info\": null,\n        \"vehicles\": [\n            {\n                \"id\": 77,\n                \"reg_no\": \"KDA123A\",\n                \"chassis_no\": \"NZE161-3012456\",\n                \"make\": \"Toyota\",\n                \"model\": \"Axio\",\n                \"year\": 2018,\n                \"on_cover\": true,\n                \"value\": 1000000,\n                \"value_minor\": 100000000\n            }\n        ],\n        \"members\": [],\n        \"travellers\": [],\n        \"benefits\": [],\n        \"debit_notes\": [\n            {\n                \"number\": \"DN-000452\",\n                \"kind\": \"premium\",\n                \"instalment_no\": 1,\n                \"instalment_of\": 1,\n                \"due_on\": \"2026-10-14\",\n                \"status\": \"settled\",\n                \"amount\": 35198,\n                \"amount_minor\": 3519800,\n                \"settled\": 35198,\n                \"settled_minor\": 3519800,\n                \"outstanding\": 0,\n                \"outstanding_minor\": 0\n            }\n        ],\n        \"receipts\": [\n            {\n                \"number\": \"RCT-000311\",\n                \"channel\": \"mpesa\",\n                \"reference\": \"SJK3ABCD12\",\n                \"received_at\": \"2026-10-14T09:31:00+03:00\",\n                \"debit_note\": \"DN-000452\",\n                \"allocated\": 35198,\n                \"allocated_minor\": 3519800\n            }\n        ],\n        \"certificates\": [\n            {\n                \"certificate_no\": \"C12345678\",\n                \"vehicle_id\": 77,\n                \"stage\": 1,\n                \"stage_of\": 1,\n                \"period_from\": \"2026-10-14\",\n                \"period_to\": \"2027-10-13\",\n                \"status\": \"issued\"\n            }\n        ],\n        \"endorsements\": [],\n        \"refunds\": [\n            {\n                \"uuid\": \"7c8d…\",\n                \"number\": \"RF-000012\",\n                \"kind\": \"cancellation\",\n                \"payee\": \"client\",\n                \"status\": \"pending\",\n                \"paid_at\": null,\n                \"reference\": null,\n                \"amount\": 26562,\n                \"amount_minor\": 2656200\n            }\n        ],\n        \"claims\": {\n            \"count\": 0,\n            \"open\": 0,\n            \"items\": []\n        },\n        \"links\": {\n            \"self\": \"https://app.flexysure.com/api/v1/policies/0d7b1f1e-…\",\n            \"web\": \"https://app.flexysure.com/policies/0d7b1f1e-…\"\n        }\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "Raise a renewal quote",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Idempotency-Key",
                                "value": "{{$guid}}",
                                "description": "Unique per write; a new one each send."
                            },
                            {
                                "key": "X-Agent-Code",
                                "value": "{{agent_code}}",
                                "disabled": true,
                                "description": "Optional: act as this agent."
                            },
                            {
                                "key": "X-Agent-Key",
                                "value": "{{agent_key}}",
                                "disabled": true
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/policies/:uuid/renewal-quote",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "policies",
                                ":uuid",
                                "renewal-quote"
                            ],
                            "variable": [
                                {
                                    "key": "uuid",
                                    "value": "",
                                    "description": "Policy uuid (from a save response or the list)."
                                }
                            ]
                        },
                        "description": "Re-quotes the same risk with current rates for the next period and links the quote to the policy. Convert it like any other quote (travel cover is not renewed).\n\nScope: bind.\n\nRate limit: 60 requests per minute per token (per-client override)."
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "POST",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/policies/:uuid/renewal-quote",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "policies",
                                        ":uuid",
                                        "renewal-quote"
                                    ],
                                    "variable": [
                                        {
                                            "key": "uuid",
                                            "value": "",
                                            "description": "Policy uuid (from a save response or the list)."
                                        }
                                    ]
                                }
                            },
                            "status": "Quote",
                            "code": 201,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"data\": {\n        \"id\": 91,\n        \"uuid\": \"3e4f…\",\n        \"quote_no\": \"Q-000091\",\n        \"product_line\": \"motor\",\n        \"status\": \"presented\",\n        \"valid_until\": \"2027-11-12\",\n        \"renews_policy_id\": 452,\n        \"options\": [\n            {\n                \"option_id\": 310,\n                \"insurer_id\": 1,\n                \"insurer_name\": \"Savanna General\",\n                \"rate\": 3.5,\n                \"total\": 35198,\n                \"total_minor\": 3519800\n            }\n        ]\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "Read a quote",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Agent-Code",
                                "value": "{{agent_code}}",
                                "disabled": true,
                                "description": "Optional: act as this agent."
                            },
                            {
                                "key": "X-Agent-Key",
                                "value": "{{agent_key}}",
                                "disabled": true
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/quotes/:uuid",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "quotes",
                                ":uuid"
                            ],
                            "variable": [
                                {
                                    "key": "uuid",
                                    "value": ""
                                }
                            ]
                        },
                        "description": "A stored quote of any product line with its options (whole shillings beside cents), inputs, validity and — once converted — the policy it became.\n\nScope: read.\n\nRate limit: 60 requests per minute per token (per-client override)."
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "GET",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/quotes/:uuid",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "quotes",
                                        ":uuid"
                                    ],
                                    "variable": [
                                        {
                                            "key": "uuid",
                                            "value": ""
                                        }
                                    ]
                                }
                            },
                            "status": "Quote",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"data\": {\n        \"id\": 88,\n        \"uuid\": \"5b0f…\",\n        \"quote_no\": \"Q-000088\",\n        \"product_line\": \"motor\",\n        \"status\": \"presented\",\n        \"valid_until\": \"2026-10-28\",\n        \"client\": {\n            \"client_no\": \"C-000124\",\n            \"name\": \"Otieno Ouma\"\n        },\n        \"inputs\": {\n            \"vehicle_class\": \"private\",\n            \"cover_type\": \"comprehensive\",\n            \"value\": 1000000,\n            \"year\": 2018\n        },\n        \"policy\": null,\n        \"options\": [\n            {\n                \"option_id\": 301,\n                \"insurer_id\": 1,\n                \"insurer_name\": \"Savanna General\",\n                \"rate\": 3.5,\n                \"basic_premium\": 35000,\n                \"basic_premium_minor\": 3500000,\n                \"total\": 35198,\n                \"total_minor\": 3519800\n            }\n        ]\n    }\n}"
                        }
                    ]
                }
            ],
            "description": "Everything after the sale, which Insurance Cloud does not expose: list and read policies, endorse them mid-term, preview and confirm a cancellation with its refund, and raise a renewal quote. Results respect visibility: an agent (by `X-Agent-Code`/`X-Agent-Key`, or a key whose actor is an agent) sees only what they created; a policy outside reach is a 404."
        },
        {
            "name": "Payments",
            "item": [
                {
                    "name": "Send an M-Pesa STK push",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Idempotency-Key",
                                "value": "{{$guid}}",
                                "description": "Unique per write; a new one each send."
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/payment/stk/push",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "payment",
                                "stk",
                                "push"
                            ]
                        },
                        "description": "Sends a \"Lipa na M-Pesa\" prompt to the customer's phone. `account` may be a debit note number, a policy number, a risk note number or a premium-finance loan ref (IPF-…). A policy resolves to its oldest unpaid debit note. If the policy has a signed premium-finance loan waiting for its deposit, the prompt is for the deposit (purpose `ipf_deposit`) and paying it hands the loan to Flexysure Finance. An active (or in-arrears) loan ref is an instalment repayment to Flexysure Finance (purpose `ipf_repayment`): when the customer pays, the money is booked in Flexysure Finance's books against the loan (fees, then interest, then principal of the oldest unpaid instalment), never as a brokerage receipt, and the loan's `repaid` and `arrears` update. To clear a loan early, use `POST /ipf/loans/{uuid}/early-settlement` (purpose `ipf_settlement`). The amount may not exceed what is outstanding on that account. Daraja takes whole shillings, so cents are rounded up.\n\nScope: pay.\n\nRate limit: 60 requests per minute per token (per-client override).",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"account\": \"DN-000123\",\n    \"amount\": 30175,\n    \"phone\": \"0712345678\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "POST",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/payment/stk/push",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "payment",
                                        "stk",
                                        "push"
                                    ]
                                }
                            },
                            "status": "Prompt sent: Insurance Cloud fields plus `stk_request_uuid` to poll",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"merchant_request_id\": \"29115-34620561-1\",\n    \"checkout_request_id\": \"ws_CO_14102026101500123\",\n    \"stk_request_uuid\": \"9b2f0f5e-6d0b-4c1e-9d55-2b8f3c1a7e10\",\n    \"status\": \"pending\",\n    \"status_label\": \"Waiting for customer\",\n    \"purpose\": \"premium\",\n    \"account\": \"DN-000123\",\n    \"phone\": \"0712 345 678\",\n    \"amount\": 30175,\n    \"amount_minor\": 3017500,\n    \"result_code\": null,\n    \"result_desc\": null,\n    \"mpesa_receipt\": null,\n    \"receipt_number\": null,\n    \"debit_note\": \"DN-000123\",\n    \"ipf_loan_ref\": null,\n    \"created_at\": \"2026-10-14T10:15:00+03:00\",\n    \"updated_at\": \"2026-10-14T10:15:00+03:00\",\n    \"customer_message\": \"We sent an M-Pesa prompt to 0712 345 678. The customer enters their PIN to pay.\"\n}"
                        }
                    ]
                },
                {
                    "name": "Get STK push status",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/payment/stk/:uuid",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "payment",
                                "stk",
                                ":uuid"
                            ],
                            "variable": [
                                {
                                    "key": "uuid",
                                    "value": "",
                                    "description": "`stk_request_uuid` from the push response."
                                }
                            ]
                        },
                        "description": "`pending` until the customer answers the prompt, then `paid` (with `mpesa_receipt` and the Flexysure `receipt_number`) or `failed` (with Daraja's `result_code` and `result_desc`, for example 1032 cancelled by the customer).\n\nScope: pay.\n\nRate limit: 60 requests per minute per token (per-client override)."
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "GET",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/payment/stk/:uuid",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "payment",
                                        "stk",
                                        ":uuid"
                                    ],
                                    "variable": [
                                        {
                                            "key": "uuid",
                                            "value": "",
                                            "description": "`stk_request_uuid` from the push response."
                                        }
                                    ]
                                }
                            },
                            "status": "The STK request",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"data\": {\n        \"merchant_request_id\": \"29115-34620561-1\",\n        \"checkout_request_id\": \"ws_CO_14102026101500123\",\n        \"stk_request_uuid\": \"9b2f0f5e-6d0b-4c1e-9d55-2b8f3c1a7e10\",\n        \"status\": \"paid\",\n        \"status_label\": \"Paid\",\n        \"purpose\": \"premium\",\n        \"account\": \"DN-000123\",\n        \"phone\": \"0712 345 678\",\n        \"amount\": 30175,\n        \"amount_minor\": 3017500,\n        \"result_code\": 0,\n        \"result_desc\": \"The service request is processed successfully.\",\n        \"mpesa_receipt\": \"SKD1A2B3C4\",\n        \"receipt_number\": \"RCT-000412\",\n        \"debit_note\": \"DN-000123\",\n        \"ipf_loan_ref\": null,\n        \"created_at\": \"2026-10-14T10:15:00+03:00\",\n        \"updated_at\": \"2026-10-14T10:15:00+03:00\",\n        \"customer_message\": \"We sent an M-Pesa prompt to 0712 345 678. The customer enters their PIN to pay.\"\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "List receipts",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/receipts",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "receipts"
                            ],
                            "query": [
                                {
                                    "key": "channel",
                                    "value": "",
                                    "description": "How the money came in.",
                                    "disabled": true
                                },
                                {
                                    "key": "from",
                                    "value": "2026-10-01",
                                    "description": "Received on or after this date (YYYY-MM-DD).",
                                    "disabled": true
                                },
                                {
                                    "key": "to",
                                    "value": "2026-10-31",
                                    "description": "Received on or before this date.",
                                    "disabled": true
                                },
                                {
                                    "key": "client_no",
                                    "value": "",
                                    "description": "Only this client's receipts.",
                                    "disabled": true
                                },
                                {
                                    "key": "policy",
                                    "value": "",
                                    "description": "Policy uuid, policy number or risk note: receipts allocated to its debit notes.",
                                    "disabled": true
                                },
                                {
                                    "key": "limit",
                                    "value": "",
                                    "description": "Page size, 1–100 (default 25).",
                                    "disabled": true
                                },
                                {
                                    "key": "cursor",
                                    "value": "",
                                    "description": "Opaque cursor from `links.next`.",
                                    "disabled": true
                                }
                            ]
                        },
                        "description": "Money received by the organisation, newest first, with what each receipt paid. Cursor paginated (`limit`, `cursor`); `page`/`per_page` also accepted. Agent-scoped clients see receipts for their own clients and policies.\n\nScope: pay.\n\nRate limit: 60 requests per minute per token (per-client override)."
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "GET",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/receipts",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "receipts"
                                    ],
                                    "query": [
                                        {
                                            "key": "channel",
                                            "value": "",
                                            "description": "How the money came in.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "from",
                                            "value": "2026-10-01",
                                            "description": "Received on or after this date (YYYY-MM-DD).",
                                            "disabled": true
                                        },
                                        {
                                            "key": "to",
                                            "value": "2026-10-31",
                                            "description": "Received on or before this date.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "client_no",
                                            "value": "",
                                            "description": "Only this client's receipts.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "policy",
                                            "value": "",
                                            "description": "Policy uuid, policy number or risk note: receipts allocated to its debit notes.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "limit",
                                            "value": "",
                                            "description": "Page size, 1–100 (default 25).",
                                            "disabled": true
                                        },
                                        {
                                            "key": "cursor",
                                            "value": "",
                                            "description": "Opaque cursor from `links.next`.",
                                            "disabled": true
                                        }
                                    ]
                                }
                            },
                            "status": "A page of receipts",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"data\": [\n        {\n            \"number\": \"RCT-000412\",\n            \"channel\": \"mpesa_stk\",\n            \"reference\": \"SKD1A2B3C4\",\n            \"amount\": 30175,\n            \"amount_minor\": 3017500,\n            \"allocated\": 30175,\n            \"allocated_minor\": 3017500,\n            \"unallocated\": 0,\n            \"unallocated_minor\": 0,\n            \"payer_phone\": \"254712345678\",\n            \"received_at\": \"2026-10-14T10:16:02+03:00\",\n            \"status\": \"allocated\",\n            \"client\": {\n                \"client_no\": \"C000231\",\n                \"name\": \"Wanjiru Kamau\"\n            },\n            \"allocations\": [\n                {\n                    \"debit_note\": \"DN-000123\",\n                    \"policy_no\": \"POL/2026/000123\",\n                    \"policy_uuid\": \"5d0c…\",\n                    \"amount\": 30175,\n                    \"amount_minor\": 3017500,\n                    \"allocated_at\": \"2026-10-14T10:16:02+03:00\"\n                }\n            ]\n        }\n    ],\n    \"meta\": {\n        \"limit\": 25,\n        \"has_more\": false,\n        \"count\": 1\n    },\n    \"links\": {\n        \"next\": null\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "Get a receipt",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/receipts/:number",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "receipts",
                                ":number"
                            ],
                            "variable": [
                                {
                                    "key": "number",
                                    "value": "RCT-000412",
                                    "description": "Receipt number."
                                }
                            ]
                        },
                        "description": "Scope: pay.\n\nRate limit: 60 requests per minute per token (per-client override)."
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "GET",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/receipts/:number",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "receipts",
                                        ":number"
                                    ],
                                    "variable": [
                                        {
                                            "key": "number",
                                            "value": "RCT-000412",
                                            "description": "Receipt number."
                                        }
                                    ]
                                }
                            },
                            "status": "The receipt with its allocations",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"data\": {\n        \"number\": \"RCT-000412\",\n        \"channel\": \"mpesa_stk\",\n        \"reference\": \"SKD1A2B3C4\",\n        \"amount\": 30175,\n        \"amount_minor\": 3017500,\n        \"allocated\": 30175,\n        \"allocated_minor\": 3017500,\n        \"unallocated\": 0,\n        \"unallocated_minor\": 0,\n        \"payer_phone\": \"254712345678\",\n        \"received_at\": \"2026-10-14T10:16:02+03:00\",\n        \"status\": \"allocated\",\n        \"client\": {\n            \"client_no\": \"C000231\",\n            \"name\": \"Wanjiru Kamau\"\n        },\n        \"allocations\": [\n            {\n                \"debit_note\": \"DN-000123\",\n                \"policy_no\": \"POL/2026/000123\",\n                \"policy_uuid\": \"5d0c…\",\n                \"amount\": 30175,\n                \"amount_minor\": 3017500,\n                \"allocated_at\": \"2026-10-14T10:16:02+03:00\"\n            }\n        ]\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "Get a client's balance",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/clients/:client_no/balance",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "clients",
                                ":client_no",
                                "balance"
                            ],
                            "variable": [
                                {
                                    "key": "client_no",
                                    "value": "C000231",
                                    "description": "Client number."
                                }
                            ]
                        },
                        "description": "Open debit notes, credits (unallocated receipts and credit notes not yet refunded) and premium-finance balances. `due` is what the client owes the organisation; debit notes Flexysure Finance is paying are listed with `payable_by: lender` and left out of `due`. `ipf_outstanding` is owed to Flexysure Finance (paybill and account in `repay_to`).\n\nScope: pay.\n\nRate limit: 60 requests per minute per token (per-client override)."
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "GET",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/clients/:client_no/balance",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "clients",
                                        ":client_no",
                                        "balance"
                                    ],
                                    "variable": [
                                        {
                                            "key": "client_no",
                                            "value": "C000231",
                                            "description": "Client number."
                                        }
                                    ]
                                }
                            },
                            "status": "Balance",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"data\": {\n        \"client\": {\n            \"client_no\": \"C000231\",\n            \"name\": \"Wanjiru Kamau\"\n        },\n        \"currency\": \"KES\",\n        \"due\": 30175,\n        \"due_minor\": 3017500,\n        \"credits\": 0,\n        \"credits_minor\": 0,\n        \"net_due\": 30175,\n        \"net_due_minor\": 3017500,\n        \"ipf_outstanding\": 46500,\n        \"ipf_outstanding_minor\": 4650000,\n        \"open_debit_notes\": [\n            {\n                \"number\": \"DN-000123\",\n                \"kind\": \"Premium\",\n                \"policy_no\": \"POL/2026/000123\",\n                \"policy_uuid\": \"5d0c…\",\n                \"due_on\": \"2026-10-14\",\n                \"amount\": 30175,\n                \"amount_minor\": 3017500,\n                \"paid\": 0,\n                \"paid_minor\": 0,\n                \"outstanding\": 30175,\n                \"outstanding_minor\": 3017500,\n                \"payable_by\": \"client\"\n            }\n        ],\n        \"unallocated_receipts\": [],\n        \"credit_notes\": [],\n        \"ipf_loans\": [\n            {\n                \"uuid\": \"1f7e…\",\n                \"loan_ref\": \"IPF-000017\",\n                \"status\": \"active\",\n                \"policy_no\": \"POL/2026/000099\",\n                \"outstanding\": 46500,\n                \"outstanding_minor\": 4650000,\n                \"arrears\": 0,\n                \"arrears_minor\": 0,\n                \"arrears_days\": 0,\n                \"repay_to\": {\n                    \"paybill\": \"700100\",\n                    \"account\": \"IPF-000017\"\n                }\n            }\n        ],\n        \"as_of\": \"2026-10-14T10:20:00+03:00\"\n    }\n}"
                        }
                    ]
                }
            ],
            "description": "Collect premiums with an M-Pesa STK push, follow the prompt to its result, and read receipts and client balances. The STK callback lands on Flexysure's Daraja webhook, which raises the receipt, allocates it to the debit note and activates the policy (and queues the DMVIC certificate) once the first instalment is paid; a premium-finance loan ref collects an instalment for Flexysure Finance instead. Subscribe to the `payment.received` and `policy.activated` webhooks rather than polling where you can. Amounts are sent in whole shillings (`amount`) and returned in shillings plus cents (`amount_minor`)."
        },
        {
            "name": "Prospects",
            "item": [
                {
                    "name": "Create a prospect",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Idempotency-Key",
                                "value": "{{$guid}}",
                                "description": "Unique per write; a new one each send."
                            },
                            {
                                "key": "X-Agent-Code",
                                "value": "{{agent_code}}",
                                "disabled": true,
                                "description": "Optional: act as this agent."
                            },
                            {
                                "key": "X-Agent-Key",
                                "value": "{{agent_key}}",
                                "disabled": true
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/prospects",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "prospects"
                            ]
                        },
                        "description": "Insurance Cloud compatible. `status` is matched case-insensitively to new, contacted, quoted, negotiating, won or lost (\"New\" works); anything else is 422. Expected premium and commission are derived from `products[]`.\n\nScope: crm.\n\nRate limit: 60 requests per minute per token (per-client override).",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"p_name\": \"Kilima Farm Supplies\",\n    \"status\": \"New\",\n    \"phone\": \"0712345678\",\n    \"email\": \"ops@kilimafarm.co.ke\",\n    \"rating\": \"hot\",\n    \"follow_up_date\": \"2026-10-17\",\n    \"products\": [\n        {\n            \"product\": \"Motor private comprehensive\",\n            \"comm_rate\": 10,\n            \"premium\": 85000\n        }\n    ],\n    \"assign_to\": [\n        4\n    ]\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "POST",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/prospects",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "prospects"
                                    ]
                                }
                            },
                            "status": "Prospect created",
                            "code": 201,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"status\": \"success\",\n    \"message\": \"Prospect created.\",\n    \"prospect\": {\n        \"id\": 42,\n        \"uuid\": \"9b1f3c5e-2d4a-4c1b-8f0e-6a7b8c9d0e1f\",\n        \"p_name\": \"Kilima Farm Supplies\",\n        \"status\": \"New\",\n        \"expected_prem\": 85000,\n        \"expected_comm\": 8500,\n        \"created_at\": \"2026-10-14T09:00:00+03:00\"\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "List prospects",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Agent-Code",
                                "value": "{{agent_code}}",
                                "disabled": true,
                                "description": "Optional: act as this agent."
                            },
                            {
                                "key": "X-Agent-Key",
                                "value": "{{agent_key}}",
                                "disabled": true
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/prospects",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "prospects"
                            ],
                            "query": [
                                {
                                    "key": "status",
                                    "value": "negotiating",
                                    "description": "Pipeline stage (any case).",
                                    "disabled": true
                                },
                                {
                                    "key": "rating",
                                    "value": "",
                                    "disabled": true
                                },
                                {
                                    "key": "follow_up",
                                    "value": "",
                                    "description": "Open prospects whose follow-up is due today or overdue.",
                                    "disabled": true
                                },
                                {
                                    "key": "search",
                                    "value": "",
                                    "description": "Name, email or phone.",
                                    "disabled": true
                                },
                                {
                                    "key": "assigned_to",
                                    "value": "",
                                    "description": "Staff user id.",
                                    "disabled": true
                                },
                                {
                                    "key": "limit",
                                    "value": "",
                                    "description": "Default 25, max 100.",
                                    "disabled": true
                                },
                                {
                                    "key": "cursor",
                                    "value": "",
                                    "description": "From `links.next`.",
                                    "disabled": true
                                }
                            ]
                        },
                        "description": "Newest first, cursor paginated (`limit`, `cursor`; `page`/`per_page` also accepted).\n\nScope: read.\n\nRate limit: 60 requests per minute per token (per-client override)."
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "GET",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/prospects",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "prospects"
                                    ],
                                    "query": [
                                        {
                                            "key": "status",
                                            "value": "negotiating",
                                            "description": "Pipeline stage (any case).",
                                            "disabled": true
                                        },
                                        {
                                            "key": "rating",
                                            "value": "",
                                            "disabled": true
                                        },
                                        {
                                            "key": "follow_up",
                                            "value": "",
                                            "description": "Open prospects whose follow-up is due today or overdue.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "search",
                                            "value": "",
                                            "description": "Name, email or phone.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "assigned_to",
                                            "value": "",
                                            "description": "Staff user id.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "limit",
                                            "value": "",
                                            "description": "Default 25, max 100.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "cursor",
                                            "value": "",
                                            "description": "From `links.next`.",
                                            "disabled": true
                                        }
                                    ]
                                }
                            },
                            "status": "Prospects",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"data\": [\n        {\n            \"uuid\": \"9b1f3c5e-2d4a-4c1b-8f0e-6a7b8c9d0e1f\",\n            \"name\": \"Kilima Farm Supplies\",\n            \"status\": \"negotiating\",\n            \"status_label\": \"Negotiating\",\n            \"rating\": \"hot\",\n            \"email\": \"ops@kilimafarm.co.ke\",\n            \"phone\": \"0712345678\",\n            \"sector\": \"Agriculture\",\n            \"insurer\": {\n                \"id\": 1,\n                \"name\": \"Savanna General\"\n            },\n            \"follow_up_date\": \"2026-10-17\",\n            \"follow_up_state\": \"upcoming\",\n            \"expected_premium\": 85000,\n            \"expected_premium_minor\": 8500000,\n            \"expected_commission\": 8500,\n            \"expected_commission_minor\": 850000,\n            \"products\": [\n                {\n                    \"product\": \"Motor private comprehensive\",\n                    \"product_id\": null,\n                    \"product_line\": \"motor\",\n                    \"comm_rate\": 10,\n                    \"comm_rate_bps\": 1000,\n                    \"premium\": 85000,\n                    \"premium_minor\": 8500000,\n                    \"commission\": 8500,\n                    \"commission_minor\": 850000\n                }\n            ],\n            \"assignees\": [\n                {\n                    \"id\": 4,\n                    \"name\": \"Kevin Kiprop\",\n                    \"role\": \"agent\",\n                    \"code\": \"KK01\"\n                }\n            ],\n            \"client\": null,\n            \"created_at\": \"2026-10-14T09:00:00+03:00\"\n        }\n    ],\n    \"meta\": {\n        \"limit\": 25,\n        \"has_more\": false,\n        \"count\": 1\n    },\n    \"links\": {\n        \"next\": null\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "Get a prospect",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Agent-Code",
                                "value": "{{agent_code}}",
                                "disabled": true,
                                "description": "Optional: act as this agent."
                            },
                            {
                                "key": "X-Agent-Key",
                                "value": "{{agent_key}}",
                                "disabled": true
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/prospects/:uuid",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "prospects",
                                ":uuid"
                            ],
                            "variable": [
                                {
                                    "key": "uuid",
                                    "value": "9b1f3c5e-2d4a-4c1b-8f0e-6a7b8c9d0e1f",
                                    "description": "Prospect uuid."
                                }
                            ]
                        },
                        "description": "The prospect with its products, assignees and activity timeline (newest first).\n\nScope: read.\n\nRate limit: 60 requests per minute per token (per-client override)."
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "GET",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/prospects/:uuid",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "prospects",
                                        ":uuid"
                                    ],
                                    "variable": [
                                        {
                                            "key": "uuid",
                                            "value": "9b1f3c5e-2d4a-4c1b-8f0e-6a7b8c9d0e1f",
                                            "description": "Prospect uuid."
                                        }
                                    ]
                                }
                            },
                            "status": "Prospect",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"data\": {\n        \"uuid\": \"9b1f3c5e-2d4a-4c1b-8f0e-6a7b8c9d0e1f\",\n        \"name\": \"Kilima Farm Supplies\",\n        \"status\": \"negotiating\",\n        \"status_label\": \"Negotiating\",\n        \"rating\": \"hot\",\n        \"email\": \"ops@kilimafarm.co.ke\",\n        \"phone\": \"0712345678\",\n        \"sector\": \"Agriculture\",\n        \"insurer\": {\n            \"id\": 1,\n            \"name\": \"Savanna General\"\n        },\n        \"follow_up_date\": \"2026-10-17\",\n        \"follow_up_state\": \"upcoming\",\n        \"expected_premium\": 85000,\n        \"expected_premium_minor\": 8500000,\n        \"expected_commission\": 8500,\n        \"expected_commission_minor\": 850000,\n        \"products\": [\n            {\n                \"product\": \"Motor private comprehensive\",\n                \"product_id\": null,\n                \"product_line\": \"motor\",\n                \"comm_rate\": 10,\n                \"comm_rate_bps\": 1000,\n                \"premium\": 85000,\n                \"premium_minor\": 8500000,\n                \"commission\": 8500,\n                \"commission_minor\": 850000\n            }\n        ],\n        \"assignees\": [\n            {\n                \"id\": 4,\n                \"name\": \"Kevin Kiprop\",\n                \"role\": \"agent\",\n                \"code\": \"KK01\"\n            }\n        ],\n        \"client\": null,\n        \"created_at\": \"2026-10-14T09:00:00+03:00\",\n        \"activities\": [\n            {\n                \"id\": 7,\n                \"type\": \"call\",\n                \"type_label\": \"Call\",\n                \"body\": \"Wants a quote by Friday.\",\n                \"user\": {\n                    \"id\": 4,\n                    \"name\": \"Kevin Kiprop\",\n                    \"role\": \"agent\",\n                    \"code\": \"KK01\"\n                },\n                \"occurred_at\": \"2026-10-14T10:00:00+03:00\"\n            }\n        ]\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "Update a prospect",
                    "request": {
                        "method": "PATCH",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Idempotency-Key",
                                "value": "{{$guid}}",
                                "description": "Unique per write; a new one each send."
                            },
                            {
                                "key": "X-Agent-Code",
                                "value": "{{agent_code}}",
                                "disabled": true,
                                "description": "Optional: act as this agent."
                            },
                            {
                                "key": "X-Agent-Key",
                                "value": "{{agent_key}}",
                                "disabled": true
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/prospects/:uuid",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "prospects",
                                ":uuid"
                            ],
                            "variable": [
                                {
                                    "key": "uuid",
                                    "value": "9b1f3c5e-2d4a-4c1b-8f0e-6a7b8c9d0e1f",
                                    "description": "Prospect uuid."
                                }
                            ]
                        },
                        "description": "Send only what changes. `name` or Insurance Cloud's `p_name`; `products` replaces the product list (totals re-derived); `assign_to` replaces the assignees. A status change is written to the timeline. Winning goes through the convert endpoint.\n\nScope: crm.\n\nRate limit: 60 requests per minute per token (per-client override).",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"status\": \"Negotiating\",\n    \"follow_up_date\": \"2026-10-20\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "PATCH",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/prospects/:uuid",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "prospects",
                                        ":uuid"
                                    ],
                                    "variable": [
                                        {
                                            "key": "uuid",
                                            "value": "9b1f3c5e-2d4a-4c1b-8f0e-6a7b8c9d0e1f",
                                            "description": "Prospect uuid."
                                        }
                                    ]
                                }
                            },
                            "status": "Updated prospect",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"data\": {\n        \"uuid\": \"9b1f3c5e-2d4a-4c1b-8f0e-6a7b8c9d0e1f\",\n        \"name\": \"Kilima Farm Supplies\",\n        \"status\": \"negotiating\",\n        \"status_label\": \"Negotiating\",\n        \"rating\": \"hot\",\n        \"email\": \"ops@kilimafarm.co.ke\",\n        \"phone\": \"0712345678\",\n        \"sector\": \"Agriculture\",\n        \"insurer\": {\n            \"id\": 1,\n            \"name\": \"Savanna General\"\n        },\n        \"follow_up_date\": \"2026-10-17\",\n        \"follow_up_state\": \"upcoming\",\n        \"expected_premium\": 85000,\n        \"expected_premium_minor\": 8500000,\n        \"expected_commission\": 8500,\n        \"expected_commission_minor\": 850000,\n        \"products\": [\n            {\n                \"product\": \"Motor private comprehensive\",\n                \"product_id\": null,\n                \"product_line\": \"motor\",\n                \"comm_rate\": 10,\n                \"comm_rate_bps\": 1000,\n                \"premium\": 85000,\n                \"premium_minor\": 8500000,\n                \"commission\": 8500,\n                \"commission_minor\": 850000\n            }\n        ],\n        \"assignees\": [\n            {\n                \"id\": 4,\n                \"name\": \"Kevin Kiprop\",\n                \"role\": \"agent\",\n                \"code\": \"KK01\"\n            }\n        ],\n        \"client\": null,\n        \"created_at\": \"2026-10-14T09:00:00+03:00\"\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "Log prospect activity",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Idempotency-Key",
                                "value": "{{$guid}}",
                                "description": "Unique per write; a new one each send."
                            },
                            {
                                "key": "X-Agent-Code",
                                "value": "{{agent_code}}",
                                "disabled": true,
                                "description": "Optional: act as this agent."
                            },
                            {
                                "key": "X-Agent-Key",
                                "value": "{{agent_key}}",
                                "disabled": true
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/prospects/:uuid/activities",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "prospects",
                                ":uuid",
                                "activities"
                            ],
                            "variable": [
                                {
                                    "key": "uuid",
                                    "value": "9b1f3c5e-2d4a-4c1b-8f0e-6a7b8c9d0e1f",
                                    "description": "Prospect uuid."
                                }
                            ]
                        },
                        "description": "Adds a note, call or meeting to the timeline and can move the follow-up date in the same call. A call or meeting moves a new prospect to contacted.\n\nScope: crm.\n\nRate limit: 60 requests per minute per token (per-client override).",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"type\": \"call\",\n    \"body\": \"Called; wants a quote by Friday.\",\n    \"follow_up_date\": \"2026-10-17\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "POST",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/prospects/:uuid/activities",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "prospects",
                                        ":uuid",
                                        "activities"
                                    ],
                                    "variable": [
                                        {
                                            "key": "uuid",
                                            "value": "9b1f3c5e-2d4a-4c1b-8f0e-6a7b8c9d0e1f",
                                            "description": "Prospect uuid."
                                        }
                                    ]
                                }
                            },
                            "status": "Activity logged",
                            "code": 201,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"data\": {\n        \"id\": 7,\n        \"type\": \"call\",\n        \"type_label\": \"Call\",\n        \"body\": \"Called; wants a quote by Friday.\",\n        \"user\": {\n            \"id\": 4,\n            \"name\": \"Kevin Kiprop\",\n            \"role\": \"agent\",\n            \"code\": \"KK01\"\n        },\n        \"occurred_at\": \"2026-10-14T10:00:00+03:00\"\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "Convert a prospect to a client",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Idempotency-Key",
                                "value": "{{$guid}}",
                                "description": "Unique per write; a new one each send."
                            },
                            {
                                "key": "X-Agent-Code",
                                "value": "{{agent_code}}",
                                "disabled": true,
                                "description": "Optional: act as this agent."
                            },
                            {
                                "key": "X-Agent-Key",
                                "value": "{{agent_key}}",
                                "disabled": true
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/prospects/:uuid/convert",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "prospects",
                                ":uuid",
                                "convert"
                            ],
                            "variable": [
                                {
                                    "key": "uuid",
                                    "value": "9b1f3c5e-2d4a-4c1b-8f0e-6a7b8c9d0e1f",
                                    "description": "Prospect uuid."
                                }
                            ]
                        },
                        "description": "Marks the prospect won and creates its client, or links an existing client with the same phone, ID number or KRA PIN. Converting twice returns the same client. Lost prospects cannot be converted.\n\nScope: crm.\n\nRate limit: 60 requests per minute per token (per-client override).",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"type\": \"corporate\",\n    \"kra_pin\": \"P051234567X\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "POST",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/prospects/:uuid/convert",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "prospects",
                                        ":uuid",
                                        "convert"
                                    ],
                                    "variable": [
                                        {
                                            "key": "uuid",
                                            "value": "9b1f3c5e-2d4a-4c1b-8f0e-6a7b8c9d0e1f",
                                            "description": "Prospect uuid."
                                        }
                                    ]
                                }
                            },
                            "status": "Prospect (won) and its client",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"data\": {\n        \"prospect\": {\n            \"uuid\": \"9b1f…\",\n            \"status\": \"won\",\n            \"client\": {\n                \"client_no\": \"C-00042\",\n                \"name\": \"Kilima Farm Supplies\"\n            }\n        },\n        \"client\": {\n            \"client_no\": \"C-00042\",\n            \"name\": \"Kilima Farm Supplies\",\n            \"type\": \"corporate\"\n        }\n    }\n}"
                        }
                    ]
                }
            ],
            "description": "The CRM pipeline. Creating a prospect takes Insurance Cloud's field names (`p_name`, `status`, `products[]`, `assign_to[]`) and answers in its shape; listing, reading, updating, logging activity and converting to a client are Flexysure additions in the `{data, meta, links}` shape with cursor pagination. Agents (an actor with own-records visibility, or X-Agent-Code/X-Agent-Key) see prospects they created or are assigned to; staff see all."
        },
        {
            "name": "Clients",
            "item": [
                {
                    "name": "List clients",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Agent-Code",
                                "value": "{{agent_code}}",
                                "disabled": true,
                                "description": "Optional: act as this agent."
                            },
                            {
                                "key": "X-Agent-Key",
                                "value": "{{agent_key}}",
                                "disabled": true
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/clients",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "clients"
                            ],
                            "query": [
                                {
                                    "key": "search",
                                    "value": "",
                                    "description": "Name, client number, phone, ID number or KRA PIN.",
                                    "disabled": true
                                },
                                {
                                    "key": "type",
                                    "value": "",
                                    "disabled": true
                                },
                                {
                                    "key": "sales_person_id",
                                    "value": "",
                                    "disabled": true
                                },
                                {
                                    "key": "risk_manager_id",
                                    "value": "",
                                    "disabled": true
                                },
                                {
                                    "key": "limit",
                                    "value": "",
                                    "description": "Default 25, max 100.",
                                    "disabled": true
                                },
                                {
                                    "key": "cursor",
                                    "value": "",
                                    "disabled": true
                                }
                            ]
                        },
                        "description": "Newest first, cursor paginated (`limit`, `cursor`; `page`/`per_page` also accepted).\n\nScope: read.\n\nRate limit: 60 requests per minute per token (per-client override)."
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "GET",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/clients",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "clients"
                                    ],
                                    "query": [
                                        {
                                            "key": "search",
                                            "value": "",
                                            "description": "Name, client number, phone, ID number or KRA PIN.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "type",
                                            "value": "",
                                            "disabled": true
                                        },
                                        {
                                            "key": "sales_person_id",
                                            "value": "",
                                            "disabled": true
                                        },
                                        {
                                            "key": "risk_manager_id",
                                            "value": "",
                                            "disabled": true
                                        },
                                        {
                                            "key": "limit",
                                            "value": "",
                                            "description": "Default 25, max 100.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "cursor",
                                            "value": "",
                                            "disabled": true
                                        }
                                    ]
                                }
                            },
                            "status": "Clients",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"data\": [\n        {\n            \"id\": 42,\n            \"client_no\": \"C-00042\",\n            \"type\": \"individual\",\n            \"name\": \"Wanjiru Kamau\",\n            \"id_no\": \"27845123\",\n            \"kra_pin\": \"A001234567Z\",\n            \"phone\": \"0712345678\",\n            \"email\": \"wanjiru@example.com\",\n            \"date_of_birth\": \"1988-04-02\",\n            \"physical_address\": \"Kilimani, Nairobi\",\n            \"branch\": {\n                \"id\": 1,\n                \"name\": \"Head office\"\n            },\n            \"risk_manager\": {\n                \"id\": 2,\n                \"name\": \"Faith Njeri\",\n                \"role\": \"account_exec\",\n                \"code\": null\n            },\n            \"sales_person\": {\n                \"id\": 4,\n                \"name\": \"Kevin Kiprop\",\n                \"role\": \"agent\",\n                \"code\": \"KK01\"\n            },\n            \"business_source\": {\n                \"id\": 2,\n                \"name\": \"Referral\"\n            },\n            \"prospect_type\": null,\n            \"sector\": null,\n            \"alt_name\": null,\n            \"alt_phone\": null,\n            \"alt_email\": null,\n            \"kyc_status\": \"unverified\",\n            \"onboarded_via\": \"api\",\n            \"created_at\": \"2026-10-14T09:00:00+03:00\",\n            \"updated_at\": \"2026-10-14T09:00:00+03:00\"\n        }\n    ],\n    \"meta\": {\n        \"limit\": 25,\n        \"has_more\": false,\n        \"count\": 1\n    },\n    \"links\": {\n        \"next\": null\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "Create a client",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Idempotency-Key",
                                "value": "{{$guid}}",
                                "description": "Unique per write; a new one each send."
                            },
                            {
                                "key": "X-Agent-Code",
                                "value": "{{agent_code}}",
                                "disabled": true,
                                "description": "Optional: act as this agent."
                            },
                            {
                                "key": "X-Agent-Key",
                                "value": "{{agent_key}}",
                                "disabled": true
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/clients",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "clients"
                            ]
                        },
                        "description": "Numbers the client (C-00001…), normalises phone and identity numbers and records who added it. The salesperson defaults to the acting agent; the risk manager to the acting account executive.\n\nScope: crm.\n\nRate limit: 60 requests per minute per token (per-client override).",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"type\": \"individual\",\n    \"name\": \"Wanjiru Kamau\",\n    \"phone\": \"0712345678\",\n    \"id_no\": \"27845123\",\n    \"email\": \"wanjiru@example.com\",\n    \"sales_person_id\": 4\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "POST",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/clients",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "clients"
                                    ]
                                }
                            },
                            "status": "Client created",
                            "code": 201,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"data\": {\n        \"id\": 42,\n        \"client_no\": \"C-00042\",\n        \"type\": \"individual\",\n        \"name\": \"Wanjiru Kamau\",\n        \"id_no\": \"27845123\",\n        \"kra_pin\": \"A001234567Z\",\n        \"phone\": \"0712345678\",\n        \"email\": \"wanjiru@example.com\",\n        \"date_of_birth\": \"1988-04-02\",\n        \"physical_address\": \"Kilimani, Nairobi\",\n        \"branch\": {\n            \"id\": 1,\n            \"name\": \"Head office\"\n        },\n        \"risk_manager\": {\n            \"id\": 2,\n            \"name\": \"Faith Njeri\",\n            \"role\": \"account_exec\",\n            \"code\": null\n        },\n        \"sales_person\": {\n            \"id\": 4,\n            \"name\": \"Kevin Kiprop\",\n            \"role\": \"agent\",\n            \"code\": \"KK01\"\n        },\n        \"business_source\": {\n            \"id\": 2,\n            \"name\": \"Referral\"\n        },\n        \"prospect_type\": null,\n        \"sector\": null,\n        \"alt_name\": null,\n        \"alt_phone\": null,\n        \"alt_email\": null,\n        \"kyc_status\": \"unverified\",\n        \"onboarded_via\": \"api\",\n        \"created_at\": \"2026-10-14T09:00:00+03:00\",\n        \"updated_at\": \"2026-10-14T09:00:00+03:00\"\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "Get a client",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Agent-Code",
                                "value": "{{agent_code}}",
                                "disabled": true,
                                "description": "Optional: act as this agent."
                            },
                            {
                                "key": "X-Agent-Key",
                                "value": "{{agent_key}}",
                                "disabled": true
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/clients/:client_no",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "clients",
                                ":client_no"
                            ],
                            "variable": [
                                {
                                    "key": "client_no",
                                    "value": "C-00042",
                                    "description": "Client number."
                                }
                            ]
                        },
                        "description": "Scope: read.\n\nRate limit: 60 requests per minute per token (per-client override)."
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "GET",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/clients/:client_no",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "clients",
                                        ":client_no"
                                    ],
                                    "variable": [
                                        {
                                            "key": "client_no",
                                            "value": "C-00042",
                                            "description": "Client number."
                                        }
                                    ]
                                }
                            },
                            "status": "Client",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"data\": {\n        \"id\": 42,\n        \"client_no\": \"C-00042\",\n        \"type\": \"individual\",\n        \"name\": \"Wanjiru Kamau\",\n        \"id_no\": \"27845123\",\n        \"kra_pin\": \"A001234567Z\",\n        \"phone\": \"0712345678\",\n        \"email\": \"wanjiru@example.com\",\n        \"date_of_birth\": \"1988-04-02\",\n        \"physical_address\": \"Kilimani, Nairobi\",\n        \"branch\": {\n            \"id\": 1,\n            \"name\": \"Head office\"\n        },\n        \"risk_manager\": {\n            \"id\": 2,\n            \"name\": \"Faith Njeri\",\n            \"role\": \"account_exec\",\n            \"code\": null\n        },\n        \"sales_person\": {\n            \"id\": 4,\n            \"name\": \"Kevin Kiprop\",\n            \"role\": \"agent\",\n            \"code\": \"KK01\"\n        },\n        \"business_source\": {\n            \"id\": 2,\n            \"name\": \"Referral\"\n        },\n        \"prospect_type\": null,\n        \"sector\": null,\n        \"alt_name\": null,\n        \"alt_phone\": null,\n        \"alt_email\": null,\n        \"kyc_status\": \"unverified\",\n        \"onboarded_via\": \"api\",\n        \"created_at\": \"2026-10-14T09:00:00+03:00\",\n        \"updated_at\": \"2026-10-14T09:00:00+03:00\"\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "Update a client",
                    "request": {
                        "method": "PATCH",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Idempotency-Key",
                                "value": "{{$guid}}",
                                "description": "Unique per write; a new one each send."
                            },
                            {
                                "key": "X-Agent-Code",
                                "value": "{{agent_code}}",
                                "disabled": true,
                                "description": "Optional: act as this agent."
                            },
                            {
                                "key": "X-Agent-Key",
                                "value": "{{agent_key}}",
                                "disabled": true
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/clients/:client_no",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "clients",
                                ":client_no"
                            ],
                            "variable": [
                                {
                                    "key": "client_no",
                                    "value": "C-00042",
                                    "description": "Client number."
                                }
                            ]
                        },
                        "description": "Send only what changes. A new phone, ID number or KRA PIN that belongs to another client answers 409 `duplicate_client` unless `force` is true. Changes are audited.\n\nScope: crm.\n\nRate limit: 60 requests per minute per token (per-client override).",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"email\": \"wanjiru.kamau@example.com\",\n    \"physical_address\": \"Lavington, Nairobi\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "PATCH",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/clients/:client_no",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "clients",
                                        ":client_no"
                                    ],
                                    "variable": [
                                        {
                                            "key": "client_no",
                                            "value": "C-00042",
                                            "description": "Client number."
                                        }
                                    ]
                                }
                            },
                            "status": "Updated client",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"data\": {\n        \"id\": 42,\n        \"client_no\": \"C-00042\",\n        \"type\": \"individual\",\n        \"name\": \"Wanjiru Kamau\",\n        \"id_no\": \"27845123\",\n        \"kra_pin\": \"A001234567Z\",\n        \"phone\": \"0712345678\",\n        \"email\": \"wanjiru@example.com\",\n        \"date_of_birth\": \"1988-04-02\",\n        \"physical_address\": \"Kilimani, Nairobi\",\n        \"branch\": {\n            \"id\": 1,\n            \"name\": \"Head office\"\n        },\n        \"risk_manager\": {\n            \"id\": 2,\n            \"name\": \"Faith Njeri\",\n            \"role\": \"account_exec\",\n            \"code\": null\n        },\n        \"sales_person\": {\n            \"id\": 4,\n            \"name\": \"Kevin Kiprop\",\n            \"role\": \"agent\",\n            \"code\": \"KK01\"\n        },\n        \"business_source\": {\n            \"id\": 2,\n            \"name\": \"Referral\"\n        },\n        \"prospect_type\": null,\n        \"sector\": null,\n        \"alt_name\": null,\n        \"alt_phone\": null,\n        \"alt_email\": null,\n        \"kyc_status\": \"unverified\",\n        \"onboarded_via\": \"api\",\n        \"created_at\": \"2026-10-14T09:00:00+03:00\",\n        \"updated_at\": \"2026-10-14T09:00:00+03:00\"\n    }\n}"
                        }
                    ]
                }
            ],
            "description": "Policyholders, keyed by client number. Creating a client runs the same duplicate check as the web app (phone, ID number, KRA PIN): a match answers 409 `duplicate_client` with the matching client numbers unless `force` is true. Agents see clients they created or are the salesperson for; staff see all. Insurance Cloud's flat export is GET /erp/clients."
        },
        {
            "name": "Claims",
            "item": [
                {
                    "name": "List claims",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Agent-Code",
                                "value": "{{agent_code}}",
                                "disabled": true,
                                "description": "Optional: act as this agent."
                            },
                            {
                                "key": "X-Agent-Key",
                                "value": "{{agent_key}}",
                                "disabled": true
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/claims",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "claims"
                            ],
                            "query": [
                                {
                                    "key": "status",
                                    "value": "",
                                    "disabled": true
                                },
                                {
                                    "key": "type",
                                    "value": "",
                                    "disabled": true
                                },
                                {
                                    "key": "claim_type",
                                    "value": "",
                                    "disabled": true
                                },
                                {
                                    "key": "policy",
                                    "value": "",
                                    "description": "Policy uuid.",
                                    "disabled": true
                                },
                                {
                                    "key": "from",
                                    "value": "",
                                    "description": "Reported on or after (Y-m-d).",
                                    "disabled": true
                                },
                                {
                                    "key": "to",
                                    "value": "",
                                    "description": "Reported on or before (Y-m-d).",
                                    "disabled": true
                                },
                                {
                                    "key": "overdue",
                                    "value": "",
                                    "description": "Only claims past their status SLA.",
                                    "disabled": true
                                },
                                {
                                    "key": "open",
                                    "value": "",
                                    "description": "true = still being worked; false = settled, closed or withdrawn.",
                                    "disabled": true
                                },
                                {
                                    "key": "limit",
                                    "value": "",
                                    "description": "Default 25, max 100.",
                                    "disabled": true
                                },
                                {
                                    "key": "cursor",
                                    "value": "",
                                    "disabled": true
                                }
                            ]
                        },
                        "description": "Newest first, cursor paginated.\n\nScope: read.\n\nRate limit: 60 requests per minute per token (per-client override)."
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "GET",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/claims",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "claims"
                                    ],
                                    "query": [
                                        {
                                            "key": "status",
                                            "value": "",
                                            "disabled": true
                                        },
                                        {
                                            "key": "type",
                                            "value": "",
                                            "disabled": true
                                        },
                                        {
                                            "key": "claim_type",
                                            "value": "",
                                            "disabled": true
                                        },
                                        {
                                            "key": "policy",
                                            "value": "",
                                            "description": "Policy uuid.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "from",
                                            "value": "",
                                            "description": "Reported on or after (Y-m-d).",
                                            "disabled": true
                                        },
                                        {
                                            "key": "to",
                                            "value": "",
                                            "description": "Reported on or before (Y-m-d).",
                                            "disabled": true
                                        },
                                        {
                                            "key": "overdue",
                                            "value": "",
                                            "description": "Only claims past their status SLA.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "open",
                                            "value": "",
                                            "description": "true = still being worked; false = settled, closed or withdrawn.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "limit",
                                            "value": "",
                                            "description": "Default 25, max 100.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "cursor",
                                            "value": "",
                                            "disabled": true
                                        }
                                    ]
                                }
                            },
                            "status": "Claims",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"data\": [\n        {\n            \"uuid\": \"5c2e8a1b-7f3d-4e6a-9b0c-1d2e3f4a5b6c\",\n            \"claim_no\": \"CLM/2026/00012\",\n            \"status\": \"under_assessment\",\n            \"status_label\": \"Under assessment\",\n            \"next_statuses\": [\n                \"approved\",\n                \"repudiated\",\n                \"documents_pending\",\n                \"withdrawn\"\n            ],\n            \"claim_type\": \"accidental_damage\",\n            \"claim_type_label\": \"Accidental damage\",\n            \"legal\": false,\n            \"legal_label\": \"Non Legal\",\n            \"policy\": {\n                \"uuid\": \"1a2b…\",\n                \"policy_no\": \"SG/MP/2026/000123\",\n                \"product_line\": \"motor\"\n            },\n            \"client\": {\n                \"client_no\": \"C-00042\",\n                \"name\": \"Wanjiru Kamau\"\n            },\n            \"insurer\": {\n                \"id\": 1,\n                \"name\": \"Savanna General\"\n            },\n            \"risk_item\": \"KDA 123A\",\n            \"incident_on\": \"2026-10-10\",\n            \"reported_on\": \"2026-10-11\",\n            \"description\": \"Rear bumper damaged at the Nyayo roundabout.\",\n            \"claimant\": {\n                \"name\": null,\n                \"phone\": null,\n                \"relationship\": null\n            },\n            \"insurer_ref\": \"SG-CL-88812\",\n            \"currency\": \"KES\",\n            \"amounts\": {\n                \"estimate\": 150000,\n                \"estimate_minor\": 15000000,\n                \"reserve\": 140000,\n                \"reserve_minor\": 14000000,\n                \"approved\": 0,\n                \"approved_minor\": 0,\n                \"paid\": 0,\n                \"paid_minor\": 0,\n                \"excess\": 15000,\n                \"excess_minor\": 1500000,\n                \"outstanding\": 0,\n                \"outstanding_minor\": 0\n            },\n            \"sla\": {\n                \"due_at\": \"2026-11-01T09:00:00+03:00\",\n                \"overdue\": false,\n                \"label\": \"18 days left\",\n                \"days_in_status\": 3\n            },\n            \"assigned_to\": {\n                \"id\": 2,\n                \"name\": \"Faith Njeri\",\n                \"role\": \"account_exec\",\n                \"code\": null\n            },\n            \"settled_on\": null,\n            \"closed_on\": null,\n            \"created_at\": \"2026-10-11T09:00:00+03:00\"\n        }\n    ],\n    \"meta\": {\n        \"limit\": 25,\n        \"has_more\": false,\n        \"count\": 1\n    },\n    \"links\": {\n        \"next\": null\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "Register a claim",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Idempotency-Key",
                                "value": "{{$guid}}",
                                "description": "Unique per write; a new one each send."
                            },
                            {
                                "key": "X-Agent-Code",
                                "value": "{{agent_code}}",
                                "disabled": true,
                                "description": "Optional: act as this agent."
                            },
                            {
                                "key": "X-Agent-Key",
                                "value": "{{agent_key}}",
                                "disabled": true
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/claims",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "claims"
                            ]
                        },
                        "description": "Only active, expired or cancelled policies carry claims, and the incident date must fall inside the cover period (before cancellation). The claim number is CLM/<year>/<sequence>; for motor the risk item defaults to the vehicle registration.\n\nScope: claims.\n\nRate limit: 60 requests per minute per token (per-client override).",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"policy\": \"1a2b3c4d-…\",\n    \"claim_type\": \"accidental_damage\",\n    \"incident_on\": \"2026-10-10\",\n    \"description\": \"Rear bumper damaged at the Nyayo roundabout.\",\n    \"estimate\": 150000,\n    \"excess\": 15000,\n    \"type\": \"Non Legal\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "POST",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/claims",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "claims"
                                    ]
                                }
                            },
                            "status": "Claim registered (with its timeline)",
                            "code": 201,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"data\": {\n        \"uuid\": \"5c2e8a1b-7f3d-4e6a-9b0c-1d2e3f4a5b6c\",\n        \"claim_no\": \"CLM/2026/00012\",\n        \"status\": \"under_assessment\",\n        \"status_label\": \"Under assessment\",\n        \"next_statuses\": [\n            \"approved\",\n            \"repudiated\",\n            \"documents_pending\",\n            \"withdrawn\"\n        ],\n        \"claim_type\": \"accidental_damage\",\n        \"claim_type_label\": \"Accidental damage\",\n        \"legal\": false,\n        \"legal_label\": \"Non Legal\",\n        \"policy\": {\n            \"uuid\": \"1a2b…\",\n            \"policy_no\": \"SG/MP/2026/000123\",\n            \"product_line\": \"motor\"\n        },\n        \"client\": {\n            \"client_no\": \"C-00042\",\n            \"name\": \"Wanjiru Kamau\"\n        },\n        \"insurer\": {\n            \"id\": 1,\n            \"name\": \"Savanna General\"\n        },\n        \"risk_item\": \"KDA 123A\",\n        \"incident_on\": \"2026-10-10\",\n        \"reported_on\": \"2026-10-11\",\n        \"description\": \"Rear bumper damaged at the Nyayo roundabout.\",\n        \"claimant\": {\n            \"name\": null,\n            \"phone\": null,\n            \"relationship\": null\n        },\n        \"insurer_ref\": \"SG-CL-88812\",\n        \"currency\": \"KES\",\n        \"amounts\": {\n            \"estimate\": 150000,\n            \"estimate_minor\": 15000000,\n            \"reserve\": 140000,\n            \"reserve_minor\": 14000000,\n            \"approved\": 0,\n            \"approved_minor\": 0,\n            \"paid\": 0,\n            \"paid_minor\": 0,\n            \"excess\": 15000,\n            \"excess_minor\": 1500000,\n            \"outstanding\": 0,\n            \"outstanding_minor\": 0\n        },\n        \"sla\": {\n            \"due_at\": \"2026-11-01T09:00:00+03:00\",\n            \"overdue\": false,\n            \"label\": \"18 days left\",\n            \"days_in_status\": 3\n        },\n        \"assigned_to\": {\n            \"id\": 2,\n            \"name\": \"Faith Njeri\",\n            \"role\": \"account_exec\",\n            \"code\": null\n        },\n        \"settled_on\": null,\n        \"closed_on\": null,\n        \"created_at\": \"2026-10-11T09:00:00+03:00\",\n        \"events\": [\n            {\n                \"status_from\": null,\n                \"status_to\": \"registered\",\n                \"note\": null,\n                \"details\": null,\n                \"user\": {\n                    \"id\": 2,\n                    \"name\": \"Faith Njeri\",\n                    \"role\": \"account_exec\",\n                    \"code\": null\n                },\n                \"occurred_at\": \"2026-10-11T09:00:00+03:00\"\n            }\n        ],\n        \"documents\": [\n            {\n                \"uuid\": \"77aa…\",\n                \"kind\": \"police_abstract\",\n                \"kind_label\": \"Police abstract\",\n                \"original_name\": \"abstract.pdf\",\n                \"mime\": \"application/pdf\",\n                \"size\": 182211,\n                \"sha256\": \"e3b0…\",\n                \"uploaded_at\": \"2026-10-12T11:00:00+03:00\"\n            }\n        ]\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "Get a claim",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Agent-Code",
                                "value": "{{agent_code}}",
                                "disabled": true,
                                "description": "Optional: act as this agent."
                            },
                            {
                                "key": "X-Agent-Key",
                                "value": "{{agent_key}}",
                                "disabled": true
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/claims/:uuid",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "claims",
                                ":uuid"
                            ],
                            "variable": [
                                {
                                    "key": "uuid",
                                    "value": "5c2e8a1b-7f3d-4e6a-9b0c-1d2e3f4a5b6c",
                                    "description": "Claim uuid."
                                }
                            ]
                        },
                        "description": "The claim with its timeline (`events`, oldest first) and documents.\n\nScope: read.\n\nRate limit: 60 requests per minute per token (per-client override)."
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "GET",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/claims/:uuid",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "claims",
                                        ":uuid"
                                    ],
                                    "variable": [
                                        {
                                            "key": "uuid",
                                            "value": "5c2e8a1b-7f3d-4e6a-9b0c-1d2e3f4a5b6c",
                                            "description": "Claim uuid."
                                        }
                                    ]
                                }
                            },
                            "status": "Claim",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"data\": {\n        \"uuid\": \"5c2e8a1b-7f3d-4e6a-9b0c-1d2e3f4a5b6c\",\n        \"claim_no\": \"CLM/2026/00012\",\n        \"status\": \"under_assessment\",\n        \"status_label\": \"Under assessment\",\n        \"next_statuses\": [\n            \"approved\",\n            \"repudiated\",\n            \"documents_pending\",\n            \"withdrawn\"\n        ],\n        \"claim_type\": \"accidental_damage\",\n        \"claim_type_label\": \"Accidental damage\",\n        \"legal\": false,\n        \"legal_label\": \"Non Legal\",\n        \"policy\": {\n            \"uuid\": \"1a2b…\",\n            \"policy_no\": \"SG/MP/2026/000123\",\n            \"product_line\": \"motor\"\n        },\n        \"client\": {\n            \"client_no\": \"C-00042\",\n            \"name\": \"Wanjiru Kamau\"\n        },\n        \"insurer\": {\n            \"id\": 1,\n            \"name\": \"Savanna General\"\n        },\n        \"risk_item\": \"KDA 123A\",\n        \"incident_on\": \"2026-10-10\",\n        \"reported_on\": \"2026-10-11\",\n        \"description\": \"Rear bumper damaged at the Nyayo roundabout.\",\n        \"claimant\": {\n            \"name\": null,\n            \"phone\": null,\n            \"relationship\": null\n        },\n        \"insurer_ref\": \"SG-CL-88812\",\n        \"currency\": \"KES\",\n        \"amounts\": {\n            \"estimate\": 150000,\n            \"estimate_minor\": 15000000,\n            \"reserve\": 140000,\n            \"reserve_minor\": 14000000,\n            \"approved\": 0,\n            \"approved_minor\": 0,\n            \"paid\": 0,\n            \"paid_minor\": 0,\n            \"excess\": 15000,\n            \"excess_minor\": 1500000,\n            \"outstanding\": 0,\n            \"outstanding_minor\": 0\n        },\n        \"sla\": {\n            \"due_at\": \"2026-11-01T09:00:00+03:00\",\n            \"overdue\": false,\n            \"label\": \"18 days left\",\n            \"days_in_status\": 3\n        },\n        \"assigned_to\": {\n            \"id\": 2,\n            \"name\": \"Faith Njeri\",\n            \"role\": \"account_exec\",\n            \"code\": null\n        },\n        \"settled_on\": null,\n        \"closed_on\": null,\n        \"created_at\": \"2026-10-11T09:00:00+03:00\",\n        \"events\": [\n            {\n                \"status_from\": null,\n                \"status_to\": \"registered\",\n                \"note\": null,\n                \"details\": null,\n                \"user\": {\n                    \"id\": 2,\n                    \"name\": \"Faith Njeri\",\n                    \"role\": \"account_exec\",\n                    \"code\": null\n                },\n                \"occurred_at\": \"2026-10-11T09:00:00+03:00\"\n            }\n        ],\n        \"documents\": [\n            {\n                \"uuid\": \"77aa…\",\n                \"kind\": \"police_abstract\",\n                \"kind_label\": \"Police abstract\",\n                \"original_name\": \"abstract.pdf\",\n                \"mime\": \"application/pdf\",\n                \"size\": 182211,\n                \"sha256\": \"e3b0…\",\n                \"uploaded_at\": \"2026-10-12T11:00:00+03:00\"\n            }\n        ]\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "Update claim status",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Idempotency-Key",
                                "value": "{{$guid}}",
                                "description": "Unique per write; a new one each send."
                            },
                            {
                                "key": "X-Agent-Code",
                                "value": "{{agent_code}}",
                                "disabled": true,
                                "description": "Optional: act as this agent."
                            },
                            {
                                "key": "X-Agent-Key",
                                "value": "{{agent_key}}",
                                "disabled": true
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/claims/:uuid/status",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "claims",
                                ":uuid",
                                "status"
                            ],
                            "variable": [
                                {
                                    "key": "uuid",
                                    "value": "5c2e8a1b-7f3d-4e6a-9b0c-1d2e3f4a5b6c",
                                    "description": "Claim uuid."
                                }
                            ]
                        },
                        "description": "Moves the claim to one of `next_statuses` and/or records amounts and a note (omit `status` to keep it). Approving needs an approved amount; settling needs a paid amount and stamps the settlement date. Every call writes one timeline event.\n\nScope: claims.\n\nRate limit: 60 requests per minute per token (per-client override).",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"status\": \"approved\",\n    \"note\": \"Assessor report accepted.\",\n    \"amounts\": {\n        \"approved\": 135000\n    }\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "POST",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/claims/:uuid/status",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "claims",
                                        ":uuid",
                                        "status"
                                    ],
                                    "variable": [
                                        {
                                            "key": "uuid",
                                            "value": "5c2e8a1b-7f3d-4e6a-9b0c-1d2e3f4a5b6c",
                                            "description": "Claim uuid."
                                        }
                                    ]
                                }
                            },
                            "status": "Updated claim",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"data\": {\n        \"uuid\": \"5c2e8a1b-7f3d-4e6a-9b0c-1d2e3f4a5b6c\",\n        \"claim_no\": \"CLM/2026/00012\",\n        \"status\": \"under_assessment\",\n        \"status_label\": \"Under assessment\",\n        \"next_statuses\": [\n            \"approved\",\n            \"repudiated\",\n            \"documents_pending\",\n            \"withdrawn\"\n        ],\n        \"claim_type\": \"accidental_damage\",\n        \"claim_type_label\": \"Accidental damage\",\n        \"legal\": false,\n        \"legal_label\": \"Non Legal\",\n        \"policy\": {\n            \"uuid\": \"1a2b…\",\n            \"policy_no\": \"SG/MP/2026/000123\",\n            \"product_line\": \"motor\"\n        },\n        \"client\": {\n            \"client_no\": \"C-00042\",\n            \"name\": \"Wanjiru Kamau\"\n        },\n        \"insurer\": {\n            \"id\": 1,\n            \"name\": \"Savanna General\"\n        },\n        \"risk_item\": \"KDA 123A\",\n        \"incident_on\": \"2026-10-10\",\n        \"reported_on\": \"2026-10-11\",\n        \"description\": \"Rear bumper damaged at the Nyayo roundabout.\",\n        \"claimant\": {\n            \"name\": null,\n            \"phone\": null,\n            \"relationship\": null\n        },\n        \"insurer_ref\": \"SG-CL-88812\",\n        \"currency\": \"KES\",\n        \"amounts\": {\n            \"estimate\": 150000,\n            \"estimate_minor\": 15000000,\n            \"reserve\": 140000,\n            \"reserve_minor\": 14000000,\n            \"approved\": 0,\n            \"approved_minor\": 0,\n            \"paid\": 0,\n            \"paid_minor\": 0,\n            \"excess\": 15000,\n            \"excess_minor\": 1500000,\n            \"outstanding\": 0,\n            \"outstanding_minor\": 0\n        },\n        \"sla\": {\n            \"due_at\": \"2026-11-01T09:00:00+03:00\",\n            \"overdue\": false,\n            \"label\": \"18 days left\",\n            \"days_in_status\": 3\n        },\n        \"assigned_to\": {\n            \"id\": 2,\n            \"name\": \"Faith Njeri\",\n            \"role\": \"account_exec\",\n            \"code\": null\n        },\n        \"settled_on\": null,\n        \"closed_on\": null,\n        \"created_at\": \"2026-10-11T09:00:00+03:00\",\n        \"events\": [\n            {\n                \"status_from\": null,\n                \"status_to\": \"registered\",\n                \"note\": null,\n                \"details\": null,\n                \"user\": {\n                    \"id\": 2,\n                    \"name\": \"Faith Njeri\",\n                    \"role\": \"account_exec\",\n                    \"code\": null\n                },\n                \"occurred_at\": \"2026-10-11T09:00:00+03:00\"\n            }\n        ],\n        \"documents\": [\n            {\n                \"uuid\": \"77aa…\",\n                \"kind\": \"police_abstract\",\n                \"kind_label\": \"Police abstract\",\n                \"original_name\": \"abstract.pdf\",\n                \"mime\": \"application/pdf\",\n                \"size\": 182211,\n                \"sha256\": \"e3b0…\",\n                \"uploaded_at\": \"2026-10-12T11:00:00+03:00\"\n            }\n        ]\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "Attach a claim document",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Idempotency-Key",
                                "value": "{{$guid}}",
                                "description": "Unique per write; a new one each send."
                            },
                            {
                                "key": "X-Agent-Code",
                                "value": "{{agent_code}}",
                                "disabled": true,
                                "description": "Optional: act as this agent."
                            },
                            {
                                "key": "X-Agent-Key",
                                "value": "{{agent_key}}",
                                "disabled": true
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/claims/:uuid/documents",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "claims",
                                ":uuid",
                                "documents"
                            ],
                            "variable": [
                                {
                                    "key": "uuid",
                                    "value": "5c2e8a1b-7f3d-4e6a-9b0c-1d2e3f4a5b6c",
                                    "description": "Claim uuid."
                                }
                            ]
                        },
                        "description": "multipart/form-data. PDF, JPG or PNG up to 10 MB. Stored privately with a SHA-256; noted on the timeline. Closed and withdrawn claims take no more documents.\n\nScope: claims.\n\nRate limit: 60 requests per minute per token (per-client override).",
                        "body": {
                            "mode": "formdata",
                            "formdata": [
                                {
                                    "key": "file",
                                    "type": "file",
                                    "src": "",
                                    "description": "The file (binary form field)."
                                },
                                {
                                    "key": "kind",
                                    "type": "text",
                                    "value": ""
                                },
                                {
                                    "key": "note",
                                    "type": "text",
                                    "value": ""
                                }
                            ]
                        }
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "POST",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/claims/:uuid/documents",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "claims",
                                        ":uuid",
                                        "documents"
                                    ],
                                    "variable": [
                                        {
                                            "key": "uuid",
                                            "value": "5c2e8a1b-7f3d-4e6a-9b0c-1d2e3f4a5b6c",
                                            "description": "Claim uuid."
                                        }
                                    ]
                                }
                            },
                            "status": "Document stored",
                            "code": 201,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"data\": {\n        \"uuid\": \"77aa…\",\n        \"kind\": \"police_abstract\",\n        \"kind_label\": \"Police abstract\",\n        \"original_name\": \"abstract.pdf\",\n        \"mime\": \"application/pdf\",\n        \"size\": 182211,\n        \"sha256\": \"e3b0…\",\n        \"uploaded_at\": \"2026-10-12T11:00:00+03:00\"\n    }\n}"
                        }
                    ]
                }
            ],
            "description": "Register claims on policies and move them through the lifecycle: registered → documents pending → with underwriter → under assessment → approved or repudiated → settled → closed (or withdrawn). Insurance Cloud only exports claims (GET /erp/claims); everything here is Flexysure. Agents see claims they registered, claims on policies they created and claims of clients they are the salesperson for."
        },
        {
            "name": "Premium finance",
            "item": [
                {
                    "name": "Get finance offers for a policy",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/ipf/offers?policy=",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "ipf",
                                "offers"
                            ],
                            "query": [
                                {
                                    "key": "policy",
                                    "value": "",
                                    "description": "Policy uuid."
                                }
                            ]
                        },
                        "description": "One offer per repayment period the lender offers (deposit, financed amount, interest, fees, instalment, APR) and whether this policy can apply now. A policy must be saved with premium finance as its payment mode and be awaiting payment.\n\nScope: finance.\n\nRate limit: 60 requests per minute per token (per-client override)."
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "GET",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/ipf/offers?policy=",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "ipf",
                                        "offers"
                                    ],
                                    "query": [
                                        {
                                            "key": "policy",
                                            "value": "",
                                            "description": "Policy uuid."
                                        }
                                    ]
                                }
                            },
                            "status": "Offers and eligibility",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"data\": {\n        \"policy\": {\n            \"uuid\": \"5d0c…\",\n            \"policy_no\": \"POL/2026/000099\",\n            \"payment_mode\": \"ipf\",\n            \"status\": \"pending_payment\"\n        },\n        \"lender\": {\n            \"code\": \"FLEXY\",\n            \"name\": \"Flexysure Premium Finance\"\n        },\n        \"eligible\": true,\n        \"reason\": null,\n        \"gross_premium\": 50000,\n        \"gross_premium_minor\": 5000000,\n        \"offers\": [\n            {\n                \"tenor_months\": 6,\n                \"deposit\": 10000,\n                \"deposit_minor\": 1000000,\n                \"principal\": 40000,\n                \"principal_minor\": 4000000,\n                \"interest\": 6000,\n                \"interest_minor\": 600000,\n                \"fees\": 500,\n                \"fees_minor\": 50000,\n                \"total_repayable\": 46500,\n                \"total_repayable_minor\": 4650000,\n                \"instalment\": 7749,\n                \"instalment_minor\": 774900,\n                \"last_instalment\": 7755,\n                \"last_instalment_minor\": 775500,\n                \"apr_percent\": 47.6\n            }\n        ]\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "Apply for premium finance",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Idempotency-Key",
                                "value": "{{$guid}}",
                                "description": "Unique per write; a new one each send."
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/ipf/applications",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "ipf",
                                "applications"
                            ]
                        },
                        "description": "Submits the application to Flexysure Finance, who decide in their portal. Calling this confirms the client agreed to the terms and to sharing their details with the lender; the time is recorded as `consent_at`. The application is owned by the API client's actor user (or the user who created the client).\n\nScope: finance.\n\nRate limit: 60 requests per minute per token (per-client override).",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"policy\": \"5d0c8a1e-…\",\n    \"tenor_months\": 6\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "POST",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/ipf/applications",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "ipf",
                                        "applications"
                                    ]
                                }
                            },
                            "status": "Application submitted (`status: submitted`)",
                            "code": 201,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"data\": {\n        \"uuid\": \"0c8d6a3e-2f4b-4d0a-9f3e-6b7d1c2a9e44\",\n        \"status\": \"submitted\",\n        \"status_label\": \"With lender\",\n        \"next_step\": \"Waiting for Flexysure Finance to decide.\",\n        \"policy\": {\n            \"uuid\": \"5d0c…\",\n            \"policy_no\": \"POL/2026/000099\",\n            \"risk_note_no\": \"RN/2026/000099\"\n        },\n        \"client\": {\n            \"client_no\": \"C000231\",\n            \"name\": \"Wanjiru Kamau\"\n        },\n        \"lender\": {\n            \"code\": \"FLEXY\",\n            \"name\": \"Flexysure Premium Finance\"\n        },\n        \"tenor_months\": 6,\n        \"gross_premium\": 50000,\n        \"gross_premium_minor\": 5000000,\n        \"deposit\": 10000,\n        \"deposit_minor\": 1000000,\n        \"principal\": 40000,\n        \"principal_minor\": 4000000,\n        \"interest\": 6000,\n        \"interest_minor\": 600000,\n        \"fees\": 500,\n        \"fees_minor\": 50000,\n        \"total_repayable\": 46500,\n        \"total_repayable_minor\": 4650000,\n        \"apr_percent\": 47.6,\n        \"consent_at\": \"2026-10-14T09:00:00+03:00\",\n        \"decided_at\": null,\n        \"decline_reason\": null,\n        \"loan_uuid\": null,\n        \"loan_ref\": null,\n        \"created_at\": \"2026-10-14T09:00:00+03:00\"\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "Get an application",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/ipf/applications/:uuid",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "ipf",
                                "applications",
                                ":uuid"
                            ],
                            "variable": [
                                {
                                    "key": "uuid",
                                    "value": "",
                                    "description": "Application uuid."
                                }
                            ]
                        },
                        "description": "Poll this (or subscribe to `ipf.application.decided`) to learn the lender's decision. Once signed, `loan_uuid` points at the loan.\n\nScope: finance.\n\nRate limit: 60 requests per minute per token (per-client override)."
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "GET",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/ipf/applications/:uuid",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "ipf",
                                        "applications",
                                        ":uuid"
                                    ],
                                    "variable": [
                                        {
                                            "key": "uuid",
                                            "value": "",
                                            "description": "Application uuid."
                                        }
                                    ]
                                }
                            },
                            "status": "Application",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"data\": {\n        \"uuid\": \"0c8d6a3e-2f4b-4d0a-9f3e-6b7d1c2a9e44\",\n        \"status\": \"approved\",\n        \"status_label\": \"Approved\",\n        \"next_step\": \"Send the signing code (POST …/otp), then sign with it (POST …/sign).\",\n        \"policy\": {\n            \"uuid\": \"5d0c…\",\n            \"policy_no\": \"POL/2026/000099\",\n            \"risk_note_no\": \"RN/2026/000099\"\n        },\n        \"client\": {\n            \"client_no\": \"C000231\",\n            \"name\": \"Wanjiru Kamau\"\n        },\n        \"lender\": {\n            \"code\": \"FLEXY\",\n            \"name\": \"Flexysure Premium Finance\"\n        },\n        \"tenor_months\": 6,\n        \"gross_premium\": 50000,\n        \"gross_premium_minor\": 5000000,\n        \"deposit\": 10000,\n        \"deposit_minor\": 1000000,\n        \"principal\": 40000,\n        \"principal_minor\": 4000000,\n        \"interest\": 6000,\n        \"interest_minor\": 600000,\n        \"fees\": 500,\n        \"fees_minor\": 50000,\n        \"total_repayable\": 46500,\n        \"total_repayable_minor\": 4650000,\n        \"apr_percent\": 47.6,\n        \"consent_at\": \"2026-10-14T09:00:00+03:00\",\n        \"decided_at\": \"2026-10-14T09:30:00+03:00\",\n        \"decline_reason\": null,\n        \"loan_uuid\": null,\n        \"loan_ref\": null,\n        \"created_at\": \"2026-10-14T09:00:00+03:00\"\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "Send the agreement signing code",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Idempotency-Key",
                                "value": "{{$guid}}",
                                "description": "Unique per write; a new one each send."
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/ipf/applications/:uuid/otp",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "ipf",
                                "applications",
                                ":uuid",
                                "otp"
                            ],
                            "variable": [
                                {
                                    "key": "uuid",
                                    "value": "",
                                    "description": "Application uuid."
                                }
                            ]
                        },
                        "description": "Texts a 6-digit code to the client's phone for signing the approved agreement (charged to the SMS balance). `sent` is true only when the SMS was queued or sent; otherwise `sent: false` with `reason`. Each call replaces the previous code; it expires after `expires_in` seconds and allows 5 tries. Only a hash is stored. In the demo the code also comes back as `demo_otp`.\n\nScope: finance.\n\nRate limit: 60 requests per minute per token (per-client override)."
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "POST",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/ipf/applications/:uuid/otp",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "ipf",
                                        "applications",
                                        ":uuid",
                                        "otp"
                                    ],
                                    "variable": [
                                        {
                                            "key": "uuid",
                                            "value": "",
                                            "description": "Application uuid."
                                        }
                                    ]
                                }
                            },
                            "status": "`{sent: true}`, or `{sent: false, reason}` when the SMS could not go",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"sent\": true,\n    \"message_status\": \"sent\",\n    \"phone\": \"0712 345 678\",\n    \"expires_in\": 600,\n    \"demo_otp\": \"483920\",\n    \"demo_note\": \"Demo mode: the code is returned here instead of being sent by SMS.\"\n}"
                        }
                    ]
                },
                {
                    "name": "Sign the agreement",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Idempotency-Key",
                                "value": "{{$guid}}",
                                "description": "Unique per write; a new one each send."
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/ipf/applications/:uuid/sign",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "ipf",
                                "applications",
                                ":uuid",
                                "sign"
                            ],
                            "variable": [
                                {
                                    "key": "uuid",
                                    "value": "",
                                    "description": "Application uuid."
                                }
                            ]
                        },
                        "description": "Checks the code and books the loan in `pending_deposit`. The signature evidence is the sha256 of the agreement text, the caller's IP and the time. Next: collect the deposit with `POST /ipf/loans/{uuid}/deposit`.\n\nScope: finance.\n\nRate limit: 60 requests per minute per token (per-client override).",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"otp\": \"483920\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "POST",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/ipf/applications/:uuid/sign",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "ipf",
                                        "applications",
                                        ":uuid",
                                        "sign"
                                    ],
                                    "variable": [
                                        {
                                            "key": "uuid",
                                            "value": "",
                                            "description": "Application uuid."
                                        }
                                    ]
                                }
                            },
                            "status": "Loan created",
                            "code": 201,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"data\": {\n        \"uuid\": \"1f7e2b9c-8a3d-4e6f-b1c2-3d4e5f6a7b8c\",\n        \"loan_ref\": \"IPF-000017\",\n        \"status\": \"pending_deposit\",\n        \"status_label\": \"Awaiting deposit\",\n        \"application_uuid\": \"0c8d6a3e-…\",\n        \"policy\": {\n            \"uuid\": \"5d0c…\",\n            \"policy_no\": \"POL/2026/000099\",\n            \"status\": \"active\"\n        },\n        \"client\": {\n            \"client_no\": \"C000231\",\n            \"name\": \"Wanjiru Kamau\"\n        },\n        \"lender\": {\n            \"code\": \"FLEXY\",\n            \"name\": \"Flexysure Premium Finance\",\n            \"paybill\": \"700100\"\n        },\n        \"repay_to\": {\n            \"paybill\": \"700100\",\n            \"account\": \"IPF-000017\"\n        },\n        \"tenor_months\": 6,\n        \"apr_percent\": 47.6,\n        \"total_repayable\": 46500,\n        \"total_repayable_minor\": 4650000,\n        \"repaid\": 0,\n        \"repaid_minor\": 0,\n        \"outstanding\": 38751,\n        \"outstanding_minor\": 3875100,\n        \"principal_outstanding\": 33334,\n        \"principal_outstanding_minor\": 3333400,\n        \"repaid_split\": {\n            \"fees\": 83,\n            \"fees_minor\": 8300,\n            \"interest\": 1000,\n            \"interest_minor\": 100000,\n            \"principal\": 6666,\n            \"principal_minor\": 666600\n        },\n        \"arrears\": 0,\n        \"arrears_minor\": 0,\n        \"arrears_days\": 0,\n        \"next_due\": null,\n        \"schedule\": [],\n        \"links\": {\n            \"agreement\": \"https://app.flexysure.com/api/v1/ipf/loans/1f7e…/agreement\"\n        }\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "Get a loan",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/ipf/loans/:uuid",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "ipf",
                                "loans",
                                ":uuid"
                            ],
                            "variable": [
                                {
                                    "key": "uuid",
                                    "value": "",
                                    "description": "Loan uuid."
                                }
                            ]
                        },
                        "description": "Terms, repayment schedule, what has been repaid (split fees, then interest, then principal inside each instalment), what is outstanding, arrears and how many days the oldest missed instalment is late. The schedule appears once Flexysure Finance has paid the underwriter.\n\nScope: finance.\n\nRate limit: 60 requests per minute per token (per-client override)."
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "GET",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/ipf/loans/:uuid",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "ipf",
                                        "loans",
                                        ":uuid"
                                    ],
                                    "variable": [
                                        {
                                            "key": "uuid",
                                            "value": "",
                                            "description": "Loan uuid."
                                        }
                                    ]
                                }
                            },
                            "status": "Loan",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"data\": {\n        \"uuid\": \"1f7e2b9c-8a3d-4e6f-b1c2-3d4e5f6a7b8c\",\n        \"loan_ref\": \"IPF-000017\",\n        \"status\": \"active\",\n        \"status_label\": \"Active\",\n        \"application_uuid\": \"0c8d6a3e-…\",\n        \"policy\": {\n            \"uuid\": \"5d0c…\",\n            \"policy_no\": \"POL/2026/000099\",\n            \"status\": \"active\"\n        },\n        \"client\": {\n            \"client_no\": \"C000231\",\n            \"name\": \"Wanjiru Kamau\"\n        },\n        \"lender\": {\n            \"code\": \"FLEXY\",\n            \"name\": \"Flexysure Premium Finance\",\n            \"paybill\": \"700100\"\n        },\n        \"repay_to\": {\n            \"paybill\": \"700100\",\n            \"account\": \"IPF-000017\"\n        },\n        \"tenor_months\": 6,\n        \"apr_percent\": 47.6,\n        \"total_repayable\": 46500,\n        \"total_repayable_minor\": 4650000,\n        \"repaid\": 7749,\n        \"repaid_minor\": 774900,\n        \"outstanding\": 38751,\n        \"outstanding_minor\": 3875100,\n        \"principal_outstanding\": 33334,\n        \"principal_outstanding_minor\": 3333400,\n        \"repaid_split\": {\n            \"fees\": 83,\n            \"fees_minor\": 8300,\n            \"interest\": 1000,\n            \"interest_minor\": 100000,\n            \"principal\": 6666,\n            \"principal_minor\": 666600\n        },\n        \"arrears\": 0,\n        \"arrears_minor\": 0,\n        \"arrears_days\": 0,\n        \"next_due\": {\n            \"seq\": 2,\n            \"due_on\": \"2026-12-14\",\n            \"amount\": 7749,\n            \"amount_minor\": 774900\n        },\n        \"schedule\": [\n            {\n                \"seq\": 1,\n                \"due_on\": \"2026-11-14\",\n                \"principal\": 6666,\n                \"principal_minor\": 666600,\n                \"interest\": 1000,\n                \"interest_minor\": 100000,\n                \"fees\": 83,\n                \"fees_minor\": 8300,\n                \"amount_due\": 7749,\n                \"amount_due_minor\": 774900,\n                \"amount_paid\": 7749,\n                \"amount_paid_minor\": 774900,\n                \"status\": \"paid\"\n            }\n        ],\n        \"links\": {\n            \"agreement\": \"https://app.flexysure.com/api/v1/ipf/loans/1f7e…/agreement\"\n        }\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "Download the signed agreement",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/ipf/loans/:uuid/agreement",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "ipf",
                                "loans",
                                ":uuid",
                                "agreement"
                            ],
                            "variable": [
                                {
                                    "key": "uuid",
                                    "value": "",
                                    "description": "Loan uuid."
                                }
                            ]
                        },
                        "description": "The agreement the client signed as a one-page PDF (`application/pdf`), with the e-signature record: time, document fingerprint and IP.\n\nScope: finance.\n\nRate limit: 60 requests per minute per token (per-client override)."
                    }
                },
                {
                    "name": "Collect the deposit by M-Pesa",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Idempotency-Key",
                                "value": "{{$guid}}",
                                "description": "Unique per write; a new one each send."
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/ipf/loans/:uuid/deposit",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "ipf",
                                "loans",
                                ":uuid",
                                "deposit"
                            ],
                            "variable": [
                                {
                                    "key": "uuid",
                                    "value": "",
                                    "description": "Loan uuid."
                                }
                            ]
                        },
                        "description": "Sends an STK push for the deposit (purpose `ipf_deposit`). When the customer pays, the receipt is allocated to the policy's debit note and the loan moves to `pending_disbursement`; cover starts after Flexysure Finance pays the underwriter. Poll with `GET /payment/stk/{uuid}`.\n\nScope: finance.\n\nRate limit: 60 requests per minute per token (per-client override).",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"phone\": \"0712345678\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "POST",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/ipf/loans/:uuid/deposit",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "ipf",
                                        "loans",
                                        ":uuid",
                                        "deposit"
                                    ],
                                    "variable": [
                                        {
                                            "key": "uuid",
                                            "value": "",
                                            "description": "Loan uuid."
                                        }
                                    ]
                                }
                            },
                            "status": "Prompt sent (same shape as `POST /payment/stk/push`)",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"merchant_request_id\": \"29115-34620561-1\",\n    \"checkout_request_id\": \"ws_CO_14102026101500123\",\n    \"stk_request_uuid\": \"9b2f…\",\n    \"status\": \"pending\",\n    \"purpose\": \"ipf_deposit\",\n    \"account\": \"DN-000099\",\n    \"amount\": 10000,\n    \"amount_minor\": 1000000,\n    \"ipf_loan_ref\": \"IPF-000017\"\n}"
                        }
                    ]
                },
                {
                    "name": "Quote or start early settlement",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Idempotency-Key",
                                "value": "{{$guid}}",
                                "description": "Unique per write; a new one each send."
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/ipf/loans/:uuid/early-settlement",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "ipf",
                                "loans",
                                ":uuid",
                                "early-settlement"
                            ],
                            "query": [
                                {
                                    "key": "quote",
                                    "value": "",
                                    "description": "`1` to get the payoff figure without sending a prompt.",
                                    "disabled": true
                                }
                            ],
                            "variable": [
                                {
                                    "key": "uuid",
                                    "value": "",
                                    "description": "Loan uuid."
                                }
                            ]
                        },
                        "description": "With `?quote=1`: the payoff figure for today and nothing else. Without it: the same quote plus an STK push for the payoff amount (`phone` required). Payoff rule: unpaid principal on every instalment, plus unpaid interest and fees on instalments already due (due date on or before today), plus interest on the current instalment accrued pro rata by days from the previous due date (or one month before the first) to today. Interest and fees on later instalments are waived. Rounded up to the shilling, never more than the contractual outstanding balance, valid today only. Use a new Idempotency-Key for each quote. When the customer pays the prompt (purpose `ipf_settlement`), the payoff is recomputed for the payment date: paying at least that much closes the loan (`status` `closed`), the remaining interest and fees are waived (schedule lines `waived`), anything above the payoff is kept as a borrower credit, and the loan timeline shows \"Settled early\". Paying less than the payoff counts as an ordinary instalment and the loan stays open. Poll `GET /payment/stk/{uuid}` and `GET /ipf/loans/{uuid}`.\n\nScope: finance.\n\nRate limit: 60 requests per minute per token (per-client override).",
                        "body": {
                            "mode": "raw",
                            "raw": "{}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "POST",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/ipf/loans/:uuid/early-settlement",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "ipf",
                                        "loans",
                                        ":uuid",
                                        "early-settlement"
                                    ],
                                    "query": [
                                        {
                                            "key": "quote",
                                            "value": "",
                                            "description": "`1` to get the payoff figure without sending a prompt.",
                                            "disabled": true
                                        }
                                    ],
                                    "variable": [
                                        {
                                            "key": "uuid",
                                            "value": "",
                                            "description": "Loan uuid."
                                        }
                                    ]
                                }
                            },
                            "status": "Quote (`data`), and `stk` when a prompt was sent",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"data\": {\n        \"loan_ref\": \"IPF-000017\",\n        \"as_of\": \"2026-12-01\",\n        \"payoff\": 34200,\n        \"payoff_minor\": 3420000,\n        \"principal\": 33334,\n        \"principal_minor\": 3333400,\n        \"interest_accrued\": 866,\n        \"interest_accrued_minor\": 86600,\n        \"fees_due\": 0,\n        \"fees_due_minor\": 0,\n        \"outstanding\": 38750,\n        \"outstanding_minor\": 3875000,\n        \"waived\": 4550,\n        \"waived_minor\": 455000,\n        \"rule\": \"Unpaid principal + interest and fees on instalments already due + interest accrued pro rata on the current instalment to today; later interest and fees are waived. Valid today only.\"\n    }\n}"
                        }
                    ]
                }
            ],
            "description": "Spread a premium over monthly instalments with Flexysure Premium Finance: quote, apply, sign the agreement with a one-time code, collect the deposit and follow the loan. Offered through brokerages and agencies only: a SACCO or microfinance token gets 403 `ipf_not_offered`. Credit decisions and paying the underwriter stay with Flexysure Finance staff; there is no API to approve an application or disburse a loan. Instalments are paid to Flexysure Finance's paybill with the loan ref as the account number, or by an M-Pesa prompt: `POST /payment/stk/push` with the loan ref as `account` (purpose `ipf_repayment`). A running loan can be settled early with `POST /ipf/loans/{uuid}/early-settlement`. Rule failures from the finance actions come back as 422 `validation_failed` with the reason under `errors.ipf` (or `errors.otp`, `errors.tenor_months`)."
        },
        {
            "name": "ERP exports",
            "item": [
                {
                    "name": "Export clients",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Agent-Code",
                                "value": "{{agent_code}}",
                                "disabled": true,
                                "description": "Optional: act as this agent."
                            },
                            {
                                "key": "X-Agent-Key",
                                "value": "{{agent_key}}",
                                "disabled": true
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/erp/clients",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "erp",
                                "clients"
                            ],
                            "query": [
                                {
                                    "key": "page",
                                    "value": "",
                                    "description": "Default 1.",
                                    "disabled": true
                                },
                                {
                                    "key": "per_page",
                                    "value": "",
                                    "description": "Default 15, max 100.",
                                    "disabled": true
                                }
                            ]
                        },
                        "description": "Scope: read.\n\nRate limit: 5 requests per minute per API client (Insurance Cloud parity), on top of the platform limit."
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "GET",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/erp/clients",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "erp",
                                        "clients"
                                    ],
                                    "query": [
                                        {
                                            "key": "page",
                                            "value": "",
                                            "description": "Default 1.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "per_page",
                                            "value": "",
                                            "description": "Default 15, max 100.",
                                            "disabled": true
                                        }
                                    ]
                                }
                            },
                            "status": "Clients",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"status\": \"success\",\n    \"clients\": [\n        {\n            \"id\": 42,\n            \"client_no\": \"C-00042\",\n            \"name\": \"Wanjiru Kamau\",\n            \"phone\": \"0712345678\",\n            \"email\": \"wanjiru@example.com\",\n            \"idno\": \"27845123\",\n            \"pin\": \"A001234567Z\",\n            \"sales_person\": \"Kevin Kiprop\",\n            \"agents\": [\n                {\n                    \"id\": 4,\n                    \"name\": \"Kevin Kiprop\",\n                    \"code\": \"KK01\"\n                }\n            ]\n        }\n    ],\n    \"meta\": {\n        \"current_page\": 1,\n        \"per_page\": 15,\n        \"total\": 1,\n        \"last_page\": 1\n    },\n    \"links\": {\n        \"next\": null,\n        \"prev\": null\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "Export policies",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Agent-Code",
                                "value": "{{agent_code}}",
                                "disabled": true,
                                "description": "Optional: act as this agent."
                            },
                            {
                                "key": "X-Agent-Key",
                                "value": "{{agent_key}}",
                                "disabled": true
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/erp/policies",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "erp",
                                "policies"
                            ],
                            "query": [
                                {
                                    "key": "status",
                                    "value": "",
                                    "description": "0 inactive, 1 active, 2 all (default).",
                                    "disabled": true
                                },
                                {
                                    "key": "starting",
                                    "value": "",
                                    "description": "Cover starting on or after (Y-m-d).",
                                    "disabled": true
                                },
                                {
                                    "key": "ending",
                                    "value": "",
                                    "description": "Cover starting on or before (Y-m-d).",
                                    "disabled": true
                                },
                                {
                                    "key": "page",
                                    "value": "",
                                    "description": "Default 1.",
                                    "disabled": true
                                },
                                {
                                    "key": "per_page",
                                    "value": "",
                                    "description": "Default 15, max 100.",
                                    "disabled": true
                                }
                            ]
                        },
                        "description": "Status mapping: 1 = active (`active`); 0 = inactive (awaiting payment, cancelled, expired, renewed, void); 2 = all (default). In the response `status` is 1 or 0 and `status_label` carries Flexysure's status. `starting`/`ending` filter on the cover start date. `transaction` is \"New business\" or \"Renewal\"; `receipted` is what has been paid against the policy's debit notes and `balance` what is still owed.\n\nScope: read.\n\nRate limit: 5 requests per minute per API client (Insurance Cloud parity), on top of the platform limit."
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "GET",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/erp/policies",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "erp",
                                        "policies"
                                    ],
                                    "query": [
                                        {
                                            "key": "status",
                                            "value": "",
                                            "description": "0 inactive, 1 active, 2 all (default).",
                                            "disabled": true
                                        },
                                        {
                                            "key": "starting",
                                            "value": "",
                                            "description": "Cover starting on or after (Y-m-d).",
                                            "disabled": true
                                        },
                                        {
                                            "key": "ending",
                                            "value": "",
                                            "description": "Cover starting on or before (Y-m-d).",
                                            "disabled": true
                                        },
                                        {
                                            "key": "page",
                                            "value": "",
                                            "description": "Default 1.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "per_page",
                                            "value": "",
                                            "description": "Default 15, max 100.",
                                            "disabled": true
                                        }
                                    ]
                                }
                            },
                            "status": "Policies",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"status\": \"success\",\n    \"policies\": [\n        {\n            \"id\": 123,\n            \"uuid\": \"1a2b…\",\n            \"status\": 1,\n            \"status_label\": \"Active\",\n            \"transaction\": \"New business\",\n            \"policy_no\": \"SG/MP/2026/000123\",\n            \"product_id\": null,\n            \"insurer\": \"Savanna General\",\n            \"client\": \"Wanjiru Kamau\",\n            \"client_no\": \"C-00042\",\n            \"product\": \"Comprehensive\",\n            \"product_line\": \"motor\",\n            \"start_date\": \"2026-10-14\",\n            \"end_date\": \"2027-10-13\",\n            \"risk_note\": \"RN-00123\",\n            \"premium\": 35587,\n            \"receipted\": 35587,\n            \"balance\": 0,\n            \"sales_person\": \"Kevin Kiprop\",\n            \"agents\": [\n                {\n                    \"id\": 4,\n                    \"name\": \"Kevin Kiprop\",\n                    \"code\": \"KK01\"\n                }\n            ]\n        }\n    ],\n    \"meta\": {\n        \"current_page\": 1,\n        \"per_page\": 15,\n        \"total\": 1,\n        \"last_page\": 1\n    },\n    \"links\": {\n        \"next\": null,\n        \"prev\": null\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "Export claims",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Agent-Code",
                                "value": "{{agent_code}}",
                                "disabled": true,
                                "description": "Optional: act as this agent."
                            },
                            {
                                "key": "X-Agent-Key",
                                "value": "{{agent_key}}",
                                "disabled": true
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/erp/claims",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "erp",
                                "claims"
                            ],
                            "query": [
                                {
                                    "key": "type",
                                    "value": "",
                                    "disabled": true
                                },
                                {
                                    "key": "starting",
                                    "value": "",
                                    "description": "Reported on or after (Y-m-d).",
                                    "disabled": true
                                },
                                {
                                    "key": "ending",
                                    "value": "",
                                    "description": "Reported on or before (Y-m-d).",
                                    "disabled": true
                                },
                                {
                                    "key": "page",
                                    "value": "",
                                    "description": "Default 1.",
                                    "disabled": true
                                },
                                {
                                    "key": "per_page",
                                    "value": "",
                                    "description": "Default 20, max 100.",
                                    "disabled": true
                                }
                            ]
                        },
                        "description": "`claim_type` is Insurance Cloud's Legal / Non Legal; `cause` is the kind of loss. `starting`/`ending` filter on the reported date. `claim_amount` is the estimate, `paid_amount` what has been paid.\n\nScope: read.\n\nRate limit: 5 requests per minute per API client (Insurance Cloud parity), on top of the platform limit."
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "GET",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/erp/claims",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "erp",
                                        "claims"
                                    ],
                                    "query": [
                                        {
                                            "key": "type",
                                            "value": "",
                                            "disabled": true
                                        },
                                        {
                                            "key": "starting",
                                            "value": "",
                                            "description": "Reported on or after (Y-m-d).",
                                            "disabled": true
                                        },
                                        {
                                            "key": "ending",
                                            "value": "",
                                            "description": "Reported on or before (Y-m-d).",
                                            "disabled": true
                                        },
                                        {
                                            "key": "page",
                                            "value": "",
                                            "description": "Default 1.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "per_page",
                                            "value": "",
                                            "description": "Default 20, max 100.",
                                            "disabled": true
                                        }
                                    ]
                                }
                            },
                            "status": "Claims",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"status\": \"success\",\n    \"claims\": [\n        {\n            \"id\": 12,\n            \"uuid\": \"5c2e…\",\n            \"claim_no\": \"CLM/2026/00012\",\n            \"policy_no\": \"SG/MP/2026/000123\",\n            \"incident_date\": \"2026-10-10\",\n            \"claim_type\": \"Non Legal\",\n            \"cause\": \"Accidental damage\",\n            \"product\": \"Motor\",\n            \"item\": \"KDA 123A\",\n            \"status\": \"Under assessment\",\n            \"client\": {\n                \"name\": \"Wanjiru Kamau\",\n                \"client_no\": \"C-00042\"\n            },\n            \"insurer\": \"Savanna General\",\n            \"currency\": \"KES\",\n            \"claim_amount\": 150000,\n            \"paid_amount\": 0,\n            \"sales_person\": \"Kevin Kiprop\",\n            \"agents\": [\n                {\n                    \"id\": 4,\n                    \"name\": \"Kevin Kiprop\",\n                    \"code\": \"KK01\"\n                }\n            ]\n        }\n    ],\n    \"meta\": {\n        \"current_page\": 1,\n        \"per_page\": 20,\n        \"total\": 1,\n        \"last_page\": 1\n    },\n    \"links\": {\n        \"next\": null,\n        \"prev\": null\n    }\n}"
                        }
                    ]
                }
            ],
            "description": "Insurance Cloud's ERP endpoints, record for record, for integrators syncing an accounting or ERP system: `{status, <records>[], meta, links}` with `page`/`per_page`. Amounts are whole shillings. Visibility: staff tokens see every record; agents (actor with own-records visibility, or X-Agent-Code/X-Agent-Key) see records they created, records of clients they are the salesperson for, and claims on policies they created. `agents[]` lists the agents attached to a record (its creator and the client's salesperson, when they are agents)."
        },
        {
            "name": "Client area",
            "item": [
                {
                    "name": "Request a sign-in code",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/client/login",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "client",
                                "login"
                            ]
                        },
                        "description": "Send the email or phone saved on the client record (or its login). If both are sent both must match the same account. The same six-digit code goes by SMS and email and expires after 5 minutes. No bearer token is needed; when the same contact is a client of more than one organisation, send the organisation's bearer token to choose. The answer never reveals whether an account exists: unknown, disabled or (without a token) ambiguous contacts get the same 200 body, and `channels` is always `[\"email\", \"sms\"]`, but no code is sent and the `otp_id` never verifies.\n\nRate limit: 3 codes per 5 minutes per identifier and per account.",
                        "auth": {
                            "type": "noauth"
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"email\": \"jane@example.com\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "POST",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/client/login",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "client",
                                        "login"
                                    ]
                                }
                            },
                            "status": "Code sent (the same body for contacts that cannot sign in)",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"status\": \"success\",\n    \"message\": \"OTP sent successfully\",\n    \"otp_id\": \"9b1f…\",\n    \"expires_in\": 300,\n    \"channels\": [\n        \"email\",\n        \"sms\"\n    ]\n}"
                        }
                    ]
                },
                {
                    "name": "Verify the code and get the client key",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/client/verify-otp",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "client",
                                "verify-otp"
                            ]
                        },
                        "description": "Consumes the code and returns the user with `client_no` and a new `client_key`, which replaces any earlier key. Five wrong codes exhaust the request; ask for a new code.\n\nRate limit: 60 requests per minute per token (per-client override).",
                        "auth": {
                            "type": "noauth"
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"otp_id\": \"9b1f…\",\n    \"otp\": \"123456\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "POST",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/client/verify-otp",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "client",
                                        "verify-otp"
                                    ]
                                }
                            },
                            "status": "Signed in",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"status\": \"success\",\n    \"message\": \"Login successful\",\n    \"user\": {\n        \"name\": \"Jane Doe\",\n        \"email\": \"jane@example.com\",\n        \"phone\": \"0712345678\",\n        \"department_id\": null,\n        \"department\": null,\n        \"company\": null,\n        \"client_no\": \"C-00042\",\n        \"national_id\": \"12345678\",\n        \"kra_pin\": \"A012345678Z\",\n        \"client_key\": \"fxck_…\",\n        \"is_admin\": true,\n        \"risk_manager_id\": 2\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "Sign out (revoke the client key)",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/client/logout",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "client",
                                "logout"
                            ]
                        },
                        "description": "Rate limit: 60 requests per minute per token (per-client override).",
                        "auth": {
                            "type": "noauth"
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"client_no\": \"C-00042\",\n    \"client_key\": \"fxck_…\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "POST",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/client/logout",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "client",
                                        "logout"
                                    ]
                                }
                            },
                            "status": "Signed out",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"status\": \"success\",\n    \"message\": \"Logout successful\"\n}"
                        }
                    ]
                },
                {
                    "name": "Register a client with its own login",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/client/register",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "client",
                                "register"
                            ]
                        },
                        "description": "Creates an individual or corporate client in the token's organisation, a customer login for the contact and a client key. For a corporate client the company is the client and the contact is its login. An existing login with that email, or a client with that ID number or KRA PIN, returns 403: sign in by code instead.\n\nScope: portal.\n\nRate limit: 60 requests per minute per token (per-client override).",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"type\": \"individual\",\n    \"contact\": {\n        \"name\": \"Jane Doe\",\n        \"phone\": \"0712345678\",\n        \"email\": \"jane@example.com\",\n        \"id_no\": \"12345678\",\n        \"password\": \"secret123\"\n    }\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "POST",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/client/register",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "client",
                                        "register"
                                    ]
                                }
                            },
                            "status": "Client, login and key created",
                            "code": 201,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"status\": \"success\",\n    \"client\": {\n        \"id\": 42,\n        \"client_no\": \"C-00042\",\n        \"client_name\": \"Jane Doe\"\n    },\n    \"user\": {\n        \"name\": \"Jane Doe\",\n        \"email\": \"jane@example.com\",\n        \"phone\": \"0712345678\",\n        \"department_id\": null,\n        \"department\": null,\n        \"company\": null,\n        \"client_no\": \"C-00042\",\n        \"national_id\": \"12345678\",\n        \"kra_pin\": \"A012345678Z\",\n        \"client_key\": \"fxck_…\",\n        \"is_admin\": true,\n        \"risk_manager_id\": 2\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "Client details and documents",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Client-No",
                                "value": "{{client_no}}"
                            },
                            {
                                "key": "X-Client-Key",
                                "value": "{{client_key}}"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/client/details",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "client",
                                "details"
                            ]
                        },
                        "description": "Scope: portal.\n\nRate limit: 5 requests per minute per client (per client and policy on the detail)."
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "GET",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/client/details",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "client",
                                        "details"
                                    ]
                                }
                            },
                            "status": "Client and KYC documents",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"status\": \"success\",\n    \"client\": {\n        \"id\": 42,\n        \"client_no\": \"C-00042\",\n        \"client_name\": \"Jane Doe\",\n        \"email\": \"jane@example.com\",\n        \"mobile\": \"0712345678\",\n        \"pin\": \"A012345678Z\",\n        \"national_id\": \"12345678\"\n    },\n    \"client_documents\": [\n        {\n            \"id\": \"5d0c…\",\n            \"name\": \"National ID\",\n            \"url\": \"https://…/api/v1/client/files/kyc/5d0c…?expires=…&signature=…\",\n            \"download_url\": \"https://…&download=1…\"\n        }\n    ]\n}"
                        }
                    ]
                },
                {
                    "name": "List the client's policies",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Client-No",
                                "value": "{{client_no}}"
                            },
                            {
                                "key": "X-Client-Key",
                                "value": "{{client_key}}"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/client/policies",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "client",
                                "policies"
                            ]
                        },
                        "description": "Paginated. Later pages are POSTed to the same URL with the same filters and `page` (the links are not GET endpoints).\n\nScope: portal.\n\nRate limit: 5 requests per minute per client (per client and policy on the detail).",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"status\": 2,\n    \"page\": 1,\n    \"per_page\": 15\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "POST",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/client/policies",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "client",
                                        "policies"
                                    ]
                                }
                            },
                            "status": "Policies with meta and links",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"status\": \"success\",\n    \"policies\": [\n        {\n            \"id\": 125,\n            \"status\": 1,\n            \"transaction\": \"New Business\",\n            \"policy_no\": \"POL-001\",\n            \"product_id\": null,\n            \"insurer\": \"Savanna General\",\n            \"client\": \"Jane Doe\",\n            \"product\": \"MOTOR\",\n            \"sub_cover\": \"Comprehensive\",\n            \"currency\": \"KES\",\n            \"start_date\": \"2026-09-01\",\n            \"end_date\": \"2027-08-31\",\n            \"sales_type\": \"Cash\",\n            \"risk_note\": \"RN-00001\",\n            \"sum_insured\": 1000000,\n            \"premium\": 50000,\n            \"receipted\": 20000,\n            \"balance\": 30000\n        }\n    ],\n    \"meta\": {\n        \"current_page\": 1,\n        \"last_page\": 1,\n        \"per_page\": 15,\n        \"total\": 1\n    },\n    \"links\": {\n        \"first\": \"https://…/api/v1/client/policies?page=1\",\n        \"prev\": null,\n        \"next\": null,\n        \"last\": \"https://…/api/v1/client/policies?page=1\"\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "List all the client's policies (no pagination)",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Client-No",
                                "value": "{{client_no}}"
                            },
                            {
                                "key": "X-Client-Key",
                                "value": "{{client_key}}"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/client/policies/all",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "client",
                                "policies",
                                "all"
                            ]
                        },
                        "description": "Same filters as the paginated list, without `page` and `per_page`. At most 500 policies, newest first; `truncated` is true when there were more (page through POST /client/policies instead).\n\nScope: portal.\n\nRate limit: 5 requests per minute per client (per client and policy on the detail).",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"status\": 1\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "POST",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/client/policies/all",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "client",
                                        "policies",
                                        "all"
                                    ]
                                }
                            },
                            "status": "Policies",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"status\": \"success\",\n    \"policies\": [\n        {\n            \"id\": 125,\n            \"status\": 1,\n            \"transaction\": \"New Business\",\n            \"policy_no\": \"POL-001\",\n            \"product_id\": null,\n            \"insurer\": \"Savanna General\",\n            \"client\": \"Jane Doe\",\n            \"product\": \"MOTOR\",\n            \"sub_cover\": \"Comprehensive\",\n            \"currency\": \"KES\",\n            \"start_date\": \"2026-09-01\",\n            \"end_date\": \"2027-08-31\",\n            \"sales_type\": \"Cash\",\n            \"risk_note\": \"RN-00001\",\n            \"sum_insured\": 1000000,\n            \"premium\": 50000,\n            \"receipted\": 20000,\n            \"balance\": 30000\n        }\n    ],\n    \"truncated\": false\n}"
                        }
                    ]
                },
                {
                    "name": "Policy detail",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Client-No",
                                "value": "{{client_no}}"
                            },
                            {
                                "key": "X-Client-Key",
                                "value": "{{client_key}}"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/client/policy/:id",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "client",
                                "policy",
                                ":id"
                            ],
                            "variable": [
                                {
                                    "key": "id",
                                    "value": "125",
                                    "description": "Policy id from the policies list."
                                }
                            ]
                        },
                        "description": "Totals, receipt allocations (with receipt PDFs), vehicles, claims, documents (risk note, invoices, motor certificates) and the client's KYC documents. Document links are temporary signed URLs valid for 30 minutes. `marine_dmvic` is always null (Flexysure has no marine line).\n\nScope: portal.\n\nRate limit: 5 requests per minute per client (per client and policy on the detail)."
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "GET",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/client/policy/:id",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "client",
                                        "policy",
                                        ":id"
                                    ],
                                    "variable": [
                                        {
                                            "key": "id",
                                            "value": "125",
                                            "description": "Policy id from the policies list."
                                        }
                                    ]
                                }
                            },
                            "status": "Policy",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"status\": \"success\",\n    \"policy\": {\n        \"id\": 125,\n        \"status\": 1,\n        \"transaction\": \"New Business\",\n        \"policy_no\": \"POL-001\",\n        \"product_id\": null,\n        \"insurer\": \"Savanna General\",\n        \"client\": \"Jane Doe\",\n        \"product\": \"MOTOR\",\n        \"sub_cover\": \"Comprehensive\",\n        \"currency\": \"KES\",\n        \"start_date\": \"2026-09-01\",\n        \"end_date\": \"2027-08-31\",\n        \"sales_type\": \"Cash\",\n        \"risk_note\": \"RN-00001\",\n        \"sum_insured\": 1000000,\n        \"premium\": 50000,\n        \"receipted\": 20000,\n        \"balance\": 30000,\n        \"marine_dmvic\": null,\n        \"risk_note_link\": \"https://…/risk-note?expires=…&signature=…\",\n        \"invoice_link\": \"https://…/debit-notes/77?expires=…\",\n        \"receipt_allocations\": [\n            {\n                \"amount\": 20000,\n                \"reference\": \"RCT-00012\",\n                \"auth_date\": \"2026-09-01 10:02:11\",\n                \"receipt_url\": \"https://…/receipts/12?expires=…\"\n            }\n        ],\n        \"vehicles\": [\n            {\n                \"id\": 9,\n                \"reg_no\": \"KDA 123A\",\n                \"make\": \"Toyota\",\n                \"model\": \"Axio\",\n                \"year\": 2018,\n                \"chassis_no\": \"NZE161-…\",\n                \"engine_no\": \"1NZ-…\",\n                \"body_type\": \"Saloon\",\n                \"value\": 1000000\n            }\n        ],\n        \"claims\": [],\n        \"policy_documents\": [\n            {\n                \"id\": \"risk-note-125\",\n                \"name\": \"Risk note RN-00001\",\n                \"source\": \"system\",\n                \"url\": \"https://…\"\n            }\n        ],\n        \"client_documents\": []\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "Statement of account",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Client-No",
                                "value": "{{client_no}}"
                            },
                            {
                                "key": "X-Client-Key",
                                "value": "{{client_key}}"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/client/statement",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "client",
                                "statement"
                            ]
                        },
                        "description": "Read from the ledger (client receivables): billed amounts are debits; receipts, premium-finance funding and credit notes are credits. The first row is the opening balance; each row carries the running balance; zero debit or credit cells are empty strings. A statement covers at most 366 days (422 `range_too_long`).\n\nScope: portal.\n\nRate limit: 10 requests per minute per client.",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"starting\": \"2026-01-01\",\n    \"ending\": \"2026-12-31\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "POST",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/client/statement",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "client",
                                        "statement"
                                    ]
                                }
                            },
                            "status": "Statement",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"status\": \"success\",\n    \"client\": \"Jane Doe\",\n    \"client_no\": \"C-00042\",\n    \"starting\": \"2026-01-01\",\n    \"ending\": \"2026-12-31\",\n    \"opening_balance\": 0,\n    \"closing_balance\": 30000,\n    \"total_debit\": 50000,\n    \"total_credit\": 20000,\n    \"statement\": [\n        {\n            \"date\": \"2026-01-01\",\n            \"reference\": \"\",\n            \"insurer_ref\": \"\",\n            \"transaction\": \"\",\n            \"insurer\": \"\",\n            \"policy_no\": \"\",\n            \"narration\": \"Opening Balance\",\n            \"dr\": \"\",\n            \"cr\": \"\",\n            \"balance\": 0\n        },\n        {\n            \"date\": \"2026-09-01\",\n            \"reference\": \"DN-00077\",\n            \"insurer_ref\": \"\",\n            \"transaction\": \"Debit note\",\n            \"insurer\": \"Savanna General\",\n            \"policy_no\": \"POL-001\",\n            \"narration\": \"Debit note raised DN-00077 for POL-001\",\n            \"dr\": 50000,\n            \"cr\": \"\",\n            \"balance\": 50000\n        },\n        {\n            \"date\": \"2026-09-01\",\n            \"reference\": \"RCT-00012\",\n            \"insurer_ref\": \"\",\n            \"transaction\": \"Receipt\",\n            \"insurer\": \"Savanna General\",\n            \"policy_no\": \"POL-001\",\n            \"narration\": \"Receipt RCT-00012 allocated to DN-00077\",\n            \"dr\": \"\",\n            \"cr\": 20000,\n            \"balance\": 30000\n        }\n    ]\n}"
                        }
                    ]
                },
                {
                    "name": "Premium-finance loans",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Client-No",
                                "value": "{{client_no}}"
                            },
                            {
                                "key": "X-Client-Key",
                                "value": "{{client_key}}"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/client/loans",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "client",
                                "loans"
                            ]
                        },
                        "description": "Scope: portal.\n\nRate limit: 60 requests per minute per token (per-client override)."
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "GET",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/client/loans",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "client",
                                        "loans"
                                    ]
                                }
                            },
                            "status": "Loans",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"data\": [\n        {\n            \"uuid\": \"1c2d…\",\n            \"loan_ref\": \"IPF-00003\",\n            \"status\": \"active\",\n            \"status_label\": \"Active\",\n            \"policy_id\": 125,\n            \"policy_no\": \"POL-001\",\n            \"lender\": \"Flexysure Premium Finance\",\n            \"currency\": \"KES\",\n            \"principal_minor\": 4000000,\n            \"total_repayable_minor\": 4650000,\n            \"repaid_minor\": 775000,\n            \"balance_minor\": 3875000,\n            \"arrears_minor\": 0,\n            \"tenor_months\": 6,\n            \"next_due\": {\n                \"date\": \"2026-11-14\",\n                \"amount_minor\": 775000\n            }\n        }\n    ]\n}"
                        }
                    ]
                },
                {
                    "name": "Premium-finance loan with schedule",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Client-No",
                                "value": "{{client_no}}"
                            },
                            {
                                "key": "X-Client-Key",
                                "value": "{{client_key}}"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/client/loans/:uuid",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "client",
                                "loans",
                                ":uuid"
                            ],
                            "variable": [
                                {
                                    "key": "uuid",
                                    "value": "",
                                    "description": "Loan uuid."
                                }
                            ]
                        },
                        "description": "Scope: portal.\n\nRate limit: 60 requests per minute per token (per-client override)."
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "GET",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/client/loans/:uuid",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "client",
                                        "loans",
                                        ":uuid"
                                    ],
                                    "variable": [
                                        {
                                            "key": "uuid",
                                            "value": "",
                                            "description": "Loan uuid."
                                        }
                                    ]
                                }
                            },
                            "status": "Loan, schedule and repayments",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"data\": {\n        \"uuid\": \"1c2d…\",\n        \"loan_ref\": \"IPF-00003\",\n        \"balance_minor\": 3875000,\n        \"schedule\": [\n            {\n                \"seq\": 1,\n                \"due_on\": \"2026-11-14\",\n                \"amount_due_minor\": 775000,\n                \"amount_paid_minor\": 0,\n                \"status\": \"due\"\n            }\n        ],\n        \"repayments\": []\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "Pay a policy by M-Pesa",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Idempotency-Key",
                                "value": "{{$guid}}",
                                "description": "Unique per write; a new one each send."
                            },
                            {
                                "key": "X-Client-No",
                                "value": "{{client_no}}"
                            },
                            {
                                "key": "X-Client-Key",
                                "value": "{{client_key}}"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/client/policy/:id/pay",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "client",
                                "policy",
                                ":id",
                                "pay"
                            ],
                            "variable": [
                                {
                                    "key": "id",
                                    "value": "",
                                    "description": "Policy id."
                                }
                            ]
                        },
                        "description": "Sends an STK push for the earliest open debit note of the policy (for a premium-finance policy awaiting its deposit, the deposit). `amount` is in shillings and defaults to what is outstanding on that note. The payment is confirmed by the M-Pesa callback; watch the policy or the `payment.*` webhooks.\n\nScope: portal.\n\nRate limit: 5 requests per minute per client (per client and policy on the detail).",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"phone\": \"0712345678\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "POST",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/client/policy/:id/pay",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "client",
                                        "policy",
                                        ":id",
                                        "pay"
                                    ],
                                    "variable": [
                                        {
                                            "key": "id",
                                            "value": "",
                                            "description": "Policy id."
                                        }
                                    ]
                                }
                            },
                            "status": "Prompt sent",
                            "code": 202,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"data\": {\n        \"stk_request_id\": 31,\n        \"merchant_request_id\": \"29115-…\",\n        \"checkout_request_id\": \"ws_CO_…\",\n        \"purpose\": \"premium\",\n        \"account\": \"DN-00077\",\n        \"phone\": \"254712345678\",\n        \"amount_minor\": 3000000,\n        \"status\": \"pending\",\n        \"message\": \"Check your phone and enter your M-Pesa PIN to pay.\"\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "The client's claims",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Client-No",
                                "value": "{{client_no}}"
                            },
                            {
                                "key": "X-Client-Key",
                                "value": "{{client_key}}"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/client/claims",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "client",
                                "claims"
                            ],
                            "query": [
                                {
                                    "key": "limit",
                                    "value": "",
                                    "description": "1–100, default 25.",
                                    "disabled": true
                                },
                                {
                                    "key": "cursor",
                                    "value": "",
                                    "description": "From links.next.",
                                    "disabled": true
                                }
                            ]
                        },
                        "description": "Cursor pagination (`limit`, `cursor`) or `page` / `per_page`.\n\nScope: portal.\n\nRate limit: 60 requests per minute per token (per-client override)."
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "GET",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/client/claims",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "client",
                                        "claims"
                                    ],
                                    "query": [
                                        {
                                            "key": "limit",
                                            "value": "",
                                            "description": "1–100, default 25.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "cursor",
                                            "value": "",
                                            "description": "From links.next.",
                                            "disabled": true
                                        }
                                    ]
                                }
                            },
                            "status": "Claims",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"data\": [\n        {\n            \"id\": \"7a1e…\",\n            \"claim_no\": \"CLM/2026/00004\",\n            \"policy_id\": 125,\n            \"policy_no\": \"POL-001\",\n            \"status\": \"registered\",\n            \"status_label\": \"Registered\",\n            \"type\": \"Accidental damage\",\n            \"legal\": \"Non Legal\",\n            \"item\": \"KDA 123A\",\n            \"incident_date\": \"2026-10-01\",\n            \"estimate\": 80000,\n            \"narration\": \"Rear-ended at a junction.\"\n        }\n    ],\n    \"meta\": {\n        \"limit\": 25,\n        \"has_more\": false,\n        \"count\": 1\n    },\n    \"links\": {\n        \"next\": null\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "Lodge a claim",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Idempotency-Key",
                                "value": "{{$guid}}",
                                "description": "Unique per write; a new one each send."
                            },
                            {
                                "key": "X-Client-No",
                                "value": "{{client_no}}"
                            },
                            {
                                "key": "X-Client-Key",
                                "value": "{{client_key}}"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/client/claims",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "client",
                                "claims"
                            ]
                        },
                        "description": "Registers a claim on one of the client's policies (active, expired or cancelled; the incident must fall inside the cover period). The broker's claims team takes it from there.\n\nScope: portal.\n\nRate limit: 60 requests per minute per token (per-client override).",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"policy_id\": 125,\n    \"claim_type\": \"accidental_damage\",\n    \"incident_on\": \"2026-10-01\",\n    \"description\": \"Rear-ended at a junction.\",\n    \"estimate\": 80000\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "POST",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/client/claims",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "client",
                                        "claims"
                                    ]
                                }
                            },
                            "status": "Claim registered",
                            "code": 201,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"data\": {\n        \"id\": \"7a1e…\",\n        \"claim_no\": \"CLM/2026/00004\",\n        \"status\": \"registered\"\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "Client document (signed link)",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/client/files/kyc/:uuid",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "client",
                                "files",
                                "kyc",
                                ":uuid"
                            ],
                            "variable": [
                                {
                                    "key": "uuid",
                                    "value": "",
                                    "description": "Document id."
                                }
                            ]
                        },
                        "description": "Temporary signed URL (30 minutes). No headers needed; an expired or altered link returns 403. Add `download=1` (already part of `download_url`) to download instead of viewing.\n\nRate limit: 60 requests per minute per token (per-client override).",
                        "auth": {
                            "type": "noauth"
                        }
                    }
                },
                {
                    "name": "Risk note PDF (signed link)",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/client/files/policies/:policy/risk-note",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "client",
                                "files",
                                "policies",
                                ":policy",
                                "risk-note"
                            ],
                            "variable": [
                                {
                                    "key": "policy",
                                    "value": "",
                                    "description": "Policy uuid."
                                }
                            ]
                        },
                        "description": "Temporary signed URL (30 minutes). No headers needed; an expired or altered link returns 403.\n\nRate limit: 60 requests per minute per token (per-client override).",
                        "auth": {
                            "type": "noauth"
                        }
                    }
                },
                {
                    "name": "Invoice or credit note PDF (signed link)",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/client/files/debit-notes/:note",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "client",
                                "files",
                                "debit-notes",
                                ":note"
                            ],
                            "variable": [
                                {
                                    "key": "note",
                                    "value": "",
                                    "description": "Debit note id."
                                }
                            ]
                        },
                        "description": "Temporary signed URL (30 minutes). No headers needed; an expired or altered link returns 403.\n\nRate limit: 60 requests per minute per token (per-client override).",
                        "auth": {
                            "type": "noauth"
                        }
                    }
                },
                {
                    "name": "Receipt PDF (signed link)",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/client/files/receipts/:receipt",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "client",
                                "files",
                                "receipts",
                                ":receipt"
                            ],
                            "variable": [
                                {
                                    "key": "receipt",
                                    "value": "",
                                    "description": "Receipt id."
                                }
                            ]
                        },
                        "description": "Temporary signed URL (30 minutes). No headers needed; an expired or altered link returns 403.\n\nRate limit: 60 requests per minute per token (per-client override).",
                        "auth": {
                            "type": "noauth"
                        }
                    }
                },
                {
                    "name": "Motor certificate PDF (signed link)",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/client/files/certificates/:certificate",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "client",
                                "files",
                                "certificates",
                                ":certificate"
                            ],
                            "variable": [
                                {
                                    "key": "certificate",
                                    "value": "",
                                    "description": "Certificate id."
                                }
                            ]
                        },
                        "description": "Temporary signed URL (30 minutes). No headers needed; an expired or altered link returns 403.\n\nRate limit: 60 requests per minute per token (per-client override).",
                        "auth": {
                            "type": "noauth"
                        }
                    }
                }
            ],
            "description": "A customer's own account for your app or website, compatible with Insurance Cloud's Client Area: passwordless sign-in by one-time code, details, policies, policy detail with documents and a ledger-backed statement. Sign-in returns `client_no` and `client_key`; send them as `X-Client-No` and `X-Client-Key` with your organisation's bearer token. Money in the Insurance Cloud endpoints is in shillings; the Flexysure-only endpoints (loans, pay, claims) use integer cents (`*_minor`). Policy `status` is 1 for active cover and 0 for any other status. A new sign-in (verify-otp or register) replaces the client's earlier keys; the key returned when your system saves a policy (`portal.client_key`) replaces only earlier policy keys, so it never signs the customer out of their app."
        },
        {
            "name": "Motor certificates (DMVIC)",
            "item": [
                {
                    "name": "Issue certificates for a risk note",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Idempotency-Key",
                                "value": "{{$guid}}",
                                "description": "Unique per write; a new one each send."
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/dmvic",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "dmvic"
                            ]
                        },
                        "description": "Issues the next eligible certificate stage for each listed vehicle on the policy. `start_date` and `expiring` must fall inside the policy cover; the certificate period itself follows the paid stage. Repeating the call for an issued stage returns the existing certificate. `email` and `phone` are accepted for Insurance Cloud compatibility.\n\nScope: certificate.\n\nRate limit: 60 requests per minute per token (per-client override).",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"risknote\": \"RN/2026/000123\",\n    \"email\": \"wanjiru@example.test\",\n    \"phone\": \"0712345678\",\n    \"vehicles\": [\n        {\n            \"registration\": \"KDA 123A\",\n            \"start_date\": \"2026-10-14\",\n            \"expiring\": \"2027-10-13\"\n        }\n    ]\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "POST",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/dmvic",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "dmvic"
                                    ]
                                }
                            },
                            "status": "`{success: true, message, data: [certificate]}`",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"success\": true,\n    \"message\": \"Certificate C12345678 issued.\",\n    \"data\": [\n        {\n            \"certificate_number\": \"C12345678\",\n            \"status\": \"issued\",\n            \"class\": \"C\",\n            \"cover_code\": 100,\n            \"stage\": 1,\n            \"stage_of\": 1,\n            \"registration\": \"KDA 123A\",\n            \"chassis\": \"NZE161-3012456\",\n            \"policy_no\": \"POL/2026/000123\",\n            \"risknote\": \"RN/2026/000123\",\n            \"start_date\": \"2026-10-14\",\n            \"expiring\": \"2027-10-13\",\n            \"issued_at\": \"2026-10-14T10:17:00+03:00\",\n            \"cancelled_at\": null,\n            \"error_code\": null,\n            \"error_text\": null\n        }\n    ]\n}"
                        }
                    ]
                },
                {
                    "name": "Issue a certificate as an agent",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Idempotency-Key",
                                "value": "{{$guid}}",
                                "description": "Unique per write; a new one each send."
                            },
                            {
                                "key": "X-Agent-Code",
                                "value": "{{agent_code}}",
                                "disabled": true,
                                "description": "Optional: act as this agent."
                            },
                            {
                                "key": "X-Agent-Key",
                                "value": "{{agent_key}}",
                                "disabled": true
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/dmvic/agent",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "dmvic",
                                "agent"
                            ]
                        },
                        "description": "Insurance Cloud's agent issuance: identifies the agent by `X-Agent-Code` and `X-Agent-Key`, checks the policy is theirs and issues the next eligible stage (`CertificateStages`). The headers are required here.\n\nScope: certificate.\n\nRate limit: 60 requests per minute per token (per-client override).",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"policy_id\": \"5d0c8a1e-…\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "POST",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/dmvic/agent",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "dmvic",
                                        "agent"
                                    ]
                                }
                            },
                            "status": "`{success: true, message, data: [certificate], stage, of}`",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"success\": true,\n    \"message\": \"Certificate C12345678 issued.\",\n    \"data\": [\n        {\n            \"certificate_number\": \"C12345678\",\n            \"status\": \"issued\",\n            \"class\": \"C\",\n            \"cover_code\": 100,\n            \"stage\": 1,\n            \"stage_of\": 1,\n            \"registration\": \"KDA 123A\",\n            \"chassis\": \"NZE161-3012456\",\n            \"policy_no\": \"POL/2026/000123\",\n            \"risknote\": \"RN/2026/000123\",\n            \"start_date\": \"2026-10-14\",\n            \"expiring\": \"2027-10-13\",\n            \"issued_at\": \"2026-10-14T10:17:00+03:00\",\n            \"cancelled_at\": null,\n            \"error_code\": null,\n            \"error_text\": null\n        }\n    ],\n    \"stage\": 1,\n    \"of\": 1\n}"
                        }
                    ]
                },
                {
                    "name": "Download a certificate",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/dmvic/get-certificate",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "dmvic",
                                "get-certificate"
                            ]
                        },
                        "description": "The certificate as a PDF file (`application/pdf`, attachment). Flexysure's rendering is marked SAMPLE; DMVIC's own PDF is the certificate of record. Only issued certificates download.\n\nScope: certificate.\n\nRate limit: 60 requests per minute per token (per-client override).",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"CertificateNumber\": \"C12345678\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Check for double insurance",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/dmvic/double-insurance",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "dmvic",
                                "double-insurance"
                            ]
                        },
                        "description": "Asks DMVIC whether the vehicle already has cover overlapping the period. `clear: true` means none; otherwise `data` lists the overlapping certificates. Read-only.\n\nScope: certificate.\n\nRate limit: 60 requests per minute per token (per-client override).",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"registration\": \"KDA 123A\",\n    \"start_date\": \"2026-10-14\",\n    \"expiring\": \"2027-10-13\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "POST",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/dmvic/double-insurance",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "dmvic",
                                        "double-insurance"
                                    ]
                                }
                            },
                            "status": "Result",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"success\": true,\n    \"message\": \"No overlapping cover on DMVIC for this period.\",\n    \"clear\": true,\n    \"data\": []\n}"
                        }
                    ]
                },
                {
                    "name": "Get certificate stock",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/dmvic/stock",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "dmvic",
                                "stock"
                            ]
                        },
                        "description": "Blank certificate stock DMVIC holds for an underwriter, by certificate class. `insurer` is the DMVIC member company id (`dmvic_member_id` from GET /insurers).\n\nScope: certificate.\n\nRate limit: 60 requests per minute per token (per-client override).",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"insurer\": 901\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "POST",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/dmvic/stock",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "dmvic",
                                        "stock"
                                    ]
                                }
                            },
                            "status": "`{success: true, data: [...]}`",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"success\": true,\n    \"message\": \"Stock for Savanna General.\",\n    \"insurer\": {\n        \"id\": 1,\n        \"name\": \"Savanna General\",\n        \"member_company_id\": 901\n    },\n    \"data\": [\n        {\n            \"classification_id\": 3,\n            \"title\": \"Type C - Private\",\n            \"stock\": 480\n        }\n    ]\n}"
                        }
                    ]
                },
                {
                    "name": "Cancel a certificate",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Idempotency-Key",
                                "value": "{{$guid}}",
                                "description": "Unique per write; a new one each send."
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/dmvic/cancel",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "dmvic",
                                "cancel"
                            ]
                        },
                        "description": "Cancels the certificate with DMVIC. DMVIC only allows this within its cancellation window (24 hours after issue); after that the certificate stays issued and the reason comes back as `dmvic_rejected`. Cancelling an already cancelled certificate succeeds.\n\nScope: certificate.\n\nRate limit: 60 requests per minute per token (per-client override).",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"certificate_number\": \"C12345678\",\n    \"reason\": \"INSURED_REQUESTED\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "POST",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/dmvic/cancel",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "dmvic",
                                        "cancel"
                                    ]
                                }
                            },
                            "status": "`{success: true, message, data: certificate}`",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"success\": true,\n    \"message\": \"Certificate C12345678 cancelled: Insured requested.\",\n    \"data\": {\n        \"certificate_number\": \"C12345678\",\n        \"status\": \"cancelled\",\n        \"class\": \"C\",\n        \"cover_code\": 100,\n        \"stage\": 1,\n        \"stage_of\": 1,\n        \"registration\": \"KDA 123A\",\n        \"chassis\": \"NZE161-3012456\",\n        \"policy_no\": \"POL/2026/000123\",\n        \"risknote\": \"RN/2026/000123\",\n        \"start_date\": \"2026-10-14\",\n        \"expiring\": \"2027-10-13\",\n        \"issued_at\": \"2026-10-14T10:17:00+03:00\",\n        \"cancelled_at\": \"2026-10-14T11:00:00+03:00\",\n        \"error_code\": null,\n        \"error_text\": null\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "Verify a certificate",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/certificates/:number/verify",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "certificates",
                                ":number",
                                "verify"
                            ],
                            "query": [
                                {
                                    "key": "registration",
                                    "value": "KDA123A",
                                    "description": "Check the certificate belongs to this vehicle.",
                                    "disabled": true
                                }
                            ],
                            "variable": [
                                {
                                    "key": "number",
                                    "value": "C12345678"
                                }
                            ]
                        },
                        "description": "`state` is `valid`, `expired`, `future` (cover not started), `cancelled`, `not_issued` or `mismatch` (the registration you passed is not the certified vehicle).\n\nScope: certificate.\n\nRate limit: 60 requests per minute per token (per-client override)."
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "GET",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/certificates/:number/verify",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "certificates",
                                        ":number",
                                        "verify"
                                    ],
                                    "query": [
                                        {
                                            "key": "registration",
                                            "value": "KDA123A",
                                            "description": "Check the certificate belongs to this vehicle.",
                                            "disabled": true
                                        }
                                    ],
                                    "variable": [
                                        {
                                            "key": "number",
                                            "value": "C12345678"
                                        }
                                    ]
                                }
                            },
                            "status": "Verification",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"data\": {\n        \"state\": \"valid\",\n        \"valid\": true,\n        \"insurer\": \"Savanna General\",\n        \"certificate_number\": \"C12345678\",\n        \"status\": \"issued\",\n        \"class\": \"C\",\n        \"cover_code\": 100,\n        \"stage\": 1,\n        \"stage_of\": 1,\n        \"registration\": \"KDA 123A\",\n        \"chassis\": \"NZE161-3012456\",\n        \"policy_no\": \"POL/2026/000123\",\n        \"risknote\": \"RN/2026/000123\",\n        \"start_date\": \"2026-10-14\",\n        \"expiring\": \"2027-10-13\",\n        \"issued_at\": \"2026-10-14T10:17:00+03:00\",\n        \"cancelled_at\": null,\n        \"error_code\": null,\n        \"error_text\": null\n    }\n}"
                        }
                    ]
                }
            ],
            "description": "Issue, fetch, check and cancel DMVIC motor insurance certificates. Issuance follows the paid-stage rule: a policy is certified once it is active (first instalment paid in full); on an instalment plan the cover period is split into stages and stage n is issued once instalment n is paid and stage n−1 exists. Every issue runs DMVIC's double-insurance check first. Responses keep Insurance Cloud's `{success, message}` shape; failures are problem documents that also carry `success: false` and `message`. In the demo every call goes to the bundled DMVIC simulator."
        },
        {
            "name": "SMS",
            "item": [
                {
                    "name": "Send SMS (batch)",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Idempotency-Key",
                                "value": "{{$guid}}",
                                "description": "Unique per write; a new one each send."
                            },
                            {
                                "key": "X-Agent-Code",
                                "value": "{{agent_code}}",
                                "disabled": true,
                                "description": "Optional: act as this agent."
                            },
                            {
                                "key": "X-Agent-Key",
                                "value": "{{agent_key}}",
                                "disabled": true
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/sms/send",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "sms",
                                "send"
                            ]
                        },
                        "description": "Sends every item and reports each one. 200 when all were sent; 207 Multi-Status when any failed (the others still went). `transaction` labels the messages (default \"API SMS\"); an item's own `transaction` wins. `uuid` in each result can be fetched with GET /sms/{uuid}.\n\nScope: messaging.\n\nRate limit: 60 requests per minute per token (per-client override).",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"transaction\": \"Renewal reminder\",\n    \"sms\": [\n        {\n            \"phone\": \"0712345678\",\n            \"message\": \"Dear Wanjiru, your motor policy renews on 13 Oct.\",\n            \"policy_id\": 123\n        },\n        {\n            \"phone\": \"12\",\n            \"message\": \"Hello\"\n        }\n    ]\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "POST",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/sms/send",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "sms",
                                        "send"
                                    ]
                                }
                            },
                            "status": "All sent",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"status\": \"partial\",\n    \"message\": \"1 SMS sent, 1 failed.\",\n    \"summary\": {\n        \"total\": 2,\n        \"sent\": 1,\n        \"failed\": 1,\n        \"units\": 1\n    },\n    \"results\": [\n        {\n            \"index\": 0,\n            \"phone\": \"0712345678\",\n            \"message\": \"Dear Wanjiru, your motor policy renews on 13 Oct.\",\n            \"policy_id\": 123,\n            \"transaction\": \"Renewal reminder\",\n            \"sent\": true,\n            \"error\": null,\n            \"uuid\": \"0c9d…\",\n            \"units\": 1\n        },\n        {\n            \"index\": 1,\n            \"phone\": \"12\",\n            \"message\": \"Hello\",\n            \"policy_id\": null,\n            \"transaction\": \"Renewal reminder\",\n            \"sent\": false,\n            \"error\": \"Enter a Kenyan mobile number like 0712 345 678.\",\n            \"uuid\": null,\n            \"units\": 0\n        }\n    ]\n}"
                        }
                    ]
                },
                {
                    "name": "List sent SMS",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/sms/sent",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "sms",
                                "sent"
                            ],
                            "query": [
                                {
                                    "key": "from",
                                    "value": "",
                                    "description": "Y-m-d. Default first of this month.",
                                    "disabled": true
                                },
                                {
                                    "key": "to",
                                    "value": "",
                                    "description": "Y-m-d. Default today.",
                                    "disabled": true
                                },
                                {
                                    "key": "page",
                                    "value": "",
                                    "disabled": true
                                },
                                {
                                    "key": "per_page",
                                    "value": "",
                                    "description": "Default 50, max 100.",
                                    "disabled": true
                                }
                            ]
                        },
                        "description": "The organisation's SMS outbox, newest first, between `from` and `to` (inclusive; default the first of this month to today).\n\nScope: messaging.\n\nRate limit: 60 requests per minute per token (per-client override)."
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "GET",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/sms/sent",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "sms",
                                        "sent"
                                    ],
                                    "query": [
                                        {
                                            "key": "from",
                                            "value": "",
                                            "description": "Y-m-d. Default first of this month.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "to",
                                            "value": "",
                                            "description": "Y-m-d. Default today.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "page",
                                            "value": "",
                                            "disabled": true
                                        },
                                        {
                                            "key": "per_page",
                                            "value": "",
                                            "description": "Default 50, max 100.",
                                            "disabled": true
                                        }
                                    ]
                                }
                            },
                            "status": "Sent SMS",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"status\": \"success\",\n    \"filters\": {\n        \"from\": \"2026-10-01\",\n        \"to\": \"2026-10-14\"\n    },\n    \"summary\": {\n        \"total\": 1,\n        \"per_page\": 50,\n        \"current_page\": 1,\n        \"last_page\": 1\n    },\n    \"sms\": [\n        {\n            \"id\": 881,\n            \"uuid\": \"0c9d…\",\n            \"phone\": \"0712345678\",\n            \"message\": \"Dear Wanjiru, your motor policy renews on 13 Oct.\",\n            \"policy_id\": 123,\n            \"transaction\": \"Renewal reminder\",\n            \"added_by\": \"api\",\n            \"status\": \"sent\",\n            \"units\": 1,\n            \"error\": null,\n            \"sent_at\": \"2026-10-14T09:00:01+03:00\",\n            \"delivered_at\": null,\n            \"created_at\": \"2026-10-14T09:00:00+03:00\",\n            \"updated_at\": \"2026-10-14T09:00:01+03:00\"\n        }\n    ]\n}"
                        }
                    ]
                },
                {
                    "name": "SMS balance",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/sms/balance",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "sms",
                                "balance"
                            ]
                        },
                        "description": "Units left. One unit sends one 160-character segment.\n\nScope: messaging.\n\nRate limit: 60 requests per minute per token (per-client override)."
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "GET",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/sms/balance",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "sms",
                                        "balance"
                                    ]
                                }
                            },
                            "status": "Balance",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"status\": \"success\",\n    \"balance\": 4820\n}"
                        }
                    ]
                },
                {
                    "name": "Get an SMS",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/sms/:uuid",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "sms",
                                ":uuid"
                            ],
                            "variable": [
                                {
                                    "key": "uuid",
                                    "value": "",
                                    "description": "From `results[].uuid` of POST /sms/send."
                                }
                            ]
                        },
                        "description": "One message from the outbox with its delivery status.\n\nScope: messaging.\n\nRate limit: 60 requests per minute per token (per-client override)."
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "GET",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/sms/:uuid",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "sms",
                                        ":uuid"
                                    ],
                                    "variable": [
                                        {
                                            "key": "uuid",
                                            "value": "",
                                            "description": "From `results[].uuid` of POST /sms/send."
                                        }
                                    ]
                                }
                            },
                            "status": "SMS",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"data\": {\n        \"id\": 881,\n        \"uuid\": \"0c9d…\",\n        \"phone\": \"0712345678\",\n        \"message\": \"Dear Wanjiru…\",\n        \"policy_id\": 123,\n        \"transaction\": \"Renewal reminder\",\n        \"added_by\": \"api\",\n        \"status\": \"sent\",\n        \"units\": 1,\n        \"error\": null,\n        \"sent_at\": \"2026-10-14T09:00:01+03:00\",\n        \"delivered_at\": null,\n        \"created_at\": \"2026-10-14T09:00:00+03:00\",\n        \"updated_at\": \"2026-10-14T09:00:01+03:00\"\n    }\n}"
                        }
                    ]
                }
            ],
            "description": "Send SMS from the organisation's sender ID and read the outbox, in Insurance Cloud's shapes. Each message costs one unit per 160-character segment from the organisation's SMS balance; a message that cannot be sent (bad number, no units, provider rejection) costs nothing. In the demo the provider is simulated and messages are marked sent at once."
        },
        {
            "name": "Webhooks",
            "item": [
                {
                    "name": "List webhook endpoints",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/webhooks",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "webhooks"
                            ],
                            "query": [
                                {
                                    "key": "limit",
                                    "value": "",
                                    "description": "Rows per page, 1–100 (default 25).",
                                    "disabled": true
                                },
                                {
                                    "key": "cursor",
                                    "value": "",
                                    "description": "Opaque cursor from links.next.",
                                    "disabled": true
                                },
                                {
                                    "key": "page",
                                    "value": "",
                                    "description": "Insurance-Cloud style page number (alternative to cursor).",
                                    "disabled": true
                                },
                                {
                                    "key": "per_page",
                                    "value": "",
                                    "description": "Rows per page when using page.",
                                    "disabled": true
                                }
                            ]
                        },
                        "description": "Every endpoint registered for the token's organisation, newest first. Secrets are never returned here; see secret_hint.\n\nScope: webhooks.\n\nRate limit: 60 requests per minute per token (per-client override)."
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "GET",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/webhooks",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "webhooks"
                                    ],
                                    "query": [
                                        {
                                            "key": "limit",
                                            "value": "",
                                            "description": "Rows per page, 1–100 (default 25).",
                                            "disabled": true
                                        },
                                        {
                                            "key": "cursor",
                                            "value": "",
                                            "description": "Opaque cursor from links.next.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "page",
                                            "value": "",
                                            "description": "Insurance-Cloud style page number (alternative to cursor).",
                                            "disabled": true
                                        },
                                        {
                                            "key": "per_page",
                                            "value": "",
                                            "description": "Rows per page when using page.",
                                            "disabled": true
                                        }
                                    ]
                                }
                            },
                            "status": "OK",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"data\": [\n        {\n            \"id\": \"b1f1c0de-1234-4abc-9def-0123456789ab\",\n            \"url\": \"https://erp.simba.co.ke/flexysure/webhooks\",\n            \"description\": \"Core ERP\",\n            \"events\": [\n                \"payment.received\",\n                \"policy.activated\"\n            ],\n            \"active\": true,\n            \"secret_hint\": \"whsec_…k9Qz\",\n            \"secret_rotated_at\": null,\n            \"last_delivered_at\": \"2026-10-14T09:31:06+03:00\",\n            \"last_failed_at\": null,\n            \"created_at\": \"2026-10-01T08:00:00+03:00\"\n        }\n    ],\n    \"meta\": {\n        \"limit\": 25,\n        \"has_more\": false,\n        \"count\": 1\n    },\n    \"links\": {\n        \"next\": null\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "Create a webhook endpoint",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/webhooks",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "webhooks"
                            ]
                        },
                        "description": "Registers a receiver URL. The response carries the signing `secret` exactly once; store it. Pass events [\"*\"] to receive everything, now and in future.\n\nScope: webhooks.\n\nRate limit: 60 requests per minute per token (per-client override).",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"url\": \"https://erp.simba.co.ke/flexysure/webhooks\",\n    \"description\": \"Core ERP\",\n    \"events\": [\n        \"payment.received\",\n        \"policy.activated\"\n    ]\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "POST",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/webhooks",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "webhooks"
                                    ]
                                }
                            },
                            "status": "Created",
                            "code": 201,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"data\": {\n        \"id\": \"b1f1c0de-1234-4abc-9def-0123456789ab\",\n        \"url\": \"https://erp.simba.co.ke/flexysure/webhooks\",\n        \"description\": \"Core ERP\",\n        \"events\": [\n            \"payment.received\",\n            \"policy.activated\"\n        ],\n        \"active\": true,\n        \"secret_hint\": \"whsec_…k9Qz\",\n        \"secret_rotated_at\": null,\n        \"last_delivered_at\": \"2026-10-14T09:31:06+03:00\",\n        \"last_failed_at\": null,\n        \"created_at\": \"2026-10-01T08:00:00+03:00\",\n        \"secret\": \"whsec_3Qf8sZl2pV9xK1mN0bT7cR4dE6gH8jL5wY2aU7oP\"\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "List the event catalogue",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/webhooks/events",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "webhooks",
                                "events"
                            ]
                        },
                        "description": "Every event name a webhook endpoint can subscribe to, with a one-line description.\n\nScope: webhooks.\n\nRate limit: 60 requests per minute per token (per-client override)."
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "GET",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/webhooks/events",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "webhooks",
                                        "events"
                                    ]
                                }
                            },
                            "status": "OK",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"data\": [\n        {\n            \"event\": \"payment.received\",\n            \"description\": \"A receipt was recorded (M-Pesa STK, C2B or manual).\"\n        }\n    ]\n}"
                        }
                    ]
                },
                {
                    "name": "Get one webhook endpoint",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/webhooks/:id",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "webhooks",
                                ":id"
                            ],
                            "variable": [
                                {
                                    "key": "id",
                                    "value": "",
                                    "description": "Endpoint id."
                                }
                            ]
                        },
                        "description": "By its UUID.\n\nScope: webhooks.\n\nRate limit: 60 requests per minute per token (per-client override)."
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "GET",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/webhooks/:id",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "webhooks",
                                        ":id"
                                    ],
                                    "variable": [
                                        {
                                            "key": "id",
                                            "value": "",
                                            "description": "Endpoint id."
                                        }
                                    ]
                                }
                            },
                            "status": "OK",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"data\": {\n        \"id\": \"b1f1c0de-1234-4abc-9def-0123456789ab\",\n        \"url\": \"https://erp.simba.co.ke/flexysure/webhooks\",\n        \"description\": \"Core ERP\",\n        \"events\": [\n            \"payment.received\",\n            \"policy.activated\"\n        ],\n        \"active\": true,\n        \"secret_hint\": \"whsec_…k9Qz\",\n        \"secret_rotated_at\": null,\n        \"last_delivered_at\": \"2026-10-14T09:31:06+03:00\",\n        \"last_failed_at\": null,\n        \"created_at\": \"2026-10-01T08:00:00+03:00\"\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "Delete a webhook endpoint",
                    "request": {
                        "method": "DELETE",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/webhooks/:id",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "webhooks",
                                ":id"
                            ],
                            "variable": [
                                {
                                    "key": "id",
                                    "value": "",
                                    "description": "Endpoint id."
                                }
                            ]
                        },
                        "description": "Removes the endpoint and its delivery history. Pending deliveries are dropped.\n\nScope: webhooks.\n\nRate limit: 60 requests per minute per token (per-client override)."
                    }
                },
                {
                    "name": "List deliveries for an endpoint",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/webhooks/:id/deliveries",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "webhooks",
                                ":id",
                                "deliveries"
                            ],
                            "query": [
                                {
                                    "key": "status",
                                    "value": "",
                                    "description": "pending | retrying | delivered | failed",
                                    "disabled": true
                                },
                                {
                                    "key": "event",
                                    "value": "",
                                    "description": "Filter by event name.",
                                    "disabled": true
                                },
                                {
                                    "key": "limit",
                                    "value": "",
                                    "description": "Rows per page, 1–100 (default 25).",
                                    "disabled": true
                                },
                                {
                                    "key": "cursor",
                                    "value": "",
                                    "description": "Opaque cursor from links.next.",
                                    "disabled": true
                                },
                                {
                                    "key": "page",
                                    "value": "",
                                    "description": "Insurance-Cloud style page number (alternative to cursor).",
                                    "disabled": true
                                },
                                {
                                    "key": "per_page",
                                    "value": "",
                                    "description": "Rows per page when using page.",
                                    "disabled": true
                                }
                            ],
                            "variable": [
                                {
                                    "key": "id",
                                    "value": "",
                                    "description": "Endpoint id."
                                }
                            ]
                        },
                        "description": "Newest first, with the exact body that was signed and sent, the attempt count, the receiver's HTTP status and the next retry time.\n\nScope: webhooks.\n\nRate limit: 60 requests per minute per token (per-client override)."
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "GET",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/webhooks/:id/deliveries",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "webhooks",
                                        ":id",
                                        "deliveries"
                                    ],
                                    "query": [
                                        {
                                            "key": "status",
                                            "value": "",
                                            "description": "pending | retrying | delivered | failed",
                                            "disabled": true
                                        },
                                        {
                                            "key": "event",
                                            "value": "",
                                            "description": "Filter by event name.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "limit",
                                            "value": "",
                                            "description": "Rows per page, 1–100 (default 25).",
                                            "disabled": true
                                        },
                                        {
                                            "key": "cursor",
                                            "value": "",
                                            "description": "Opaque cursor from links.next.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "page",
                                            "value": "",
                                            "description": "Insurance-Cloud style page number (alternative to cursor).",
                                            "disabled": true
                                        },
                                        {
                                            "key": "per_page",
                                            "value": "",
                                            "description": "Rows per page when using page.",
                                            "disabled": true
                                        }
                                    ],
                                    "variable": [
                                        {
                                            "key": "id",
                                            "value": "",
                                            "description": "Endpoint id."
                                        }
                                    ]
                                }
                            },
                            "status": "OK",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"data\": [\n        {\n            \"id\": 9821,\n            \"event\": \"payment.received\",\n            \"event_id\": \"6f1c2b3a-4d5e-4f60-8a71-9b2c3d4e5f60\",\n            \"status\": \"delivered\",\n            \"attempt\": 1,\n            \"response_code\": 200,\n            \"last_error\": null,\n            \"signed_at\": \"2026-10-14T09:31:05+03:00\",\n            \"delivered_at\": \"2026-10-14T09:31:06+03:00\",\n            \"next_attempt_at\": null,\n            \"created_at\": \"2026-10-14T09:31:05+03:00\",\n            \"payload\": {\n                \"id\": \"6f1c2b3a-4d5e-4f60-8a71-9b2c3d4e5f60\",\n                \"event\": \"payment.received\",\n                \"created_at\": \"2026-10-14T09:31:05+03:00\",\n                \"api_version\": \"v1\",\n                \"tenant\": {\n                    \"code\": \"SIMBA\",\n                    \"name\": \"Simba Risk Brokers\"\n                },\n                \"data\": {\n                    \"receipt\": {\n                        \"number\": \"RCT-000311\"\n                    }\n                }\n            }\n        }\n    ],\n    \"meta\": {\n        \"limit\": 25,\n        \"has_more\": false,\n        \"count\": 1\n    },\n    \"links\": {\n        \"next\": null\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "Retry a delivery now",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/webhook-deliveries/:id/retry",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "webhook-deliveries",
                                ":id",
                                "retry"
                            ],
                            "variable": [
                                {
                                    "key": "id",
                                    "value": "",
                                    "description": "Delivery id from the deliveries list."
                                }
                            ]
                        },
                        "description": "Queues one more attempt of a delivery (any status), keeping the same Flexysure-Delivery id. Fails with 409 when the endpoint is disabled.\n\nScope: webhooks.\n\nRate limit: 60 requests per minute per token (per-client override)."
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "POST",
                                "header": [],
                                "url": {
                                    "raw": "{{base_url}}/webhook-deliveries/:id/retry",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "webhook-deliveries",
                                        ":id",
                                        "retry"
                                    ],
                                    "variable": [
                                        {
                                            "key": "id",
                                            "value": "",
                                            "description": "Delivery id from the deliveries list."
                                        }
                                    ]
                                }
                            },
                            "status": "Accepted",
                            "code": 202,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"data\": {\n        \"id\": 9821,\n        \"event\": \"payment.received\",\n        \"event_id\": \"6f1c2b3a-4d5e-4f60-8a71-9b2c3d4e5f60\",\n        \"status\": \"pending\",\n        \"attempt\": 1,\n        \"response_code\": 200,\n        \"last_error\": null,\n        \"signed_at\": \"2026-10-14T09:31:05+03:00\",\n        \"delivered_at\": \"2026-10-14T09:31:06+03:00\",\n        \"next_attempt_at\": null,\n        \"created_at\": \"2026-10-14T09:31:05+03:00\",\n        \"payload\": {\n            \"id\": \"6f1c2b3a-4d5e-4f60-8a71-9b2c3d4e5f60\",\n            \"event\": \"payment.received\",\n            \"created_at\": \"2026-10-14T09:31:05+03:00\",\n            \"api_version\": \"v1\",\n            \"tenant\": {\n                \"code\": \"SIMBA\",\n                \"name\": \"Simba Risk Brokers\"\n            },\n            \"data\": {\n                \"receipt\": {\n                    \"number\": \"RCT-000311\"\n                }\n            }\n        }\n    }\n}"
                        }
                    ]
                }
            ],
            "description": "Register HTTPS endpoints and Flexysure will POST a signed JSON event to them when money lands, cover changes, a motor certificate is issued, a claim moves or premium finance is decided. Deliveries are retried after 1 m, 5 m, 30 m, 2 h and 12 h, then marked failed; failed deliveries can be retried by hand. Verify every request with the Flexysure-Signature header: t=<unix>,v1=<hex HMAC-SHA256 of \"{t}.{raw body}\" with your endpoint secret>; reject timestamps older than 300 seconds and compare in constant time."
        }
    ]
}