Skip to content
Demo environment. M-Pesa and DMVIC are simulated; no real money or certificates move. Sandbox details
FlexySure

Policies and quotes

7 endpoints · base URL https://flexysure.intrepidprojects.co.ke/api/v1

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.

MethodPathSummaryScope
GET /api/v1/policies List policies Flexysure only read
GET /api/v1/policies/{uuid} Read a policy Flexysure only read
POST /api/v1/policies/{uuid}/endorse Endorse a policy Flexysure only bind
GET /api/v1/policies/{uuid}/cancellation-quote Preview a cancellation Flexysure only read
POST /api/v1/policies/{uuid}/cancel Cancel a policy Flexysure only bind
POST /api/v1/policies/{uuid}/renewal-quote Raise a renewal quote Flexysure only bind
GET /api/v1/quotes/{uuid} Read a quote Flexysure only read
GET /api/v1/policies Flexysure only

List policies

Newest first, cursor-paginated (?limit=&cursor=; Insurance Cloud style ?page=&per_page= also works).

Scope
read
Authentication
Bearer token
Rate limit
60 requests per minute per token (per-client override)
Idempotency
Safe to repeat (read only).
Agent headers
Accepts X-Agent-Code and X-Agent-Key: the call runs as that agent and sees only the agent's own records.

Headers

HeaderMeaning
AuthorizationBearer <access_token> (scope read)
X-Agent-CodeOptional. Agent code; with X-Agent-Key results narrow to that agent's records and writes are recorded against them.
X-Agent-KeyOptional. The agent's key.

Parameters

NameInTypeRequiredDescription
status query string No One of: pending_payment, active, cancelled, expired, renewed, void
product_line query string No One of: motor, medical, travel, standard
insurer_id query integer No
starting query string No Cover starts on or after (Y-m-d).
ending query string No Cover ends on or before (Y-m-d).
client_no query string No
limit query integer No 1–100 (default 25).
cursor query string No From links.next.

Example

Request cURL
curl -X GET 'https://flexysure.intrepidprojects.co.ke/api/v1/policies' \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H 'Accept: application/json' \
  -H 'X-Agent-Code: KK01' \
  -H "X-Agent-Key: $AGENT_KEY"
Response JSON
{
    "data": [
        {
            "id": 452,
            "uuid": "0d7b1f1e-7a2c-4f3b-9a8e-2c1d5f6a7b8c",
            "policy_no": "POL-000452",
            "risk_note_no": "RN-000452",
            "product_line": "motor",
            "status": "active",
            "status_label": "Active",
            "client": {
                "client_no": "C-000123",
                "name": "Wanjiru Kamau"
            },
            "insurer": {
                "id": 1,
                "name": "Savanna General"
            },
            "vehicle_class": "private",
            "cover_type": "comprehensive",
            "cover": "Comprehensive",
            "cover_name": null,
            "risk": "KDA 123A",
            "start_date": "2026-10-14",
            "end_date": "2027-10-13",
            "payment_mode": "full",
            "instalments": 1,
            "sum_insured": 1000000,
            "sum_insured_minor": 100000000,
            "basic_premium": 35000,
            "basic_premium_minor": 3500000,
            "taxes": 198,
            "taxes_minor": 19800,
            "premium": 35198,
            "premium_minor": 3519800,
            "billed": 35198,
            "billed_minor": 3519800,
            "paid": 35198,
            "paid_minor": 3519800,
            "balance": 0,
            "balance_minor": 0,
            "created_by": 4,
            "created_at": "2026-10-14T09:30:00+03:00",
            "activated_at": "2026-10-14T09:31:04+03:00",
            "cancelled_at": null
        }
    ],
    "meta": {
        "limit": 25,
        "has_more": false,
        "count": 1
    },
    "links": {
        "next": null
    }
}

Responses

StatusMeaning
200 Policies

Errors are problem documents; the common codes (401, 403 insufficient_scope, 422, 429) apply to every endpoint.

GET /api/v1/policies/{uuid} Flexysure only

Read a policy

The list row plus client details, vehicles, members, travellers, benefits, debit notes, receipts allocated to them, certificates, endorsements, refunds, a claims summary and links.

Scope
read
Authentication
Bearer token
Rate limit
60 requests per minute per token (per-client override)
Idempotency
Safe to repeat (read only).
Agent headers
Accepts X-Agent-Code and X-Agent-Key: the call runs as that agent and sees only the agent's own records.

Headers

HeaderMeaning
AuthorizationBearer <access_token> (scope read)
X-Agent-CodeOptional. Agent code; with X-Agent-Key results narrow to that agent's records and writes are recorded against them.
X-Agent-KeyOptional. The agent's key.

Parameters

NameInTypeRequiredDescription
uuid path string Yes Policy uuid (from a save response or the list).

Example

Request cURL
curl -X GET 'https://flexysure.intrepidprojects.co.ke/api/v1/policies/{uuid}' \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H 'Accept: application/json' \
  -H 'X-Agent-Code: KK01' \
  -H "X-Agent-Key: $AGENT_KEY"
Response JSON
{
    "data": {
        "id": 452,
        "uuid": "0d7b1f1e-7a2c-4f3b-9a8e-2c1d5f6a7b8c",
        "policy_no": "POL-000452",
        "risk_note_no": "RN-000452",
        "product_line": "motor",
        "status": "active",
        "status_label": "Active",
        "client": {
            "client_no": "C-000123",
            "name": "Wanjiru Kamau"
        },
        "insurer": {
            "id": 1,
            "name": "Savanna General"
        },
        "vehicle_class": "private",
        "cover_type": "comprehensive",
        "cover": "Comprehensive",
        "cover_name": null,
        "risk": "KDA 123A",
        "start_date": "2026-10-14",
        "end_date": "2027-10-13",
        "payment_mode": "full",
        "instalments": 1,
        "sum_insured": 1000000,
        "sum_insured_minor": 100000000,
        "basic_premium": 35000,
        "basic_premium_minor": 3500000,
        "taxes": 198,
        "taxes_minor": 19800,
        "premium": 35198,
        "premium_minor": 3519800,
        "billed": 35198,
        "billed_minor": 3519800,
        "paid": 35198,
        "paid_minor": 3519800,
        "balance": 0,
        "balance_minor": 0,
        "created_by": 4,
        "created_at": "2026-10-14T09:30:00+03:00",
        "activated_at": "2026-10-14T09:31:04+03:00",
        "cancelled_at": null,
        "limits": {
            "cover_period": "annual",
            "days": 365
        },
        "travel_info": null,
        "vehicles": [
            {
                "id": 77,
                "reg_no": "KDA123A",
                "chassis_no": "NZE161-3012456",
                "make": "Toyota",
                "model": "Axio",
                "year": 2018,
                "on_cover": true,
                "value": 1000000,
                "value_minor": 100000000
            }
        ],
        "members": [],
        "travellers": [],
        "benefits": [],
        "debit_notes": [
            {
                "number": "DN-000452",
                "kind": "premium",
                "instalment_no": 1,
                "instalment_of": 1,
                "due_on": "2026-10-14",
                "status": "settled",
                "amount": 35198,
                "amount_minor": 3519800,
                "settled": 35198,
                "settled_minor": 3519800,
                "outstanding": 0,
                "outstanding_minor": 0
            }
        ],
        "receipts": [
            {
                "number": "RCT-000311",
                "channel": "mpesa",
                "reference": "SJK3ABCD12",
                "received_at": "2026-10-14T09:31:00+03:00",
                "debit_note": "DN-000452",
                "allocated": 35198,
                "allocated_minor": 3519800
            }
        ],
        "certificates": [
            {
                "certificate_no": "C12345678",
                "vehicle_id": 77,
                "stage": 1,
                "stage_of": 1,
                "period_from": "2026-10-14",
                "period_to": "2027-10-13",
                "status": "issued"
            }
        ],
        "endorsements": [],
        "refunds": [],
        "claims": {
            "count": 0,
            "open": 0,
            "items": []
        },
        "links": {
            "self": "https://app.flexysure.com/api/v1/policies/0d7b1f1e-…",
            "web": "https://app.flexysure.com/policies/0d7b1f1e-…"
        }
    }
}

Responses

StatusMeaning
200 Policy
404 Not found or not visible to the caller

Errors are problem documents; the common codes (401, 403 insufficient_scope, 422, 429) apply to every endpoint.

POST /api/v1/policies/{uuid}/endorse Flexysure only

Endorse a policy

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.

Scope
bind
Authentication
Bearer token
Rate limit
60 requests per minute per token (per-client override)
Idempotency
Required: send an Idempotency-Key; a retry with the same key replays the first response.
Agent headers
Accepts X-Agent-Code and X-Agent-Key: the call runs as that agent and sees only the agent's own records.

Headers

HeaderMeaning
AuthorizationBearer <access_token> (scope bind)
Idempotency-KeyRequired. Unique per write; replays return the first response.
X-Agent-CodeOptional. Agent code; with X-Agent-Key results narrow to that agent's records and writes are recorded against them.
X-Agent-KeyOptional. The agent's key.

Parameters

NameInTypeRequiredDescription
uuid path string Yes Policy uuid (from a save response or the list).

Body fields

FieldTypeRequiredDescription
type string Yes One of: add_vehicle, remove_vehicle, change_value, change_cover, change_dates, add_member, remove_member, other
effective_on string No Y-m-d inside the cover period (default today).
changes object No

Example

Request cURL
curl -X POST 'https://flexysure.intrepidprojects.co.ke/api/v1/policies/{uuid}/endorse' \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H 'Accept: application/json' \
  -H 'Idempotency-Key: 66dd91c0-4628-429d-a7b4-365a25792756' \
  -H 'X-Agent-Code: KK01' \
  -H "X-Agent-Key: $AGENT_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "type": "change_value",
    "effective_on": "2027-01-10",
    "changes": {
        "value": 1200000
    }
}'
Request body (JSON)
Request body JSON
{
    "type": "change_value",
    "effective_on": "2027-01-10",
    "changes": {
        "value": 1200000
    }
}
Response JSON
{
    "data": {
        "endorsement": {
            "uuid": "1f2e…",
            "number": "END-000031",
            "type": "change_value",
            "effective_on": "2027-01-10",
            "status": "issued",
            "narrative": "Sum insured KES 1,000,000 → KES 1,200,000",
            "changes": {
                "value": 1200000
            },
            "debit_note": "DN-000460",
            "premium_delta": 5404,
            "premium_delta_minor": 540400,
            "taxes_delta": 24,
            "taxes_delta_minor": 2400,
            "gross_delta": 5428,
            "gross_delta_minor": 542800
        },
        "policy": {
            "id": 452,
            "uuid": "0d7b1f1e-7a2c-4f3b-9a8e-2c1d5f6a7b8c",
            "policy_no": "POL-000452",
            "risk_note_no": "RN-000452",
            "product_line": "motor",
            "status": "active",
            "status_label": "Active",
            "client": {
                "client_no": "C-000123",
                "name": "Wanjiru Kamau"
            },
            "insurer": {
                "id": 1,
                "name": "Savanna General"
            },
            "vehicle_class": "private",
            "cover_type": "comprehensive",
            "cover": "Comprehensive",
            "cover_name": null,
            "risk": "KDA 123A",
            "start_date": "2026-10-14",
            "end_date": "2027-10-13",
            "payment_mode": "full",
            "instalments": 1,
            "sum_insured": 1000000,
            "sum_insured_minor": 100000000,
            "basic_premium": 35000,
            "basic_premium_minor": 3500000,
            "taxes": 198,
            "taxes_minor": 19800,
            "premium": 35198,
            "premium_minor": 3519800,
            "billed": 35198,
            "billed_minor": 3519800,
            "paid": 35198,
            "paid_minor": 3519800,
            "balance": 0,
            "balance_minor": 0,
            "created_by": 4,
            "created_at": "2026-10-14T09:30:00+03:00",
            "activated_at": "2026-10-14T09:31:04+03:00",
            "cancelled_at": null,
            "limits": {
                "cover_period": "annual",
                "days": 365
            },
            "travel_info": null,
            "vehicles": [
                {
                    "id": 77,
                    "reg_no": "KDA123A",
                    "chassis_no": "NZE161-3012456",
                    "make": "Toyota",
                    "model": "Axio",
                    "year": 2018,
                    "on_cover": true,
                    "value": 1000000,
                    "value_minor": 100000000
                }
            ],
            "members": [],
            "travellers": [],
            "benefits": [],
            "debit_notes": [
                {
                    "number": "DN-000452",
                    "kind": "premium",
                    "instalment_no": 1,
                    "instalment_of": 1,
                    "due_on": "2026-10-14",
                    "status": "settled",
                    "amount": 35198,
                    "amount_minor": 3519800,
                    "settled": 35198,
                    "settled_minor": 3519800,
                    "outstanding": 0,
                    "outstanding_minor": 0
                }
            ],
            "receipts": [
                {
                    "number": "RCT-000311",
                    "channel": "mpesa",
                    "reference": "SJK3ABCD12",
                    "received_at": "2026-10-14T09:31:00+03:00",
                    "debit_note": "DN-000452",
                    "allocated": 35198,
                    "allocated_minor": 3519800
                }
            ],
            "certificates": [
                {
                    "certificate_no": "C12345678",
                    "vehicle_id": 77,
                    "stage": 1,
                    "stage_of": 1,
                    "period_from": "2026-10-14",
                    "period_to": "2027-10-13",
                    "status": "issued"
                }
            ],
            "endorsements": [],
            "refunds": [],
            "claims": {
                "count": 0,
                "open": 0,
                "items": []
            },
            "links": {
                "self": "https://app.flexysure.com/api/v1/policies/0d7b1f1e-…",
                "web": "https://app.flexysure.com/policies/0d7b1f1e-…"
            }
        }
    }
}

Responses

StatusMeaning
201 Endorsement and the updated policy
403 actor_forbidden
404 Not found
422 validation_failed or domain_rule (not active, type not for this line…)

Errors are problem documents; the common codes (401, 403 insufficient_scope, 422, 429) apply to every endpoint.

GET /api/v1/policies/{uuid}/cancellation-quote Flexysure only

Preview a cancellation

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.

Scope
read
Authentication
Bearer token
Rate limit
60 requests per minute per token (per-client override)
Idempotency
Safe to repeat (read only).
Agent headers
Accepts X-Agent-Code and X-Agent-Key: the call runs as that agent and sees only the agent's own records.

Headers

HeaderMeaning
AuthorizationBearer <access_token> (scope read or bind)
X-Agent-CodeOptional. Agent code; with X-Agent-Key results narrow to that agent's records and writes are recorded against them.
X-Agent-KeyOptional. The agent's key.

Parameters

NameInTypeRequiredDescription
uuid path string Yes Policy uuid (from a save response or the list).
effective_on query string No Y-m-d (default today).

Example

Request cURL
curl -X GET 'https://flexysure.intrepidprojects.co.ke/api/v1/policies/{uuid}/cancellation-quote' \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H 'Accept: application/json' \
  -H 'X-Agent-Code: KK01' \
  -H "X-Agent-Key: $AGENT_KEY"
Response JSON
{
    "data": {
        "policy_no": "POL-000452",
        "status": "active",
        "cancellable": true,
        "outcome": "cancel",
        "effective_on": "2027-01-10",
        "method": "pro_rata",
        "cover_days": 365,
        "days_on_risk": 88,
        "remaining_days": 277,
        "months_on_risk": 3,
        "basic_premium": 35000,
        "basic_premium_minor": 3500000,
        "earned": 8438,
        "earned_minor": 843800,
        "unearned_basic": 26562,
        "unearned_basic_minor": 2656200,
        "unearned_levies": 0,
        "unearned_levies_minor": 0,
        "unearned": 26562,
        "unearned_minor": 2656200,
        "billed": 35198,
        "billed_minor": 3519800,
        "paid": 35198,
        "paid_minor": 3519800,
        "estimated_refund": 26562,
        "estimated_refund_minor": 2656200,
        "note": "Levies and stamp duty are not refunded…"
    }
}

Responses

StatusMeaning
200 Breakdown
404 Not found

Errors are problem documents; the common codes (401, 403 insufficient_scope, 422, 429) apply to every endpoint.

POST /api/v1/policies/{uuid}/cancel Flexysure only

Cancel a policy

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.

Scope
bind
Authentication
Bearer token
Rate limit
60 requests per minute per token (per-client override)
Idempotency
Required: send an Idempotency-Key; a retry with the same key replays the first response.
Agent headers
Accepts X-Agent-Code and X-Agent-Key: the call runs as that agent and sees only the agent's own records.

Headers

HeaderMeaning
AuthorizationBearer <access_token> (scope bind)
Idempotency-KeyRequired. Unique per write; replays return the first response.
X-Agent-CodeOptional. Agent code; with X-Agent-Key results narrow to that agent's records and writes are recorded against them.
X-Agent-KeyOptional. The agent's key.

Parameters

NameInTypeRequiredDescription
uuid path string Yes Policy uuid (from a save response or the list).

Body fields

FieldTypeRequiredDescription
reason string Yes Example: Client requested cancellation
effective_on string No Y-m-d (default today).

Example

Request cURL
curl -X POST 'https://flexysure.intrepidprojects.co.ke/api/v1/policies/{uuid}/cancel' \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H 'Accept: application/json' \
  -H 'Idempotency-Key: cdeae604-d9b5-4fd5-ab1b-c7e3280f221d' \
  -H 'X-Agent-Code: KK01' \
  -H "X-Agent-Key: $AGENT_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "reason": "Vehicle sold",
    "effective_on": "2027-01-10"
}'
Request body (JSON)
Request body JSON
{
    "reason": "Vehicle sold",
    "effective_on": "2027-01-10"
}
Response JSON
{
    "data": {
        "id": 452,
        "uuid": "0d7b1f1e-7a2c-4f3b-9a8e-2c1d5f6a7b8c",
        "policy_no": "POL-000452",
        "risk_note_no": "RN-000452",
        "product_line": "motor",
        "status": "cancelled",
        "status_label": "Cancelled",
        "client": {
            "client_no": "C-000123",
            "name": "Wanjiru Kamau"
        },
        "insurer": {
            "id": 1,
            "name": "Savanna General"
        },
        "vehicle_class": "private",
        "cover_type": "comprehensive",
        "cover": "Comprehensive",
        "cover_name": null,
        "risk": "KDA 123A",
        "start_date": "2026-10-14",
        "end_date": "2027-10-13",
        "payment_mode": "full",
        "instalments": 1,
        "sum_insured": 1000000,
        "sum_insured_minor": 100000000,
        "basic_premium": 35000,
        "basic_premium_minor": 3500000,
        "taxes": 198,
        "taxes_minor": 19800,
        "premium": 35198,
        "premium_minor": 3519800,
        "billed": 35198,
        "billed_minor": 3519800,
        "paid": 35198,
        "paid_minor": 3519800,
        "balance": 0,
        "balance_minor": 0,
        "created_by": 4,
        "created_at": "2026-10-14T09:30:00+03:00",
        "activated_at": "2026-10-14T09:31:04+03:00",
        "cancelled_at": null,
        "limits": {
            "cover_period": "annual",
            "days": 365
        },
        "travel_info": null,
        "vehicles": [
            {
                "id": 77,
                "reg_no": "KDA123A",
                "chassis_no": "NZE161-3012456",
                "make": "Toyota",
                "model": "Axio",
                "year": 2018,
                "on_cover": true,
                "value": 1000000,
                "value_minor": 100000000
            }
        ],
        "members": [],
        "travellers": [],
        "benefits": [],
        "debit_notes": [
            {
                "number": "DN-000452",
                "kind": "premium",
                "instalment_no": 1,
                "instalment_of": 1,
                "due_on": "2026-10-14",
                "status": "settled",
                "amount": 35198,
                "amount_minor": 3519800,
                "settled": 35198,
                "settled_minor": 3519800,
                "outstanding": 0,
                "outstanding_minor": 0
            }
        ],
        "receipts": [
            {
                "number": "RCT-000311",
                "channel": "mpesa",
                "reference": "SJK3ABCD12",
                "received_at": "2026-10-14T09:31:00+03:00",
                "debit_note": "DN-000452",
                "allocated": 35198,
                "allocated_minor": 3519800
            }
        ],
        "certificates": [
            {
                "certificate_no": "C12345678",
                "vehicle_id": 77,
                "stage": 1,
                "stage_of": 1,
                "period_from": "2026-10-14",
                "period_to": "2027-10-13",
                "status": "issued"
            }
        ],
        "endorsements": [],
        "refunds": [
            {
                "uuid": "7c8d…",
                "number": "RF-000012",
                "kind": "cancellation",
                "payee": "client",
                "status": "pending",
                "paid_at": null,
                "reference": null,
                "amount": 26562,
                "amount_minor": 2656200
            }
        ],
        "claims": {
            "count": 0,
            "open": 0,
            "items": []
        },
        "links": {
            "self": "https://app.flexysure.com/api/v1/policies/0d7b1f1e-…",
            "web": "https://app.flexysure.com/policies/0d7b1f1e-…"
        }
    }
}

Responses

StatusMeaning
200 The cancelled policy with its refunds
403 actor_forbidden (agents cannot cancel)
404 Not found
422 validation_failed or domain_rule

Errors are problem documents; the common codes (401, 403 insufficient_scope, 422, 429) apply to every endpoint.

POST /api/v1/policies/{uuid}/renewal-quote Flexysure only

Raise a renewal quote

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).

Scope
bind
Authentication
Bearer token
Rate limit
60 requests per minute per token (per-client override)
Idempotency
Required: send an Idempotency-Key; a retry with the same key replays the first response.
Agent headers
Accepts X-Agent-Code and X-Agent-Key: the call runs as that agent and sees only the agent's own records.

Headers

HeaderMeaning
AuthorizationBearer <access_token> (scope bind)
Idempotency-KeyRequired. Unique per write; replays return the first response.
X-Agent-CodeOptional. Agent code; with X-Agent-Key results narrow to that agent's records and writes are recorded against them.
X-Agent-KeyOptional. The agent's key.

Parameters

NameInTypeRequiredDescription
uuid path string Yes Policy uuid (from a save response or the list).

Example

Request cURL
curl -X POST 'https://flexysure.intrepidprojects.co.ke/api/v1/policies/{uuid}/renewal-quote' \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H 'Accept: application/json' \
  -H 'Idempotency-Key: c767750d-f88f-46ef-a37e-0a6eefa0c9d4' \
  -H 'X-Agent-Code: KK01' \
  -H "X-Agent-Key: $AGENT_KEY"
Response JSON
{
    "data": {
        "id": 91,
        "uuid": "3e4f…",
        "quote_no": "Q-000091",
        "product_line": "motor",
        "status": "presented",
        "valid_until": "2027-11-12",
        "renews_policy_id": 452,
        "options": [
            {
                "option_id": 310,
                "insurer_id": 1,
                "insurer_name": "Savanna General",
                "rate": 3.5,
                "total": 35198,
                "total_minor": 3519800
            }
        ]
    }
}

Responses

StatusMeaning
201 Quote
404 Not found
422 domain_rule (not renewable, already renewed…)

Errors are problem documents; the common codes (401, 403 insufficient_scope, 422, 429) apply to every endpoint.

GET /api/v1/quotes/{uuid} Flexysure only

Read a quote

A stored quote of any product line with its options (whole shillings beside cents), inputs, validity and — once converted — the policy it became.

Scope
read
Authentication
Bearer token
Rate limit
60 requests per minute per token (per-client override)
Idempotency
Safe to repeat (read only).
Agent headers
Accepts X-Agent-Code and X-Agent-Key: the call runs as that agent and sees only the agent's own records.

Headers

HeaderMeaning
AuthorizationBearer <access_token> (scope read)
X-Agent-CodeOptional. Agent code; with X-Agent-Key results narrow to that agent's records and writes are recorded against them.
X-Agent-KeyOptional. The agent's key.

Parameters

NameInTypeRequiredDescription
uuid path string Yes

Example

Request cURL
curl -X GET 'https://flexysure.intrepidprojects.co.ke/api/v1/quotes/{uuid}' \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H 'Accept: application/json' \
  -H 'X-Agent-Code: KK01' \
  -H "X-Agent-Key: $AGENT_KEY"
Response JSON
{
    "data": {
        "id": 88,
        "uuid": "5b0f…",
        "quote_no": "Q-000088",
        "product_line": "motor",
        "status": "presented",
        "valid_until": "2026-10-28",
        "client": {
            "client_no": "C-000124",
            "name": "Otieno Ouma"
        },
        "inputs": {
            "vehicle_class": "private",
            "cover_type": "comprehensive",
            "value": 1000000,
            "year": 2018
        },
        "policy": null,
        "options": [
            {
                "option_id": 301,
                "insurer_id": 1,
                "insurer_name": "Savanna General",
                "rate": 3.5,
                "basic_premium": 35000,
                "basic_premium_minor": 3500000,
                "total": 35198,
                "total_minor": 3519800
            }
        ]
    }
}

Responses

StatusMeaning
200 Quote
404 Not found or not visible to the caller

Errors are problem documents; the common codes (401, 403 insufficient_scope, 422, 429) apply to every endpoint.