> 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/data-dictionary.md).

# Data Dictionary

The Data Dictionary describes the fields that the Shield API accepts and returns for each resource, with their type and meaning. Use it as a reference when you build requests and read responses.

Types follow JSON: `string`, `number`, `boolean`, `object` and `array`. Identifiers are UUID strings and dates are ISO 8601 strings.

## **Authentication**

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

## **Policies**

| Name                    | Type               | Description                                                       |
| ----------------------- | ------------------ | ----------------------------------------------------------------- |
| id                      | string (uuid)      | Unique identifier for the policy.                                 |
| created\_at             | string (date-time) | Date and time when the policy was created.                        |
| updated\_at             | string (date-time) | Date and time when the policy was last updated.                   |
| deleted\_at             | string (date-time) | Date and time when the policy was deleted (null if active).       |
| version                 | number             | Version number of the policy.                                     |
| channel\_id             | string (uuid)      | Identifier of the channel through which the policy was issued.    |
| holder\_id              | string (uuid)      | Identifier of the policyholder.                                   |
| uid                     | string             | Your own alphanumeric identifier for the policy.                  |
| policy\_number          | string             | Policy number.                                                    |
| total\_gross\_price     | string             | Total cost of the policy.                                         |
| subject\_schema         | object             | Schema defining the insured subject's details.                    |
| coverages               | object             | Coverages included in the policy.                                 |
| product                 | object             | Details of the insurance product.                                 |
| metadata                | object             | Additional policy-related information.                            |
| features                | array              | Specific policy features.                                         |
| attachments             | array              | Relevant policy attachments.                                      |
| max\_rescission\_window | string             | Maximum time window allowed for policy cancellation. Can be null. |

## **Claims**

| Name                    | Type               | Description                                                      |
| ----------------------- | ------------------ | ---------------------------------------------------------------- |
| id                      | string (uuid)      | Unique identifier for the claim.                                 |
| created\_at             | string (date-time) | Date and time when the claim was created.                        |
| updated\_at             | string (date-time) | Date and time when the claim was last updated.                   |
| deleted\_at             | string (date-time) | Date and time when the claim was deleted (null if active).       |
| risk\_item\_id          | string (uuid)      | Identifier of the risk item.                                     |
| claimant\_id            | string (uuid)      | Identifier of the person or entity making the claim.             |
| channel\_id             | string (uuid)      | Identifier of the channel.                                       |
| subject                 | string             | Subject of the claim.                                            |
| insurer\_claim\_number  | string             | Claim number assigned by the insurer.                            |
| internal\_claim\_number | string             | InsureHero claim reference number.                               |
| status                  | string             | Current status of the claim (e.g., pending, approved, rejected). |
| incident\_date          | string (date-time) | Date and time when the incident occurred.                        |
| resolution\_date        | string (date-time) | Date and time when the claim was resolved.                       |
| claim\_amount           | number             | Amount claimed by the policyholder.                              |
| payout\_amount          | number             | Amount approved for payout.                                      |
| metadata                | object             | Additional claim-related data.                                   |
| assets                  | array              | Claim-related assets.                                            |
| type                    | string             | Type of claim. Can be null.                                      |
| consent\_date           | string (date-time) | Date and time when the claimant gave consent.                    |
| incident                | object             | Details of the incident related to the claim.                    |
| package\_id             | string (uuid)      | Identifier of the insurance package related to the claim.        |
| transaction\_date       | string (date-time) | Date and time of the financial transaction related to the claim. |
| uid                     | string             | Your own alphanumeric identifier for the claim.                  |
| variant\_id             | string (uuid)      | Identifier of the policy variant related to the claim.           |
| assignee\_id            | string (uuid)      | Identifier of the person assigned to handle the claim.           |
| claimant\_data          | object             | Claimant's personal and contact details.                         |
| policy\_reference       | object             | Policy details referenced in the claim.                          |
| required\_documents     | array              | Documents required for claim processing.                         |
| owner\_id               | string (uuid)      | Identifier of the entity or person who owns the claim.           |
| current\_step           | string             | Current step of the claim process.                               |
| workflow                | object             | Workflow stages of the claim process.                            |
| information\_collected  | object             | Information collected during the claim process.                  |

## **Risk Items**

| Name                  | Type               | Description                                                                                                              |
| --------------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------ |
| id                    | string (uuid)      | Unique identifier for the risk item.                                                                                     |
| package\_id           | string (uuid)      | Identifier of the related package.                                                                                       |
| start\_date           | string (date-time) | Start date of the risk item.                                                                                             |
| end\_date             | string (date-time) | End date of the risk item. Can be null.                                                                                  |
| status                | string             | Current status of the risk item.                                                                                         |
| metadata              | object             | Additional information related to the risk item.                                                                         |
| authorized\_claimants | array              | Authorized claimants for the risk item.                                                                                  |
| assets                | array              | Assets related to the risk item.                                                                                         |
| insured\_subject      | object             | Details about the insured subject of the risk item.                                                                      |
| beneficiaries         | array              | Beneficiaries of the risk item.                                                                                          |
| policy\_id            | string (uuid)      | Identifier of the related policy. Can be null.                                                                           |
| uid                   | string             | Your own identifier for the risk item. Can be null.                                                                      |
| payment\_model        | string             | Payment model of the risk item: `direct`, `channel_billed` or `included`. Can be null.                                   |
| payment\_status       | string             | Payment status of the risk item: `pending`, `confirmed`, `failed`, `channel_due` or `cancelled`.                         |
| current\_installment  | number             | Current installment number of the risk item.                                                                             |
| consents              | array              | Consents, each with `type`, `accepted`, `accepted_at` and `version` (nullable).                                          |
| payment               | object             | Payment details of the risk item. Can be null.                                                                           |
| external\_id          | number             | External identifier of the risk item. Present only when the channel has an external identifier mapped for the risk item. |

## **Users**

| Name                    | Type               | Description                                                |
| ----------------------- | ------------------ | ---------------------------------------------------------- |
| id                      | string (uuid)      | Unique identifier for the user.                            |
| created\_at             | string (date-time) | Date and time when the user was created.                   |
| updated\_at             | string (date-time) | Date and time when the user was last updated.              |
| deleted\_at             | string (date-time) | Date and time when the user was deleted (null if active).  |
| first\_name             | string             | User's first name.                                         |
| last\_name              | string             | User's last name.                                          |
| email                   | string             | User's email address.                                      |
| uid                     | string             | Your own alphanumeric identifier for the user.             |
| channel\_id             | string (uuid)      | Identifier of the channel linked to the user.              |
| phone                   | string             | User's phone number.                                       |
| dob                     | string             | User's date of birth.                                      |
| document\_type          | string             | Type of identification document (e.g., passport, ID card). |
| document\_number        | string             | Identification document number.                            |
| gender                  | string             | User's gender (e.g., male, female, non-binary).            |
| address                 | object             | User's address details.                                    |
| metadata                | object             | Additional user data.                                      |
| bank\_accounts          | array              | User's bank accounts.                                      |
| company\_name           | string             | Name of the company the user is associated with.           |
| company\_role           | string             | User's role within the company.                            |
| company\_email          | string             | Company-related email address of the user.                 |
| company\_identifier     | object             | Company identifiers.                                       |
| company\_address        | object             | Company address details.                                   |
| company\_bank\_accounts | array              | Company's bank accounts.                                   |
| group\_id               | string (uuid)      | Identifier of the group the user belongs to.               |

## **Orders**

| Name                | Type               | Description                                                        |
| ------------------- | ------------------ | ------------------------------------------------------------------ |
| id                  | string (uuid)      | Unique identifier for the order.                                   |
| created\_at         | string (date-time) | Date and time when the order was created.                          |
| channel\_id         | string (uuid)      | Identifier of the channel through which the order was placed.      |
| customer\_id        | string (uuid)      | Identifier of the customer associated with the order. Can be null. |
| customer\_data      | object             | Additional customer information.                                   |
| status              | string             | Current status of the order.                                       |
| status\_data        | object             | Additional data related to the order status.                       |
| total\_gross\_price | string             | Total gross price of the order. Can be null.                       |
| total\_net\_price   | string             | Total net price of the order. Can be null.                         |
| total\_taxes        | string             | Total taxes applied to the order. Can be null.                     |
| risk\_item\_id      | string (uuid)      | Identifier of the associated risk item. Can be null.               |

Orders also include the price breakdown that applies to your API key. See [Order management](https://docs.insurehero.io/shield-api/policies/order-management.md) and [Fetch Orders](https://docs.insurehero.io/shield-api/integrations/fetch-orders.md).

## **Claims Events**

| Name        | Type               | Description                                                        |
| ----------- | ------------------ | ------------------------------------------------------------------ |
| id          | string (uuid)      | Unique identifier for the event.                                   |
| created\_at | string (date-time) | Date and time when the event was created.                          |
| updated\_at | string (date-time) | Date and time when the event was last updated.                     |
| deleted\_at | string (date-time) | Date and time when the event was deleted.                          |
| metadata    | object             | Additional metadata related to the event.                          |
| claim\_id   | string (uuid)      | Identifier of the associated claim.                                |
| channel\_id | string (uuid)      | Identifier of the channel where the event occurred.                |
| event\_data | object             | Details about the event. Free-form JSON in responses; can be null. |
| uid         | string             | Your own identifier for the event. Can be null.                    |

## **Risk Items Events**

| Name           | Type               | Description                                                        |
| -------------- | ------------------ | ------------------------------------------------------------------ |
| id             | string (uuid)      | Unique identifier for the event.                                   |
| created\_at    | string (date-time) | Date and time when the event was created.                          |
| updated\_at    | string (date-time) | Date and time when the event was last updated.                     |
| deleted\_at    | string (date-time) | Date and time when the event was deleted.                          |
| metadata       | object             | Additional metadata related to the event.                          |
| risk\_item\_id | string (uuid)      | Identifier of the associated risk item.                            |
| channel\_id    | string (uuid)      | Identifier of the channel where the event occurred.                |
| event\_data    | object             | Details about the event. Free-form JSON in responses; can be null. |
| uid            | string             | Your own identifier for the event. Can be null.                    |

#### **Error Handling**

All Shield API errors share the same JSON envelope:

```json
{
  "error": "Internal validation failed",
  "details": {}
}
```

| Field   | Type   | Description                                                                                      |
| ------- | ------ | ------------------------------------------------------------------------------------------------ |
| error   | string | Error category. It depends on the HTTP status code (see the table below).                        |
| details | any    | Specifics of the error. It can be a string, an object or `null`, depending on the kind of error. |

| Status | `error`                         | When                                                                                                               |
| ------ | ------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
| 400    | Request contains malformed data | The `Authorization` header is missing or does not contain a bearer token.                                          |
| 401    | Invalid or expired access token | The access token or the API key is invalid, or the access token has expired.                                       |
| 404    | Resource not found              | The requested resource does not exist (on endpoints that report it this way).                                      |
| 422    | Internal validation failed      | The request failed input validation, the data sent conflicts with existing records, or an internal error occurred. |

The Shield API does not respond with `429` or `402`.

A few endpoints, such as OTP verification, answer `400` with a `{ "data": { "message": "..." } }` body instead. Those cases are described on each endpoint's page.

**Input validation errors**

When the headers, query parameters, path parameters or body do not match the expected schema, the API responds `422` and `details` contains the list of validation `issues`. Each issue has a `code`, a `message` and a `path`; the first element of `path` tells where the invalid value is (`headers`, `searchParams`, `params` or `body`).

For example, `POST /v1/risk-items/{riskItemId}/events` with this body:

```json
{
  "event_data": {
    "start_date": "2026-10-01"
  }
}
```

responds:

```json
{
  "error": "Internal validation failed",
  "details": {
    "issues": [
      {
        "code": "invalid_string",
        "validation": "datetime",
        "message": "Invalid datetime",
        "path": ["body", "event_data", "start_date"]
      },
      {
        "code": "invalid_type",
        "expected": "string",
        "received": "undefined",
        "path": ["body", "event_data", "end_date"],
        "message": "Required"
      }
    ]
  }
}
```

An invalid JSON body, an empty body or an invalid multipart body returns the same `422` with a single issue:

```json
{
  "error": "Internal validation failed",
  "details": {
    "issues": [
      {
        "code": "custom",
        "path": ["body"],
        "message": "Invalid request body"
      }
    ]
  }
}
```

**Data errors caused by the input**

When a request is rejected because of the data sent, `details` contains an object with `code`, `message`, `details` and `hint`. The most common codes are:

* Codes starting with `22`: a value has an invalid format (for example `22P02`, an invalid uuid).
* Codes starting with `23`: the data conflicts with existing records (for example `23505`, a duplicated unique value, and `23503`, a reference to a record that does not exist).
* `PGRST116`: the requested record was not found.
* `P0001`: a uniqueness rule was not met. The `message` tells which one: "Group names must be unique", "User emails must be unique", "User phone numbers must be unique", "User uid must be unique within the same channel", "Risk Item uid must be unique within the same channel", "Policy numbers must be unique within the same channel", "Policy uid must be unique within the same channel", "Package uid must be unique within the same channel", "Group insurer coverage numbers must be unique", "UID must be unique within the same channel".

```json
{
  "error": "Internal validation failed",
  "details": {
    "code": "P0001",
    "details": null,
    "hint": null,
    "message": "Risk Item uid must be unique within the same channel"
  }
}
```

**Internal errors**

Any other error is reported without its internal message. The status is the one of the endpoint (almost always `422`) and `details` keeps the error `code` and adds an `event_id`:

```json
{
  "error": "Internal validation failed",
  "details": {
    "code": "XX000",
    "message": "Internal error",
    "details": null,
    "hint": null,
    "event_id": "3f2b8c9d1e4a4f6b8a7c5d2e1f0a9b8c"
  }
}
```

An unexpected server failure, or a response that could not be built, returns `422` with:

```json
{
  "error": "Internal validation failed",
  "details": {
    "message": "Internal error",
    "event_id": "3f2b8c9d1e4a4f6b8a7c5d2e1f0a9b8c"
  }
}
```

In a few cases `details` is the plain string `"Internal error"`.

{% hint style="info" %}
`event_id` identifies the incident in our error tracking. Include it when you contact support about an internal error. It can be `null`.
{% endhint %}

**Authorization errors**

Every endpoint that requires an access token checks the `Authorization: Bearer <accessToken>` header before running:

| Status | `details`            | Cause                                                   |
| ------ | -------------------- | ------------------------------------------------------- |
| 400    | Missing bearer token | The `Authorization` header is missing.                  |
| 400    | Invalid bearer token | The header does not follow the `Bearer <token>` format. |
| 401    | Invalid access token | The token is not valid.                                 |
| 401    | Access token expired | The token has expired. Request a new one.               |

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

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