Policies

This section details all the endpoints needed to view the individual policies of your customers. You can query active policyholders on your integration.

View all Policies

Use the following endpoint to list all the policies on your integration.

Fetch all policies under a distributor

GET https://api.mycover.ai/v1/policies

Query Parameters

Name
Type
Description

page

string

Page number of response

limit

string

Number of data to show per fetch

Sample Response

{
   "responseCode":1,
   "responseText":"Policies retrieved",
   "data":{
      "policies":[
         {
                "id": "c9f7426b-0458-4cc4-a3c9-0da9a2e2229e",
                "is_live": false,
                "first_name": "David",
                "last_name": "Mark",
                "email": "david.mark@gmail.com",
                "phone": "07064378577",
                "dob": "1987-02-20",
                "product_category_id": "f3933c0d-ef7c-4287-90bd-744cf00c8426",
                "activation_date": "2022-12-12T00:00:00.000Z",
                "start_date": "2022-12-12T00:00:00.000Z",
                "expiration_date": "2023-01-10T00:00:00.000Z",
                "market_price": 21400,
                "genius_price": 21400,
                "profit": 4280,
                "meta": {
                    "data": {
                        "cert_url": "https://developers.custodianplc.com.ng/webportaltest/travelcert.aspx?muser=ebusiness&mcert=0003984&mcert2=0003984",
                        "policy_number": [
                            "HO/A/44/B0000805E"
                        ]
                    },
                    "policy_number": "HO/A/44/B0000805E",
                    "certificate_url": "https://developers.custodianplc.com.ng/webportaltest/travelcert.aspx?muser=ebusiness&mcert=0003984&mcert2=0003984"
                },
                "active": true,
                "submitted_to_provider": true,
                "payment_option": null,
                "payment_channel": null,
                "request_source": null,
                "created_at": "2022-12-09T10:10:05.975Z",
                "updated_at": "2022-12-09T10:10:05.975Z",
                "deleted_at": null,
                "customer_id": "aa1da21f-16cf-4dbb-8734-e3e0ffd9c3be",
                "buyer_id": "aa1da21f-16cf-4dbb-8734-e3e0ffd9c3be",
                "distributor_id": "92e39bc5-6110-4dcb-8583-bc50c2e6922b",
                "product_id": "f3b14adb-f9ed-4541-894d-8ab137f048a4",
                "provider_id": "a5998ddf-a45e-4466-a21e-ddd4ade071c8",
                "inspection_id": null,
                "purchase_id": "c4309fd2-4a80-46a8-8544-196b2df33fba",
                "product": {
                    "name": "Custodian Travel Insurance",
                    "description": "Custodian Travel Insurance Cover",
                    "id": "f3b14adb-f9ed-4541-894d-8ab137f048a4",
                    "inspectable": false,
                    "is_dynamic_pricing": true,
                    "claimable": true
                },
                "distributor": {
                    "business_name": "Yvonne Rhodes",
                    "id": "92e39bc5-6110-4dcb-8583-bc50c2e6922b"
                },
                "provider": {
                    "company_name": "Custodian",
                    "id": "a5998ddf-a45e-4466-a21e-ddd4ade071c8"
                },
                "purchase": {
                    "id": "c4309fd2-4a80-46a8-8544-196b2df33fba",
                    "total": "21400"
                },
                "inspection": null
            },
      ],
      "total_count":1
   }
}

Search Policies

Search and filter for policies by their status, dates or customer details.

Search for policies based on certain parameters

GET https://api.mycover.ai/v1/policies/search

Query Parameters

Name
Type
Description

start_date

string

Start date of the policy

status

boolean

Status of the policy

end_date

string

End date of the policy

distributor_id

string

Distributor ID

customer_type

string

Type of customer (all, principal, beneficiary)

expired_end_date

string

Policy expiry end date

customer_id

string

Customer ID

provider_id

string

Insurance provider ID

expired_start_date

string

Policy expiry start date

customer_email

string

Customer email

 Sample Response

{
   "responseCode":1,
   "responseText":"Policies fetched successfully",
   "data":{
      "policies":[
         {
                "id": "9053db29-0aa8-402f-8d6e-38cbf8c8ddf8",
                "is_live": false,
                "first_name": "Sandy",
                "last_name": "Sally",
                "email": "sandsally@gmail.com",
                "phone": "07046425756",
                "dob": "2000-12-02",
                "product_category_id": "978ced0d-0e05-4de6-b43a-b408c0e8b95e",
                "activation_date": "2022-12-02T00:00:00.000Z",
                "start_date": "2022-12-02T00:00:00.000Z",
                "expiration_date": "2023-12-02T00:00:00.000Z",
                "market_price": 140000,
                "genius_price": 140000,
                "profit": 28000,
                "meta": {
                    "payload": {
                        "make": "Ford",
                        "color": "CORNSILK",
                        "model": "EVEREST",
                        "regNo": "4563885346735",
                        "smsTel": "07046425756",
                        "titleId": "0e439e44-98cf-e711-83b7-44850015c0e7",
                        "yrManft": "2018",
                        "bodyType": "Car",
                        "chasisNo": "357974214680722",
                        "engineNo": "357974214680722",
                        "lastName": "Sally",
                        "pryEmail": "mgjyllasdnashkt@gmail.com",
                        "firstName": "Sandy",
                        "productId": "f1326cce-47e7-e711-a2be-005056a02281",
                        "dateOfBirth": "2000-12-02",
                        "physicalAddrs": "Flood light street",
                        "premiumAmount": 140000,
                        "vehicleAmount": 4000000,
                        "identificationUrl": "https://s3.eu-west-2.amazonaws.com/staging.mycover.ai/b583824e-d9d4-4867-b7dd-bfa9864b8bb0-119EE3E0-7480-414A-B16F-97585441D9D1.jpeg",
                        "identificationName": "National ID",
                        "subclassSectCovtypeId": "8b8cee87-d9ea-e711-a2be-005056a02281"
                    },
                    "vehicle_registration_number": "4563885346735"
                },
                "active": false,
                "submitted_to_provider": false,
                "payment_option": null,
                "payment_channel": null,
                "request_source": null,
                "created_at": "2022-12-02T14:54:30.590Z",
                "updated_at": "2022-12-02T14:54:30.590Z",
                "deleted_at": null,
                "customer_id": "d3ae5eb4-0676-49c9-821a-f57ab4127746",
                "buyer_id": "d3ae5eb4-0676-49c9-821a-f57ab4127746",
                "distributor_id": "92e39bc5-6110-4dcb-8583-bc50c2e6922b",
                "product_id": "0db73bd6-f937-47f8-9f31-812c673633fa",
                "provider_id": "63dbfce7-a743-47bd-bc49-b95703054aa1",
                "inspection_id": null,
                "purchase_id": "45ef1ee3-3f7c-4172-9969-b29545e7b5a0",
                "product": {
                    "name": "Aiico Auto Classic",
                    "description": "Aiico Auto Classic",
                    "id": "0db73bd6-f937-47f8-9f31-812c673633fa",
                    "inspectable": true,
                    "is_dynamic_pricing": true
                },
                "distributor": {
                    "business_name": "Yvonne Rhodes",
                    "id": "92e39bc5-6110-4dcb-8583-bc50c2e6922b"
                },
                "provider": {
                    "company_name": "Aiico",
                    "id": "63dbfce7-a743-47bd-bc49-b95703054aa1"
                },
                "purchase": {
                    "id": "45ef1ee3-3f7c-4172-9969-b29545e7b5a0",
                    "total": "140000"
                },
                "inspection": null
            },
      ],
      "total_count":1
   }
}

Get details of a Policy By ID

View the details of a single policy using the policy ID.

Fetch a policy details by ID

GET https://api.mycover.ai/v1/policies/{policy_id}

Path Parameters

Name
Type
Description

policy_id*

string

Policy ID

{
    "responseCode": 1,
    "responseText": "Policy retrieved",
    "data": {
        "policy": {
            "id": "9053db29-0aa8-402f-8d6e-38cbf8c8ddf8",
            "is_live": false,
            "first_name": "Sandy",
            "last_name": "Sally",
            "email": "sandsally@gmail.com",
            "phone": "07046425756",
            "dob": "2000-12-02",
            "product_category_id": "978ced0d-0e05-4de6-b43a-b408c0e8b95e",
            "activation_date": "2022-12-02T00:00:00.000Z",
            "start_date": "2022-12-02T00:00:00.000Z",
            "expiration_date": "2023-12-02T00:00:00.000Z",
            "market_price": 140000,
            "genius_price": 140000,
            "profit": 28000,
            "meta": {
                "payload": {
                    "make": "Ford",
                    "color": "CORNSILK",
                    "model": "EVEREST",
                    "regNo": "4563885346735",
                    "smsTel": "07046425756",
                    "titleId": "0e439e44-98cf-e711-83b7-44850015c0e7",
                    "yrManft": "2018",
                    "bodyType": "Car",
                    "chasisNo": "357974214680722",
                    "engineNo": "357974214680722",
                    "lastName": "Sally",
                    "pryEmail": "mgjyllasdnashkt@gmail.com",
                    "firstName": "Sandy",
                    "productId": "f1326cce-47e7-e711-a2be-005056a02281",
                    "dateOfBirth": "2000-12-02",
                    "physicalAddrs": "Flood light street",
                    "premiumAmount": 140000,
                    "vehicleAmount": 4000000,
                    "identificationUrl": "https://s3.eu-west-2.amazonaws.com/staging.mycover.ai/b583824e-d9d4-4867-b7dd-bfa9864b8bb0-119EE3E0-7480-414A-B16F-97585441D9D1.jpeg",
                    "identificationName": "National ID",
                    "subclassSectCovtypeId": "8b8cee87-d9ea-e711-a2be-005056a02281"
                },
                "vehicle_registration_number": "4563885346735"
            },
            "active": false,
            "submitted_to_provider": false,
            "payment_option": null,
            "payment_channel": null,
            "request_source": null,
            "created_at": "2022-12-02T14:54:30.590Z",
            "updated_at": "2022-12-02T14:54:30.590Z",
            "deleted_at": null,
            "customer_id": "d3ae5eb4-0676-49c9-821a-f57ab4127746",
            "buyer_id": "d3ae5eb4-0676-49c9-821a-f57ab4127746",
            "distributor_id": "92e39bc5-6110-4dcb-8583-bc50c2e6922b",
            "product_id": "0db73bd6-f937-47f8-9f31-812c673633fa",
            "provider_id": "63dbfce7-a743-47bd-bc49-b95703054aa1",
            "inspection_id": null,
            "purchase_id": "45ef1ee3-3f7c-4172-9969-b29545e7b5a0",
            "customer": {
                "id": "d3ae5eb4-0676-49c9-821a-f57ab4127746",
                "is_live": false,
                "first_name": "Sandy",
                "business_id": "92e39bc5-6110-4dcb-8583-bc50c2e6922b",
                "user_id": "b0932e15-ec86-46ff-abe8-efe23f23489b",
                "last_name": "Sally",
                "email": "sandsally@gmail.com",
                "phone_number": "07046425756",
                "country": null,
                "gender": null,
                "title": null,
                "date_of_birth": null,
                "state_of_residence": null,
                "city": null,
                "address": null,
                "identity_verification": null,
                "verification_type": null,
                "face_image": null,
                "is_kyc_complete": false,
                "active": false,
                "wallet_id": "8f7d0583-cbea-4010-a9a4-5b84b944640b",
                "created_at": "2022-12-02T14:54:30.446Z",
                "updated_at": "2022-12-02T14:54:30.572Z",
                "deleted_at": null
            },
            "provider": {
                "id": "63dbfce7-a743-47bd-bc49-b95703054aa1",
                "first_name": "Chuks",
                "last_name": "Efam",
                "email": "testpovider@mycover.ai",
                "phone_number": "08099776655",
                "country": "Nigeria",
                "company_name": "Aiico",
                "verification_type": "National Passport",
                "verification_images": null,
                "verification_number": "1134553454",
                "bvn_number": "54651333604",
                "business_type": null,
                "claim_email": null,
                "business_email": null,
                "support_email": null,
                "active": true,
                "bank_account_id": null,
                "wallet_id": null,
                "owner_id": "83dbfce7-a743-47bd-bc49-b95703054aa1",
                "created_at": "2021-09-03T13:42:43.332Z",
                "updated_at": "2022-12-08T07:07:19.645Z"
            },
            "purchase": {
                "id": "45ef1ee3-3f7c-4172-9969-b29545e7b5a0",
                "is_live": false,
                "discount_code_id": null,
                "total": "140000",
                "mca_profit": "28000",
                "distributor_profit": "7000",
                "payment_option": "gateway",
                "payment_channel": "bank transfer",
                "request_source": "sdk",
                "batch_id": "b68b3529-e227-427b-92a0-d486f2c624c9",
                "created_at": "2022-12-02T14:54:30.583Z",
                "updated_at": "2022-12-02T14:54:30.622Z",
                "deleted_at": null,
                "customer_id": "d3ae5eb4-0676-49c9-821a-f57ab4127746",
                "distributor_id": "92e39bc5-6110-4dcb-8583-bc50c2e6922b",
                "product_id": "0db73bd6-f937-47f8-9f31-812c673633fa",
                "product_category_id": "978ced0d-0e05-4de6-b43a-b408c0e8b95e",
                "provider_id": "63dbfce7-a743-47bd-bc49-b95703054aa1",
                "policy_id": null
            },
            "product": {
                "id": "0db73bd6-f937-47f8-9f31-812c673633fa",
                "is_live": false,
                "name": "Aiico Auto Classic",
                "key_benefits": "none",
                "full_benefits": [
                    {
                        "name": "Theft",
                        "description": "Covered"
                    },
                    {
                        "name": "Fire damage",
                        "description": "Covered"
                    },
                    {
                        "name": "Own Accidental damage",
                        "description": "Covered"
                    },
                    {
                        "name": "3rd party property damage",
                        "description": "2.5 Million"
                    },
                    {
                        "name": "3rd party bodily injury",
                        "description": "Covered"
                    },
                    {
                        "name": "Medical refund",
                        "description": "Up to 150,000.00"
                    },
                    {
                        "name": "Loss of personal effects",
                        "description": "20,000.00"
                    },
                    {
                        "name": "Authorized repair limit",
                        "description": "2.5% of value"
                    },
                    {
                        "name": "Refund for hired vehicle after an accident/theft",
                        "description": "Up to N7,500.00"
                    },
                    {
                        "name": "Excess Buy Back",
                        "description": "Covered"
                    },
                    {
                        "name": "Towing limit",
                        "description": "Up to N25,000.00"
                    },
                    {
                        "name": "Tracking Installation",
                        "description": "Free for Sum Insured above N4m"
                    },
                    {
                        "name": "Loss of Car Accessories  when the vehicle is stolen",
                        "description": "Covered"
                    },
                    {
                        "name": "Flood Extension",
                        "description": "Not Covered"
                    },
                    {
                        "name": "Riot, Strike and Civil Commotion",
                        "description": "Covered"
                    }
                ],
                "description": "Aiico Auto Classic",
                "meta": {
                    "productId": "f1326cce-47e7-e711-a2be-005056a02281",
                    "subClassId": "8b8cee87-d9ea-e711-a2be-005056a02281",
                    "productName": "Private Motor Comprehensive",
                    "sectionType": "SI",
                    "subClassName": "Private Motor Comprehensive"
                },
                "prefix": "aiico",
                "route_name": "aiico-auto-classic",
                "renewable": false,
                "claimable": true,
                "inspectable": true,
                "certificateable": true,
                "is_dynamic_pricing": true,
                "price": "3.50",
                "distributor_commission_percentage": "5.00",
                "mca_commission_percentage": "20.00",
                "cover_period": "12",
                "active": true,
                "how_it_works": null,
                "how_to_claim": null,
                "document": null,
                "created_at": "2021-09-09T23:37:25.217Z",
                "updated_at": "2022-02-14T12:35:54.195Z",
                "deleted_at": null,
                "product_category_id": "978ced0d-0e05-4de6-b43a-b408c0e8b95e",
                "provider_id": "63dbfce7-a743-47bd-bc49-b95703054aa1"
            },
            "inspection": null
        }
    }
}

Last updated