> 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/motor-insurance/third-party-motor-insurance/third-party-motor-claims.md).

# Third Party Motor Claims

## Initiate Third Party Claims

## The endpoint initiates the creation of a Third Party claim.

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

This endpoint is used to initiate claims for third party motor insurance

#### 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 - **INS1642236323569** |
| proof\_of\_incidence<mark style="color:red;">\*</mark>   | string | image url with proof that the incidence took place                                       |
| proof\_of\_ownership<mark style="color:red;">\*</mark>   | string | Image url with proof of vehicle ownership                                                |
| driving\_licence<mark style="color:red;">\*</mark>       | string | image url of driving licensce                                                            |
| details\_of\_incidence<mark style="color:red;">\*</mark> | string | Descriptive text about the details of the incident                                       |

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

```javascript
{
   "success":true,
   "response_message":"Third Party policy claim initiated successfully",
   "response_code":"",
   "data":{
      "result":"Third party claim 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/third_party_motor_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/MTP/06102022/53166",
    "proof_of_incidence": "https://example.com/image",
    "proof_of_ownership": "https://example.com/image",
    "driving_licence": "https://example.com/image",
    "details_of_incidence": "It was a dark and stormy night."
}',
  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/MTP/06102022/53166",
    "proof_of_incidence": "https://example.com/image",
    "proof_of_ownership": "https://example.com/image",
    "driving_licence": "https://example.com/image",
    "details_of_incidence": "It was a dark and stormy night."
});

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

```clike
curl --location --request POST https://sandbox.insurpass.com/api/merchant/third_party_motor_initiate_claim' \
--header 'Authorization: Bearer {{SECRETKEY}}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data-raw '{
    "policy_number": "UIC/RE/INP/MTP/06102022/53166",
    "proof_of_incidence": "https://example.com/image",
    "proof_of_ownership": "https://example.com/image",
    "driving_licence": "https://example.com/image",
    "details_of_incidence": "It was a dark and stormy night."
}'
```

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

## Third Party Motor Claim Details

## This endpoint  returns an object containing a single Third Party Motor claim .   &#x20;

<mark style="color:green;">`POST`</mark> `https://sandbox.insurpass.com /api/merchant/third_party_motor_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                                                                              |
| ------------------------------------------------ | ------ | ---------------------------------------------------------------------------------------- |
| policy\_number<mark style="color:red;">\*</mark> | String | The unique number that identifies the purchased  insurance policy - **INS1642236323569** |

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

```javascript
{
   "success":true,
   "response_message":"Data fetched successfully",
   "response_code":"",
   "data":{
      "status":false,
      "amount":null,
      "proof_of_ownership":"String",
      "proof_of_incidence":"string",
      "police_report":null,
      "details_of_incidence":"string",
      "driving_licence":"strinf",
      "created_at":"2022-04-04T07:44:14.000000Z",
      "updated_at":"2022-04-04T07:44:14.000000Z",
      "third_party_policy":{
         "frequency_type":"yearly",
         "vehicle_value":"35000",
         "vehicle_type":"required|string",
         "start_date":"2022-03-16T00:00:00.000000Z",
         "end_date":"2023-03-16T00:00:00.000000Z",
         "registration_no":"required|string",
         "vehicle_make":"required|string",
         "vehicle_model":"required|string",
         "year_make":"2002",
         "vehicle_color":"required|string",
         "chasis_no":"required|string",
         "engine_no":"required|string",
         "class_of_insurance":"required|string",
         "certificate_no":"required|string",
         "vehicle_front_side_image":"required|string",
         "vehicle_back_side_image":"required|string",
         "vehicle_left_side_image":"required|string",
         "vehicle_right_side_image":"required|string",
         "policy_number":"UIC/RE/INP/MTP/16032022/32398",
         "status":true,
         "created_at":"2022-03-16T08:33:38.000000Z",
         "updated_at":"2022-03-16T08:37:29.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/third_party_motor_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 =>'{
  "policy_number":"UIC/RE/INP/MTP/06102022/75835"
}',
  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/MTP/06102022/75835"
});

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

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

## **List All Third Party Motor Claims**

## This endpoint returns a list of all the Third Party claims objects.

<mark style="color:blue;">`GET`</mark> `https://sandbox.insurpass.com /api/merchant/third_party_motor_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":[
      {
         "status":false,
         "amount":null,
         "proof_of_ownership":"String",
         "proof_of_incidence":"string",
         "police_report":null,
         "details_of_incidence":"string",
         "driving_licence":"strinf",
         "created_at":"2022-04-04T07:44:14.000000Z",
         "updated_at":"2022-04-04T07:44:14.000000Z",
         "third_party_policy":{
            "policy_number":"UIC/RE/INP/MTP/16032022/32398"
         }
      }
   ]
}
```

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

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

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