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

Travel

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

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.

MethodPathSummaryScope
POST /api/v1/travel/quote Price a trip quote
POST /api/v1/travel/save Bind a travel policy bind
POST /api/v1/travel/quote

Price a trip

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.

Scope
quote
Authentication
Bearer token
Rate limit
60 requests per minute per token (per-client override)
Idempotency
Not keyed. Check before retrying.
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 quote)
X-Agent-CodeOptional. Agent code; with X-Agent-Key the agent becomes the creator.
X-Agent-KeyOptional. The agent's key.

Body fields

FieldTypeRequiredDescription
rate_type string Yes One of: normal, student, inbound
traveling_from string No Example: Kenya
traveling_to string Yes Example: Germany
number_of_travelers integer No Example: 2
departure_date string Yes Y-m-d, today or later.
return_date string Yes
insurer_id integer[] No Flexysure only.

Example

Request cURL
curl -X POST 'https://flexysure.intrepidprojects.co.ke/api/v1/travel/quote' \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H 'Accept: application/json' \
  -H 'X-Agent-Code: KK01' \
  -H "X-Agent-Key: $AGENT_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "rate_type": "normal",
    "traveling_from": "Kenya",
    "traveling_to": "Germany",
    "number_of_travelers": 2,
    "departure_date": "2026-11-01",
    "return_date": "2026-11-10"
}'
Request body (JSON)
Request body JSON
{
    "rate_type": "normal",
    "traveling_from": "Kenya",
    "traveling_to": "Germany",
    "number_of_travelers": 2,
    "departure_date": "2026-11-01",
    "return_date": "2026-11-10"
}
Response JSON
{
    "message": "1 plan found.",
    "quote": {
        "rate_type": "normal",
        "traveling_to": "Germany",
        "number_of_travelers": 2,
        "days": 10,
        "region": "schengen"
    },
    "options": [
        {
            "insurer_id": 2,
            "insurer_name": "Kilima Assurance",
            "plan_id": 7,
            "plan_name": "Schengen",
            "basic_premium": 5000,
            "basic_premium_minor": 500000,
            "taxes": [],
            "taxes_total": 63,
            "taxes_total_minor": 6300,
            "total": 5063,
            "total_minor": 506300,
            "days": 10,
            "travellers": 2,
            "region": "schengen",
            "per_traveller": 2500,
            "per_traveller_minor": 250000,
            "sum_insured": 4500000,
            "sum_insured_minor": 450000000
        }
    ]
}

Responses

StatusMeaning
200 Options
422 validation_failed, domain_rule or no_quote

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

POST /api/v1/travel/save

Bind a travel policy

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.

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 save; replays return the first response.
X-Agent-CodeOptional. Agent code; with X-Agent-Key the agent becomes the creator.
X-Agent-KeyOptional. The agent's key.

Body fields

FieldTypeRequiredDescription
client object Yes Same block as POST /api/v1/motor/save.
policy object Yes {insurer_id, premium, basicPremium?, taxes?, sumInsured?, coverName?, quoteId?, start_date?, end_date?, rate_type?, premium_instalments?}.
travel_info object Yes {departure, return, travelling_from, travelling_to, trip_type, rate_type?}.
travellers array Yes [{name, dob, passport_no, id_no, phone, beneficiary_name, beneficiary_passport_id_no, benefitiary_relationship, benefitiary_phone_no}].

Example

Request cURL
curl -X POST 'https://flexysure.intrepidprojects.co.ke/api/v1/travel/save' \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H 'Accept: application/json' \
  -H 'Idempotency-Key: 286af8e6-ad34-4c60-a83e-74a276ea61c9' \
  -H 'X-Agent-Code: KK01' \
  -H "X-Agent-Key: $AGENT_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "client": {
        "name": "Kamau Njoroge",
        "phone": "0744000222",
        "email": "kamau@example.co.ke"
    },
    "policy": {
        "start_date": "2026-11-01",
        "end_date": "2026-11-10",
        "insurer_id": 2,
        "basicPremium": 5000,
        "taxes": 63,
        "premium": 5063,
        "sumInsured": 4500000,
        "coverName": "Schengen"
    },
    "travel_info": {
        "departure": "2026-11-01",
        "return": "2026-11-10",
        "travelling_from": "Kenya",
        "travelling_to": "Germany",
        "trip_type": "single"
    },
    "travellers": [
        {
            "name": "Kamau Njoroge",
            "dob": "1990-01-01",
            "passport_no": "AK123456",
            "id_no": "22113344",
            "phone": "0744000222",
            "beneficiary_name": "Wairimu Kamau",
            "beneficiary_passport_id_no": "22334455",
            "benefitiary_relationship": "Wife",
            "benefitiary_phone_no": "0700111222"
        }
    ]
}'
Request body (JSON)
Request body JSON
{
    "client": {
        "name": "Kamau Njoroge",
        "phone": "0744000222",
        "email": "kamau@example.co.ke"
    },
    "policy": {
        "start_date": "2026-11-01",
        "end_date": "2026-11-10",
        "insurer_id": 2,
        "basicPremium": 5000,
        "taxes": 63,
        "premium": 5063,
        "sumInsured": 4500000,
        "coverName": "Schengen"
    },
    "travel_info": {
        "departure": "2026-11-01",
        "return": "2026-11-10",
        "travelling_from": "Kenya",
        "travelling_to": "Germany",
        "trip_type": "single"
    },
    "travellers": [
        {
            "name": "Kamau Njoroge",
            "dob": "1990-01-01",
            "passport_no": "AK123456",
            "id_no": "22113344",
            "phone": "0744000222",
            "beneficiary_name": "Wairimu Kamau",
            "beneficiary_passport_id_no": "22334455",
            "benefitiary_relationship": "Wife",
            "benefitiary_phone_no": "0700111222"
        }
    ]
}
Response JSON
{
    "message": "Policy saved successfully.",
    "id": 454,
    "uuid": "c2d4…",
    "risknote": "RN-000454",
    "policy_no": "POL-000454",
    "client_no": "C-000126",
    "client_key": "fxck_…",
    "product_line": "travel",
    "start_date": "2026-11-01",
    "end_date": "2026-11-10"
}

Responses

StatusMeaning
201 Policy saved (same shape as motor save)
422 validation_failed, premium_mismatch, no_quote or domain_rule

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