# Okada Policy

## Initiate Okada Policy

## This endpoint initiates the creation of a okada insurance policy.

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

#### 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                                                   |
| -------------------------------------------------------------- | ------- | ------------------------------------------------------------- |
| next\_of\_kin\_address<mark style="color:red;">\*</mark>       | string  | Address of net of kin. 12 Oshomobo, Lagos.                    |
| next\_of\_kin\_phone\_number<mark style="color:red;">\*</mark> | numeric | Phone number of next of kin. digits:11                        |
| next\_of\_kin\_email<mark style="color:red;">\*</mark>         | email   | Email address of next of kin. <nextofkin@gmail.com>           |
| alternate\_phone\_number                                       | numeric | Principal customer's other phone number. digits:11            |
| surname<mark style="color:red;">\*</mark>                      | String  | Principal customer's surname                                  |
| phone\_number<mark style="color:red;">\*</mark>                | numeric | Principal customer's phone number - 081922234567. - digits:11 |
| image<mark style="color:red;">\*</mark>                        | string  | Principal customer's image url.  <https://picsum.photos/>     |
| next\_of\_kin\_surname<mark style="color:red;">\*</mark>       | string  | Surnnae of Next of kin. Amadi                                 |
| gender<mark style="color:red;">\*</mark>                       | String  | Principal customer's gender - female, male                    |
| next\_of\_kin\_relationship<mark style="color:red;">\*</mark>  | string  | Relationship with next of kin. Mother, Father, etc.           |
| frequency\_type<mark style="color:red;">\*</mark>              | string  | How often policy is renewed. Monthly, Quarterly, Annually.    |
| date\_of\_birth<mark style="color:red;">\*</mark>              | String  | Principal customer's date of birth. FORMAT \_ yy-mm-dd        |
| product\_id<mark style="color:red;">\*</mark>                  | String  | unique number used to identify okada policy. - 3              |
| othernames<mark style="color:red;">\*</mark>                   | String  | Principal customer's other names                              |
| occupation<mark style="color:red;">\*</mark>                   | String  | Principal customer's occupation                               |
| email\_address<mark style="color:red;">\*</mark>               | Email   | Principal customer's email address - <email@domain.com>       |
| address<mark style="color:red;">\*</mark>                      | String  | Principal customer's address                                  |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
   "success":true,
   "response_message":"Okada pass policy initiated successfully",
   "response_code":200,
   "data":{
      "token":"OKP1645093519301421419"
   }
}
```

{% 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/initiate_okada_pass_policy',
  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 =>'{
    "email": "sasa@gmail.com",
    "surname": "Parker",
    "first_name": "Peter",
    "gender": "male",
    "date_of_birth": "2022-08-23",
    "address": "ash kljk kjlhk",
    "occupation": "popopo",
    "phone_no": "08034565434",
    "image": "https://image.jpg",
    "frequency_type": "monthly",
    "next_of_kin_surname": "salami",
    "next_of_kin_relationship": "brother",
    "next_of_kin_address": "as gjg kl",
    "next_of_kin_email": "sass@gma.bh",
    "next_of_kin_phone_number": "08065456876",
    "product_id": "5"
}',
  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({
    "email": "sasa@gmail.com",
    "surname": "Parker",
    "first_name": "Peter",
    "gender": "male",
    "date_of_birth": "2022-08-23",
    "address": "ash kljk kjlhk",
    "occupation": "popopo",
    "phone_no": "08034565434",
    "image": "https://image.jpg",
    "frequency_type": "monthly",
    "next_of_kin_surname": "salami",
    "next_of_kin_relationship": "brother",
    "next_of_kin_address": "as gjg kl",
    "next_of_kin_email": "sass@gma.bh",
    "next_of_kin_phone_number": "08065456876",
    "product_id": "5"
});

var config = {
  method: 'post',
  url: 'https://sandbox.insurpass.com/api/merchant/initiate_okada_pass_policy',
  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/initiate_okada_pass_policy' \
--header 'Authorization: Bearer {{SECRETKEY}}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data-raw '{
    "email": "sasa@gmail.com",
    "surname": "Parker",
    "first_name": "Peter",
    "gender": "male",
    "date_of_birth": "2022-08-23",
    "address": "ash kljk kjlhk",
    "occupation": "popopo",
    "phone_no": "08034565434",
    "image": "https://image.jpg",
    "frequency_type": "monthly",
    "next_of_kin_surname": "salami",
    "next_of_kin_relationship": "brother",
    "next_of_kin_address": "as gjg kl",
    "next_of_kin_email": "sass@gma.bh",
    "next_of_kin_phone_number": "08065456876",
    "product_id": "5"
}'
```

{% endcode %}
{% endtab %}
{% endtabs %}

## **Verify Okada Policy**

## This endpoints sends a token that verifies the creation of a Okada insurance policy.

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

#### 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            |
| --------------------------------------- | ------ | ---------------------- |
| token<mark style="color:red;">\*</mark> | String | OKP1645093519301421419 |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
    "success": true,
    "response_message": "Okada pass policy verified successfully",
    "response_code": 200,
    "data": {
        "id": 51,
        "user_id": 378,
        "product_id": 5,
        "merchant_id": 1,
        "policy_number": "UIC/RE/INP/OPASS/20102022/66379",
        "email_address": "sasa@gmail.com",
        "surname": "Parker",
        "othernames": null,
        "gender": "male",
        "date_of_birth": "2022-08-23T00:00:00.000000Z",
        "address": "ash kljk kjlhk",
        "occupation": "popopo",
        "phone_number": "08034565434",
        "alternate_phone_number": null,
        "means_of_identity": "https://sandbox.insurpass.com//storage/identity/https://image.jpg",
        "frequency_type": "monthly",
        "frequency": null,
        "start_date": "2022-10-20T00:00:00.000000Z",
        "end_date": "2023-10-19T00:00:00.000000Z",
        "status": "success",
        "product_code": "OPASS",
        "deleted_at": null,
        "created_at": "2022-10-20T13:03:09.000000Z",
        "updated_at": "2022-10-20T13:03:22.000000Z"
    }
}
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
The 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.
{% endhint %}

{% 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/verify_okada_pass_policy',
  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 =>'{
    "token": "OKP1645093519301421419"
}',
  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({
    "token": "OKP1645093519301421419"
});

var config = {
  method: 'post',
  url: 'https://sandbox.insurpass.com/api/merchant/verify_okada_pass_policy',
  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/verify_okada_pass_policy' \
--header 'Authorization: Bearer {{SECRETKEY}}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data-raw '{
  "token": "OKP1645093519301421419"
}'
```

{% endcode %}
{% endtab %}
{% endtabs %}

## List All Okada Policies

## This endpoint returns a list of all the okada insurance policies

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

#### 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":"Okada Pass Policy get successful",
   "response_code":[
      
   ],
   "data":[
      {
         "id":17,
         "user_id":301,
         "product_id":15,
         "merchant_id":1,
         "policy_number":null,
         "email_address":"joshuanwosu007@gmail.com",
         "surname":"Nwosu",
         "othernames":"Joshua",
         "gender":"male",
         "date_of_birth":"2021-02-11T00:00:00.000000Z",
         "address":"Iyana Ipaja",
         "occupation":"Driver",
         "phone_number":"09033648902",
         "alternate_phone_number":"09033648902",
         "means_of_identity":"https://sandbox.insurpass.com//storage/identity/https://images.pexels.com/photos/10840765/pexels-photo-10840765.jpeg",
         "frequency_type":"monthly",
         "frequency":1,
         "start_date":null,
         "end_date":null,
         "status":"pending",
         "deleted_at":null,
         "created_at":"2022-03-15T11:31:40.000000Z",
         "updated_at":"2022-03-15T11:31:40.000000Z",
         "user":{
            "first_name":"Joshua",
            "middle_name":null,
            "surname":"Nwosu",
            "phone_no":"09033648902",
            "email":"joshnwosu01@gmail.com",
            "address":null,
            "gender":null,
            "date_of_birth":"2022-01-20T00:00:00.000000Z"
         },
         "transactions":null,
         "product":{
            "id":15,
            "name":"JEJE COVER",
            "details":"JEJE COVER",
            "beneficiaries":true,
            "max_beneficiaries":1,
            "provider_id":2,
            "logo_url":"logo.png",
            "enable":true,
            "created_at":"2022-03-11T14:01:19.000000Z",
            "updated_at":"2022-03-11T14:01:19.000000Z",
            "service_id":8,
            "product_class_id":0
         },
         "next_of_kin":null
      },
      {
         "id":16,
         "user_id":301,
         "product_id":15,
         "merchant_id":1,
         "policy_number":"UIC/RE/INP/OPASS/10032022/8816",
         "email_address":"joshuanwosu007@gmail.com",
         "surname":"Nwosu",
         "othernames":"Joshua",
         "gender":"male",
         "date_of_birth":"2021-02-11T00:00:00.000000Z",
         "address":"Iyana Ipaja",
         "occupation":"Driver",
         "phone_number":"09033648902",
         "alternate_phone_number":"09033648902",
         "means_of_identity":"https://sandbox.insurpass.com//storage/identity/https://images.pexels.com/photos/10840765/pexels-photo-10840765.jpeg",
         "frequency_type":"monthly",
         "frequency":1,
         "start_date":"2022-03-10T00:00:00.000000Z",
         "end_date":"2023-03-10T00:00:00.000000Z",
         "status":"success",
         "deleted_at":null,
         "created_at":"2022-03-10T18:39:06.000000Z",
         "updated_at":"2022-03-10T18:39:19.000000Z",
         "user":{
            "first_name":"Joshua",
            "middle_name":null,
            "surname":"Nwosu",
            "phone_no":"09033648902",
            "email":"joshnwosu01@gmail.com",
            "address":null,
            "gender":null,
            "date_of_birth":"2022-01-20T00:00:00.000000Z"
         },
         "transactions":null,
         "product":{
            "id":15,
            "name":"JEJE COVER",
            "details":"JEJE COVER",
            "beneficiaries":true,
            "max_beneficiaries":1,
            "provider_id":2,
            "logo_url":"logo.png",
            "enable":true,
            "created_at":"2022-03-11T14:01:19.000000Z",
            "updated_at":"2022-03-11T14:01:19.000000Z",
            "service_id":8,
            "product_class_id":0
         },
         "next_of_kin":null
      },
      {
         "id":15,
         "user_id":301,
         "product_id":15,
         "merchant_id":1,
         "policy_number":null,
         "email_address":"joshuanwosu007@gmail.com",
         "surname":"Nwosu",
         "othernames":"Joshua",
         "gender":"male",
         "date_of_birth":"2021-02-11T00:00:00.000000Z",
         "address":"Iyana Ipaja",
         "occupation":"Driver",
         "phone_number":"09033648902",
         "alternate_phone_number":"09033648902",
         "means_of_identity":"https://sandbox.insurpass.com//storage/identity/https://images.pexels.com/photos/10840765/pexels-photo-10840765.jpeg",
         "frequency_type":"monthly",
         "frequency":1,
         "start_date":null,
         "end_date":null,
         "status":"pending",
         "deleted_at":null,
         "created_at":"2022-03-10T17:25:09.000000Z",
         "updated_at":"2022-03-10T17:25:09.000000Z",
         "user":{
            "first_name":"Joshua",
            "middle_name":null,
            "surname":"Nwosu",
            "phone_no":"09033648902",
            "email":"joshnwosu01@gmail.com",
            "address":null,
            "gender":null,
            "date_of_birth":"2022-01-20T00:00:00.000000Z"
         },
         "transactions":null,
         "product":{
            "id":15,
            "name":"JEJE COVER",
            "details":"JEJE COVER",
            "beneficiaries":true,
            "max_beneficiaries":1,
            "provider_id":2,
            "logo_url":"logo.png",
            "enable":true,
            "created_at":"2022-03-11T14:01:19.000000Z",
            "updated_at":"2022-03-11T14:01:19.000000Z",
            "service_id":8,
            "product_class_id":0
         },
         "next_of_kin":null
      },
      {
         "id":14,
         "user_id":301,
         "product_id":15,
         "merchant_id":1,
         "policy_number":null,
         "email_address":"joshuanwosu007@gmail.com",
         "surname":"Nwosu",
         "othernames":"Joshua",
         "gender":"male",
         "date_of_birth":"2021-02-11T00:00:00.000000Z",
         "address":"Iyana Ipaja",
         "occupation":"Driver",
         "phone_number":"09033648902",
         "alternate_phone_number":"09033648902",
         "means_of_identity":"https://sandbox.insurpass.com//storage/identity/https://images.pexels.com/photos/10840765/pexels-photo-10840765.jpeg",
         "frequency_type":"monthly",
         "frequency":1,
         "start_date":null,
         "end_date":null,
         "status":"pending",
         "deleted_at":null,
         "created_at":"2022-03-10T17:09:16.000000Z",
         "updated_at":"2022-03-10T17:09:16.000000Z",
         "user":{
            "first_name":"Joshua",
            "middle_name":null,
            "surname":"Nwosu",
            "phone_no":"09033648902",
            "email":"joshnwosu01@gmail.com",
            "address":null,
            "gender":null,
            "date_of_birth":"2022-01-20T00:00:00.000000Z"
         },
         "transactions":null,
         "product":{
            "id":15,
            "name":"JEJE COVER",
            "details":"JEJE COVER",
            "beneficiaries":true,
            "max_beneficiaries":1,
            "provider_id":2,
            "logo_url":"logo.png",
            "enable":true,
            "created_at":"2022-03-11T14:01:19.000000Z",
            "updated_at":"2022-03-11T14:01:19.000000Z",
            "service_id":8,
            "product_class_id":0
         },
         "next_of_kin":null
      },
      {
         "id":13,
         "user_id":301,
         "product_id":15,
         "merchant_id":1,
         "policy_number":null,
         "email_address":"joshuanwosu007@gmail.com",
         "surname":"Nwosu",
         "othernames":"Joshua",
         "gender":"male",
         "date_of_birth":"2021-02-11T00:00:00.000000Z",
         "address":"Iyana Ipaja",
         "occupation":"Driver",
         "phone_number":"09033648902",
         "alternate_phone_number":"09033648902",
         "means_of_identity":"https://sandbox.insurpass.com//storage/identity/https://images.pexels.com/photos/10840765/pexels-photo-10840765.jpeg",
         "frequency_type":"monthly",
         "frequency":1,
         "start_date":null,
         "end_date":null,
         "status":"pending",
         "deleted_at":null,
         "created_at":"2022-03-10T16:55:03.000000Z",
         "updated_at":"2022-03-10T16:55:03.000000Z",
         "user":{
            "first_name":"Joshua",
            "middle_name":null,
            "surname":"Nwosu",
            "phone_no":"09033648902",
            "email":"joshnwosu01@gmail.com",
            "address":null,
            "gender":null,
            "date_of_birth":"2022-01-20T00:00:00.000000Z"
         },
         "transactions":null,
         "product":{
            "id":15,
            "name":"JEJE COVER",
            "details":"JEJE COVER",
            "beneficiaries":true,
            "max_beneficiaries":1,
            "provider_id":2,
            "logo_url":"logo.png",
            "enable":true,
            "created_at":"2022-03-11T14:01:19.000000Z",
            "updated_at":"2022-03-11T14:01:19.000000Z",
            "service_id":8,
            "product_class_id":0
         },
         "next_of_kin":null
      },
      {
         "id":12,
         "user_id":301,
         "product_id":15,
         "merchant_id":1,
         "policy_number":null,
         "email_address":"nwosu.joshua02@gmail.com",
         "surname":"Nwosu",
         "othernames":"Joshua",
         "gender":"male",
         "date_of_birth":"2021-02-11T00:00:00.000000Z",
         "address":"Iyana Ipaja",
         "occupation":"Driver",
         "phone_number":"09033648902",
         "alternate_phone_number":"09033648902",
         "means_of_identity":"https://sandbox.insurpass.com//storage/identity/https://images.pexels.com/photos/10840765/pexels-photo-10840765.jpeg",
         "frequency_type":"monthly",
         "frequency":1,
         "start_date":null,
         "end_date":null,
         "status":"pending",
         "deleted_at":null,
         "created_at":"2022-02-22T18:23:09.000000Z",
         "updated_at":"2022-02-22T18:23:09.000000Z",
         "user":{
            "first_name":"Joshua",
            "middle_name":null,
            "surname":"Nwosu",
            "phone_no":"09033648902",
            "email":"joshnwosu01@gmail.com",
            "address":null,
            "gender":null,
            "date_of_birth":"2022-01-20T00:00:00.000000Z"
         },
         "transactions":null,
         "product":{
            "id":15,
            "name":"JEJE COVER",
            "details":"JEJE COVER",
            "beneficiaries":true,
            "max_beneficiaries":1,
            "provider_id":2,
            "logo_url":"logo.png",
            "enable":true,
            "created_at":"2022-03-11T14:01:19.000000Z",
            "updated_at":"2022-03-11T14:01:19.000000Z",
            "service_id":8,
            "product_class_id":0
         },
         "next_of_kin":null
      },
      {
         "id":8,
         "user_id":301,
         "product_id":15,
         "merchant_id":1,
         "policy_number":null,
         "email_address":"joshuanwosu007@gmail.com",
         "surname":"Nwosu",
         "othernames":"Joshua",
         "gender":"male",
         "date_of_birth":"2021-02-11T00:00:00.000000Z",
         "address":"Iyana Ipaja",
         "occupation":"Driver",
         "phone_number":"09033648902",
         "alternate_phone_number":"09033648902",
         "means_of_identity":"https://sandbox.insurpass.com//storage/identity/https://images.pexels.com/photos/10840765/pexels-photo-10840765.jpeg",
         "frequency_type":"monthly",
         "frequency":1,
         "start_date":null,
         "end_date":null,
         "status":"pending",
         "deleted_at":null,
         "created_at":"2022-02-22T17:52:15.000000Z",
         "updated_at":"2022-02-22T17:52:15.000000Z",
         "user":{
            "first_name":"Joshua",
            "middle_name":null,
            "surname":"Nwosu",
            "phone_no":"09033648902",
            "email":"joshnwosu01@gmail.com",
            "address":null,
            "gender":null,
            "date_of_birth":"2022-01-20T00:00:00.000000Z"
         },
         "transactions":null,
         "product":{
            "id":15,
            "name":"JEJE COVER",
            "details":"JEJE COVER",
            "beneficiaries":true,
            "max_beneficiaries":1,
            "provider_id":2,
            "logo_url":"logo.png",
            "enable":true,
            "created_at":"2022-03-11T14:01:19.000000Z",
            "updated_at":"2022-03-11T14:01:19.000000Z",
            "service_id":8,
            "product_class_id":0
         },
         "next_of_kin":null
      },
      {
         "id":1,
         "user_id":301,
         "product_id":15,
         "merchant_id":1,
         "policy_number":null,
         "email_address":"joshuanwosu007@gmail.com",
         "surname":"Nwosu",
         "othernames":"Joshua",
         "gender":"male",
         "date_of_birth":"2021-02-11T00:00:00.000000Z",
         "address":"Iyana Ipaja",
         "occupation":"Driver",
         "phone_number":"09033648902",
         "alternate_phone_number":"09033648902",
         "means_of_identity":"https://sandbox.insurpass.com//storage/identity/https://images.pexels.com/photos/10840765/pexels-photo-10840765.jpeg",
         "frequency_type":"monthly",
         "frequency":1,
         "start_date":null,
         "end_date":null,
         "status":"pending",
         "deleted_at":null,
         "created_at":"2022-02-17T10:25:19.000000Z",
         "updated_at":"2022-02-17T10:25:19.000000Z",
         "user":{
            "first_name":"Joshua",
            "middle_name":null,
            "surname":"Nwosu",
            "phone_no":"09033648902",
            "email":"joshnwosu01@gmail.com",
            "address":null,
            "gender":null,
            "date_of_birth":"2022-01-20T00:00:00.000000Z"
         },
         "transactions":null,
         "product":{
            "id":15,
            "name":"JEJE COVER",
            "details":"JEJE COVER",
            "beneficiaries":true,
            "max_beneficiaries":1,
            "provider_id":2,
            "logo_url":"logo.png",
            "enable":true,
            "created_at":"2022-03-11T14:01:19.000000Z",
            "updated_at":"2022-03-11T14:01:19.000000Z",
            "service_id":8,
            "product_class_id":0
         },
         "next_of_kin":null
      }
   ]
}
```

{% 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/merchant_okada_pass_policies',
  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/merchant_okada_pass_policies',
  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/merchant_okada_pass_policies' \
--header 'Authorization: Bearer {{SECRETKEY}}' \
--header 'Accept: application/json' \
--data-raw ''
```

{% endcode %}
{% endtab %}
{% endtabs %}

## Retrieve Okada Report&#x20;

## This endpoint returns an object containing a merchant's number of policies and claims

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

This endpoint returns an object containing a merchant's number of policies and claims for the okada insurance product.

#### 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":"Shop Insure policy report get successful",
   "response_code":"",
   "data":{
      "no_of_policy":1,
      "no_of_claim":0
   }
}
```

{% 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/okada_pass_merchant_report',
  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('axio');
var data = '';

var config = {
  method: 'get',
  url: 'https://sandbox.insurpass.com/api/merchant/okada_pass_merchant_report',
  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/okada_pass_merchant_report' \
--header 'Authorization: Bearer {{SECRETKEY}}' \
--header 'Accept: application/json' \
--data-raw ''
```

{% endcode %}
{% endtab %}
{% endtabs %}

## Okada Policy Details

## This endpoint returns an object containing a single Okada Policy&#x20;

<mark style="color:green;">`POST`</mark> `https://sandbox.insurpass.com/api/merchant/okada_pass_policy_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                                                                        |
| ------------------------------------------------ | ------ | ---------------------------------------------------------------------------------- |
| policy\_number<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":"Policy details retrieved successfully",
   "response_code":"",
   "data":{
      "id":1,
      "user_id":26,
      "product_id":3,
      "merchant_id":1,
      "policy_number":"AJDHKH/DJAADAD",
      "type_of_goods_sold":null,
      "shop_duration":3,
      "number_of_staff":4,
      "wall_construction_material":"BLOCK",
      "roof_construction_material":"zINC",
      "avg_value_shop":null,
      "shop_address":"oJO",
      "status":true,
      "start_date":"2022-03-31T00:00:00.000000Z",
      "end_date":"2022-03-31T00:00:00.000000Z",
      "deleted_at":null,        
      "created_at":"2022-03-31T12:10:02.000000Z",
      "updated_at":"2022-03-31T12:10:05.000000Z",
      "user":{
         "first_name":"Sakani",
         "middle_name":null,
         "surname":"Oluwakemi",
         "phone_no":"09076567875",
         "email":"email@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-02-24T11:35:24.000000Z",
         "updated_at":"2022-02-24T11:35:24.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
      },
      "product":{
         "id":3,
         "name":"School fee bronze",
         "details":"sgsfgsfgsf",
         "beneficiaries":false,
         "max_beneficiaries":5,
         "provider_id":1,
         "logo_url":null,
         "enable":true,
         "created_at":"2022-02-24T10:01:42.000000Z",
         "updated_at":"2022-02-24T09:14:21.000000Z",
         "service_id":1
      }
   }
}
```

{% 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/okada_pass_policy_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 =>'{"policy_number":"UIC/RE/INP/OPASS/20102022/66379"}',
  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({"policy_number":"UIC/RE/INP/OPASS/20102022/66379"});

var config = {
  method: 'post',
  url: 'https://sandbox.insurpass.com/api/merchant/okada_pass_policy_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/okada_pass_policy_details' \
--header 'Authorization: Bearer {{SECRETKEY}}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data-raw '{"policy_number":"UIC/RE/INP/OPASS/20102022/66379"}'
```

{% endcode %}
{% endtab %}
{% endtabs %}
