Policy
Initiate Group Life Policy
This endpoint initiates a group life policy with a post request
POST
https://sandbox.insurpass.com/api/merchant/group-life/policy/initiate-group-life-policy
Successful initiation of policy generates a token that would be used to verify a transaction
Headers
Request Body
{
"success": true,
"response_message": "Group life policy verified successfully",
"response_code": 200,
"data": {
"token": "GLP163879198612409044"
}
}
Verify Group Life Policy
This endpoint verifies the token which was generated during the initiation of the policy.
POST
https://sandbox.insurpass.com/api/merchant/group-life/policy/verify-group-life-policy
Note that the token expires after a certain duration
Headers
Request Body
{
"success": false,
"response_message": "Token has expired",
"response_code": 400,
"data": {
"error": [
"Token has expired"
]
}
}
{
"success": false,
"response_message": "Invalid Token",
"response_code": 400,
"data": {
"error": [
"Invalid Token"
]
}
{
"success": true,
"response_message": "Group life Policy initiated successfully",
"response_code": 200,
"data": {
"id": 57,
"user_id": 12,
"product_id": 2,
"merchant_id": 1,
"policy_number": "IN93809537",
"group_name": "group life policy group",
"group_type": "User",
"group_contact_address": "rojojo store makurdi",
"first_person_name": "John",
"first_person_phone": "2636373737",
"second_person_name": "Peter",
"second_person_phone": null,
"start_date": null,
"end_date": null,
"status": true,
"deleted_at": null,
"created_at": "2021-12-03T22:24:44.000000Z",
"updated_at": "2021-12-03T22:24:44.000000Z",
"user": {
"id": 12,
"first_name": "John",
"middle_name": null,
"surname": "Doe",
"phone_no": "08135540787",
"email": "johndoed21393@gmail.com",
"address": null,
"gender": "Male",
"date_of_birth": "2021-02-12T00:00:00.00000,
"created_at": "2021-11-26T15:48:01.000000Z",
"updated_at": "2021-11-26T15:48:01.000000Z",
},
"product": {
"id": 2,
"name": "Malaria Care Plan Plus",
"details": "some details",
"beneficiaries": true,
"max_beneficiaries": 3,
"provider_id": 1,
"logo_url": "logo.png",
"enable": true,
"created_at": "2021-11-23T17:20:38.000000Z",
"updated_at": "2021-11-23T17:20:38.000000Z",
"service_id": 2,
"product_class_id": 2
},
"members": [
{
"id": 15,
"policy_id": 57,
"full_name": "Lasisi Modupela",
"gender": "male",
"occupation": "software Engineer",
"date_of_birth": "2021-01-12T00:00:00.000000Z",
"next_of_kiln": "Oson",
"phone_number": "08135540787",
"policy_type": "group-life",
"deleted_at": null,
"created_at": "2021-12-03T22:24:44.000000Z",
"updated_at": "2021-12-03T22:24:44.000000Z"
},
{
"id": 16,
"policy_id": 57,
"full_name": "Adebayo Ademola",
"gender": "male",
"occupation": "software Engineer",
"date_of_birth": "2021-01-12T00:00:00.000000Z",
"next_of_kiln": "shimi",
"phone_number": "08135540787",
"policy_type": "group-life",
"deleted_at": null,
"created_at": "2021-12-03T22:24:44.000000Z",
"updated_at": "2021-12-03T22:24:44.000000Z"
}
]
}
}
Initiate token expires in 15 minutes, and if a user does not verify his/her subscription after 15 minutes of initiation, the details of the subscription will be deleted.
Get Merchant Group Life Policy
This endpoint returns all the policies created by the merchant
GET
https://sandbox.insurpass.com/api/merchant/group-life/policy/merchant-group-life-policies
Headers
{
"success": true,
"response_message": "Group Life Policies retrieved successfully",
"response_code": 200,
"data": {
"current_page": 5,
"data": [
{
"id": 55,
"user_id": 12,
"product_id": 2,
"merchant_id": 1,
"policy_number": "IN32349098",
"group_name": "group life policy group",
"group_type": "User",
"group_contact_address": "rojojo store makurdi",
"first_person_name": "John",
"first_person_phone": "2636373737",
"second_person_name": "Peter",
"second_person_phone": null,
"start_date": null,
"end_date": null,
"status": true,
"deleted_at": null,
"created_at": "2021-12-03T22:13:02.000000Z",
"updated_at": "2021-12-03T22:13:02.000000Z",
"user": {
"id": 12,
"first_name": "John",
"middle_name": null,
"surname": "Doe",
"phone_no": "08135540787",
"email": "johndoed21393@gmail.com",
"address": null,
"gender": "Male",
"created_at": "2021-11-26T15:48:01.000000Z",
"updated_at": "2021-11-26T15:48:01.000000Z",
},
"product": {
"id": 2,
"name": "Malaria Care Plan Plus",
"details": "some details",
"beneficiaries": true,
"max_beneficiaries": 3,
"created_at": "2021-11-23T17:20:38.000000Z",
"updated_at": "2021-11-23T17:20:38.000000Z",
"service_id": 2,
"product_class_id": 2
},
"group_life_members": [
{
"id": 11,
"policy_id": 55,
"full_name": "Lasisi Modupela",
"gender": "male",
"occupation": "software Engineer",
"date_of_birth": "2021-01-12T00:00:00.000000Z",
"next_of_kiln": "Oson",
"phone_number": "08135540787",
"policy_type": "group-life",
"deleted_at": null,
"created_at": "2021-12-03T22:13:02.000000Z",
"updated_at": "2021-12-03T22:13:02.000000Z"
},
{
"id": 12,
"policy_id": 55,
"full_name": "Adebayo Ademola",
"gender": "male",
"occupation": "software Engineer",
"date_of_birth": "2021-01-12T00:00:00.000000Z",
"next_of_kiln": "shimi",
"phone_number": "08135540787",
"policy_type": "group-life",
"deleted_at": null,
"created_at": "2021-12-03T22:13:02.000000Z",
"updated_at": "2021-12-03T22:13:02.000000Z"
}
]
},
Group Life Policy Details
This endpoint returns the merchant policy details.
POST
https://sandbox.insurpass.com/api/merchant/group-life/policy/group-life-policy-details
The developer needs to provide the policy number for the policy details to display.
Headers
Request Body
{
"success": true,
"response_message": "Group life Policy initiated successfully",
"response_code": 200,
"data": {
"id": 57,
"user_id": 12,
"product_id": 2,
"merchant_id": 1,
"policy_number": "IN93809537",
"group_name": "group life policy group",
"group_type": "User",
"group_contact_address": "rojojo store makurdi",
"first_person_name": "John",
"first_person_phone": "2636373737",
"second_person_name": "Peter",
"second_person_phone": null,
"start_date": null,
"end_date": null,
"status": true,
"deleted_at": null,
"created_at": "2021-12-03T22:24:44.000000Z",
"updated_at": "2021-12-03T22:24:44.000000Z",
"user": {
"id": 12,
"first_name": "John",
"middle_name": null,
"surname": "Doe",
"phone_no": "08135540787",
"email": "johndoed21393@gmail.com",
"address": null,
"gender": "Male",
"date_of_birth": "2021-02-12T00:00:00.000000Z",
"password": null,
"policy_no": "1234567",
"have_beneficiaries": false,
"enable": true,
"next_of_kin_full_name": null,
"merchant_user_id": null,
"user_type": "user",
"created_at": "2021-11-26T15:48:01.000000Z",
"updated_at": "2021-11-26T15:48:01.000000Z",
"principal_policy_no": null,
"nin_number": null,
"id_url": null,
"profile_url": null,
"company_id": null,
"verify_phone": 0,
"verify_email": 0,
"town": null,
"state_of_residence": null,
"transaction_pin": null,
"occupation": null
},
"product": {
"id": 2,
"name": "Malaria Care Plan Plus",
"details": "some details",
"beneficiaries": true,
"max_beneficiaries": 3,
"provider_id": 1,
"logo_url": "logo.png",
"enable": true,
"created_at": "2021-11-23T17:20:38.000000Z",
"updated_at": "2021-11-23T17:20:38.000000Z",
"service_id": 2,
"product_class_id": 2
},
"group_life_members": [
{
"id": 15,
"policy_id": 57,
"full_name": "Lasisi Modupela",
"gender": "male",
"occupation": "software Engineer",
"date_of_birth": "2021-01-12T00:00:00.000000Z",
"next_of_kiln": "Oson",
"phone_number": "08135540787",
"policy_type": "group-life",
"deleted_at": null,
"created_at": "2021-12-03T22:24:44.000000Z",
"updated_at": "2021-12-03T22:24:44.000000Z"
},
{
"id": 16,
"policy_id": 57,
"full_name": "Adebayo Ademola",
"gender": "male",
"occupation": "software Engineer",
"date_of_birth": "2021-01-12T00:00:00.000000Z",
"next_of_kiln": "shimi",
"phone_number": "08135540787",
"policy_type": "group-life",
"deleted_at": null,
"created_at": "2021-12-03T22:24:44.000000Z",
"updated_at": "2021-12-03T22:24:44.000000Z"
}
]
}
}
Last updated