# Policy management

## Endpoints

<table><thead><tr><th width="107">Method</th><th>Endpoint</th></tr></thead><tbody><tr><td><mark style="color:blue;">GET</mark></td><td><a href="#get-the-data-of-all-the-policies"><code>https://app.insurehero.io/api/shield/v1/policies</code></a></td></tr><tr><td><mark style="color:blue;">GET</mark></td><td><a href="#get-the-data-of-all-the-packages"><code>https://app.insurehero.io/api/shield/v1/packages</code></a></td></tr><tr><td><mark style="color:blue;">GET</mark></td><td><a href="#get-the-data-of-a-variant"><code>https://app.insurehero.io/api/shield/v1/variants/:variantId</code></a></td></tr><tr><td><mark style="color:blue;">GET</mark></td><td><a href="#get-the-data-of-all-the-variants"><code>https://app.insurehero.io/api/shield/v1/variants</code></a></td></tr><tr><td><mark style="color:blue;">GET</mark></td><td><a href="#get-the-data-of-a-coverage"><code>https://app.insurehero.io/api/shield/v1/coverages/:coverageId</code></a></td></tr><tr><td><mark style="color:blue;">GET</mark></td><td><a href="#get-the-data-of-all-the-coverages"><code>https://app.insurehero.io/api/shield/v1/coverages</code></a></td></tr></tbody></table>

### Get the data of all the policies

<mark style="color:blue;">`GET`</mark> `https://app.insurehero.io/api/shield/v1/policies`

#### Headers

<table><thead><tr><th>Name</th><th width="262">Type</th><th>Description</th></tr></thead><tbody><tr><td>Authorization<mark style="color:red;">*</mark></td><td>string</td><td>Bearer access token</td></tr></tbody></table>

#### Query Params

<table><thead><tr><th width="251">Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>holderId</td><td>string</td><td>Holder identifier</td></tr></tbody></table>

#### Example Response

Returns the policies associated with the given `holderId`.

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

```json
{
    "data": [
        {
            "id": "05f159b4-6f70-46ce-b2e7-1ab911fdddf2",
            "version": 3,
            "channel_id": "fc94d4a1-f834-481d-a6b2-138b823389c8",
            "holder_id": "d9a63a37-80a8-4963-b171-c0a92b90c44c",
            "uid": "testing_subscriptions",
            "max_rescission_window": null,
            "policy_number": "testing_subscriptions",
            "coverages": {
                "Gastos médicos por accidente": [
                    {
                        "id": "b3e3a1d8-954a-4c60-a0b9-b6f91f7c55cb",
                        "insurer": {},
                        "variant": {
                            "id": "b3e3a1d8-954a-4c60-a0b9-b6f91f7c55cb",
                            "name": "Gastos médicos por accidente hasta 1500",
                            "claim_schema": {}
                        }
                    }
                ]
            },
            "metadata": {},
            "attachments": [
                "https://bkrxyxqcthcbzmhwwzef.supabase.co/storage/v1/object/public/policies/fc94d4a1-f834-481d-a6b2-138b823389c8/testing_subscriptions/Screenshot%20from%202024-08-08%2011-00-48.jpg"
            ],
            "features": []
        }
    ]
}
```

{% endtab %}

{% tab title="400: Bad Request Request contains malformed data" %}

```json
{
    "error": "Request contains malformed data",
    "details": "Bad Request Request contains malformed data"
}
```

{% endtab %}

{% tab title="401: Unauthorized Invalid or expired access token" %}

```json
{
    "error": "Invalid or expired access token",
    "details": "Invalid access token"
}
```

{% endtab %}

{% tab title="402: Payment Required Pending payment" %}

```json
{
    "error": "Pending payment",
    "details": "Payment Required Pending payment"
}
```

{% endtab %}

{% tab title="422: Unprocessable Entity Internal validation failed" %}

```json
{
    "error": "Internal validation failed",
    "details": {
        "code": "22P02",
        "details": null,
        "hint": null,
        "message": "invalid input syntax for type uuid: \"806fb2cc-7283-4a9c-a19c-7e3e32ffe96ss\""
    }
}
```

{% endtab %}

{% tab title="429: Too Many Requests API rate limit" %}

```json
{
    "error": "API ratelimit exceeded",
    "details": "Too Many Requests API rate limit exceeded"
}{
```

{% endtab %}
{% endtabs %}

#### Attributes

<table><thead><tr><th width="233">Name</th><th width="98">Type</th><th>Description</th></tr></thead><tbody><tr><td>data</td><td>object</td><td>A list of policies associated with the request. Each item in the array represents a policy with its details.</td></tr><tr><td>id</td><td>uuid</td><td>Unique identifier of the policy.</td></tr><tr><td>version</td><td>number</td><td>Policy version number.</td></tr><tr><td>channel_id</td><td>uuid</td><td>Unique identifier of the channel associated with the policy.</td></tr><tr><td>holder_id</td><td>uuid</td><td>Unique identifier of the policyholder.</td></tr><tr><td>uid</td><td>string</td><td>Unique identifier assigned to the policy.</td></tr><tr><td>max_rescission_window</td><td>string</td><td>Maximum time window allowed for policy rescission.</td></tr><tr><td>policy_number</td><td>string</td><td>Policy number assigned to the contract.</td></tr><tr><td>coverages</td><td>object []</td><td>Details of the policy coverages.</td></tr><tr><td>metada</td><td>object []</td><td>Additional metadata related to the policy.</td></tr><tr><td>attachments</td><td>object []</td><td>List of files or documents attached to the policy.</td></tr><tr><td>features</td><td>object []</td><td>List of additional policy features.</td></tr></tbody></table>

### Get the data of all the packages

<mark style="color:blue;">`GET`</mark> `https://app.insurehero.io/api/shield/v1/packages`

#### Headers

<table><thead><tr><th>Name</th><th width="262">Type</th><th>Description</th></tr></thead><tbody><tr><td>Authorization<mark style="color:red;">*</mark></td><td>string</td><td>Bearer access token</td></tr></tbody></table>

#### Query Params

<table><thead><tr><th width="251">Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>from<mark style="color:red;">*</mark></td><td>number</td><td>The starting index of the records to retrieve (0-based).</td></tr><tr><td>to<mark style="color:red;">*</mark></td><td>number</td><td>The ending index of the records to retrieve (inclusive).</td></tr></tbody></table>

#### Example Response

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

```json
{
    "data": [
        {
            "id": "99865be6-e0fb-4432-84e4-ddb2475791e9",
            "name": "test",
            "description": "test",
            "channel_id": "fc94d4a1-f834-481d-a6b2-138b823389c8",
            "uid": "083f1c05-dc42-4dee-ae6f-7ae7f0ea7545",
            "pricing_rules":
            {
              "pricing_type": "one_time"
            }
        },
        {
            "id": "083f1c05-dc42-4dee-ae6f-7ae7f0ea7545",
            "name": "test",
            "description": "test",
            "channel_id": "fc94d4a1-f834-481d-a6b2-138b823389c8",
            "uid": "083f1c05-dc42-4dee-ae6f-7ae7f0ea7545",
            "pricing_rules": {
                "pricing_type": "recurring",
                "interval": "day",
                "interval_count": "2",
                "billing_cycle": "anniversary",
                "trial_period": "0"
            }
        }
    ]
}
```

{% endtab %}

{% tab title="400: Bad Request Request contains malformed data" %}

```json
{
    "error": "Request contains malformed data",
    "details": "Bad Request Request contains malformed data"
}
```

{% endtab %}

{% tab title="401: Unauthorized Invalid or expired access token" %}

```json
{
    "error": "Request contains malformed data",
    "details": "Bad Request Request contains malformed data"
}
```

{% endtab %}

{% tab title="402: Payment Required Pending payment" %}

```json
{
    "error": "Pending payment",
    "details": "Payment Required Pending payment"
}
```

{% endtab %}

{% tab title="422: Unprocessable Entity Internal validation failed" %}

```json
{
    "error": "Internal validation failed",
    "details": {
        "code": "22P02",
        "details": null,
        "hint": null,
        "message": "error"
    }
}
```

{% endtab %}

{% tab title="429: Too Many Requests API rate limit" %}

```json
{
    "error": "API ratelimit exceeded",
    "details": "Too Many Requests API rate limit exceeded"
}
```

{% endtab %}
{% endtabs %}

#### Attributes

<table><thead><tr><th width="154">Name</th><th width="106">Type</th><th>Description</th></tr></thead><tbody><tr><td>data</td><td>object</td><td>A list of policies associated with the request. Each item in the array represents a policy with its details</td></tr><tr><td>id</td><td>uuid</td><td>Unique identifier for the package.</td></tr><tr><td>name</td><td>string</td><td>Name of the package.</td></tr><tr><td>description</td><td>string</td><td>Short description of the package.</td></tr><tr><td>channel_id</td><td>uuid</td><td>Unique identifier of the channel this package belongs to.</td></tr><tr><td>uid</td><td>string</td><td>Unique identifier associated with the package.</td></tr><tr><td>pricing_rules</td><td>object</td><td>Object defining the pricing model for the package.</td></tr><tr><td>pricing_type</td><td>string</td><td>Defines how pricing is applied. Possible values: <code>one_time</code>, <code>recurring</code></td></tr><tr><td>interval</td><td>string</td><td>Specifies the frequency of billing. Possible values: <code>day</code>, <code>week</code>, <code>month</code>, <code>years</code></td></tr><tr><td>interval_count</td><td>string</td><td>Number of intervals between each billing cycle</td></tr></tbody></table>

### Get the data of a variant

<mark style="color:blue;">`GET`</mark> `https://app.insurehero.io/api/shield/v1/variants/:variantId`

#### Headers

| Name                                            | Type   | Description         |
| ----------------------------------------------- | ------ | ------------------- |
| Authorization<mark style="color:red;">\*</mark> | string | Bearer access token |

#### Path Parameters

<table><thead><tr><th width="251">Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>variantId<mark style="color:red;">*</mark></td><td>string</td><td>Variant identifier</td></tr></tbody></table>

#### Example Response

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

```json
{
    "data": {
        "id": "8622af2d-9035-491d-9c8b-ea1dd5c419e6",
        "name": "test app",
        "description": "Gastos médicos por accidente hasta 1,500 USD",
        "coverage_id": "3e4e703a-bc79-47e6-9782-6c616a578940",
        "channel_id": "fc94d4a1-f834-481d-a6b2-138b823389c8",
        "conditions": "The item has to break while transporting it",
        "exclusions": "The item was broken by spilling liquid on it.",
        "subject_schema": {
            "local": {
                "type": "string",
                "pattern": "",
                "required": true,
                "maxLength": "16",
                "minLength": "1"
            }
        },
        "claim_schema": {
            "name_of_the_book": {
                "type": "string",
                "pattern": "",
                "required": true,
                "maxLength": "160",
                "minLength": "1"
            },
            "place_where_it_get_broken": {
                "type": "string",
                "required": true,
                "maxLength": "200",
                "minLength": "1"
            }
        },
        "uid": "testapp"
    }
}

```

{% endtab %}

{% tab title="400: Bad Request Request contains malformed data" %}

```json
{
    "error": "Request contains malformed data",
    "details": "Bad Request Request contains malformed data"
}
```

{% endtab %}

{% tab title="401: Unauthorized Invalid or expired access token" %}

```json
{
    "error": "Request contains malformed data",
    "details": "Bad Request Request contains malformed data"
}
```

{% endtab %}

{% tab title="402: Payment Required Pending payment" %}

```json
{
    "error": "Pending payment",
    "details": "Payment Required Pending payment"
}
```

{% endtab %}

{% tab title="422: Unprocessable Entity Internal validation failed" %}

```json
{
    "error": "Internal validation failed",
    "details": {
        "code": "22P02",
        "details": null,
        "hint": null,
        "message": "error"
    }
}
```

{% endtab %}

{% tab title="429: Too Many Requests API rate limit" %}

```json
{
    "error": "API ratelimit exceeded",
    "details": "Too Many Requests API rate limit exceeded"
}
```

{% endtab %}

{% tab title="404: Not Found User not found" %}

```
{
    "error": "Resource not found",
    "details": ""
}
```

{% endtab %}
{% endtabs %}

#### Attributes

<table><thead><tr><th width="176">Name</th><th width="125">Type</th><th>Description</th></tr></thead><tbody><tr><td>data</td><td>object</td><td>Object containing the details of the variant.</td></tr><tr><td>id</td><td>uuid</td><td>Unique identifier for the variant.</td></tr><tr><td>name</td><td>string</td><td>Name of the variant.</td></tr><tr><td>description</td><td>string</td><td>Description of the variant.</td></tr><tr><td>coverage_id</td><td>uuid</td><td>Unique identifier of the coverage associated with this variant.</td></tr><tr><td>channel_id</td><td>uuid</td><td>Unique identifier of the channel where this variant is available.</td></tr><tr><td>conditions</td><td>string</td><td>Conditions that must be met for the insurance to be valid.</td></tr><tr><td>exclusions</td><td>string</td><td>Situations where the insurance coverage does not apply.</td></tr><tr><td>subject_schema</td><td>object</td><td>Schema defining the structure of the insured item.</td></tr><tr><td>claim_schema</td><td>object</td><td>Schema defining the structure of claims related to this variant.</td></tr><tr><td>uid</td><td>string</td><td>Unique identifier for the variant in a human-readable format.</td></tr><tr><td>type</td><td>string</td><td>Data type of the field.</td></tr><tr><td>pattern</td><td>string</td><td>Regular expression pattern that the value must match.</td></tr><tr><td>required</td><td>boolean</td><td>Indicates whether the field is mandatory.</td></tr><tr><td>maxLength</td><td>string</td><td>Maximum length allowed for the field.</td></tr><tr><td>minLength</td><td>string</td><td>Minimum length required for the field.</td></tr></tbody></table>

### Get the data of all the variants

<mark style="color:blue;">`GET`</mark> `https://app.insurehero.io/api/shield/v1/variants`

#### Headers

| Name                                            | Type   | Description         |
| ----------------------------------------------- | ------ | ------------------- |
| Authorization<mark style="color:red;">\*</mark> | string | Bearer access token |

**Query Params**

| Name                                   | Type   | Description           |
| -------------------------------------- | ------ | --------------------- |
| from<mark style="color:red;">\*</mark> | number | Starting record index |
| to<mark style="color:red;">\*</mark>   | number | Ending record index   |

#### Example Response

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

```json
{
    "data": [
        {
            "id": "7ce3714a-cb02-4fd2-9a88-de0888b8496b",
            "name": "Cancelación por cualquier razón - 100% - DEV",
            "description": "Crédito para cambio de pasaje.",
            "coverage_id": "e6bcf65d-aaae-4f10-b025-97cd010c341c",
            "channel_id": "fc94d4a1-f834-481d-a6b2-138b823389c8",
            "conditions": "Cancelación por cualquier razón hasta 30 minutos antes del viaje",
            "exclusions": "Cancelación del ticket en un tiempo menor a 30 minutos antes del viaje.",
            "subject_schema": {
                "ticket_id": {
                    "type": "string",
                    "pattern": "",
                    "required": true,
                    "maxLength": "500",
                    "minLength": "1"
                }
            },
            "claim_schema": {
                "local": {
                    "type": "string",
                    "pattern": "",
                    "required": false,
                    "maxLength": "500",
                    "minLength": 0
                }
            },
            "uid": "cfar_ensuro_ec_vamospasajes_100%_dev"
        },
        {
            "id": "2dd61510-daf3-4f5e-a741-a4e655adbd05",
            "name": "juan.londono@trade.ec 1",
            "description": "Crédito para cambio de pasaje.",
            "coverage_id": "3e4e703a-bc79-47e6-9782-6c616a578940",
            "channel_id": "fc94d4a1-f834-481d-a6b2-138b823389c8",
            "conditions": "se encuentre en la escuela",
            "exclusions": "se encuentre fuera de la escuela",
            "subject_schema": {
                "local": {
                    "type": "string",
                    "pattern": "",
                    "required": false,
                    "maxLength": "16",
                    "minLength": "1"
                },
                "value": {
                    "type": "number",
                    "maximum": "20000",
                    "minimum": "1000",
                    "required": false
                }
            },
            "claim_schema": {
                "local": {
                    "type": "string",
                    "pattern": "",
                    "required": true,
                    "maxLength": "16",
                    "minLength": "1"
                }
            },
            "uid": "variantjuanbasic"
        }
    ]
}

```

{% endtab %}

{% tab title="400: Bad Request Request contains malformed data" %}

{% endtab %}

{% tab title="401: Unauthorized Invalid or expired access token" %}

```json
{
    "error": "Request contains malformed data",
    "details": "Bad Request Request contains malformed data"
}
```

{% endtab %}

{% tab title="402: Payment Required Pending payment" %}

```json
{
    "error": "Pending payment",
    "details": "Payment Required Pending payment"
}
```

{% endtab %}

{% tab title="422: Unprocessable Entity Internal validation failed" %}

```json
{
    "error": "Internal validation failed",
    "details": {
        "code": "22P02",
        "details": null,
        "hint": null,
        "message": "error"
    }
}
```

{% endtab %}

{% tab title="429: Too Many Requests API rate limit" %}

```json
{
    "error": "API ratelimit exceeded",
    "details": "Too Many Requests API rate limit exceeded"
}
```

{% endtab %}

{% tab title="404: Not Found User not found" %}

```
{
    "error": "Resource not found",
    "details": ""
}
```

{% endtab %}
{% endtabs %}

#### Attributes

<table><thead><tr><th width="174">Name</th><th width="153">Type</th><th>Description</th></tr></thead><tbody><tr><td>data</td><td>object []</td><td>Array containing multiple variants.</td></tr><tr><td>id</td><td>uuid</td><td>Unique identifier for the variant.</td></tr><tr><td>name</td><td>string</td><td>Name of the variant.</td></tr><tr><td>description</td><td>string</td><td>Description of the variant.</td></tr><tr><td>coverage_id</td><td>uuid</td><td>Unique identifier of the coverage associated with this variant.</td></tr><tr><td>channel_id</td><td>uuid</td><td>Unique identifier of the channel where this variant is available.</td></tr><tr><td>conditions</td><td>string</td><td>Conditions that must be met for the insurance to be valid.</td></tr><tr><td>exclusions</td><td>string</td><td>Situations where the insurance coverage does not apply.</td></tr><tr><td>subject_schema</td><td>object</td><td>Schema defining the structure of the insured item.</td></tr><tr><td>claim_schema</td><td>object</td><td>Schema defining the structure of claims related to this variant.</td></tr><tr><td>uid</td><td>string</td><td>Unique identifier for the variant in a human-readable format.</td></tr><tr><td>type</td><td>string</td><td>Data type of the field.</td></tr><tr><td>pattern</td><td>string</td><td>Regular expression pattern that the value must match.</td></tr><tr><td>required</td><td>boolean</td><td>Indicates whether the field is mandatory.</td></tr><tr><td>maxLength</td><td>string</td><td>Maximum length allowed for the field.</td></tr><tr><td>minLength</td><td>string</td><td>Minimum length required for the field.</td></tr></tbody></table>

### Get the data of a coverage

<mark style="color:blue;">`GET`</mark> `https://app.insurehero.io/api/shield/v1/coverages/:coverageId`

#### Headers

| Name                                            | Type   | Description         |
| ----------------------------------------------- | ------ | ------------------- |
| Authorization<mark style="color:red;">\*</mark> | string | Bearer access token |

#### Path Parameters

| Name                                         | Type   | Description         |
| -------------------------------------------- | ------ | ------------------- |
| coverageId<mark style="color:red;">\*</mark> | string | Coverage identifier |

#### Example Response

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

```json
{
    "data": {
            "id": "12345678-90ab-cdef-1234-567890abcdef",
            "channel_id": "fc94d4a1-f834-481d-a6b2-138b823389c8",
            "name": "Sample Property Insurance",
            "type": "Property Insurance",
            "description": "Sample description for Property Insurance",
            "insurer_coverage_number": "ABC123",
            "insurer_id": "98765432-10ab-cdef-9876-543210abcdef",
            "country_id": "87654321-bcde-fghi-8765-432109876543",
            "uid": "COVERAGEUID"
        }
}

```

{% endtab %}

{% tab title="400: Bad Request Request contains malformed data" %}

```json
{
    "error": "Request contains malformed data",
    "details": "Bad Request Request contains malformed data"
}
```

{% endtab %}

{% tab title="401: Unauthorized Invalid or expired access token" %}

```json
{
    "error": "Request contains malformed data",
    "details": "Bad Request Request contains malformed data"
}
```

{% endtab %}

{% tab title="402: Payment Required Pending payment" %}

```json
{
    "error": "Pending payment",
    "details": "Payment Required Pending payment"
}
```

{% endtab %}

{% tab title="422: Unprocessable Entity Internal validation failed" %}

```json
{
    "error": "Internal validation failed",
    "details": {
        "code": "22P02",
        "details": null,
        "hint": null,
        "message": "error"
    }
}
```

{% endtab %}

{% tab title="429: Too Many Requests API rate limit" %}

```json
{
    "error": "API ratelimit exceeded",
    "details": "Too Many Requests API rate limit exceeded"
}
```

{% endtab %}

{% tab title="404: Not Found User not found" %}

```
{
    "error": "Resource not found",
    "details": ""
}
```

{% endtab %}
{% endtabs %}

#### Attributes

<table><thead><tr><th width="241">Name</th><th width="126">Type</th><th>Description</th></tr></thead><tbody><tr><td>data</td><td>object</td><td>Object containing the coverage details.</td></tr><tr><td>id</td><td>uuid</td><td>Unique identifier for the coverage.</td></tr><tr><td>channel_id</td><td>uuid</td><td>Unique identifier for the channel associated with the coverage.</td></tr><tr><td>name</td><td>string</td><td>Name of the coverage.</td></tr><tr><td>type</td><td>string</td><td>Type of insurance coverage.</td></tr><tr><td>description</td><td>string</td><td>Description of the insurance coverage.</td></tr><tr><td>insurer_coverage_number</td><td>string</td><td>Unique coverage number assigned by the insurer.</td></tr><tr><td>insurer_id</td><td>uuid</td><td>Unique identifier of the insurer.</td></tr><tr><td>country_id</td><td>uuid</td><td>Unique identifier of the country.</td></tr><tr><td>uid</td><td>string</td><td>Unique identifier for this coverage within the system.</td></tr></tbody></table>

### Get the data of all the coverages

<mark style="color:blue;">`GET`</mark> `https://app.insurehero.io/api/shield/v1/coverages`

#### Headers

| Name                                            | Type   | Description         |
| ----------------------------------------------- | ------ | ------------------- |
| Authorization<mark style="color:red;">\*</mark> | string | Bearer access token |

**Query Params**

<table><thead><tr><th width="249">Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>from<mark style="color:red;">*</mark></td><td>number</td><td>Starting record index</td></tr><tr><td>to<mark style="color:red;">*</mark></td><td>number</td><td>Ending record index</td></tr></tbody></table>

#### Example Response

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

```json
{
    "data": [
        {
            "id": "12345678-90ab-cdef-1234-567890abcdef",
            "channel_id": "fc94d4a1-f834-481d-a6b2-138b823389c8",
            "name": "Sample Property Insurance",
            "type": "Property Insurance",
            "description": "Sample description for Property Insurance",
            "insurer_coverage_number": "ABC123",
            "insurer_id": "98765432-10ab-cdef-9876-543210abcdef",
            "country_id": "87654321-bcde-fghi-8765-432109876543",
            "uid": "COVERAGEUID"
        },
        {
            "id": "87654321-bcde-fghi-8765-432109876543",
            "channel_id": "fc94d4a1-f834-481d-a6b2-138b823389c8",
            "name": "Sample Auto Insurance",
            "type": "Auto Insurance",
            "description": "Sample description for Auto Insurance",
            "insurer_coverage_number": "AUTO567",
            "insurer_id": "12345678-90ab-cdef-1234-567890abcdef",
            "country_id": "87654321-bcde-fghi-8765-432109876543",
            "uid": "COVERAGEUID"
        }
    ]
}

```

{% endtab %}

{% tab title="400: Bad Request Request contains malformed data" %}

```json
{
    "error": "Request contains malformed data",
    "details": "Bad Request Request contains malformed data"
}
```

{% endtab %}

{% tab title="401: Unauthorized Invalid or expired access token" %}

```json
{
    "error": "Request contains malformed data",
    "details": "Bad Request Request contains malformed data"
}
```

{% endtab %}

{% tab title="402: Payment Required Pending payment" %}

```json
{
    "error": "Pending payment",
    "details": "Payment Required Pending payment"
}
```

{% endtab %}

{% tab title="422: Unprocessable Entity Internal validation failed" %}

```json
{
    "error": "Internal validation failed",
    "details": {
        "code": "22P02",
        "details": null,
        "hint": null,
        "message": "error"
    }
}
```

{% endtab %}

{% tab title="429: Too Many Requests API rate limit" %}

```json
{
    "error": "API ratelimit exceeded",
    "details": "Too Many Requests API rate limit exceeded"
}
```

{% endtab %}

{% tab title="404: Not Found User not found" %}

```
{
    "error": "Resource not found",
    "details": ""
}
```

{% endtab %}
{% endtabs %}

| Name                      | Type       | Description                                                     |
| ------------------------- | ---------- | --------------------------------------------------------------- |
| data                      | object \[] | Array containing multiple coverages.                            |
| id                        | uuid       | Unique identifier for the coverage.                             |
| channel\_id               | uuid       | Unique identifier for the channel associated with the coverage. |
| name                      | string     | Name of the coverage.                                           |
| type                      | string     | Type of insurance coverage.                                     |
| description               | string     | Description of the insurance coverage.                          |
| insurer\_coverage\_number | string     | Unique coverage number assigned by the insurer.                 |
| insurer\_id               | uuid       | Unique identifier of the insurer.                               |
| country\_id               | uuid       | Unique identifier of the country.                               |
| uid                       | string     | Unique identifier for this coverage within the system.          |
