Policy management

Endpoints

Get the data of all the policies

GET https://app.insurehero.io/api/shield/v1/policies

Headers

Name
Type
Description

Authorization*

string

Bearer access token

Query Params

Name
Type
Description

holderId

string

Holder identifier

Example Response

Returns the policies associated with the given holderId.

{
    "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": []
        }
    ]
}

Attributes

Name
Type
Description

data

object

A list of policies associated with the request. Each item in the array represents a policy with its details.

id

uuid

Unique identifier of the policy.

version

number

Policy version number.

channel_id

uuid

Unique identifier of the channel associated with the policy.

holder_id

uuid

Unique identifier of the policyholder.

uid

string

Unique identifier assigned to the policy.

max_rescission_window

string

Maximum time window allowed for policy rescission.

policy_number

string

Policy number assigned to the contract.

coverages

object []

Details of the policy coverages.

metada

object []

Additional metadata related to the policy.

attachments

object []

List of files or documents attached to the policy.

features

object []

List of additional policy features.

Get the data of all the packages

GET https://app.insurehero.io/api/shield/v1/packages

Headers

Name
Type
Description

Authorization*

string

Bearer access token

Query Params

Name
Type
Description

from*

number

The starting index of the records to retrieve (0-based).

to*

number

The ending index of the records to retrieve (inclusive).

Example Response

{
    "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"
            }
        }
    ]
}

Attributes

Name
Type
Description

data

object

A list of policies associated with the request. Each item in the array represents a policy with its details

id

uuid

Unique identifier for the package.

name

string

Name of the package.

description

string

Short description of the package.

channel_id

uuid

Unique identifier of the channel this package belongs to.

uid

string

Unique identifier associated with the package.

pricing_rules

object

Object defining the pricing model for the package.

pricing_type

string

Defines how pricing is applied. Possible values: one_time, recurring

interval

string

Specifies the frequency of billing. Possible values: day, week, month, years

interval_count

string

Number of intervals between each billing cycle

Get the data of a variant

GET https://app.insurehero.io/api/shield/v1/variants/:variantId

Headers

Name
Type
Description

Authorization*

string

Bearer access token

Path Parameters

Name
Type
Description

variantId*

string

Variant identifier

Example Response

{
    "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"
    }
}

Attributes

Name
Type
Description

data

object

Object containing the details of the variant.

id

uuid

Unique identifier for the variant.

name

string

Name of the variant.

description

string

Description of the variant.

coverage_id

uuid

Unique identifier of the coverage associated with this variant.

channel_id

uuid

Unique identifier of the channel where this variant is available.

conditions

string

Conditions that must be met for the insurance to be valid.

exclusions

string

Situations where the insurance coverage does not apply.

subject_schema

object

Schema defining the structure of the insured item.

claim_schema

object

Schema defining the structure of claims related to this variant.

uid

string

Unique identifier for the variant in a human-readable format.

type

string

Data type of the field.

pattern

string

Regular expression pattern that the value must match.

required

boolean

Indicates whether the field is mandatory.

maxLength

string

Maximum length allowed for the field.

minLength

string

Minimum length required for the field.

Get the data of all the variants

GET https://app.insurehero.io/api/shield/v1/variants

Headers

Name
Type
Description

Authorization*

string

Bearer access token

Query Params

Name
Type
Description

from*

number

Starting record index

to*

number

Ending record index

Example Response

{
    "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": "[email protected] 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"
        }
    ]
}

Attributes

Name
Type
Description

data

object []

Array containing multiple variants.

id

uuid

Unique identifier for the variant.

name

string

Name of the variant.

description

string

Description of the variant.

coverage_id

uuid

Unique identifier of the coverage associated with this variant.

channel_id

uuid

Unique identifier of the channel where this variant is available.

conditions

string

Conditions that must be met for the insurance to be valid.

exclusions

string

Situations where the insurance coverage does not apply.

subject_schema

object

Schema defining the structure of the insured item.

claim_schema

object

Schema defining the structure of claims related to this variant.

uid

string

Unique identifier for the variant in a human-readable format.

type

string

Data type of the field.

pattern

string

Regular expression pattern that the value must match.

required

boolean

Indicates whether the field is mandatory.

maxLength

string

Maximum length allowed for the field.

minLength

string

Minimum length required for the field.

Get the data of a coverage

GET https://app.insurehero.io/api/shield/v1/coverages/:coverageId

Headers

Name
Type
Description

Authorization*

string

Bearer access token

Path Parameters

Name
Type
Description

coverageId*

string

Coverage identifier

Example Response

{
    "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"
        }
}

Attributes

Name
Type
Description

data

object

Object containing the coverage details.

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.

Get the data of all the coverages

GET https://app.insurehero.io/api/shield/v1/coverages

Headers

Name
Type
Description

Authorization*

string

Bearer access token

Query Params

Name
Type
Description

from*

number

Starting record index

to*

number

Ending record index

Example Response

{
    "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"
        }
    ]
}
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.

Last updated