> For the complete documentation index, see [llms.txt](https://docs.insurehero.io/shield-api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.insurehero.io/shield-api/policies/policy-management.md).

# 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-a-policy"><code>https://app.insurehero.io/api/shield/v1/policies/:policyNumber</code></a></td></tr><tr><td><mark style="color:blue;">GET</mark></td><td><a href="#get-the-subject-schema-of-a-policy"><code>https://app.insurehero.io/api/shield/v1/policies/:policyNumber/subject-schema</code></a></td></tr><tr><td><mark style="color:blue;">GET</mark></td><td><a href="#get-the-versions-of-a-policy"><code>https://app.insurehero.io/api/shield/v1/policies/:policyNumber/versions</code></a></td></tr><tr><td><mark style="color:blue;">GET</mark></td><td><a href="#get-a-specific-version-of-a-policy"><code>https://app.insurehero.io/api/shield/v1/policies/:policyNumber/versions/:versionNumber</code></a></td></tr><tr><td><mark style="color:blue;">GET</mark></td><td><a href="#get-the-data-of-all-the-products"><code>https://app.insurehero.io/api/shield/v1/products</code></a></td></tr><tr><td><mark style="color:blue;">GET</mark></td><td><a href="#get-the-data-of-a-package"><code>https://app.insurehero.io/api/shield/v1/packages/:packageId</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>

All error responses use the `{ "error": string, "details": any }` envelope. The examples on this page show the most common cases for each endpoint; see [Error Handling](https://docs.insurehero.io/shield-api/data-dictionary#error-handling) for the general format, including unexpected internal errors, which return `422` with an `event_id` you can share with support.

### 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>uuid</td><td>Holder identifier. Returns only the policies of this holder.</td></tr><tr><td>id</td><td>uuid</td><td>Policy identifier. Returns only the policy with this id.</td></tr></tbody></table>

#### Example Response

Returns the policies of your channel. Use `holderId` or `id` to filter the result; without filters, all the policies of the channel are returned.

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

```json
{
    "data": [
        {
            "id": "1e9f3bb7-5d6f-595f-a74e-be59d4728606",
            "version": 3,
            "channel_id": "0ccad1d6-18ee-5c17-a684-9f8fe203d7c1",
            "holder_id": "c4b53bc9-3cc6-501a-9d54-dbd25584d725",
            "uid": "POL-0001",
            "max_rescission_window": null,
            "policy_number": "PN-0001",
            "product": {
                "products_packages": [
                    {
                        "package_id": "202b251c-83bf-510e-ab51-5234d44b4b68"
                    }
                ]
            },
            "coverages": {
                "Accidental medical expenses": [
                    {
                        "id": "212ac5ba-ecdf-56fc-a6cb-2594dcf4f584",
                        "insurer": {},
                        "variant": {
                            "id": "7472519c-484c-5158-b6a0-ca8722f6d474",
                            "name": "Accidental medical expenses up to 1,500",
                            "claim_schema": {}
                        }
                    }
                ]
            },
            "subject_schema": {},
            "total_gross_price": "10.00",
            "metadata": {},
            "attachments": [
                "https://storage.example.com/policies/0ccad1d6-18ee-5c17-a684-9f8fe203d7c1/POL-0001/document.pdf"
            ],
            "features": [],
            "created_at": "2026-03-15T16:05:12.411+00:00",
            "updated_at": "2026-03-15T16:05:12.411+00:00",
            "deleted_at": null
        }
    ]
}
```

{% endtab %}

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

```json
{
    "error": "Request contains malformed data",
    "details": "Missing bearer token"
}
```

{% endtab %}

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

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

{% 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: \"72189828-01b6-58c8-b78e-06d5bf804163s\""
    }
}
```

{% 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 | null</td><td>Unique identifier assigned to the policy.</td></tr><tr><td>max_rescission_window</td><td>string | null</td><td>Maximum time window, in minutes from the creation of a risk item, allowed for its rescission. <code>null</code> when not configured.</td></tr><tr><td>policy_number</td><td>string</td><td>Policy number assigned to the contract.</td></tr><tr><td>product</td><td>object</td><td>Snapshot of the product (and its packages) taken when the policy version was created.</td></tr><tr><td>coverages</td><td>object</td><td>Details of the policy coverages, grouped by coverage name.</td></tr><tr><td>subject_schema</td><td>object</td><td>Schema of the insured subject for the policy.</td></tr><tr><td>total_gross_price</td><td>string</td><td>Total gross price of the policy.</td></tr><tr><td>metadata</td><td>object</td><td>Additional metadata related to the policy.</td></tr><tr><td>attachments</td><td>string []</td><td>List of URLs of the files or documents attached to the policy.</td></tr><tr><td>features</td><td>object []</td><td>List of additional policy features.</td></tr><tr><td>created_at</td><td>string</td><td>Date and time when the policy was created.</td></tr><tr><td>updated_at</td><td>string</td><td>Date and time when the policy was last updated.</td></tr><tr><td>deleted_at</td><td>string | null</td><td>Date and time when the policy was deleted, or <code>null</code>.</td></tr></tbody></table>

### Get the data of a policy

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

#### 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>

#### Path Parameters

<table><thead><tr><th width="251">Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>policyNumber<mark style="color:red;">*</mark></td><td>string</td><td>Policy number (<code>policy_number</code>) of the policy.</td></tr></tbody></table>

#### Example Response

Returns the current version of a policy of your channel. The response does not include `product`, `subject_schema`, `total_gross_price` or the dates of the policy; use [Get the subject schema of a policy](#get-the-subject-schema-of-a-policy) to get the schema of the insured subject.

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

```json
{
    "data": {
                "id": "1e9f3bb7-5d6f-595f-a74e-be59d4728606",
                "version": 3,
                "channel_id": "0ccad1d6-18ee-5c17-a684-9f8fe203d7c1",
                "holder_id": "c4b53bc9-3cc6-501a-9d54-dbd25584d725",
                "uid": "POL-0001",
                "max_rescission_window": "60",
                "policy_number": "PN-0001",
                "coverages": {
                    "Accidental medical expenses": [
                        {
                            "id": "212ac5ba-ecdf-56fc-a6cb-2594dcf4f584",
                            "insurer": {
                                "id": "94f9e6c6-0b50-5d44-af83-4a11195ba7bf",
                                "name": "Example Insurance Co."
                            },
                            "variant": {
                                "id": "7472519c-484c-5158-b6a0-ca8722f6d474",
                                "name": "Accidental medical expenses up to 1,500",
                                "claim_schema": {}
                            }
                        }
                    ]
                },
                "metadata": {},
                "attachments": [],
                "features": []
            }
}
```

{% endtab %}

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

```json
{
    "error": "Request contains malformed data",
    "details": "Missing bearer token"
}
```

{% endtab %}

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

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

{% endtab %}

{% tab title="422: Unprocessable Entity Internal validation failed" %}
The policy does not exist in your channel:

```json
{
    "error": "Internal validation failed",
    "details": {
        "code": "PGRST116",
        "details": "The result contains 0 rows",
        "hint": null,
        "message": "Cannot coerce the result to a single JSON object"
    }
}
```

{% 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>The policy.</td></tr><tr><td>id</td><td>uuid</td><td>Unique identifier of the policy version.</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 | null</td><td>Unique identifier assigned to the policy.</td></tr><tr><td>max_rescission_window</td><td>string | null</td><td>Maximum time window, in minutes from the creation of a risk item, allowed for its rescission. <code>null</code> when not configured.</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>Coverages of the policy, grouped by coverage name. Each item has the coverage <code>id</code>, its <code>insurer</code> (<code>id</code> and <code>name</code>) and its <code>variant</code> (<code>id</code>, <code>name</code> and <code>claim_schema</code>). Prices are not included.</td></tr><tr><td>metadata</td><td>object</td><td>Additional metadata related to the policy.</td></tr><tr><td>attachments</td><td>string [] | null</td><td>List of URLs of the files or documents attached to the policy.</td></tr><tr><td>features</td><td>object [] | null</td><td>List of additional policy features.</td></tr></tbody></table>

### Get the subject schema of a policy

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

#### 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>

#### Path Parameters

<table><thead><tr><th width="251">Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>policyNumber<mark style="color:red;">*</mark></td><td>string</td><td>Policy number (<code>policy_number</code>) of the policy.</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>packageName</td><td>string</td><td>Name of a package of the policy. At least 3 characters.</td></tr><tr><td>coverages</td><td>string</td><td>Coverage and variant, as <code>&#x3C;coverage name>:&#x3C;variant name></code>. At least 3 characters.</td></tr></tbody></table>

#### Example Response

Returns the fields of the insured subject (`insured_subject`) that the policy expects when you [add a risk item](/shield-api/policies/risk-item-management.md#add-a-risk-item-to-a-policy), keyed by field name.

When you send `packageName` and `coverages` together, the response contains the fields of that variant of the package, taken from the policy snapshot. If the package or the variant is not found, or the variant has no fields of its own, the response is the subject schema of the policy. A single parameter is ignored.

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

```json
{
    "data": {
        "first_name": {
            "type": "string",
            "required": true,
            "pattern": "",
            "minLength": "1",
            "maxLength": "255",
            "insurer": true
        },
        "last_name": {
            "type": "string",
            "required": true,
            "pattern": "",
            "minLength": "1",
            "maxLength": "255",
            "insurer": false
        },
        "document_number": {
            "type": "string",
            "required": true,
            "pattern": "^[0-9]+$",
            "minLength": "6",
            "maxLength": "20",
            "insurer": true
        }
    }
}
```

{% endtab %}

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

```json
{
    "error": "Request contains malformed data",
    "details": "Missing bearer token"
}
```

{% endtab %}

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

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

{% endtab %}

{% tab title="422: Unprocessable Entity Internal validation failed" %}
The policy does not exist in your channel:

```json
{
    "error": "Internal validation failed",
    "details": {
        "code": "PGRST116",
        "details": "The result contains 0 rows",
        "hint": null,
        "message": "Cannot coerce the result to a single JSON object"
    }
}
```

A `packageName` or `coverages` with fewer than 3 characters returns an input validation error. See [Error Handling](https://docs.insurehero.io/shield-api/data-dictionary#error-handling).
{% endtab %}
{% endtabs %}

#### Attributes

Each key of `data` is the name of a field of the insured subject. Its value describes the field:

<table><thead><tr><th width="233">Name</th><th width="98">Type</th><th>Description</th></tr></thead><tbody><tr><td>type</td><td>string</td><td>Type of the field, for example <code>string</code> or <code>number</code>.</td></tr><tr><td>required</td><td>boolean</td><td>Whether the field is required.</td></tr><tr><td>pattern</td><td>string</td><td>Regular expression the value must match. Empty when there is none.</td></tr><tr><td>minLength</td><td>string | number</td><td>Minimum length of the value.</td></tr><tr><td>maxLength</td><td>string | number</td><td>Maximum length of the value.</td></tr><tr><td>minimum</td><td>number</td><td>Minimum value, for numeric fields. Optional.</td></tr><tr><td>maximum</td><td>number</td><td>Maximum value, for numeric fields. Optional.</td></tr><tr><td>value</td><td>any</td><td>Fixed value of the field. Optional.</td></tr><tr><td>insurer</td><td>boolean</td><td>Whether the field is visible to the insurer. Optional.</td></tr></tbody></table>

### Get the versions of a policy

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

#### 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>

#### Path Parameters

<table><thead><tr><th width="251">Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>policyNumber<mark style="color:red;">*</mark></td><td>string</td><td>Policy number (<code>policy_number</code>) of the policy.</td></tr></tbody></table>

#### Example Response

Returns every version of a policy of your channel, in no particular order. A policy number that does not exist in your channel returns an empty list.

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

```json
{
    "data": [
        {
                "id": "fb114e33-734c-5d91-a3c9-0975dc038f4f",
                "version": 1,
                "channel_id": "0ccad1d6-18ee-5c17-a684-9f8fe203d7c1",
                "holder_id": "c4b53bc9-3cc6-501a-9d54-dbd25584d725",
                "uid": "POL-0001",
                "max_rescission_window": "60",
                "policy_number": "PN-0001",
                "coverages": {
                    "Accidental medical expenses": [
                        {
                            "id": "212ac5ba-ecdf-56fc-a6cb-2594dcf4f584",
                            "insurer": {
                                "id": "94f9e6c6-0b50-5d44-af83-4a11195ba7bf",
                                "name": "Example Insurance Co."
                            },
                            "variant": {
                                "id": "7472519c-484c-5158-b6a0-ca8722f6d474",
                                "name": "Accidental medical expenses up to 1,500",
                                "claim_schema": {}
                            }
                        }
                    ]
                },
                "metadata": {},
                "attachments": [],
                "features": []
            },
        {
                "id": "1e9f3bb7-5d6f-595f-a74e-be59d4728606",
                "version": 3,
                "channel_id": "0ccad1d6-18ee-5c17-a684-9f8fe203d7c1",
                "holder_id": "c4b53bc9-3cc6-501a-9d54-dbd25584d725",
                "uid": "POL-0001",
                "max_rescission_window": "60",
                "policy_number": "PN-0001",
                "coverages": {
                    "Accidental medical expenses": [
                        {
                            "id": "212ac5ba-ecdf-56fc-a6cb-2594dcf4f584",
                            "insurer": {
                                "id": "94f9e6c6-0b50-5d44-af83-4a11195ba7bf",
                                "name": "Example Insurance Co."
                            },
                            "variant": {
                                "id": "7472519c-484c-5158-b6a0-ca8722f6d474",
                                "name": "Accidental medical expenses up to 1,500",
                                "claim_schema": {}
                            }
                        }
                    ]
                },
                "metadata": {},
                "attachments": [],
                "features": []
            }
    ]
}
```

{% endtab %}

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

```json
{
    "error": "Request contains malformed data",
    "details": "Missing bearer token"
}
```

{% endtab %}

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

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

{% endtab %}

{% tab title="422: Unprocessable Entity Internal validation failed" %}
Internal error. See [Error Handling](https://docs.insurehero.io/shield-api/data-dictionary#error-handling).
{% 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>The versions of the policy. Each item has the following fields.</td></tr><tr><td>id</td><td>uuid</td><td>Unique identifier of the policy version.</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 | null</td><td>Unique identifier assigned to the policy.</td></tr><tr><td>max_rescission_window</td><td>string | null</td><td>Maximum time window, in minutes from the creation of a risk item, allowed for its rescission. <code>null</code> when not configured.</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>Coverages of the policy, grouped by coverage name. Each item has the coverage <code>id</code>, its <code>insurer</code> (<code>id</code> and <code>name</code>) and its <code>variant</code> (<code>id</code>, <code>name</code> and <code>claim_schema</code>). Prices are not included.</td></tr><tr><td>metadata</td><td>object</td><td>Additional metadata related to the policy.</td></tr><tr><td>attachments</td><td>string [] | null</td><td>List of URLs of the files or documents attached to the policy.</td></tr><tr><td>features</td><td>object [] | null</td><td>List of additional policy features.</td></tr></tbody></table>

### Get a specific version of a policy

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

#### 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>

#### Path Parameters

<table><thead><tr><th width="251">Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>policyNumber<mark style="color:red;">*</mark></td><td>string</td><td>Policy number (<code>policy_number</code>) of the policy.</td></tr><tr><td>versionNumber<mark style="color:red;">*</mark></td><td>number</td><td>Version number of the policy.</td></tr></tbody></table>

#### Example Response

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

```json
{
    "data": {
                "id": "1e9f3bb7-5d6f-595f-a74e-be59d4728606",
                "version": 3,
                "channel_id": "0ccad1d6-18ee-5c17-a684-9f8fe203d7c1",
                "holder_id": "c4b53bc9-3cc6-501a-9d54-dbd25584d725",
                "uid": "POL-0001",
                "max_rescission_window": "60",
                "policy_number": "PN-0001",
                "coverages": {
                    "Accidental medical expenses": [
                        {
                            "id": "212ac5ba-ecdf-56fc-a6cb-2594dcf4f584",
                            "insurer": {
                                "id": "94f9e6c6-0b50-5d44-af83-4a11195ba7bf",
                                "name": "Example Insurance Co."
                            },
                            "variant": {
                                "id": "7472519c-484c-5158-b6a0-ca8722f6d474",
                                "name": "Accidental medical expenses up to 1,500",
                                "claim_schema": {}
                            }
                        }
                    ]
                },
                "metadata": {},
                "attachments": [],
                "features": []
            }
}
```

{% endtab %}

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

```json
{
    "error": "Request contains malformed data",
    "details": "Missing bearer token"
}
```

{% endtab %}

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

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

{% endtab %}

{% tab title="422: Unprocessable Entity Internal validation failed" %}
The version does not exist for that policy in your channel:

```json
{
    "error": "Internal validation failed",
    "details": {
        "code": "PGRST116",
        "details": "The result contains 0 rows",
        "hint": null,
        "message": "Cannot coerce the result to a single JSON object"
    }
}
```

A `versionNumber` that is not a number returns the database error `22P02` (`invalid input syntax for type smallint`) in `details`.
{% 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>The policy version.</td></tr><tr><td>id</td><td>uuid</td><td>Unique identifier of the policy version.</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 | null</td><td>Unique identifier assigned to the policy.</td></tr><tr><td>max_rescission_window</td><td>string | null</td><td>Maximum time window, in minutes from the creation of a risk item, allowed for its rescission. <code>null</code> when not configured.</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>Coverages of the policy, grouped by coverage name. Each item has the coverage <code>id</code>, its <code>insurer</code> (<code>id</code> and <code>name</code>) and its <code>variant</code> (<code>id</code>, <code>name</code> and <code>claim_schema</code>). Prices are not included.</td></tr><tr><td>metadata</td><td>object</td><td>Additional metadata related to the policy.</td></tr><tr><td>attachments</td><td>string [] | null</td><td>List of URLs of the files or documents attached to the policy.</td></tr><tr><td>features</td><td>object [] | null</td><td>List of additional policy features.</td></tr></tbody></table>

### Get the data of all the products

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

#### 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>Starting record index (0-based).</td></tr><tr><td>to<mark style="color:red;">*</mark></td><td>number</td><td>Ending record index (inclusive). It cannot be lower than <code>from</code>, and the range cannot exceed 100 records.</td></tr></tbody></table>

#### Example Response

Returns the products of your channel. A product groups the packages that a policy offers; the packages of each policy are in the `product` snapshot returned by [Get the data of all the policies](#get-the-data-of-all-the-policies).

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

```json
{
    "data": [
        {
            "id": "de755bd6-a8fd-5b0f-89b7-0407cc89ffcc",
            "channel_id": "0ccad1d6-18ee-5c17-a684-9f8fe203d7c1",
            "code": "Basic product",
            "overrides": {},
            "features": {},
            "lifecycle": {},
            "pricing": {}
        }
    ]
}
```

{% endtab %}

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

```json
{
    "error": "Request contains malformed data",
    "details": "Missing bearer token"
}
```

{% endtab %}

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

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

{% endtab %}

{% tab title="422: Unprocessable Entity Internal validation failed" %}
Without `from` and `to`:

```json
{
    "error": "Internal validation failed",
    "details": {
        "issues": [
            {
                "code": "invalid_type",
                "expected": "number",
                "received": "nan",
                "path": ["searchParams", "from"],
                "message": "Expected number, received nan"
            },
            {
                "code": "invalid_type",
                "expected": "number",
                "received": "nan",
                "path": ["searchParams", "to"],
                "message": "Expected number, received nan"
            }
        ],
        "name": "ZodError"
    }
}
```

{% 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>List of products.</td></tr><tr><td>id</td><td>uuid</td><td>Unique identifier of the product.</td></tr><tr><td>channel_id</td><td>uuid</td><td>Identifier of the channel of the product.</td></tr><tr><td>code</td><td>string</td><td>Code or name of the product.</td></tr><tr><td>overrides</td><td>any</td><td>Configuration overrides of the product.</td></tr><tr><td>features</td><td>any</td><td>Features of the product.</td></tr><tr><td>lifecycle</td><td>any</td><td>Lifecycle configuration of the product.</td></tr><tr><td>pricing</td><td>any</td><td>Pricing configuration of the product.</td></tr><tr><td>subject_schema</td><td>any</td><td>Schema of the insured subject. Optional.</td></tr><tr><td>claim_schema</td><td>any</td><td>Schema of the claims. Optional.</td></tr></tbody></table>

### Get the data of a package

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

#### Headers

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

#### Path Parameters

| Name                                        | Type   | Description                                        |
| ------------------------------------------- | ------ | -------------------------------------------------- |
| packageId<mark style="color:red;">\*</mark> | string | Package identifier (`id` by default, or its `uid`) |

#### Query Params

| Name     | Type   | Description                                                                                   |
| -------- | ------ | --------------------------------------------------------------------------------------------- |
| searchBy | string | Field used to find the package: `id` (default) or `uid`. Use `?searchBy=uid` to send the uid. |

#### Example Response

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

```json
{
    "data": {
        "id": "202b251c-83bf-510e-ab51-5234d44b4b68",
        "channel_id": "0ccad1d6-18ee-5c17-a684-9f8fe203d7c1",
        "category_id": "1b3c3cbc-632d-51f6-b10c-356824c41ac7",
        "name": "Basic plan",
        "description": "Personal accident package",
        "uid": "PKG-BASIC",
        "pricing_rules": {
            "pricing_type": "one_time"
        },
        "sales_integration_slug": null,
        "post_sales_integration_slug": null,
        "sales_integration_variant": null,
        "created_at": "2026-03-01T15:41:13.708+00:00",
        "updated_at": "2026-03-01T15:41:13.708+00:00",
        "deleted_at": null
    }
}
```

{% endtab %}

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

```json
{
    "error": "Request contains malformed data",
    "details": "Missing bearer token"
}
```

{% endtab %}

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

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

{% endtab %}

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

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

{% endtab %}

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

```json
{
    "error": "Internal validation failed",
    "details": {
        "issues": [
            {
                "code": "invalid_union",
                "unionErrors": [
                    {
                        "issues": [
                            {
                                "received": "name",
                                "code": "invalid_literal",
                                "expected": "id",
                                "path": ["searchParams", "searchBy"],
                                "message": "Invalid literal value, expected \"id\""
                            }
                        ],
                        "name": "ZodError"
                    },
                    {
                        "issues": [
                            {
                                "received": "name",
                                "code": "invalid_literal",
                                "expected": "uid",
                                "path": ["searchParams", "searchBy"],
                                "message": "Invalid literal value, expected \"uid\""
                            }
                        ],
                        "name": "ZodError"
                    }
                ],
                "path": ["searchParams", "searchBy"],
                "message": "Invalid input"
            }
        ],
        "name": "ZodError"
    }
}
```

{% endtab %}
{% endtabs %}

#### Attributes

<table><thead><tr><th width="250">Name</th><th width="120">Type</th><th>Description</th></tr></thead><tbody><tr><td>data</td><td>object</td><td>Object containing the details of the package.</td></tr><tr><td>id</td><td>uuid</td><td>Unique identifier for 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>category_id</td><td>uuid</td><td>Unique identifier of the package category.</td></tr><tr><td>name</td><td>string</td><td>Name of the package.</td></tr><tr><td>description</td><td>string | null</td><td>Short description of the package.</td></tr><tr><td>uid</td><td>string | null</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. See the fields in <a href="#get-the-data-of-all-the-packages">Get the data of all the packages</a>.</td></tr><tr><td>sales_integration_slug</td><td>string | null</td><td>Sales integration configured for the package.</td></tr><tr><td>post_sales_integration_slug</td><td>string | null</td><td>Post-sales integration configured for the package.</td></tr><tr><td>sales_integration_variant</td><td>string | null</td><td>Variant of the sales integration.</td></tr><tr><td>created_at</td><td>string</td><td>Date and time when the package was created.</td></tr><tr><td>updated_at</td><td>string</td><td>Date and time when the package was last updated.</td></tr><tr><td>deleted_at</td><td>string | null</td><td>Date and time when the package was deleted, or <code>null</code>.</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). Must be greater than <code>from</code>, and the range cannot exceed 100 records.</td></tr></tbody></table>

#### Example Response

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

```json
{
    "data": [
        {
            "id": "202b251c-83bf-510e-ab51-5234d44b4b68",
            "channel_id": "0ccad1d6-18ee-5c17-a684-9f8fe203d7c1",
            "category_id": "1b3c3cbc-632d-51f6-b10c-356824c41ac7",
            "name": "Basic plan",
            "description": "Personal accident package",
            "uid": "PKG-BASIC",
            "pricing_rules": {
                "pricing_type": "one_time"
            },
            "sales_integration_slug": null,
            "post_sales_integration_slug": null,
            "sales_integration_variant": null,
            "created_at": "2026-03-01T15:41:13.708+00:00",
            "updated_at": "2026-03-01T15:41:13.708+00:00",
            "deleted_at": null
        },
        {
            "id": "7353e326-7666-5e9d-a48c-b6d6b43a1cfc",
            "channel_id": "0ccad1d6-18ee-5c17-a684-9f8fe203d7c1",
            "category_id": "1b3c3cbc-632d-51f6-b10c-356824c41ac7",
            "name": "Recurring plan",
            "description": "Personal accident package with recurring billing",
            "uid": "PKG-RECURRING",
            "pricing_rules": {
                "pricing_type": "recurring",
                "interval": "day",
                "interval_count": "2",
                "billing_cycle": "anniversary",
                "trial_period": "0"
            },
            "sales_integration_slug": null,
            "post_sales_integration_slug": null,
            "sales_integration_variant": null,
            "created_at": "2026-03-01T17:49:29.137+00:00",
            "updated_at": "2026-03-01T17:49:29.137+00:00",
            "deleted_at": null
        }
    ]
}
```

{% endtab %}

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

```json
{
    "error": "Request contains malformed data",
    "details": "Missing bearer token"
}
```

{% endtab %}

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

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

{% endtab %}

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

```json
{
    "error": "Internal validation failed",
    "details": {
        "issues": [
            {
                "code": "invalid_type",
                "expected": "number",
                "received": "nan",
                "path": ["searchParams", "from"],
                "message": "Expected number, received nan"
            },
            {
                "code": "invalid_type",
                "expected": "number",
                "received": "nan",
                "path": ["searchParams", "to"],
                "message": "Expected number, received nan"
            }
        ],
        "name": "ZodError"
    }
}
```

{% 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 packages associated with the request. Each item in the array represents a package with its details.</td></tr><tr><td>id</td><td>uuid</td><td>Unique identifier for 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>category_id</td><td>uuid</td><td>Unique identifier of the package category.</td></tr><tr><td>name</td><td>string</td><td>Name of the package.</td></tr><tr><td>description</td><td>string | null</td><td>Short description of the package.</td></tr><tr><td>uid</td><td>string | null</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>year</code></td></tr><tr><td>interval_count</td><td>string</td><td>Number of intervals between each billing cycle</td></tr><tr><td>billing_cycle</td><td>string</td><td>When the payment is charged. Possible values: <code>start_of_month</code>, <code>end_of_month</code>, <code>anniversary</code></td></tr><tr><td>grace_period</td><td>string</td><td>Grace period configured for the package.</td></tr><tr><td>trial_period</td><td>string</td><td>Trial period configured for the package.</td></tr><tr><td>sales_integration_slug</td><td>string | null</td><td>Sales integration configured for the package.</td></tr><tr><td>post_sales_integration_slug</td><td>string | null</td><td>Post-sales integration configured for the package.</td></tr><tr><td>sales_integration_variant</td><td>string | null</td><td>Variant of the sales integration.</td></tr><tr><td>created_at</td><td>string</td><td>Date and time when the package was created.</td></tr><tr><td>updated_at</td><td>string</td><td>Date and time when the package was last updated.</td></tr><tr><td>deleted_at</td><td>string | null</td><td>Date and time when the package was deleted, or <code>null</code>.</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 (<code>id</code> by default, or its <code>uid</code>)</td></tr></tbody></table>

#### Query Params

| Name     | Type   | Description                                                                                   |
| -------- | ------ | --------------------------------------------------------------------------------------------- |
| searchBy | string | Field used to find the variant: `id` (default) or `uid`. Use `?searchBy=uid` to send the uid. |

#### Example Response

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

```json
{
    "data": {
        "id": "03c2528e-aae0-5bdd-91d9-bc76f6d92981",
        "name": "Gold plan",
        "description": "Accidental damage during transport up to 1,500 USD",
        "coverage_id": "3c980a4b-2e2d-572a-b852-587724ff563a",
        "channel_id": "0ccad1d6-18ee-5c17-a684-9f8fe203d7c1",
        "net_price": "10.00",
        "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": "VAR-GOLD"
    }
}

```

{% endtab %}

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

```json
{
    "error": "Request contains malformed data",
    "details": "Missing bearer token"
}
```

{% endtab %}

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

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

{% endtab %}

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

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

{% endtab %}

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

```json
{
    "error": "Internal validation failed",
    "details": {
        "issues": [
            {
                "code": "invalid_union",
                "unionErrors": [
                    {
                        "issues": [
                            {
                                "received": "name",
                                "code": "invalid_literal",
                                "expected": "id",
                                "path": ["searchParams", "searchBy"],
                                "message": "Invalid literal value, expected \"id\""
                            }
                        ],
                        "name": "ZodError"
                    },
                    {
                        "issues": [
                            {
                                "received": "name",
                                "code": "invalid_literal",
                                "expected": "uid",
                                "path": ["searchParams", "searchBy"],
                                "message": "Invalid literal value, expected \"uid\""
                            }
                        ],
                        "name": "ZodError"
                    }
                ],
                "path": ["searchParams", "searchBy"],
                "message": "Invalid input"
            }
        ],
        "name": "ZodError"
    }
}
```

{% 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 | null</td><td>Description of the variant.</td></tr><tr><td>coverage_id</td><td>uuid | null</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>net_price</td><td>string | null</td><td>Net price configured for the variant.</td></tr><tr><td>conditions</td><td>string | null</td><td>Conditions that must be met for the insurance to be valid.</td></tr><tr><td>exclusions</td><td>string | null</td><td>Situations where the insurance coverage does not apply.</td></tr><tr><td>subject_schema</td><td>object | null</td><td>Schema defining the structure of the insured item.</td></tr><tr><td>claim_schema</td><td>object | null</td><td>Schema defining the structure of claims related to this variant.</td></tr><tr><td>uid</td><td>string | null</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 (0-based)                                                                   |
| to<mark style="color:red;">\*</mark>   | number | Ending record index (inclusive). Must be greater than `from`; the range cannot exceed 100 records |

#### Example Response

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

```json
{
    "data": [
        {
            "id": "10089766-1bed-52ce-83f5-24a9227af5b7",
            "name": "Cancel for any reason - 100%",
            "description": "Credit to change the ticket.",
            "coverage_id": "6e0c9b26-c503-54b1-8d64-06b3619f7b43",
            "channel_id": "0ccad1d6-18ee-5c17-a684-9f8fe203d7c1",
            "net_price": null,
            "conditions": "Cancellation for any reason up to 30 minutes before the trip",
            "exclusions": "Ticket cancelled less than 30 minutes before the trip.",
            "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": "VAR-CFAR-100"
        },
        {
            "id": "90209e04-c3a8-5ffb-9bf8-9be3bac1fa2b",
            "name": "Silver plan",
            "description": "Accident coverage at school.",
            "coverage_id": "3c980a4b-2e2d-572a-b852-587724ff563a",
            "channel_id": "0ccad1d6-18ee-5c17-a684-9f8fe203d7c1",
            "net_price": "10.00",
            "conditions": "The insured is at school",
            "exclusions": "The insured is outside the school",
            "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": "VAR-SILVER"
        }
    ]
}

```

{% endtab %}

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

```json
{
    "error": "Request contains malformed data",
    "details": "Missing bearer token"
}
```

{% endtab %}

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

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

{% endtab %}

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

```json
{
    "error": "Internal validation failed",
    "details": {
        "issues": [
            {
                "code": "invalid_type",
                "expected": "number",
                "received": "nan",
                "path": ["searchParams", "from"],
                "message": "Expected number, received nan"
            },
            {
                "code": "invalid_type",
                "expected": "number",
                "received": "nan",
                "path": ["searchParams", "to"],
                "message": "Expected number, received nan"
            }
        ],
        "name": "ZodError"
    }
}
```

{% 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 | null</td><td>Description of the variant.</td></tr><tr><td>coverage_id</td><td>uuid | null</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>net_price</td><td>string | null</td><td>Net price configured for the variant.</td></tr><tr><td>conditions</td><td>string | null</td><td>Conditions that must be met for the insurance to be valid.</td></tr><tr><td>exclusions</td><td>string | null</td><td>Situations where the insurance coverage does not apply.</td></tr><tr><td>subject_schema</td><td>object | null</td><td>Schema defining the structure of the insured item.</td></tr><tr><td>claim_schema</td><td>object | null</td><td>Schema defining the structure of claims related to this variant.</td></tr><tr><td>uid</td><td>string | null</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 (`id` by default, or its `uid`) |

#### Query Params

| Name     | Type   | Description                                                                                    |
| -------- | ------ | ---------------------------------------------------------------------------------------------- |
| searchBy | string | Field used to find the coverage: `id` (default) or `uid`. Use `?searchBy=uid` to send the uid. |

#### Example Response

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

```json
{
    "data": {
            "id": "d5442c20-0197-5e6c-a781-47ec0daad4bc",
            "channel_id": "0ccad1d6-18ee-5c17-a684-9f8fe203d7c1",
            "name": "Property damage",
            "type": "Property Insurance",
            "description": "Damage to the insured property",
            "insurer_coverage_number": "INS-PROP-0001",
            "insurer_id": "94f9e6c6-0b50-5d44-af83-4a11195ba7bf",
            "country_id": "aac70d23-4456-5724-814f-d1a6bbb38ebc",
            "uid": "COV-PROPERTY"
        }
}

```

{% endtab %}

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

```json
{
    "error": "Request contains malformed data",
    "details": "Missing bearer token"
}
```

{% endtab %}

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

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

{% endtab %}

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

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

{% endtab %}

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

```json
{
    "error": "Internal validation failed",
    "details": {
        "issues": [
            {
                "code": "invalid_union",
                "unionErrors": [
                    {
                        "issues": [
                            {
                                "received": "name",
                                "code": "invalid_literal",
                                "expected": "id",
                                "path": ["searchParams", "searchBy"],
                                "message": "Invalid literal value, expected \"id\""
                            }
                        ],
                        "name": "ZodError"
                    },
                    {
                        "issues": [
                            {
                                "received": "name",
                                "code": "invalid_literal",
                                "expected": "uid",
                                "path": ["searchParams", "searchBy"],
                                "message": "Invalid literal value, expected \"uid\""
                            }
                        ],
                        "name": "ZodError"
                    }
                ],
                "path": ["searchParams", "searchBy"],
                "message": "Invalid input"
            }
        ],
        "name": "ZodError"
    }
}
```

{% 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 | null</td><td>Type of insurance coverage.</td></tr><tr><td>description</td><td>string | null</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 | null</td><td>Unique identifier of the insurer.</td></tr><tr><td>country_id</td><td>uuid | null</td><td>Unique identifier of the country.</td></tr><tr><td>uid</td><td>string | null</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 (0-based)</td></tr><tr><td>to<mark style="color:red;">*</mark></td><td>number</td><td>Ending record index (inclusive). Must be greater than <code>from</code>; the range cannot exceed 100 records</td></tr></tbody></table>

#### Example Response

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

```json
{
    "data": [
        {
            "id": "d5442c20-0197-5e6c-a781-47ec0daad4bc",
            "channel_id": "0ccad1d6-18ee-5c17-a684-9f8fe203d7c1",
            "name": "Property damage",
            "type": "Property Insurance",
            "description": "Damage to the insured property",
            "insurer_coverage_number": "INS-PROP-0001",
            "insurer_id": "94f9e6c6-0b50-5d44-af83-4a11195ba7bf",
            "country_id": "aac70d23-4456-5724-814f-d1a6bbb38ebc",
            "uid": "COV-PROPERTY"
        },
        {
            "id": "ec031017-2d71-5ec6-bbbc-a403c79916f9",
            "channel_id": "0ccad1d6-18ee-5c17-a684-9f8fe203d7c1",
            "name": "Vehicle liability",
            "type": null,
            "description": "Third-party liability for the insured vehicle",
            "insurer_coverage_number": "INS-AUTO-0001",
            "insurer_id": null,
            "country_id": "aac70d23-4456-5724-814f-d1a6bbb38ebc",
            "uid": "COV-AUTO"
        }
    ]
}

```

{% endtab %}

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

```json
{
    "error": "Request contains malformed data",
    "details": "Missing bearer token"
}
```

{% endtab %}

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

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

{% endtab %}

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

```json
{
    "error": "Internal validation failed",
    "details": {
        "issues": [
            {
                "code": "invalid_type",
                "expected": "number",
                "received": "nan",
                "path": ["searchParams", "from"],
                "message": "Expected number, received nan"
            },
            {
                "code": "invalid_type",
                "expected": "number",
                "received": "nan",
                "path": ["searchParams", "to"],
                "message": "Expected number, received nan"
            }
        ],
        "name": "ZodError"
    }
}
```

{% 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 \| null | Type of insurance coverage.                                     |
| description               | string \| null | Description of the insurance coverage.                          |
| insurer\_coverage\_number | string         | Unique coverage number assigned by the insurer.                 |
| insurer\_id               | uuid \| null   | Unique identifier of the insurer.                               |
| country\_id               | uuid \| null   | Unique identifier of the country.                               |
| uid                       | string \| null | Unique identifier for this coverage within the system.          |
