> For the complete documentation index, see [llms.txt](https://milonics.gitbook.io/api-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://milonics.gitbook.io/api-documentation/insurpass-api-reference/shop-insurance/shop-insurance-claims.md).

# Shop Insurance Claims

## Initiate Shop Insurance Claims&#x20;

## The endpoint initiates the creation of a Shop Insurance claim.

<mark style="color:green;">`POST`</mark> `https://sandbox.insurpass.com/api/merchants/shop_insure_policy_initiate_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                                                                        |
| ---------------------------------------------------------- | ------------------ | ---------------------------------------------------------------------------------- |
| policy\_number<mark style="color:red;">\*</mark>           | string             | The unique number that identifies the purchased  insurance policy - **IN98570819** |
| shop\_insure\_policy\_id<mark style="color:red;">\*</mark> | string             | The unique number that identifies shop insurance policy product                    |
| user\_id<mark style="color:red;">\*</mark>                 | string             | the data used to identify the user                                                 |
| incident\_details<mark style="color:red;">\*</mark>        | string             | details of the incident that took place                                            |
| phone\_number<mark style="color:red;">\*</mark>            | numeric\|digits:11 | phone number of the user                                                           |
| name\_of\_claiment<mark style="color:red;">\*</mark>       | string             | the name of the person requesting claims                                           |
| signature<mark style="color:red;">\*</mark>                | string             | image url of the signature                                                         |
| suspects<mark style="color:red;">\*</mark>                 | string             | details of suspects that carried out the incident                                  |
| witnesses<mark style="color:red;">\*</mark>                | string             | details of any witnesses                                                           |
| lostItems<mark style="color:red;">\*</mark>                | string             | items that got ruined or damaged during the incident                               |
| attach\_bills<mark style="color:red;">\*</mark>            | string             | bill receipts for damages                                                          |
| injuredPersons                                             | Object             | A object containing the name, treatment cost and attached bills in it.             |

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

```javascript
{
    "success": true,
    "response_message": "Shop Insure policy claim initiated successfully",
    "response_code": "",
    "data": {
        "result": "Shop Insure claims was initiated successfully"
    }
}
```

{% 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/shop_insure_policy_initiate_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 =>'{
    "policy_number": "UIC/RE/INP/SI/30092022/79187",
    "insured_name": "Salami Kaol",
    "incident_details": "This is a detail",
    "suspects": [
        {
            "name": "Sala Kolawole",
            "address": "okoko ljjkh"
        }
    ],
    "witnesses": [
        {
            "name": "Kolawole",
            "address": "lffsfnksfjk sfjsljflsf",
            "phone": "090553435353"
        }
    ],
    "lostItems": [
        {
            "item": "dsff fs",
            "value": 4255
        }
    ],
    "injuredPersons": [
        {
            "name": "Kolawole Salami",
            "treatment_cost": 3000,
            "attached_bill": "https://www.attachment.com"
        }
    ],
    "name_of_claimant": "89788 gfhfh",
    "signature": "ffafaf_sfdfs",
    "phone_number": "08034543234"
}',
  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/SI/30092022/79187",
    "insured_name": "Salami Kaol",
    "incident_details": "This is a detail",
    "suspects": [
        {
            "name": "Sala Kolawole",
            "address": "okoko ljjkh"
        }
    ],
    "witnesses": [
        {
            "name": "Kolawole",
            "address": "lffsfnksfjk sfjsljflsf",
            "phone": "090553435353"
        }
    ],
    "lostItems": [
        {
            "item": "dsff fs",
            "value": 4255
        }
    ],
    "injuredPersons": [
        {
            "name": "Kolawole Salami",
            "treatment_cost": 3000,
            "attached_bill": "https://www.attachment.com"
        }
    ],
    "name_of_claimant": "89788 gfhfh",
    "signature": "ffafaf_sfdfs",
    "phone_number": "08034543234"
});

var config = {
  method: 'post',
  url: 'https://sandbox.insurpass.com/api/merchant/shop_insure_policy_initiate_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="Untitled" %}
{% code overflow="wrap" %}

```clike
curl --location --request POST https://sandbox.insurpass.com/api/merchants/shop_insure_policy_initiate_claim' \
--header 'Authorization: Bearer {{SECRETKEY}}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data-raw '{
    "policy_number": "UIC/RE/INP/SI/30092022/79187",
    "insured_name": "Salami Kaol",
    "incident_details": "This is a detail",
    "suspects": [
        {
            "name": "Sala Kolawole",
            "address": "okoko ljjkh"
        }
    ],
    "witnesses": [
        {
            "name": "Kolawole",
            "address": "lffsfnksfjk sfjsljflsf",
            "phone": "090553435353"
        }
    ],
    "lostItems": [
        {
            "item": "dsff fs",
            "value": 4255
        }
    ],
    "injuredPersons": [
        {
            "name": "Kolawole Salami",
            "treatment_cost": 3000,
            "attached_bill": "https://www.attachment.com"
        }
    ],
    "name_of_claimant": "89788 gfhfh",
    "signature": "ffafaf_sfdfs",
    "phone_number": "08034543234"
}'
```

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

## Shop Insurance Claim Details

## This endpoint  returns an object containing a single Shop Insurance policy claim

<mark style="color:green;">`POST`</mark> `https://sandbox.insurpass.com/api/merchant/shop_insure_policy_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 " %}
{% code overflow="wrap" lineNumbers="true" %}

```javascript
{
    "success": true,
    "response_message": "Data fetched successfully",
    "response_code": "",
    "data": {
        "id": 1,
        "shop_insure_policy_id": 43,
        "user_id": 301,
        "product_id": 3,
        "merchant_id": 1,
        "incident_details": "This is a detail",
        "phone_number": "07016000160",
        "name_of_claiment": "",
        "signature": "ffafaf_sfdfs",
        "status": true,
        "deleted_at": null,
        "created_at": "2022-05-23T12:05:08.000000Z",
        "updated_at": "2022-05-23T12:05:08.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",
            "password": null,
            "policy_no": "2022058004",
            "have_beneficiaries": false,
            "enable": true,
            "next_of_kin_full_name": null,
            "merchant_user_id": 1,
            "user_type": "user",
            "created_at": "2022-01-20T10:51:04.000000Z",
            "updated_at": "2022-01-27T12:25:25.000000Z",
            "principal_policy_no": "2022058004_0",
            "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,
            "id_type": null
        },
        "shop_insure_policy": {
            "id": 43,
            "user_id": 301,
            "product_id": 3,
            "merchant_id": 1,
            "policy_number": "UIC/RE/INP/SI/23052022/80883",
            "type_of_goods_sold": "Clothes",
            "shop_duration": 1,
            "number_of_staff": 3,
            "wall_construction_material": "concrete block",
            "roof_construction_material": "concrete",
            "avg_value_shop": 10000000,
            "shop_address": "15 Lawal street Iyana Ipaja",
            "status": true,
            "start_date": "2022-05-23T00:00:00.000000Z",
            "end_date": "2023-05-23T00:00:00.000000Z",
            "deleted_at": null,
            "created_at": "2022-05-23T10:39:58.000000Z",
            "updated_at": "2022-05-23T10:40:47.000000Z"
        },
        "attached_bills": [
            {
                "id": 1,
                "name": "Joshua Nwosu",
                "treatment_cost": 3000,
                "file_path": "https://www.attachment.com",
                "claims_id": 1,
                "claims_type": "App\\Models\\ShopInsurePolicyClaim",
                "created_at": null,
                "updated_at": null
            }
        ],
        "suspects": [
            {
                "id": 1,
                "name": "Joshua Nwosu",
                "address": "15 Lawal street",
                "phone": null,
                "email": null,
                "claims_id": 1,
                "claims_type": "App\\Models\\ShopInsurePolicyClaim",
                "created_at": null,
                "updated_at": null
            }
        ],
        "witnesses": [
            {
                "id": 1,
                "name": "Kolawole",
                "address": "109 main street",
                "phone": "09074366630",
                "email": null,
                "claims_id": 1,
                "claims_type": "App\\Models\\ShopInsurePolicyClaim",
                "created_at": null,
                "updated_at": null
            }
        ],
        "items": [
            {
                "id": 1,
                "item": "Phone",
                "value": 250000,
                "claims_id": 1,
                "claims_type": "App\\Models\\ShopInsurePolicyClaim",
                "created_at": null,
                "updated_at": null
            }
        ]
    }
}
```

{% endcode %}
{% 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/shop_insure_policy_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/shop_insure_policy_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/shop_insure_policy_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 Shop Insurance Claims

## This endpoint returns a list of all the Shop Insurance Claim objects.

<mark style="color:blue;">`GET`</mark> `https://sandbox.insurpass.com/api/merchant/shop_insure_policy_merchant_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":"Data fetched successfully",
   "response_code":"",
   "data":[
      {
         "id":4,
         "shop_insure_policy_id":1,
         "user_id":26,
         "product_id":3,
         "merchant_id":1,
         "incident_details":"This is a detail",
         "phone_number":"08034543234",
         "name_of_claiment":"89788 gfhfh",
         "signature":"ffafaf_sfdfs",
         "status":true,
         "deleted_at":null,
         "created_at":"2022-04-29T13:34:06.000000Z",
         "updated_at":"2022-04-29T13:34:06.000000Z",
         "shop_insure_policy":{
            "id":1,
            "policy_number":"AJDHKH/DJAADAD"
         }
      }
   ]
}
```

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

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

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