# Keke Claims

## Initiate Keke Claim

## The endpoint initiates the creation of a keke claim.

<mark style="color:green;">`POST`</mark> `https://sandbox.insurpass.com/api/merchant/create_keke_pass_claim`

#### Headers

| Name                                            | Type   | Description                      |
| ----------------------------------------------- | ------ | -------------------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer {$secret-key}/{$api-key}  |
| Content-Type<mark style="color:red;">\*</mark>  | String | application/json                 |

#### Request Body

| Name                                                                  | Type   | Description                          |
| --------------------------------------------------------------------- | ------ | ------------------------------------ |
| means\_of\_claimant\_identification<mark style="color:red;">\*</mark> | String |                                      |
| date\_of\_occurance<mark style="color:red;">\*</mark>                 | String | **2022-02-02**                       |
| address\_of\_occurance<mark style="color:red;">\*</mark>              | String |                                      |
| details\_of\_incidence<mark style="color:red;">\*</mark>              | String |                                      |
| policy\_number<mark style="color:red;">\*</mark>                      | String | **UIC/RE/INP/KPASS/22032022/53349**  |
| picture\_of\_incident<mark style="color:red;">\*</mark>               | String | **http://IDP164672978456281014.com** |
| medical\_report<mark style="color:red;">\*</mark>                     | String | **http://IDP164672978456281014.com** |
| death\_certificate<mark style="color:red;">\*</mark>                  | String | **http://IDP164672978456281014.com** |
| original\_policy\_certificate<mark style="color:red;">\*</mark>       | String | **http://IDP164672978456281014.com** |
| estimate\_of\_repair<mark style="color:red;">\*</mark>                | String | **http://IDP164672978456281014.com** |

{% tabs %}
{% tab title="200: OK " %}
```javascript
{
   "success":true,
   "response_message":"Keke pass claim policy claim initiated successfully",
   "response_code":200,
   "data":{
      "keke_policy_id":24,
      "policy_number":"UIC/RE/INP/KPASS/22032022/53349",
      "date_of_occurance":"2022-02-02",
      "address_of_occurance":"IDP164672978456281014",
      "details_of_incidence":"IDP164672978456281014",
      "picture_of_incident":"http://IDP164672978456281014.com",
      "medical_report":"http://IDP164672978456281014.com",
      "death_certificate":"http://IDP164672978456281014.com",
      "original_policy_certificate":"http://IDP164672978456281014.com",
      "estimate_of_repair":6000,
      "means_of_claimant_identification":"IDP164672978456281014",
      "status":"0",
      "updated_at":"2022-04-21T16:28:05.000000Z",
      "created_at":"2022-04-21T16:28:05.000000Z"
   }
}
```
{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="PHP" %}
{% code overflow="wrap" lineNumbers="true" %}
```php
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://sandbox.insurpass.com/api/merchant/create_keke_pass_claim',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
    "means_of_claimant_identification": "IDP164672978456281014",
    "date_of_occurance": "2022-02-02",
    "address_of_occurance": "13th Main street, off lonely road, code city.",
    "details_of_incidence": "hfuihg shfiug fdv dhuidhhf iuhvushs sdhiasfsfs sfoif  sfhf oiofviussiuu .",
    "policy_number": "UIC/RE/INP/KPASS/03102022/29182",
    "picture_of_incident": "http://IDP164672978456281014.com",
    "medical_report": "http://IDP164672978456281014.com",
    "death_certificate": "http://IDP164672978456281014.com",
    "original_policy_certificate": "http://IDP164672978456281014.com",
    "estimate_of_repair": 6000
}',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer {{SECRETKEY}}',
    'Content-Type: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
```
{% endcode %}
{% endtab %}

{% tab title="NODE JS" %}
{% code overflow="wrap" lineNumbers="true" %}
```javascript
var axios = require('axios');
var data = JSON.stringify({
    "means_of_claimant_identification": "IDP164672978456281014",
    "date_of_occurance": "2022-02-02",
    "address_of_occurance": "13th Main street, off lonely road, code city.",
    "details_of_incidence": "hfuihg shfiug fdv dhuidhhf iuhvushs sdhiasfsfs sfoif  sfhf oiofviussiuu .",
    "policy_number": "UIC/RE/INP/KPASS/03102022/29182",
    "picture_of_incident": "http://IDP164672978456281014.com",
    "medical_report": "http://IDP164672978456281014.com",
    "death_certificate": "http://IDP164672978456281014.com",
    "original_policy_certificate": "http://IDP164672978456281014.com",
    "estimate_of_repair": 6000
});

var config = {
  method: 'post',
  url: 'https://sandbox.insurpass.com/api/merchant/create_keke_pass_claim',
  headers: { 
    'Authorization': 'Bearer {{SECRETKEY}}', 
    'Content-Type': 'application/json'
  },
  data: data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
```
{% endcode %}
{% endtab %}

{% tab title="CURL" %}
{% code overflow="wrap" %}
```clike
curl --location --request POST https://sandbox.insurpass.com/api/merchant/create_keke_pass_claim' \
--header 'Authorization: Bearer {{SECRETKEY}}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data-raw '{{
    "means_of_claimant_identification": "IDP164672978456281014",
    "date_of_occurance": "2022-02-02",
    "address_of_occurance": "13th Main street, off lonely road, code city.",
    "details_of_incidence": "hfuihg shfiug fdv dhuidhhf iuhvushs sdhiasfsfs sfoif  sfhf oiofviussiuu .",
    "policy_number": "UIC/RE/INP/KPASS/03102022/29182",
    "picture_of_incident": "http://IDP164672978456281014.com",
    "medical_report": "http://IDP164672978456281014.com",
    "death_certificate": "http://IDP164672978456281014.com",
    "original_policy_certificate": "http://IDP164672978456281014.com",
    "estimate_of_repair": 6000
}'
```
{% endcode %}
{% endtab %}
{% endtabs %}

## Keke Claim Details

## This endpoint  returns an object containing a single keke claim .                                                                                                                                                                                                                                                                                                                                                                                         &#x20;

<mark style="color:green;">`POST`</mark> `https://sandbox.insurpass.com/api/merchant/keke_pass_claim_details`

#### Headers

| Name                                            | Type   | Description                      |
| ----------------------------------------------- | ------ | -------------------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer {$secret-key}/{$api-key}  |
| Content-Type<mark style="color:red;">\*</mark>  | String | application/json                 |

#### Request Body

| Name                                           | Type   | Description                                                                        |
| ---------------------------------------------- | ------ | ---------------------------------------------------------------------------------- |
| policyNumber<mark style="color:red;">\*</mark> | String | The unique number that identifies the purchased  insurance policy - **IN98570819** |

{% tabs %}
{% tab title="200: OK " %}
```javascript
{
   "success":true,
   "response_message":"Keke pass claim fetched successfully",
   "response_code":200,
   "data":{
      "keke_policy_id":24,
      "policy_number":"UIC/RE/INP/KPASS/22032022/53349",
      "date_of_occurance":"2022-02-02",
      "address_of_occurance":"IDP164672978456281014",
      "details_of_incidence":"IDP164672978456281014",
      "picture_of_incident":"http://IDP164672978456281014.com",
      "medical_report":"http://IDP164672978456281014.com",
      "death_certificate":"http://IDP164672978456281014.com",
      "original_policy_certificate":"http://IDP164672978456281014.com",
      "estimate_of_repair":"6000",
      "means_of_claimant_identification":"IDP164672978456281014",
      "status":"0",
      "deleted_at":null,
      "created_at":"2022-04-21T16:28:05.000000Z",
      "updated_at":"2022-04-21T16:28:05.000000Z",
      "user":{
         "first_name":"required|string",
         "middle_name":null,
         "surname":"required|string",
         "phone_no":"08045754345",
         "email":"salami@gmail.com",
         "address":null,
         "gender":"male",
         "date_of_birth":null,
         "password":null,
         "policy_no":null,
         "have_beneficiaries":false,
         "enable":true,
         "next_of_kin_full_name":null,
         "merchant_user_id":null,
         "user_type":"user",
         "created_at":"2022-03-08T08:29:42.000000Z",
         "updated_at":"2022-03-08T08:29:42.000000Z",
         "principal_policy_no":null,
         "nin_number":null,
         "id_url":null,
         "id_type":null,
         "profile_url":null,
         "company_id":null,
         "verify_phone":0,
         "verify_email":0,
         "town":null,
         "state_of_residence":null,
         "transaction_pin":null,
         "occupation":null
      },
      "merchant":{
         "id":1,
         "company_name":"xyz",
         "email":"xyz@gmail.com",
         "phone_no":"0804532456",
         "address":"38, Atimi Busari",
         "category_id":1,
         "secret_key":"XYZ-HTTP-CURL",
         "username":"xyz insurance",
         "enable":true,
         "merchant_type":"sales_agent",
         "created_at":"2021-10-10T11:24:55.000000Z",
         "updated_at":"2021-10-10T11:24:57.000000Z",
         "transaction_pin":null,
         "verify_email":0,
         "verify_phone":0,
         "allow_negative_balance":0,
         "charge_own_wallet":0
      },
      "keke_policy":{
         "id":24,
         "variant_type":"confaam",
         "product_id":2,
         "amount_insured":5000,
         "policy_number":"UIC/RE/INP/KPASS/22032022/53349",
         "nok_surname":"required|string",
         "nok_othernames":"required|string",
         "nok_relationship":"required|string",
         "nok_gender":"required|string",
         "nok_phone_no":"09034543643",
         "nok_email":"sala@gmi.com",
         "start_date":"2022-03-22",
         "end_date":"2023-03-22",
         "status":1,
         "created_at":"2022-03-22T21:06:38.000000Z",
         "updated_at":"2022-03-22T21:06:46.000000Z"
      }
   }
}
```
{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="PHP" %}
{% code overflow="wrap" lineNumbers="true" %}
```php
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://sandbox.insurpass.com/api/merchant/keke_pass_claim_details',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{"policyNumber":"UIC/RE/INP/SI/30092022/79187"}',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer {{SECRETKEY}}',
    'Content-Type: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
```
{% endcode %}
{% endtab %}

{% tab title="NODE JS" %}
{% code overflow="wrap" lineNumbers="true" %}
```javascript
var axios = require('axios');
var data = JSON.stringify({"policyNumber":"UIC/RE/INP/SI/30092022/79187"});

var config = {
  method: 'post',
  url: 'https://sandbox.insurpass.com/api/merchant/school_fee_claim_details',
  headers: { 
    'Authorization': 'Bearer {{SECRETKEY}}', 
    'Content-Type': 'application/json'
  },
  data: data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
```
{% endcode %}
{% endtab %}

{% tab title="CURL" %}
{% code overflow="wrap" %}
```clike
curl --location --request POST https://sandbox.insurpass.com/api/merchant/keke_pass_claim_details' \
--header 'Authorization: Bearer {{SECRETKEY}}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data-raw '{"policyNumber":"UIC/RE/INP/SI/30092022/79187"}'
```
{% endcode %}
{% endtab %}
{% endtabs %}

## List All Keke Claims

## This endpoint returns a list of all the keke policy claims objects.

<mark style="color:blue;">`GET`</mark> `https://sandbox.insurpass.com/api/merchant/get_keke_pass_claims`

#### Headers

| Name                                            | Type   | Description                      |
| ----------------------------------------------- | ------ | -------------------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer {$secret-key}/{$api-key}  |
| Content-Type<mark style="color:red;">\*</mark>  | String | application/json                 |

{% tabs %}
{% tab title="200: OK " %}
```javascript
{
   "success":true,
   "response_message":"Keke pass claim fetched successfully",
   "response_code":200,
   "data":[
      {
         "id":1,
         "user_id":56,
         "merchant_id":1,
         "keke_policy_id":24,
         "policy_number":"UIC/RE/INP/KPASS/22032022/53349",
         "product_id":2,
         "date_of_occurance":"2022-02-02",
         "address_of_occurance":"IDP164672978456281014",
         "details_of_incidence":"IDP164672978456281014",
         "picture_of_incident":"http://IDP164672978456281014.com",
         "medical_report":"http://IDP164672978456281014.com",
         "death_certificate":"http://IDP164672978456281014.com",
         "original_policy_certificate":"http://IDP164672978456281014.com",
         "estimate_of_repair":"6000",
         "means_of_claimant_identification":"IDP164672978456281014",
         "status":"0",
         "deleted_at":null,
         "created_at":"2022-04-21T16:28:05.000000Z",
         "updated_at":"2022-04-21T16:28:05.000000Z",
         "keke_policy":{
            "id":24,
            "policy_number":"UIC/RE/INP/KPASS/22032022/53349"
         }
      }
   ]
}
```
{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="PHP" %}
{% code overflow="wrap" lineNumbers="true" %}
```php
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://sandbox.insurpass.com/api/merchant/get_keke_pass_claims',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer {{SECRETKEY}}'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
```
{% endcode %}
{% endtab %}

{% tab title="NODE JS" %}
{% code overflow="wrap" lineNumbers="true" %}
```javascript
var axios = require('axios');
var data = '';

var config = {
  method: 'get',
  url: 'https://sandbox.insurpass.com/api/merchant/get_keke_pass_claims',
  headers: { 
    'Authorization': 'Bearer {{SECRETKEY}}'
  },
  data: data
};
axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
```
{% endcode %}
{% endtab %}

{% tab title="CURL" %}
{% code overflow="wrap" %}
```clike
curl --location --request GET https://sandbox.insurpass.com/api/merchant/get_keke_pass_claims' \
--header 'Authorization: Bearer {{SECRETKEY}}' \
--header 'Accept: application/json' \
--data-raw ''
```
{% endcode %}
{% endtab %}
{% endtabs %}
