Download OpenAPI specification:Download
Habit Distributor API's allow insurance distributors to sell insurance products using Habit resources.
In order to interact with the Habit API, clients must authenticate using the OAuth 2.0 protocol, in particular the Client credentials flow.
This call must be made using the /v3/auth/authorize endpoint, passing pre-generated\ncredentials, called client\_id and client\_secret.
Other required parameters are:
The response will be populated with, at least, 4 main attributes:
All subsequent calls must be directed to the base URL provided in endpoints.http and an Authorization header must be added to every API call, in the form of:
Authorization: Bearer {access_token}
PARAMETER | TYPE | DESCRIPTION |
---|---|---|
client_id | uuid | the client unique identifier, provided by the Habit self-care |
client_secret | string | automatically generated hash, provide by the Habit self-care |
redirect_uri | uri | URI to be provided to the user-agent as part of a 303 or 307 HTTP response |
response_type | string | the OAuth 2.0 flow to be used |
scope | string | a comma separated string of permissions to be associated with the token |
state | string | a general purpose string that will be forwarded and added to the flow final result |
FIELD | TYPE | DESCRIPTION |
---|---|---|
access_token | string | the token to be used in subsequent calls to the API as part of an HTTP Authorization header |
client_id | uuid | the client unique identifier |
code | string | an exchange code, for usage with code flow requests |
endpoints | object | HTTP and MQTT base URLs assigned to the requesting client |
expires | timestamp | the expiration date for the provided tokens |
grant_type | string | the type of grant flow used to generate the provided tokens |
refresh_token | string | a token used with /v3/auth/exchange to retrieve fresh tokens, without the re-executing the entire flow |
scope | array | granted permissions associated with the provided tokens |
state | string | general purpose string forwarded by the client in the first flow call |
client_id required | string Client ID from Selfcare |
client_secret required | string Client Secret from Selfcare |
response_type required | string |
scope required | string |
{- "client_id": "bef41164-90c6-11e7-a25d-97266664a105",
- "client_secret": "tqypzi6q3faldgbrtyhbh6e2",
- "response_type": "client_credentials",
- "scope": "distributor"
}
{- "access_token": "{access_token}",
- "client_id": "bef41164-90c6-11e7-a25d-97266664a105",
- "code": "{code}",
- "endpoints": {
- "mqtt": "mqtts://api.platform.habit.io:8881"
}, - "expires": "2020-12-31T00:00:00.000+0000",
- "grant_type": "client_credentials",
- "refresh_token": "{refresh_token}",
- "scope": [
- "distributor"
]
}
client_id required | string Example: client_id=bef41164-90c6-11e7-a25d-97266664a105 |
client_secret required | string Example: client_secret=tqypzi6q3faldgbrtyhbh6e2 |
response_type required | string Example: response_type=client_credentials |
scope required | string Example: scope=distributor |
redirect_uri | string |
state | string |
Content-Type required | string Default: application/json |
{- "access_token": "{access_token}",
- "client_id": "bef41164-90c6-11e7-a25d-97266664a105",
- "code": "{code}",
- "endpoints": {
- "mqtt": "mqtts://api.platform.habit.io:8881"
}, - "expires": "2020-12-31T00:00:00.000+0000",
- "grant_type": "client_credentials",
- "refresh_token": "{refresh_token}",
- "scope": [
- "distributor"
]
}
Before the expiration timestamp returns as expired, the client should renew the access token by calling the /v3/auth/exchange endpoint, passing the refresh_token return with the call to /v3/auth/authorize.
The return will be exactly the same as the return by /v3/auth/authorize.
PARAMETER | TYPE | DESCRIPTION |
---|---|---|
client_id | uuid | the client unique identifier, provided by the Habit self-care |
redirect_uri | uri | URI to be provided to the user-agent as part of a 303 or 307 HTTP response |
refresh_token | string | the token provided as refresh_token in a previous call to /v3/auth/authorize |
grant_type | string | the type of grant flow used to generate the provided tokens |
FIELD | TYPE | DESCRIPTION |
---|---|---|
access_token | string | the token to be used in subsequent calls to the API as part of an HTTP Authorization header |
client_id | uuid | the client unique identifier |
code | string | an exchange code, for usage with code flow requests |
endpoints | object | HTTP and MQTT base URLs assigned to the requesting client |
expires | timestamp | the expiration date for the provided tokens |
grant_type | string | the type of grant flow used to generate the provided tokens |
refresh_token | string | a token used with /v3/auth/exchange to retrieve fresh tokens, without executing the entire flow |
scope | array | granted permissions associated with the provided tokens |
Use the following method to retrieve insurance products being sold
FIELD | TYPE | DESCRIPTION |
---|---|---|
id | uuid | Insurance Product unique identifier |
name | string | Insurance Product Name |
icon | string (uri) | icon uri |
image | string (uri) | image uri |
state | string | Insurance Product state |
namespace | string | Insurance Product namespace |
type | string | Insurance Product type |
created | string (date) | creation date |
updated | string (date) | update date |
active_ts | string (date) | activation date |
inactive_ts | string (date) | inactivation date |
legal_disclaimers | array | Legal disclaimers to use with that product |
cdata | json | Object with extra informations about the product like country |
id required | string <uuid> Example: 0cc9de4b-1b70-406d-b67b-766cf9c53cca The ID of the desired insurance-product. |
Content-Type required | string Default: application/json |
Authorization required | string Example: Bearer {access_token} |
{- "id": "0cc9de4b-1b70-406d-b67b-766cf9c53cca",
- "name": "insurance product",
- "icon": "icon_uri",
- "image": "image_uri",
- "state": "active",
- "namespace": "insurance_namespace",
- "type": ":type",
- "created": "2020-08-27T00:00:00.000+0000",
- "updated": "2020-08-27T00:00:00.000+0000",
- "active_ts": "2020-08-27T00:00:00.000+0000",
- "inactive_ts": "2020-08-27T00:00:00.000+0000",
- "legal_disclaimers": [
- {
- "id": "4948ba0b-781a-4c38-ad1f-1c1ecc47a369",
- "country_id": "pt",
- "text": "Legal disclaimer text example",
- "type": "global"
}
], - "cdata": {
- "public": {
- "country": {
- "id": "string",
- "name": "string",
- "namespace": "string"
}, - "currency": {
- "id": "string",
- "name": "string",
- "namespace": "string",
- "symbol": "string"
}
}
}, - "documents": {
- "at_product_info": [
- {
- "id": "624c9741-7560-4851-9609-6729bb67946e",
- "name": "Document Name",
- "description": "Document Description",
- "help_text": "Document Help Text",
- "state": "active",
- "to_be_shown": "at_product_info"
}
], - "at_offer": [
- {
- "id": "624c9741-7560-4851-9609-6729bb67946f",
- "name": "Document Name",
- "description": "Document Description",
- "help_text": "Document Help Text",
- "state": "active",
- "to_be_shown": "at_offer"
}
], - "at_subscription": [
- {
- "id": "624c9741-7560-4851-9609-6729bb67946g",
- "name": "Document Name",
- "description": "Document Description",
- "help_text": "Document Help Text",
- "state": "active",
- "to_be_shown": "at_subscription"
}
]
}
}
Use the following method to retrieve an array of insurance products being sold.
FIELD | TYPE | DESCRIPTION |
---|---|---|
elements | array | Array of insurance products being sold |
size | number | Number of insurance products in elements array |
Every element in the array must contain the following fields:
FIELD | TYPE | DESCRIPTION |
---|---|---|
id | uuid | Insurance Product unique identifier |
name | string | Insurance Product Name |
icon | string (uri) | icon uri |
image | string (uri) | image uri |
state | string | Insurance Product state |
namespace | string | Insurance Product namespace |
type | string | Insurance Product type |
created | string (date) | creation date |
updated | string (date) | update date |
active_ts | string (date) | activation date |
inactive_ts | string (date) | inactivation date |
legal_disclaimers | array | Legal disclaimers to use with that product |
cdata | json | Object with extra informations about the product like country |
id | string <uuid> entity id to filter by. |
name | string complete entity name to filter by. |
namespace | string complete entity namespace to filter by. |
state | string complete entity state to filter by. |
page_size | number <integer> Default: 20 A limit on the number of objects to be returned. Default is 20, minimum is 1, maximum is 100. |
page_start_index | number <integer> Default: 0 Offset the list of returned results by this amount. Default is 0. |
order_by | string Example: order_by=-created The results can be in ascendent (+) or descendent (-) order. Use + or - before the field name to use a specific order. |
fields | string Example: fields=id,name comma separeted fields to return in payload. |
Content-Type required | string Default: application/json |
Authorization required | string Example: Bearer {access_token} |
{- "elements": [
- {
- "id": "0cc9de4b-1b70-406d-b67b-766cf9c53cca",
- "name": "insurance product",
- "icon": "icon_uri",
- "image": "image_uri",
- "state": "active",
- "namespace": "insurance_namespace",
- "type": ":type",
- "created": "2020-08-27T00:00:00.000+0000",
- "updated": "2020-08-27T00:00:00.000+0000",
- "active_ts": "2020-08-27T00:00:00.000+0000",
- "inactive_ts": "2020-08-27T00:00:00.000+0000",
- "legal_disclaimers": [
- {
- "id": "4948ba0b-781a-4c38-ad1f-1c1ecc47a369",
- "country_id": "pt",
- "text": "Legal disclaimer text example",
- "type": "global"
}
], - "cdata": {
- "public": {
- "country": {
- "id": "string",
- "name": "string",
- "namespace": "string"
}, - "currency": {
- "id": "string",
- "name": "string",
- "namespace": "string",
- "symbol": "string"
}
}
}, - "documents": {
- "at_product_info": [
- {
- "id": "624c9741-7560-4851-9609-6729bb67946e",
- "name": "Document Name",
- "description": "Document Description",
- "help_text": "Document Help Text",
- "state": "active",
- "to_be_shown": "at_product_info"
}
], - "at_offer": [
- {
- "id": "624c9741-7560-4851-9609-6729bb67946f",
- "name": "Document Name",
- "description": "Document Description",
- "help_text": "Document Help Text",
- "state": "active",
- "to_be_shown": "at_offer"
}
], - "at_subscription": [
- {
- "id": "624c9741-7560-4851-9609-6729bb67946g",
- "name": "Document Name",
- "description": "Document Description",
- "help_text": "Document Help Text",
- "state": "active",
- "to_be_shown": "at_subscription"
}
]
}
}
], - "size": 1
}
Use the following method to retrieve an array of coverage specs that will be linked to the quote when quote is submitted.
FIELD | TYPE | DESCRIPTION |
---|---|---|
elements | array | Array of coverage specs |
size | number | Number of coverage specs in elements array |
Every element in the array must contain the following fields:
FIELD | TYPE | DESCRIPTION |
---|---|---|
id | uuid | Quote Coverage Spec unique identifier |
coverage_id | uuid | Coverage unique identifier |
quotespec_id | uuid | Quote spec unique identifier |
namespace | string | Namespace of the Coverage |
order_index | string | Coverage order index |
classes | array | Array of classes linked to the Coverage |
created | string (date) | creation date |
updated | string (date) | update date |
properties | array | Array with all coverage properties |
id required | string <uuid> Example: 0cc9de4b-1b70-406d-b67b-766cf9c53cca The ID of the desired insurance-product. |
version_id required | string <uuid> Example: 58970c9d-7c6c-4b4e-9664-ec3001899ca0 The ID of the desired version. |
page_size | number <integer> Default: 20 A limit on the number of objects to be returned. Default is 20, minimum is 1, maximum is 100. |
page_start_index | number <integer> Default: 0 Offset the list of returned results by this amount. Default is 0. |
order_by | string Example: order_by=-created The results can be in ascendent (+) or descendent (-) order. Use + or - before the field name to use a specific order. |
fields | string Example: fields=id,name comma separeted fields to return in payload. |
id | string <uuid> entity id to filter by. |
namespace | string complete entity namespace to filter by. |
Content-Type required | string Default: application/json |
Authorization required | string Example: Bearer {access_token} |
{- "elements": [
- {
- "id": "b05924ae-f7b6-47dd-a074-3f51ae290459",
- "coverage_id": "08a166a0-e29b-47c2-ab2b-a73b0987ccd8",
- "quotespec_id": "ee0c8f10-0b90-415c-947f-b5d8271d647a",
- "namespace": "family_protection",
- "order_index": 0,
- "classes": [
- "io.habit.operation.mandatory"
], - "properties": [
- {
- "id": "ac58df58-1957-4417-8e07-19de73609bb8",
- "namespace": "number_of_people",
- "label": "Number of people",
- "icon": null,
- "image": null,
- "data": null,
- "options": { },
- "help_text": "string",
- "placeholder": "string",
- "force_data": false,
- "schema": "v1_number",
- "order_index": 0,
- "parent_id": "string",
- "classes": [
- "io.habit.operation.coverages.required"
], - "children": [
- "string"
]
}
]
}
], - "size": 1
}
Retrieve information about coverage specs that will be linked to the quote when quote is submitted.
FIELD | TYPE | DESCRIPTION |
---|---|---|
id | uuid | Quote Coverage Spec unique identifier |
coverage_id | uuid | Coverage unique identifier |
quotespec_id | uuid | Quote spec unique identifier |
namespace | string | Namespace of the Coverage |
order_index | string | Coverage order index |
classes | array | Array of classes linked to the Coverage |
created | string (date) | creation date |
updated | string (date) | update date |
properties | array | Array with all coverage properties |
id required | string <uuid> Example: 0cc9de4b-1b70-406d-b67b-766cf9c53cca The ID of the desired insurance-product. |
version_id required | string <uuid> Example: 58970c9d-7c6c-4b4e-9664-ec3001899ca0 The ID of the desired version. |
coverage_id required | string <uuid> Example: b05924ae-f7b6-47dd-a074-3f51ae290459 The ID of the coverage. |
page_size | number <integer> Default: 20 A limit on the number of objects to be returned. Default is 20, minimum is 1, maximum is 100. |
page_start_index | number <integer> Default: 0 Offset the list of returned results by this amount. Default is 0. |
order_by | string Example: order_by=-created The results can be in ascendent (+) or descendent (-) order. Use + or - before the field name to use a specific order. |
fields | string Example: fields=id,name comma separeted fields to return in payload. |
id | string <uuid> entity id to filter by. |
namespace | string complete entity namespace to filter by. |
Content-Type required | string Default: application/json |
Authorization required | string Example: Bearer {access_token} |
{- "id": "b05924ae-f7b6-47dd-a074-3f51ae290459",
- "coverage_id": "08a166a0-e29b-47c2-ab2b-a73b0987ccd8",
- "quotespec_id": "ee0c8f10-0b90-415c-947f-b5d8271d647a",
- "namespace": "family_protection",
- "order_index": 0,
- "classes": [
- "io.habit.operation.mandatory"
], - "properties": [
- {
- "id": "ac58df58-1957-4417-8e07-19de73609bb8",
- "namespace": "number_of_people",
- "label": "Number of people",
- "icon": null,
- "image": null,
- "data": null,
- "options": { },
- "help_text": "string",
- "placeholder": "string",
- "force_data": false,
- "schema": "v1_number",
- "order_index": 0,
- "parent_id": "string",
- "classes": [
- "io.habit.operation.coverages.required"
], - "children": [
- "string"
]
}
]
}
Use the following method to retrieve an array of users linked to the distributors and the insurance product
FIELD | TYPE | DESCRIPTION |
---|---|---|
elements | array | Array of users |
size | number | Number of users in elements array |
Every element in the array must contain the following fields:
FIELD | TYPE | DESCRIPTION |
---|---|---|
id | uuid | User unique identifier |
name | string | User's name |
string | User's e-mail | |
mobile | string | User's mobile number |
active_ts | string (date) | Date when user got active |
inactive_ts | string (date) | Date when user got inactive |
created | string (date) | Date when user was created |
updated | string (date) | Date when user was updated |
target_id | uuid | ID of insurance-product linked to the user |
partner_code | string | Distributor custom code linked to the user |
flags | string | Distributor custom flags linked to the user |
state | string | Actual user state |
type | string | user client type |
id required | string <uuid> Example: 0cc9de4b-1b70-406d-b67b-766cf9c53cca The ID of the desired insurance-product. |
page_size | number <integer> Default: 20 A limit on the number of objects to be returned. Default is 20, minimum is 1, maximum is 100. |
page_start_index | number <integer> Default: 0 Offset the list of returned results by this amount. Default is 0. |
order_by | string Example: order_by=-created The results can be in ascendent (+) or descendent (-) order. Use + or - before the field name to use a specific order. |
fields | string Example: fields=id,name comma separeted fields to return in payload. |
id | string <uuid> entity id to filter by. |
name | string complete entity name to filter by. |
string complete entity email to filter by. | |
state | string complete entity state to filter by. |
Content-Type required | string Default: application/json |
Authorization required | string Example: Bearer {access_token} |
{- "elements": [
- {
- "id": "3bfb32f9-7a48-4d89-894e-d4ba49f7df2e",
- "name": "New User",
- "email": "new.user@habit.io",
- "mobile": "+999999999999",
- "active_ts": "2020-09-18T14:15:56.095+0000",
- "inactive_ts": "2020-09-18T14:15:56.095+0000",
- "created": "2020-09-18T14:15:56.095+0000",
- "updated": "2020-09-18T14:15:56.095+0000",
- "target_id": "0cc9de4b-1b70-406d-b67b-766cf9c53cca",
- "partner_code": "XYZ1234",
- "flags": {
- "receive_email_marketing": true,
- "allow_geolocation": false,
- "accepted_terms_and_conditions": true
}, - "state": "active",
- "type": "user"
}
], - "size": 1
}
create users linked to the distributors and the Insurance Product
FIELD | TYPE | DESCRIPTION |
---|---|---|
name | string | User's name |
string | User's e-mail | |
mobile | string | User's mobile number with international code |
partner_code | string (optional) | Distributor custom code |
flags | object (optional) | Distributor custom flags |
FIELD | TYPE | DESCRIPTION |
---|---|---|
id | uuid | User unique identifier |
name | string | User's name |
string | User's e-mail | |
mobile | string | User's mobile number |
active_ts | string (date) | Date when user became active |
inactive_ts | string (date) | Date when user became inactive |
created | string (date) | Date when user was created |
updated | string (date) | Date when user was updated |
target_id | uuid | ID of insurance-product linked to the user |
partner_code | string | Distributor custom code linked to the user |
flags | string | Distributor custom flags linked to the user |
state | string | Actual user state |
type | string | user client type |
id required | string <uuid> Example: 0cc9de4b-1b70-406d-b67b-766cf9c53cca The ID of the desired insurance-product. |
Content-Type required | string Default: application/json |
Authorization required | string Example: Bearer {access_token} |
name required | string User name to be created |
email required | string User email |
mobile | string User mobile number with international code |
partner_code | string Distributor custom code to be linked to the user |
flags | string Distributor custom flags to be linked to the user |
{- "name": "New User",
- "email": "new.user@habit.io",
- "mobile": "+999999999999",
- "partner_code": "XYZ1234",
- "flags": {
- "receive_email_marketing": true,
- "allow_geolocation": false,
- "accepted_terms_and_conditions": true
}
}
{- "id": "3bfb32f9-7a48-4d89-894e-d4ba49f7df2e",
- "name": "New User",
- "email": "new.user@habit.io",
- "mobile": "+999999999999",
- "active_ts": "2020-09-18T14:15:56.095+0000",
- "inactive_ts": "2020-09-18T14:15:56.095+0000",
- "created": "2020-09-18T14:15:56.095+0000",
- "updated": "2020-09-18T14:15:56.095+0000",
- "target_id": "0cc9de4b-1b70-406d-b67b-766cf9c53cca",
- "partner_code": "XYZ1234",
- "flags": {
- "receive_email_marketing": true,
- "allow_geolocation": false,
- "accepted_terms_and_conditions": true
}, - "state": "active",
- "type": "user"
}
Retrieve single user information
FIELD | TYPE | DESCRIPTION |
---|---|---|
id | uuid | User unique identifier |
name | string | User's name |
string | User's e-mail | |
mobile | string | User's mobile number |
active_ts | string (date) | Date when user became active |
inactive_ts | string (date) | Date when user became inactive |
created | string (date) | Date when user was created |
updated | string (date) | Date when user was updated |
target_id | uuid | ID of insurance-product linked to the user |
partner_code | string | Distributor custom code linked to the user |
flags | string | Distributor custom flags linked to the user |
state | string | Actual user state |
type | string | user client type |
id required | string <uuid> Example: 0cc9de4b-1b70-406d-b67b-766cf9c53cca The ID of the desired insurance-product. |
user_id required | string <uuid> Example: 3bfb32f9-7a48-4d89-894e-d4ba49f7df2e The ID of the desired user. |
Content-Type required | string Default: application/json |
Authorization required | string Example: Bearer {access_token} |
{- "id": "3bfb32f9-7a48-4d89-894e-d4ba49f7df2e",
- "name": "New User",
- "email": "new.user@habit.io",
- "mobile": "+999999999999",
- "active_ts": "2020-09-18T14:15:56.095+0000",
- "inactive_ts": "2020-09-18T14:15:56.095+0000",
- "created": "2020-09-18T14:15:56.095+0000",
- "updated": "2020-09-18T14:15:56.095+0000",
- "target_id": "0cc9de4b-1b70-406d-b67b-766cf9c53cca",
- "partner_code": "XYZ1234",
- "flags": {
- "receive_email_marketing": true,
- "allow_geolocation": false,
- "accepted_terms_and_conditions": true
}, - "state": "active",
- "type": "user"
}
Update User's Information
FIELD | TYPE | DESCRIPTION |
---|---|---|
name | string (optional) | User's name |
string (optional) | User's e-mail | |
mobile | string (optional) | User's mobile number with international code |
partner_code | string (optional) | Distributor custom code |
flags | object (optional) | Distributor custom flags |
FIELD | TYPE | DESCRIPTION |
---|---|---|
n_updated | number | Number of quote properties updated |
id required | string <uuid> Example: 0cc9de4b-1b70-406d-b67b-766cf9c53cca The ID of the desired insurance-product. |
user_id required | string <uuid> Example: 3bfb32f9-7a48-4d89-894e-d4ba49f7df2e The ID of the desired user. |
Content-Type required | string Default: application/json |
Authorization required | string Example: Bearer {access_token} |
name | string User name to be created |
string User email | |
mobile | string User mobile number with international code |
partner_code | string Distributor custom code to be linked to the user |
flags | string Distributor custom flags to be linked to the user |
{- "name": "New User",
- "email": "new.user@habit.io",
- "mobile": "+999999999999",
- "partner_code": "XYZ1234",
- "flags": {
- "receive_email_marketing": true,
- "allow_geolocation": false,
- "accepted_terms_and_conditions": true
}
}
{- "n_updated": 1
}
Use the following method to retrieve all necessary properties to create a quote.
FIELD | TYPE | DESCRIPTION |
---|---|---|
insuranceproduct_id | uuid | Insurance Product unique identifier |
quote_specs | array | Array with all available quote properties |
policyholder_specs | array | Array with all available policy holder properties |
protectedasset_specs | array | Array with all available protected asset properties |
id required | string <uuid> Example: 0cc9de4b-1b70-406d-b67b-766cf9c53cca The ID of the desired insurance-product. |
version_id required | string <uuid> Example: 58970c9d-7c6c-4b4e-9664-ec3001899ca0 The ID of the desired version. |
Content-Type required | string Default: application/json |
Authorization required | string Example: Bearer {access_token} |
{- "client_id": "0cc9de4b-1b70-406d-b67b-766cf9c53cca",
- "service_id": "11539368-524f-4b79-8902-28e1935fdf8e",
- "service": { },
- "specs": {
- "quoteproperty_specs": [
- {
- "id": "5a2cf4bf-b457-4439-a177-f2273f499638",
- "namespace": "rate_base",
- "label": "string",
- "icon": "string",
- "image": "string",
- "data": "string",
- "options": { },
- "help_text": "string",
- "placeholder": "string",
- "force_data": true,
- "schema": "string",
- "order_index": 0,
- "classes": [
- "string"
], - "children": [
- "io.habit.operations.required.quotes.create"
]
}
], - "policyholderproperty_specs": [
- {
- "id": "8b18da06-1031-4c08-8fbf-90c54de614a3",
- "namespace": "string",
- "label": "string",
- "icon": "string",
- "image": "string",
- "data": "string",
- "options": { },
- "help_text": "string",
- "placeholder": "string",
- "force_data": true,
- "schema": "string",
- "order_index": 0,
- "parent_id": "string",
- "classes": [
- "string"
], - "children": [
- "string"
]
}
], - "protectedassetproperty_specs": [
- {
- "id": "e753ab5c-33b3-4c12-b95c-2da878668eed",
- "namespace": "string",
- "label": "string",
- "icon": "string",
- "image": "string",
- "data": "string",
- "options": { },
- "help_text": "string",
- "placeholder": "string",
- "force_data": true,
- "schema": "string",
- "order_index": 0,
- "parent_id": "string",
- "classes": [
- "string"
], - "children": [
- "string"
]
}
]
}
}
Use the following method to submit a new quote to the insurance company
FIELD | TYPE | DESCRIPTION |
---|---|---|
quote_properties | array | Array with all quote properties to be created (properties id or namespace can be used) |
policyholder_properties | array | Array with all policy holder properties to be created (this field will be ignored if you set "policyholder_id" field) |
protectedasset_properties | array | Array with all protected asset properties to be created |
coverages | array | Array with all coverages to be created/changed |
user_id | uuid | User unique identifier to be linked with created quote |
policyholder_id | uuid | Policy Holder unique identifier to be linked with the created quote (if you set this field, we will ignore the "policyholder_properties" field. To be able to reuse the session you must set the "user_id" field or "session_fingerprint" field from the last quote response that created the policyholder) |
FIELD | TYPE | DESCRIPTION |
---|---|---|
created | object | Object with created Quote |
customized | object | Object with all quote properties updated in the setup process by Insurer |
simulated | object | Object with all quote properties updated in the simulation process by Insurer |
id required | string <uuid> Example: 0cc9de4b-1b70-406d-b67b-766cf9c53cca The ID of the desired insurance-product. |
version_id required | string <uuid> Example: 58970c9d-7c6c-4b4e-9664-ec3001899ca0 The ID of the desired version. |
Content-Type required | string Default: application/json |
Authorization required | string Example: Bearer {access_token} |
session_fingerprint | string |
user_id | string |
Array of objects (quoteSpecPropNamespace) | |
Array of objects (policyHolderSpecNamespace) | |
policyholder_id | string |
Array of objects (protectedAssetSpecNamespace) | |
Array of objects (coverage) |
{- "session_fingerprint": "2ec8ea29-ee45-4ee5-a7e3-bf04a156d4ae-2ec8ea29-ee45-4ee5-a7e3-bf04a156d4ae-anon-2ec8ea29-ee45-4ee5-a7e3-bf04a156d4ae",
- "user_id": "2ec8ea29-ee45-4ee5-a7e3-bf04a156d4ae",
- "quote_properties": [
- {
- "namespace": ":namespace",
- "data": ":data"
}
], - "policyholder_properties": [
- {
- "namespace": "namespace",
- "data": ":data"
}
], - "policyholder_id": "1cc8ea29-ee45-4ee5-a7e3-bf04a156d4ae",
- "protectedasset_properties": [
- {
- "namespace": "namespace",
- "data": ":data"
}
], - "coverages": [
- {
- "namespace": "family_protection",
- "properties": [
- {
- "namespace": "number_of_people",
- "data": "10"
}
]
}
]
}
{- "created": {
- "id": "1ea47dd4-6c9c-4b05-8575-549e04cfee81",
- "code": "ABC123",
- "session_id": "14990e13-1663-48e5-b14f-362c463dad84",
- "user_id": "2ec8ea29-ee45-4ee5-a7e3-bf04a156d4ae",
- "service_id": "11539368-524f-4b79-8902-28e1935fdf8e",
- "service": { },
- "state": "draft",
- "session": {
- "id": "11539368-524f-4b79-8902-28e1935fdf8e",
- "fingerprint": "11539368-524f-4b79-8902-28e1935fdf8e-11539368-524f-4b79-8902-28e1935fdf8e-anon-11539368-524f-4b79-8902-28e1935fdf8e"
}, - "policy_holder": {
- "id": "7742945f-8bc9-4e7d-91b4-9c8298696427",
- "quotes": [
- {
- "id": "1ea47dd4-6c9c-4b05-8575-549e04cfee81",
- "code": "ABC123",
- "session_id": "14990e13-1663-48e5-b14f-362c463dad84",
- "user_id": "2ec8ea29-ee45-4ee5-a7e3-bf04a156d4ae",
- "classes": [
- "io.habit.operations.required.quotes.create"
], - "created": "2020-08-27T00:00:00.000+0000",
- "updated": "2020-08-27T00:00:00.000+0000",
- "open_ts": "2020-08-27T00:00:00.000+0000",
- "simulated_ts": "2020-08-27T00:00:00.000+0000",
- "processing_ts": "2020-08-27T00:00:00.000+0000",
- "error_ts": "2020-08-27T00:00:00.000+0000",
- "closed_ts": "2020-08-27T00:00:00.000+0000",
- "canceled_ts": "2020-08-27T00:00:00.000+0000",
- "service_id": "11539368-524f-4b79-8902-28e1935fdf8e",
- "service": { },
- "state": "open"
}
], - "namespace": "string",
- "code": "ABC456",
- "session_id": "string",
- "user_id": "string",
- "parent_id": "string",
- "classes": [
- "string"
], - "state": "draft"
}, - "protected_assets": [
- {
- "id": "f174b596-470d-4b76-86f0-ea71d68ad881"
}
]
}, - "customized": {
- "quote_properties": [
- {
- "id": "9d720479-8269-49cf-9e68-61d0ea6c0316",
- "data": ":data",
- "namespace": ":namespace",
- "quote_id": "1ea47dd4-6c9c-4b05-8575-549e04cfee81"
}
]
}, - "simulated": {
- "quote_properties": [
- {
- "id": "9d720479-8269-49cf-9e68-61d0ea6c0316",
- "data": ":data",
- "namespace": ":namespace",
- "quote_id": "1ea47dd4-6c9c-4b05-8575-549e04cfee81"
}
]
}
}
After a successfully simulation it becomes a simulated quote. Use the following method to retrieve an array of submitted quotes.
FIELD | TYPE | DESCRIPTION |
---|---|---|
elements | array | Array of submitted quotes |
size | number | Number of submitted quotes in elements array |
Every element in the array must contain the following fields:
FIELD | TYPE | DESCRIPTION |
---|---|---|
id | uuid | Quote unique identifier |
code | string | Internal code to identify the quote |
state | string | Actual quote state (draft, open, simulated, processing, error, closed or canceled) |
session_id | uuid | ID of the session used to create the quote |
user_id | uuid | ID of the user linked to the quote |
classes | array | Array of classes linked to the quote |
open_ts | string (date) | Date when quote was sent to open state |
simulated_ts | string (date) | Date when quote was sent to simulated state |
processing_ts | string (date) | Date when quote was sent to processing state |
error_ts | string (date) | Date when quote was sent to error state |
closed_ts | string (date) | Date when quote was sent to closed state |
canceled_ts | string (date) | Date when quote was sent to canceled state |
service_id | uuid | ID of the service related to the quote |
service | object | Service details |
policy_id | uuid | ID of the Policy created from this quote |
reason | string | reason for quote approval or rejection |
id required | string <uuid> Example: 0cc9de4b-1b70-406d-b67b-766cf9c53cca The ID of the desired insurance-product. |
page_size | number <integer> Default: 20 A limit on the number of objects to be returned. Default is 20, minimum is 1, maximum is 100. |
page_start_index | number <integer> Default: 0 Offset the list of returned results by this amount. Default is 0. |
order_by | string Example: order_by=-created The results can be in ascendent (+) or descendent (-) order. Use + or - before the field name to use a specific order. |
fields | string Example: fields=id,name comma separeted fields to return in payload. |
id | string <uuid> entity id to filter by. |
user_id | string <uuid> user id to filter by. |
state | string complete entity state to filter by. |
namespace | string complete entity namespace to filter by. |
code | string complete entity code to filter by. |
Content-Type required | string Default: application/json |
Authorization required | string Example: Bearer {access_token} |
{- "elements": [
- {
- "id": "1ea47dd4-6c9c-4b05-8575-549e04cfee81",
- "code": "ABC123",
- "session_id": "14990e13-1663-48e5-b14f-362c463dad84",
- "user_id": "2ec8ea29-ee45-4ee5-a7e3-bf04a156d4ae",
- "classes": [
- "io.habit.operations.required.quotes.create"
], - "created": "2020-08-27T00:00:00.000+0000",
- "updated": "2020-08-27T00:00:00.000+0000",
- "open_ts": "2020-08-27T00:00:00.000+0000",
- "simulated_ts": "2020-08-27T00:00:00.000+0000",
- "processing_ts": "2020-08-27T00:00:00.000+0000",
- "error_ts": "2020-08-27T00:00:00.000+0000",
- "closed_ts": "2020-08-27T00:00:00.000+0000",
- "canceled_ts": "2020-08-27T00:00:00.000+0000",
- "service_id": "11539368-524f-4b79-8902-28e1935fdf8e",
- "service": { },
- "state": "open"
}
], - "size": 1
}
After a quote is successfully simulated it becomes a simulated quote. Use the following method to retrieve quote.
FIELD | TYPE | DESCRIPTION |
---|---|---|
id | uuid | Quote unique identifier |
code | string | Internal code to identify the quote |
state | string | Actual quote state (draft, open, simulated, processing, error, closed or canceled) |
session_id | uuid | ID of the session used to create the quote |
user_id | uuid | ID of the user linked to the quote |
classes | array | Array of classes linked to the quote |
open_ts | string (date) | Date when quote was sent to open state |
simulated_ts | string (date) | Date when quote was sent to simulated state |
processing_ts | string (date) | Date when quote was sent to processing state |
error_ts | string (date) | Date when quote was sent to error state |
closed_ts | string (date) | Date when quote was sent to closed state |
canceled_ts | string (date) | Date when quote was sent to canceled state |
service_id | uuid | ID of the service related to the quote |
service | object | Service details |
policy_id | uuid | ID of the Policy created from this quote |
reason | string | reason for quote approval or rejection |
coverages | array | Array with quote's coverages |
policy_holders | array | Array with quote's policy holders |
protectedassets | array | Array with quote's protected assets |
assets | array | Array with quote's assets |
id required | string <uuid> Example: 0cc9de4b-1b70-406d-b67b-766cf9c53cca The ID of the desired insurance-product. |
quote_id required | string <uuid> Example: 1ea47dd4-6c9c-4b05-8575-549e04cfee81 The ID of the desired quote. |
Content-Type required | string Default: application/json |
Authorization required | string Example: Bearer {access_token} |
{- "id": "1ea47dd4-6c9c-4b05-8575-549e04cfee81",
- "code": "ABC123",
- "session_id": "14990e13-1663-48e5-b14f-362c463dad84",
- "user_id": "2ec8ea29-ee45-4ee5-a7e3-bf04a156d4ae",
- "classes": [
- "io.habit.operations.required.quotes.create"
], - "created": "2020-08-27T00:00:00.000+0000",
- "updated": "2020-08-27T00:00:00.000+0000",
- "open_ts": "2020-08-27T00:00:00.000+0000",
- "simulated_ts": "2020-08-27T00:00:00.000+0000",
- "processing_ts": "2020-08-27T00:00:00.000+0000",
- "error_ts": "2020-08-27T00:00:00.000+0000",
- "closed_ts": "2020-08-27T00:00:00.000+0000",
- "canceled_ts": "2020-08-27T00:00:00.000+0000",
- "service_id": "11539368-524f-4b79-8902-28e1935fdf8e",
- "service": { },
- "state": "open",
- "properties": [
- {
- "id": "111b40fd-e9a8-4ca4-a5db-84a9878d32f2",
- "data": ":data",
- "label": ":label",
- "namespace": ":namespace",
- "order_index": 0,
- "quotepropertyspec_id": "5a2cf4bf-b457-4439-a177-f2273f499638",
- "classes": [ ],
- "schema": "v1_string"
}
], - "policy_id": "string",
- "reason": "string",
- "coverages": [
- {
- "id": "b05924ae-f7b6-47dd-a074-3f51ae290459",
- "coverage_id": "08a166a0-e29b-47c2-ab2b-a73b0987ccd8",
- "quotespec_id": "ee0c8f10-0b90-415c-947f-b5d8271d647a",
- "namespace": "family_protection",
- "order_index": 0,
- "classes": [
- "io.habit.operation.mandatory"
], - "properties": [
- {
- "id": "ac58df58-1957-4417-8e07-19de73609bb8",
- "namespace": "number_of_people",
- "label": "Number of people",
- "icon": null,
- "image": null,
- "data": null,
- "options": { },
- "help_text": "string",
- "placeholder": "string",
- "force_data": false,
- "schema": "v1_number",
- "order_index": 0,
- "parent_id": "string",
- "classes": [
- "io.habit.operation.coverages.required"
], - "children": [
- "string"
]
}
]
}
], - "protectedassets": [
- {
- "id": "f3ec5688-709f-4c94-94dc-88897c9a2e20",
- "namespace": "string",
- "quote_id": "1ea47dd4-6c9c-4b05-8575-549e04cfee81",
- "quote": {
- "id": "1ea47dd4-6c9c-4b05-8575-549e04cfee81",
- "code": "ABC123",
- "session_id": "14990e13-1663-48e5-b14f-362c463dad84",
- "user_id": "2ec8ea29-ee45-4ee5-a7e3-bf04a156d4ae",
- "classes": [
- "io.habit.operations.required.quotes.create"
], - "created": "2020-08-27T00:00:00.000+0000",
- "updated": "2020-08-27T00:00:00.000+0000",
- "open_ts": "2020-08-27T00:00:00.000+0000",
- "simulated_ts": "2020-08-27T00:00:00.000+0000",
- "processing_ts": "2020-08-27T00:00:00.000+0000",
- "error_ts": "2020-08-27T00:00:00.000+0000",
- "closed_ts": "2020-08-27T00:00:00.000+0000",
- "canceled_ts": "2020-08-27T00:00:00.000+0000",
- "service_id": "11539368-524f-4b79-8902-28e1935fdf8e",
- "service": { },
- "state": "open"
}, - "parent_id": "string",
- "classes": [
- "string"
], - "properties": [
- {
- "id": "ac58df58-1957-4417-8e07-19de73609bb8",
- "namespace": "string",
- "label": "string",
- "icon": "string",
- "image": "string",
- "data": "string",
- "options": { },
- "help_text": "string",
- "placeholder": "string",
- "force_data": true,
- "schema": "string",
- "order_index": 0,
- "parent_id": "string",
- "classes": [
- "string"
], - "children": [
- "string"
]
}
], - "files": [
- {
- "id": "54dc0ee0-fa12-4ce4-a038-6dbed8f314e2",
- "client_id": "0cc9de4b-1b70-406d-b67b-766cf9c53cca",
- "client_type": "string",
- "action": "application_upload",
- "name": "General conditions",
- "description": "Insurance general conditions",
- "icon": "string",
- "image": "string",
- "created": "2020-10-16T11:57:28.059+0000",
- "updated": "2020-10-16T11:57:28.059+0000",
- "entity": "quote-protected-assets",
- "entity_id": "0045c214-af61-41ca-92a0-136c3954d212"
}
]
}
], - "policy_holders": [
- {
- "id": "7742945f-8bc9-4e7d-91b4-9c8298696427",
- "quotes": [
- {
- "id": "1ea47dd4-6c9c-4b05-8575-549e04cfee81",
- "code": "ABC123",
- "session_id": "14990e13-1663-48e5-b14f-362c463dad84",
- "user_id": "2ec8ea29-ee45-4ee5-a7e3-bf04a156d4ae",
- "classes": [
- "io.habit.operations.required.quotes.create"
], - "created": "2020-08-27T00:00:00.000+0000",
- "updated": "2020-08-27T00:00:00.000+0000",
- "open_ts": "2020-08-27T00:00:00.000+0000",
- "simulated_ts": "2020-08-27T00:00:00.000+0000",
- "processing_ts": "2020-08-27T00:00:00.000+0000",
- "error_ts": "2020-08-27T00:00:00.000+0000",
- "closed_ts": "2020-08-27T00:00:00.000+0000",
- "canceled_ts": "2020-08-27T00:00:00.000+0000",
- "service_id": "11539368-524f-4b79-8902-28e1935fdf8e",
- "service": { },
- "state": "open"
}
], - "namespace": "string",
- "code": "ABC456",
- "session_id": "string",
- "user_id": "string",
- "parent_id": "string",
- "classes": [
- "string"
], - "state": "draft"
}
], - "files": [
- {
- "id": "54dc0ee0-fa12-4ce4-a038-6dbed8f314e2",
- "client_id": "0cc9de4b-1b70-406d-b67b-766cf9c53cca",
- "client_type": "string",
- "action": "application_upload",
- "name": "General conditions",
- "description": "Insurance general conditions",
- "icon": "string",
- "image": "string",
- "created": "2020-10-16T11:57:28.059+0000",
- "updated": "2020-10-16T11:57:28.059+0000",
- "entity": "quote",
- "entity_id": "bb6e1769-5685-4fc8-b9f5-f29a9ac6771e"
}
]
}
Add or update quote details
FIELD | TYPE | DESCRIPTION |
---|---|---|
properties | array | Array with all quote properties to be created or updated (properties id or namespace can be used) |
Each property must contain the following information
FIELD | TYPE | DESCRIPTION |
---|---|---|
quotepropertyspec_id | uuid | Quote Property Spec unique identifier to be created or updated. Either this or namespace must be specified. |
namespace | string | Quote Property Spec namespace to be created or updated. Either this or quotepropertyspec_id must be specified. |
data | string (required) | Data to be set in property |
FIELD | TYPE | DESCRIPTION |
---|---|---|
properties | array | Array with all created or updated properties |
n_updated | number | Number of quote properties updated |
simulated | object | Object with all quote properties updated by Insurer |
id required | string <uuid> Example: 0cc9de4b-1b70-406d-b67b-766cf9c53cca The ID of the desired insurance-product. |
quote_id required | string <uuid> Example: 1ea47dd4-6c9c-4b05-8575-549e04cfee81 The ID of the desired quote. |
Content-Type required | string Default: application/json |
Authorization required | string Example: Bearer {access_token} |
Array of objects (quoteSpecPropNamespace) |
{- "properties": [
- {
- "namespace": ":namespace",
- "data": ":data"
}
]
}
{- "properties": [
- {
- "id": "111b40fd-e9a8-4ca4-a5db-84a9878d32f2",
- "data": ":data",
- "label": ":label",
- "namespace": ":namespace",
- "order_index": 0,
- "quotepropertyspec_id": "5a2cf4bf-b457-4439-a177-f2273f499638",
- "classes": [ ],
- "schema": "v1_string"
}
], - "n_updated": 1,
- "simulated": {
- "quote_properties": [
- {
- "id": "9d720479-8269-49cf-9e68-61d0ea6c0316",
- "data": ":data",
- "namespace": ":namespace",
- "quote_id": "1ea47dd4-6c9c-4b05-8575-549e04cfee81"
}
]
}
}
Add or update quote coverages
FIELD | TYPE | DESCRIPTION |
---|---|---|
coverages | array | Array with all coverages to be created/changed |
Each coverage must contain the following information
FIELD | TYPE | DESCRIPTION |
---|---|---|
coverage_id | uuid | Quote Coverage ID unique identifier to be created or updated. Either this or namespace must be specified. |
namespace | string | Quote Coverage Spec namespace to be created or updated. Either this or coverage_id must be specified. |
properties | array (optional) | Data to be set in property |
Each property must contain the following information
FIELD | TYPE | DESCRIPTION |
---|---|---|
quotecoveragepropertyspec_id | uuid | Quote Coverage Property Spec unique identifier to be created or updated. Either this or namespace must be specified. |
namespace | string | Quote Coverage Property Spec namespace to be created or updated. Either this or quotecoveragepropertyspec_id must be specified. |
data | string (required) | Data to be set in property |
FIELD | TYPE | DESCRIPTION |
---|---|---|
coverages | array | Array with all coverages |
n_created | number | Number of quote coverage properties created |
n_updated | number | Number of quote coverage properties updated |
simulated | object | Object with all quote properties updated by Insurer |
id required | string <uuid> Example: 0cc9de4b-1b70-406d-b67b-766cf9c53cca The ID of the desired insurance-product. |
quote_id required | string <uuid> Example: 1ea47dd4-6c9c-4b05-8575-549e04cfee81 The ID of the desired quote. |
Content-Type required | string Default: application/json |
Authorization required | string Example: Bearer {access_token} |
Array of objects (coverage) |
{- "coverages": [
- {
- "namespace": "family_protection",
- "properties": [
- {
- "namespace": "number_of_people",
- "data": "10"
}
]
}
]
}
{- "coverages": [
- {
- "id": "b05924ae-f7b6-47dd-a074-3f51ae290459",
- "coverage_id": "08a166a0-e29b-47c2-ab2b-a73b0987ccd8",
- "quotespec_id": "ee0c8f10-0b90-415c-947f-b5d8271d647a",
- "namespace": "family_protection",
- "order_index": 0,
- "classes": [
- "io.habit.operation.mandatory"
], - "properties": [
- {
- "id": "ac58df58-1957-4417-8e07-19de73609bb8",
- "namespace": "number_of_people",
- "label": "Number of people",
- "icon": null,
- "image": null,
- "data": null,
- "options": { },
- "help_text": "string",
- "placeholder": "string",
- "force_data": false,
- "schema": "v1_number",
- "order_index": 0,
- "parent_id": "string",
- "classes": [
- "io.habit.operation.coverages.required"
], - "children": [
- "string"
]
}
]
}
], - "n_updated": 1,
- "simulated": {
- "quote_properties": [
- {
- "id": "9d720479-8269-49cf-9e68-61d0ea6c0316",
- "data": ":data",
- "namespace": ":namespace",
- "quote_id": "1ea47dd4-6c9c-4b05-8575-549e04cfee81"
}
]
}
}
delete quote coverages
FIELD | TYPE | DESCRIPTION |
---|---|---|
coverages | array | Array with all coverages to be created/changed |
Each coverage must contain the following information
FIELD | TYPE | DESCRIPTION |
---|---|---|
coverage_id | uuid | Quote Coverage ID unique identifier to be deleted. Either this or namespace must be specified. |
namespace | string | Quote Coverage Spec namespace to be deleted. Either this or coverage_id must be specified. |
FIELD | TYPE | DESCRIPTION |
---|---|---|
n_deleted | number | Number of quote coverage removed |
simulated | object | Object with all quote properties updated by Insurer |
id required | string <uuid> Example: 0cc9de4b-1b70-406d-b67b-766cf9c53cca The ID of the desired insurance-product. |
quote_id required | string <uuid> Example: 1ea47dd4-6c9c-4b05-8575-549e04cfee81 The ID of the desired quote. |
Content-Type required | string Default: application/json |
Authorization required | string Example: Bearer {access_token} |
Array of objects (coverage) |
{- "coverages": [
- {
- "namespace": "family_protection"
}
]
}
{- "n_deleted": 1,
- "simulated": {
- "quote_properties": [
- {
- "id": "9d720479-8269-49cf-9e68-61d0ea6c0316",
- "data": ":data",
- "namespace": ":namespace",
- "quote_id": "1ea47dd4-6c9c-4b05-8575-549e04cfee81"
}
]
}
}
Attach files to a quote. A file can be a document, picture, video, audio or json. Use classes to properly identify file type.
FIELD | TYPE | DESCRIPTION |
---|---|---|
files | array | Array with all files to be attached |
Each asset must contain the following information
FIELD | TYPE | DESCRIPTION |
---|---|---|
name | string | Filename from file-upload result |
uri | url | File url from file-upload result |
icon | url (optional) | File icon from file-upload result |
image | url (optional) | File image from file-upload result |
classes | array (optional) | Array of classes to be attached to the file. Find bellow available classes |
FIELD | TYPE | DESCRIPTION |
---|---|---|
files | array | Array with all attached files |
TYPE | DESCRIPTION |
---|---|
io.habit.trackableassets.type.document | Documents (*.pdf) |
io.habit.trackableassets.type.photo | Images (*.png, *.jpg) |
io.habit.trackableassets.type.video | Videos (*.mp4) |
io.habit.trackableassets.type.json | Json |
io.habit.trackableassets.type.audio | Audio |
id required | string <uuid> Example: 0cc9de4b-1b70-406d-b67b-766cf9c53cca The ID of the desired insurance-product. |
quote_id required | string <uuid> Example: 1ea47dd4-6c9c-4b05-8575-549e04cfee81 The ID of the desired quote. |
Content-Type required | string Default: application/json |
Authorization required | string Example: Bearer {access_token} |
Array of objects (attachFiles) |
{- "files": [
- {
- "name": "c4369b0342cb407c9935f248b7d44c5c_6782311e-3269-4f90-88f0-a22e453aca96.pdf",
- "classes": [
- "io.habit.trackableassets.type.document"
]
}
]
}
{- "files": [
- {
- "id": "07233fbd-e0c0-458c-b9eb-aaf6c6be1b81",
- "name": "c4369b0342cb407c9935f248b7d44c5c_6782311e-3269-4f90-88f0-a22e453aca96.pdf",
}
]
}
Create a new Protected Asset and link with an existent and active quote
FIELD | TYPE | DESCRIPTION |
---|---|---|
protectedasset_properties | array | Array with all protected asset properties to be created |
FIELD | TYPE | DESCRIPTION |
---|---|---|
created | object | Object with created Protected Asset |
customized | object | Object with all quote properties updated by Insurer |
id required | string <uuid> Example: 0cc9de4b-1b70-406d-b67b-766cf9c53cca The ID of the desired insurance-product. |
quote_id required | string <uuid> Example: 1ea47dd4-6c9c-4b05-8575-549e04cfee81 The ID of the desired quote. |
Content-Type required | string Default: application/json |
Authorization required | string Example: Bearer {access_token} |
Array of objects (protectedAssetSpecPropNamespace) |
{- "protectedasset_properties": [
- {
- "namespace": ":namespace",
- "data": ":data"
}
]
}
{- "href": "/v3/data-layer/quote-protected-assets/f3ec5688-709f-4c94-94dc-88897c9a2e20",
- "id": "f3ec5688-709f-4c94-94dc-88897c9a2e20",
- "customized": {
- "quote_properties": [
- {
- "id": "9d720479-8269-49cf-9e68-61d0ea6c0316",
- "data": ":data",
- "namespace": ":namespace",
- "quote_id": "1ea47dd4-6c9c-4b05-8575-549e04cfee81"
}
]
}
}
Delete Protected Assets linked to a quote
FIELD | TYPE | DESCRIPTION |
---|---|---|
protectedassets | array | Array with all protected asset ids to be deleted |
FIELD | TYPE | DESCRIPTION |
---|---|---|
protectedasset_id | uuid | Protected Asset ID unique identifier to be deleted. |
FIELD | TYPE | DESCRIPTION |
---|---|---|
n_deleted | number | Number of protected assets deleted |
simulated | object | Object with all quote properties updated by Insurer |
id required | string <uuid> Example: 0cc9de4b-1b70-406d-b67b-766cf9c53cca The ID of the desired insurance-product. |
quote_id required | string <uuid> Example: 1ea47dd4-6c9c-4b05-8575-549e04cfee81 The ID of the desired quote. |
Content-Type required | string Default: application/json |
Authorization required | string Example: Bearer {access_token} |
Array of objects (PADelete) |
{- "protectedassets": [
- {
- "protectedasset_id": "b05924ae-f7b6-47dd-a074-3f51ae290459"
}
]
}
{- "n_deleted": 1,
- "simulated": {
- "quote_properties": [
- {
- "id": "9d720479-8269-49cf-9e68-61d0ea6c0316",
- "data": ":data",
- "namespace": ":namespace",
- "quote_id": "1ea47dd4-6c9c-4b05-8575-549e04cfee81"
}
]
}
}
Create a new policy holder and associate with a quote
If user is present, the API will try to create a new user, or find an existing one with data sent. This user will be linked to the Policy Holder and Quote
FIELD | TYPE | DESCRIPTION |
---|---|---|
quote_id | uuid, required | Quote unique identifier |
user_id | uuid | User unique identifier to be linked with policy holder |
version_id | string, optional | Specs version to be used when creating the policy holder. |
properties | array | Array with all policy holder properties to be created |
A list of available properties can be retrieved using Quotes -> Retrieve Specs method
Policy holder fields
FIELD | TYPE | DESCRIPTION |
---|---|---|
id | uuid | Policy Holder unique identifier |
code | string | Internal code to identify the Policy Holder |
state | string | Actual Policy Holder state default: draft |
session_id | uuid | ID of the session used to create the Policy Holder |
user_id | uuid | ID of the user linked to the Policy Holder |
classes | array | Array of classes linked to the Policy Holder |
namespace | string | Namespace of the Policy Holder |
parent_id | uuid | Parent Policy Holder unique identifier |
quotes | array | Array of quotes linked to the Policy Holder |
properties | array | Array of Policy Holder's properties. Retrieved only for a single Policy Holder |
Extra fields:
FIELD | TYPE | DESCRIPTION |
---|---|---|
simulated | object | Object with all quote properties updated by Insurer |
id required | string <uuid> Example: 0cc9de4b-1b70-406d-b67b-766cf9c53cca The ID of the desired insurance-product. |
Content-Type required | string Default: application/json |
Authorization required | string Example: Bearer {access_token} |
quote_id required | string |
user_id | string |
version_id | string |
Array of objects (Policy Holder Property Create Id) |
{- "quote_id": "1ea47dd4-6c9c-4b05-8575-549e04cfee81",
- "user_id": "2ec8ea29-ee45-4ee5-a7e3-bf04a156d4ae",
- "version_id": "58970c9d-7c6c-4b4e-9664-ec3001899ca0",
- "properties": [
- {
- "policyholderpropertyspec_id": "8b18da06-1031-4c08-8fbf-90c54de614a3",
- "data": ":data"
}
]
}
{- "id": "7742945f-8bc9-4e7d-91b4-9c8298696427",
- "quote": {
- "id": "1ea47dd4-6c9c-4b05-8575-549e04cfee81",
- "code": "ABC123",
- "session_id": "14990e13-1663-48e5-b14f-362c463dad84",
- "user_id": "2ec8ea29-ee45-4ee5-a7e3-bf04a156d4ae",
- "classes": [
- "io.habit.operations.required.quotes.create"
], - "created": "2020-08-27T00:00:00.000+0000",
- "updated": "2020-08-27T00:00:00.000+0000",
- "open_ts": "2020-08-27T00:00:00.000+0000",
- "simulated_ts": "2020-08-27T00:00:00.000+0000",
- "processing_ts": "2020-08-27T00:00:00.000+0000",
- "error_ts": "2020-08-27T00:00:00.000+0000",
- "closed_ts": "2020-08-27T00:00:00.000+0000",
- "canceled_ts": "2020-08-27T00:00:00.000+0000",
- "service_id": "11539368-524f-4b79-8902-28e1935fdf8e",
- "service": { },
- "state": "open"
}, - "namespace": "string",
- "code": "ABC456",
- "session_id": "string",
- "user_id": "string",
- "parent_id": "string",
- "classes": [
- "string"
], - "state": "draft",
- "properties": [
- {
- "id": "8b18da06-1031-4c08-8fbf-90c54de614a3",
- "namespace": "string",
- "label": "string",
- "icon": "string",
- "image": "string",
- "data": "string",
- "options": { },
- "help_text": "string",
- "placeholder": "string",
- "force_data": true,
- "schema": "string",
- "order_index": 0,
- "parent_id": "string",
- "classes": [
- "string"
], - "children": [
- "string"
]
}
], - "simulated": {
- "quote_properties": [
- {
- "id": "9d720479-8269-49cf-9e68-61d0ea6c0316",
- "data": ":data",
- "namespace": ":namespace",
- "quote_id": "1ea47dd4-6c9c-4b05-8575-549e04cfee81"
}
]
}
}
Retrieve information about policy holders
FIELD | TYPE | DESCRIPTION |
---|---|---|
id | uuid | Policy Holder unique identifier |
code | string | Internal code to identify the Policy Holder |
state | string | Actual Policy Holder state default: draft |
session_id | uuid | ID of the session used to create the Policy Holder |
user_id | uuid | ID of the user linked to the Policy Holder |
classes | array | Array of classes linked to the Policy Holder |
namespace | string | Namespace of the Policy Holder |
parent_id | uuid | Parent Policy Holder unique identifier |
quotes | array | Array of quotes linked to the Policy Holder |
properties | array | Array of Policy Holder's properties. Retrieved only for a single Policy Holder |
id required | string <uuid> Example: 0cc9de4b-1b70-406d-b67b-766cf9c53cca The ID of the desired insurance-product. |
policyholder_id required | string <uuid> Example: 7742945f-8bc9-4e7d-91b4-9c8298696427 The ID of the desired policy-holder. |
Content-Type required | string Default: application/json |
Authorization required | string Example: Bearer {access_token} |
{- "id": "7742945f-8bc9-4e7d-91b4-9c8298696427",
- "quotes": [
- {
- "id": "1ea47dd4-6c9c-4b05-8575-549e04cfee81",
- "code": "ABC123",
- "session_id": "14990e13-1663-48e5-b14f-362c463dad84",
- "user_id": "2ec8ea29-ee45-4ee5-a7e3-bf04a156d4ae",
- "classes": [
- "io.habit.operations.required.quotes.create"
], - "created": "2020-08-27T00:00:00.000+0000",
- "updated": "2020-08-27T00:00:00.000+0000",
- "open_ts": "2020-08-27T00:00:00.000+0000",
- "simulated_ts": "2020-08-27T00:00:00.000+0000",
- "processing_ts": "2020-08-27T00:00:00.000+0000",
- "error_ts": "2020-08-27T00:00:00.000+0000",
- "closed_ts": "2020-08-27T00:00:00.000+0000",
- "canceled_ts": "2020-08-27T00:00:00.000+0000",
- "service_id": "11539368-524f-4b79-8902-28e1935fdf8e",
- "service": { },
- "state": "open"
}
], - "namespace": "string",
- "code": "ABC456",
- "session_id": "string",
- "user_id": "string",
- "parent_id": "string",
- "classes": [
- "string"
], - "state": "draft",
- "properties": [
- {
- "id": "8b18da06-1031-4c08-8fbf-90c54de614a3",
- "namespace": "string",
- "label": "string",
- "icon": "string",
- "image": "string",
- "data": "string",
- "options": { },
- "help_text": "string",
- "placeholder": "string",
- "force_data": true,
- "schema": "string",
- "order_index": 0,
- "parent_id": "string",
- "classes": [
- "string"
], - "children": [
- "string"
]
}
]
}
Use the following method to retrieve an array of created policy holders
FIELD | TYPE | DESCRIPTION |
---|---|---|
elements | array | Array of policy holders |
size | number | Number of policy holders in elements array |
Every element in the array must contain the following fields:
FIELD | TYPE | DESCRIPTION |
---|---|---|
id | uuid | Policy Holder unique identifier |
code | string | Internal code to identify the Policy Holder |
state | string | Actual Policy Holder state default: draft |
session_id | uuid | ID of the session used to create the Policy Holder |
user_id | uuid | ID of the user linked to the Policy Holder |
classes | array | Array of classes linked to the Policy Holder |
namespace | string | Namespace of the Policy Holder |
parent_id | uuid | Parent Policy Holder unique identifier |
quotes | array | Array of quotes linked to the Policy Holder |
properties | array | Array of Policy Holder's properties. Retrieved only for a single Policy Holder |
id required | string <uuid> Example: 0cc9de4b-1b70-406d-b67b-766cf9c53cca The ID of the desired insurance-product. |
page_size | number <integer> Default: 20 A limit on the number of objects to be returned. Default is 20, minimum is 1, maximum is 100. |
page_start_index | number <integer> Default: 0 Offset the list of returned results by this amount. Default is 0. |
order_by | string Example: order_by=-created The results can be in ascendent (+) or descendent (-) order. Use + or - before the field name to use a specific order. |
fields | string Example: fields=id,name comma separeted fields to return in payload. |
id | string <uuid> entity id to filter by. |
code | string complete entity code to filter by. |
state | string complete entity state to filter by. |
namespace | string complete entity namespace to filter by. |
Content-Type required | string Default: application/json |
Authorization required | string Example: Bearer {access_token} |
{- "elements": [
- {
- "id": "7742945f-8bc9-4e7d-91b4-9c8298696427",
- "quotes": [
- {
- "id": "1ea47dd4-6c9c-4b05-8575-549e04cfee81",
- "code": "ABC123",
- "session_id": "14990e13-1663-48e5-b14f-362c463dad84",
- "user_id": "2ec8ea29-ee45-4ee5-a7e3-bf04a156d4ae",
- "classes": [
- "io.habit.operations.required.quotes.create"
], - "created": "2020-08-27T00:00:00.000+0000",
- "updated": "2020-08-27T00:00:00.000+0000",
- "open_ts": "2020-08-27T00:00:00.000+0000",
- "simulated_ts": "2020-08-27T00:00:00.000+0000",
- "processing_ts": "2020-08-27T00:00:00.000+0000",
- "error_ts": "2020-08-27T00:00:00.000+0000",
- "closed_ts": "2020-08-27T00:00:00.000+0000",
- "canceled_ts": "2020-08-27T00:00:00.000+0000",
- "service_id": "11539368-524f-4b79-8902-28e1935fdf8e",
- "service": { },
- "state": "open"
}
], - "namespace": "string",
- "code": "ABC456",
- "session_id": "string",
- "user_id": "string",
- "parent_id": "string",
- "classes": [
- "string"
], - "state": "draft"
}
], - "size": 1
}
Update Policy Holder's properties according to payload
FIELD | TYPE | DESCRIPTION |
---|---|---|
properties | array | Array with all policy holder properties to be updated |
quote_id | uuid | Quote unique identifier (optional) |
Each property must contain the following information
FIELD | TYPE | DESCRIPTION |
---|---|---|
policyholderpropertyspec_id | uuid | Policy Holder Property Spec unique identifier to be created or updated. Either this or namespace must be specified. |
namespace | string | Policy Holder Property Spec namespace to be created or updated. Either this or policyholderpropertyspec_id must be specified. |
data | string (required) | Data to be set in property |
FIELD | TYPE | DESCRIPTION |
---|---|---|
properties | array | Array with all created or updated properties |
n_updated | number | Number of quote properties updated |
simulated | object | Object with all quote properties updated by Insurer |
id required | string <uuid> Example: 0cc9de4b-1b70-406d-b67b-766cf9c53cca The ID of the desired insurance-product. |
policyholder_id required | string <uuid> Example: 7742945f-8bc9-4e7d-91b4-9c8298696427 The ID of the desired policy-holder. |
Content-Type required | string Default: application/json |
Authorization required | string Example: Bearer {access_token} |
required | Array of objects (Policy Holder Property Create Namespace) |
quote_id | string |
{- "properties": [
- {
- "namespace": ":namespace",
- "data": ":data"
}
], - "quote_id": "1ea47dd4-6c9c-4b05-8575-549e04cfee81"
}
{- "properties": [
- {
- "id": "14e7bc30-d54e-47b5-b56a-ee3edbae0af5",
- "namespace": "string",
- "label": "string",
- "icon": "string",
- "image": "string",
- "data": "string",
- "options": { },
- "help_text": "string",
- "placeholder": "string",
- "schema": "string",
- "order_index": 0,
- "parent_id": "string",
- "classes": [
- "string"
]
}
], - "n_updated": 1,
- "simulated": {
- "quote_properties": [
- {
- "id": "9d720479-8269-49cf-9e68-61d0ea6c0316",
- "data": ":data",
- "namespace": ":namespace",
- "quote_id": "1ea47dd4-6c9c-4b05-8575-549e04cfee81"
}
]
}
}
Retrieve information about Protected Assets
FIELD | TYPE | DESCRIPTION |
---|---|---|
id | uuid | Protected Asset unique identifier |
namespace | string | Namespace of the Protected Asset |
quote_id | uuid | Quote unique identifier |
quote | object | Object with quote's details |
classes | array | Array of classes linked to the Protected Asset |
parent_id | uuid | Parent Protected Asset unique identifier |
properties | array | Array with all protected asset properties |
assets | array | Array with protected asset's assets |
id required | string <uuid> Example: 0cc9de4b-1b70-406d-b67b-766cf9c53cca The ID of the desired insurance-product. |
protectedasset_id required | string <uuid> Example: f3ec5688-709f-4c94-94dc-88897c9a2e20 The ID of the desired protected asset. |
Content-Type required | string Default: application/json |
Authorization required | string Example: Bearer {access_token} |
{- "id": "f3ec5688-709f-4c94-94dc-88897c9a2e20",
- "namespace": "string",
- "quote_id": "1ea47dd4-6c9c-4b05-8575-549e04cfee81",
- "quote": {
- "id": "1ea47dd4-6c9c-4b05-8575-549e04cfee81",
- "code": "ABC123",
- "session_id": "14990e13-1663-48e5-b14f-362c463dad84",
- "user_id": "2ec8ea29-ee45-4ee5-a7e3-bf04a156d4ae",
- "classes": [
- "io.habit.operations.required.quotes.create"
], - "created": "2020-08-27T00:00:00.000+0000",
- "updated": "2020-08-27T00:00:00.000+0000",
- "open_ts": "2020-08-27T00:00:00.000+0000",
- "simulated_ts": "2020-08-27T00:00:00.000+0000",
- "processing_ts": "2020-08-27T00:00:00.000+0000",
- "error_ts": "2020-08-27T00:00:00.000+0000",
- "closed_ts": "2020-08-27T00:00:00.000+0000",
- "canceled_ts": "2020-08-27T00:00:00.000+0000",
- "service_id": "11539368-524f-4b79-8902-28e1935fdf8e",
- "service": { },
- "state": "open"
}, - "parent_id": "string",
- "classes": [
- "string"
], - "properties": [
- {
- "id": "ac58df58-1957-4417-8e07-19de73609bb8",
- "namespace": "string",
- "label": "string",
- "icon": "string",
- "image": "string",
- "data": "string",
- "options": { },
- "help_text": "string",
- "placeholder": "string",
- "force_data": true,
- "schema": "string",
- "order_index": 0,
- "parent_id": "string",
- "classes": [
- "string"
], - "children": [
- "string"
]
}
], - "files": [
- {
- "id": "54dc0ee0-fa12-4ce4-a038-6dbed8f314e2",
- "client_id": "0cc9de4b-1b70-406d-b67b-766cf9c53cca",
- "client_type": "string",
- "action": "application_upload",
- "name": "General conditions",
- "description": "Insurance general conditions",
- "icon": "string",
- "image": "string",
- "created": "2020-10-16T11:57:28.059+0000",
- "updated": "2020-10-16T11:57:28.059+0000",
- "entity": "quote-protected-assets",
- "entity_id": "0045c214-af61-41ca-92a0-136c3954d212"
}
]
}
Use the following method to retrieve an array of Protected Assets.
FIELD | TYPE | DESCRIPTION |
---|---|---|
elements | array | Array of Protected Assets |
size | number | Number of Protected Assets in elements array |
Every element in the array must contain the following fields:
FIELD | TYPE | DESCRIPTION |
---|---|---|
id | uuid | Protected Asset unique identifier |
namespace | string | Namespace of the Protected Asset |
quote_id | uuid | Quote unique identifier |
quote | object | Object with quote's details |
classes | array | Array of classes linked to the Protected Asset |
parent_id | uuid | Parent Protected Asset unique identifier |
id required | string <uuid> Example: 0cc9de4b-1b70-406d-b67b-766cf9c53cca The ID of the desired insurance-product. |
page_size | number <integer> Default: 20 A limit on the number of objects to be returned. Default is 20, minimum is 1, maximum is 100. |
page_start_index | number <integer> Default: 0 Offset the list of returned results by this amount. Default is 0. |
order_by | string Example: order_by=-created The results can be in ascendent (+) or descendent (-) order. Use + or - before the field name to use a specific order. |
fields | string Example: fields=id,name comma separeted fields to return in payload. |
id | string <uuid> entity id to filter by. |
namespace | string complete entity namespace to filter by. |
quote_id | string <uuid> quote id to filter by. |
Content-Type required | string Default: application/json |
Authorization required | string Example: Bearer {access_token} |
{- "elements": [
- {
- "id": "f3ec5688-709f-4c94-94dc-88897c9a2e20",
- "namespace": "string",
- "quote_id": "1ea47dd4-6c9c-4b05-8575-549e04cfee81",
- "quote": {
- "id": "1ea47dd4-6c9c-4b05-8575-549e04cfee81",
- "code": "ABC123",
- "session_id": "14990e13-1663-48e5-b14f-362c463dad84",
- "user_id": "2ec8ea29-ee45-4ee5-a7e3-bf04a156d4ae",
- "classes": [
- "io.habit.operations.required.quotes.create"
], - "created": "2020-08-27T00:00:00.000+0000",
- "updated": "2020-08-27T00:00:00.000+0000",
- "open_ts": "2020-08-27T00:00:00.000+0000",
- "simulated_ts": "2020-08-27T00:00:00.000+0000",
- "processing_ts": "2020-08-27T00:00:00.000+0000",
- "error_ts": "2020-08-27T00:00:00.000+0000",
- "closed_ts": "2020-08-27T00:00:00.000+0000",
- "canceled_ts": "2020-08-27T00:00:00.000+0000",
- "service_id": "11539368-524f-4b79-8902-28e1935fdf8e",
- "service": { },
- "state": "open"
}, - "parent_id": "string",
- "classes": [
- "string"
], - "properties": [
- {
- "id": "ac58df58-1957-4417-8e07-19de73609bb8",
- "namespace": "string",
- "label": "string",
- "icon": "string",
- "image": "string",
- "data": "string",
- "options": { },
- "help_text": "string",
- "placeholder": "string",
- "force_data": true,
- "schema": "string",
- "order_index": 0,
- "parent_id": "string",
- "classes": [
- "string"
], - "children": [
- "string"
]
}
], - "files": [
- {
- "id": "54dc0ee0-fa12-4ce4-a038-6dbed8f314e2",
- "client_id": "0cc9de4b-1b70-406d-b67b-766cf9c53cca",
- "client_type": "string",
- "action": "application_upload",
- "name": "General conditions",
- "description": "Insurance general conditions",
- "icon": "string",
- "image": "string",
- "created": "2020-10-16T11:57:28.059+0000",
- "updated": "2020-10-16T11:57:28.059+0000",
- "entity": "quote-protected-assets",
- "entity_id": "0045c214-af61-41ca-92a0-136c3954d212"
}
]
}
], - "size": 1
}
Retrieve all available protected asset specs to update protected asset properties
FIELD | TYPE | DESCRIPTION |
---|---|---|
elements | array | Array with all available protected asset properties |
size | number | Number of properties in elements |
id required | string <uuid> Example: 0cc9de4b-1b70-406d-b67b-766cf9c53cca The ID of the desired insurance-product. |
version_id required | string <uuid> Example: 58970c9d-7c6c-4b4e-9664-ec3001899ca0 The ID of the desired version. |
id | string <uuid> entity id to filter by. |
namespace | string complete entity namespace to filter by. |
label | string complete entity label to filter by. |
force_data | boolean boolean indicating force_data state to filter by. |
schema | string complete entity schema to filter by. |
order_index | number <integer> entity order_index to filter by. |
fields | string Example: fields=id,name comma separeted fields to return in payload. |
Content-Type required | string Default: application/json |
Authorization required | string Example: Bearer {access_token} |
{- "elements": [
- {
- "id": "e753ab5c-33b3-4c12-b95c-2da878668eed",
- "namespace": "string",
- "label": "string",
- "icon": "string",
- "image": "string",
- "data": "string",
- "options": { },
- "help_text": "string",
- "placeholder": "string",
- "force_data": true,
- "schema": "string",
- "order_index": 0,
- "parent_id": "string",
- "classes": [
- "string"
], - "children": [
- "string"
]
}
], - "size": 1
}
Add or Update additional information about a protected asset. A list of available properties can be retrieved using Protected Asset -> Protected Asset Property Specs method
FIELD | TYPE | DESCRIPTION |
---|---|---|
properties | array | Array with all protected asset properties to be created or updated |
Each property must contain the following information
FIELD | TYPE | DESCRIPTION |
---|---|---|
protectedassetpropertyspec_id | uuid (required) | Protected Asset Property Spec unique identifier to be created or updated. Either this or namespace must be specified. |
namespace | uuid (required) | Protected Asset Property Spec namespace to be created or updated. Either this or protectedassetpropertyspec_id must be specified. |
data | string (required) | Data to be set in property |
FIELD | TYPE | DESCRIPTION |
---|---|---|
properties | array | Array with all created or updated properties |
n_updated | number | Number of protected asset properties updated |
simulated | object | Object with all quote properties updated by Insurer |
id required | string <uuid> Example: 0cc9de4b-1b70-406d-b67b-766cf9c53cca The ID of the desired insurance-product. |
quote_id required | string <uuid> Example: 1ea47dd4-6c9c-4b05-8575-549e04cfee81 The ID of the desired quote. |
protectedasset_id required | string <uuid> Example: f3ec5688-709f-4c94-94dc-88897c9a2e20 The ID of the desired protected asset. |
Content-Type required | string Default: application/json |
Authorization required | string Example: Bearer {access_token} |
Array of objects (protectedAssetSpecPropNamespace) |
{- "properties": [
- {
- "namespace": ":namespace",
- "data": ":data"
}
]
}
{- "properties": [
- {
- "id": "ac58df58-1957-4417-8e07-19de73609bb8",
- "namespace": "string",
- "label": "string",
- "icon": "string",
- "image": "string",
- "data": "string",
- "options": { },
- "help_text": "string",
- "placeholder": "string",
- "force_data": true,
- "schema": "string",
- "order_index": 0,
- "parent_id": "string",
- "classes": [
- "string"
], - "children": [
- "string"
]
}
], - "n_updated": 1,
- "simulated": {
- "quote_properties": [
- {
- "id": "9d720479-8269-49cf-9e68-61d0ea6c0316",
- "data": ":data",
- "namespace": ":namespace",
- "quote_id": "1ea47dd4-6c9c-4b05-8575-549e04cfee81"
}
]
}
}
Attach files to a Protected Asset. A file can be a document, picture, video, audio or json. Use classes to properly identify file type.
FIELD | TYPE | DESCRIPTION |
---|---|---|
files | array | Array with all files to be attached |
Each asset must contain the following information
FIELD | TYPE | DESCRIPTION |
---|---|---|
name | string | Filename from file-upload result |
uri | url | File url from file-upload result |
icon | url (optional) | File icon from file-upload result |
image | url (optional) | File image from file-upload result |
classes | array (optional) | Array of classes to be attached to the file. Find bellow available classes |
FIELD | TYPE | DESCRIPTION |
---|---|---|
files | array | Array with all attached files |
TYPE | DESCRIPTION |
---|---|
io.habit.trackableassets.type.document | Documents (*.pdf) |
io.habit.trackableassets.type.photo | Images (*.png, *.jpg) |
io.habit.trackableassets.type.video | Videos (*.mp4) |
io.habit.trackableassets.type.json | Json |
io.habit.trackableassets.type.audio | Audio |
id required | string <uuid> Example: 0cc9de4b-1b70-406d-b67b-766cf9c53cca The ID of the desired insurance-product. |
protectedasset_id required | string <uuid> Example: f3ec5688-709f-4c94-94dc-88897c9a2e20 The ID of the desired protected asset. |
Content-Type required | string Default: application/json |
Authorization required | string Example: Bearer {access_token} |
Array of objects (attachFiles) |
{- "files": [
- {
- "name": "c4369b0342cb407c9935f248b7d44c5c_6782311e-3269-4f90-88f0-a22e453aca96.pdf",
- "classes": [
- "io.habit.trackableassets.type.document"
]
}
]
}
{- "files": [
- {
- "id": "07233fbd-e0c0-458c-b9eb-aaf6c6be1b81",
- "name": "c4369b0342cb407c9935f248b7d44c5c_6782311e-3269-4f90-88f0-a22e453aca96.pdf",
}
]
}
Create a contract for a simulated quote
User information is required to create a contract. If the user exists you can send user_id in request payload, or you can send all user information to be created inside user request payload
If both parameters were sent, user parameter will be ignored and policy will be linked to the user_id
FIELD | TYPE | DESCRIPTION |
---|---|---|
user_id | uuid | User unique identifier to be linked with a contract |
user | object | User information to be created and linked to the quote and policy |
Policy Fields:
FIELD | TYPE | DESCRIPTION |
---|---|---|
id | uuid | Policy unique identifier |
code | string | Internal code to identify the Policy |
state | string | Actual quote state (active, inactive, suspend, canceled, renewed) |
created | string (date) | Policy instance creation date |
updated | string (date) | Policy instance last update date |
active_ts | string (date) | Policy last activation date |
inactive_ts | string (date) | Policy last inactivation date |
suspended_ts | string (date) | Policy last suspension date |
canceled_ts | string (date) | Policy cacelation date |
renewed_ts | string (date) | Policy renovation date |
user_id | string | ID of the user linked to the policy |
quote_id | uuid | Quote unique identifier |
quote | object | Object with quote's details |
Extra fields:
FIELD | TYPE | DESCRIPTION |
---|---|---|
customized | object | Object with all quote properties updated by Insurer |
id required | string <uuid> Example: 0cc9de4b-1b70-406d-b67b-766cf9c53cca The ID of the desired insurance-product. |
quote_id required | string <uuid> Example: 1ea47dd4-6c9c-4b05-8575-549e04cfee81 The ID of the desired quote. |
Content-Type required | string Default: application/json |
Authorization required | string Example: Bearer {access_token} |
user_id | string User unique identifier to be linked with a contract |
object (userCreateRequest) |
{- "user_id": "3bfb32f9-7a48-4d89-894e-d4ba49f7df2e",
- "user": {
- "name": "New User",
- "email": "new.user@habit.io",
- "mobile": "+999999999999",
- "partner_code": "XYZ1234",
- "flags": {
- "receive_email_marketing": true,
- "allow_geolocation": false,
- "accepted_terms_and_conditions": true
}
}
}
{- "id": "bb6e1769-5685-4fc8-b9f5-f29a9ac6771e",
- "code": "ABC789",
- "state": "active",
- "custom_state": "string",
- "user_id": "string",
- "quote_id": "1ea47dd4-6c9c-4b05-8575-549e04cfee81",
- "quote": {
- "id": "1ea47dd4-6c9c-4b05-8575-549e04cfee81",
- "code": "ABC123",
- "session_id": "14990e13-1663-48e5-b14f-362c463dad84",
- "user_id": "2ec8ea29-ee45-4ee5-a7e3-bf04a156d4ae",
- "classes": [
- "io.habit.operations.required.quotes.create"
], - "created": "2020-08-27T00:00:00.000+0000",
- "updated": "2020-08-27T00:00:00.000+0000",
- "open_ts": "2020-08-27T00:00:00.000+0000",
- "simulated_ts": "2020-08-27T00:00:00.000+0000",
- "processing_ts": "2020-08-27T00:00:00.000+0000",
- "error_ts": "2020-08-27T00:00:00.000+0000",
- "closed_ts": "2020-08-27T00:00:00.000+0000",
- "canceled_ts": "2020-08-27T00:00:00.000+0000",
- "service_id": "11539368-524f-4b79-8902-28e1935fdf8e",
- "service": { },
- "state": "open"
}, - "reason_id": "io.habit.policies.other",
- "created": "2020-08-27T00:00:00.000+0000",
- "updated": "2020-08-27T00:00:00.000+0000",
- "active_ts": "2020-08-27T00:00:00.000+0000",
- "inactive_ts": "2020-08-27T00:00:00.000+0000",
- "suspended_ts": "2020-08-27T00:00:00.000+0000",
- "canceled_ts": "2020-08-27T00:00:00.000+0000",
- "renewed_ts": "2020-08-27T00:00:00.000+0000",
- "files": [
- {
- "id": "54dc0ee0-fa12-4ce4-a038-6dbed8f314e2",
- "client_id": "0cc9de4b-1b70-406d-b67b-766cf9c53cca",
- "client_type": "string",
- "action": "application_upload",
- "name": "General conditions",
- "description": "Insurance general conditions",
- "icon": "string",
- "image": "string",
- "created": "2020-10-16T11:57:28.059+0000",
- "updated": "2020-10-16T11:57:28.059+0000",
- "entity": "policy",
- "entity_id": "bb6e1769-5685-4fc8-b9f5-f29a9ac6771e"
}
], - "coverages": [
- {
- "id": "b05924ae-f7b6-47dd-a074-3f51ae290459",
- "coverage_id": "08a166a0-e29b-47c2-ab2b-a73b0987ccd8",
- "quotespec_id": "ee0c8f10-0b90-415c-947f-b5d8271d647a",
- "namespace": "family_protection",
- "order_index": 0,
- "classes": [
- "io.habit.operation.mandatory"
], - "properties": [
- {
- "id": "ac58df58-1957-4417-8e07-19de73609bb8",
- "namespace": "number_of_people",
- "label": "Number of people",
- "icon": null,
- "image": null,
- "data": null,
- "options": { },
- "help_text": "string",
- "placeholder": "string",
- "force_data": false,
- "schema": "v1_number",
- "order_index": 0,
- "parent_id": "string",
- "classes": [
- "io.habit.operation.coverages.required"
], - "children": [
- "string"
]
}
]
}
], - "customized": {
- "quote_properties": [
- {
- "id": "9d720479-8269-49cf-9e68-61d0ea6c0316",
- "data": ":data",
- "namespace": ":namespace",
- "quote_id": "1ea47dd4-6c9c-4b05-8575-549e04cfee81"
}
]
}
}
After a contract is approved by the insurance company, it becomes a Policy.
Use the following method to retrieve information about Policies
FIELD | TYPE | DESCRIPTION |
---|---|---|
id | uuid | Policy unique identifier |
code | string | Internal code to identify the Policy |
state | string | Actual quote state (active, inactive, suspend, canceled, renewed) |
custom_state | string | Custom state for the contract (active, inactive, suspended, canceled, renewed) |
user_id | string | ID of the user linked to the policy |
quote_id | uuid | Quote unique identifier |
quote | object | Object with quote's details |
reason_id | string | Reason to explain policy state or custom_state |
classes | array | Array of classes linked to the Protected Asset |
created | string (date) | Policy instance creation date |
updated | string (date) | Policy instance last update date |
active_ts | string (date) | Policy last activation date |
inactive_ts | string (date) | Policy last inactivation date |
suspended_ts | string (date) | Policy last suspension date |
canceled_ts | string (date) | Policy cacelation date |
renewed_ts | string (date) | Policy renovation date |
files | array | Array of files linked to the Policy |
coverages | array | Array with policy's coverages |
id required | string <uuid> Example: 0cc9de4b-1b70-406d-b67b-766cf9c53cca The ID of the desired insurance-product. |
policy_id required | string <uuid> Example: bb6e1769-5685-4fc8-b9f5-f29a9ac6771e The ID of the desired policy. |
Content-Type required | string Default: application/json |
Authorization required | string Example: Bearer {access_token} |
{- "id": "bb6e1769-5685-4fc8-b9f5-f29a9ac6771e",
- "code": "ABC789",
- "state": "active",
- "custom_state": "string",
- "user_id": "string",
- "quote_id": "1ea47dd4-6c9c-4b05-8575-549e04cfee81",
- "quote": {
- "id": "1ea47dd4-6c9c-4b05-8575-549e04cfee81",
- "code": "ABC123",
- "session_id": "14990e13-1663-48e5-b14f-362c463dad84",
- "user_id": "2ec8ea29-ee45-4ee5-a7e3-bf04a156d4ae",
- "classes": [
- "io.habit.operations.required.quotes.create"
], - "created": "2020-08-27T00:00:00.000+0000",
- "updated": "2020-08-27T00:00:00.000+0000",
- "open_ts": "2020-08-27T00:00:00.000+0000",
- "simulated_ts": "2020-08-27T00:00:00.000+0000",
- "processing_ts": "2020-08-27T00:00:00.000+0000",
- "error_ts": "2020-08-27T00:00:00.000+0000",
- "closed_ts": "2020-08-27T00:00:00.000+0000",
- "canceled_ts": "2020-08-27T00:00:00.000+0000",
- "service_id": "11539368-524f-4b79-8902-28e1935fdf8e",
- "service": { },
- "state": "open"
}, - "reason_id": "io.habit.policies.other",
- "created": "2020-08-27T00:00:00.000+0000",
- "updated": "2020-08-27T00:00:00.000+0000",
- "active_ts": "2020-08-27T00:00:00.000+0000",
- "inactive_ts": "2020-08-27T00:00:00.000+0000",
- "suspended_ts": "2020-08-27T00:00:00.000+0000",
- "canceled_ts": "2020-08-27T00:00:00.000+0000",
- "renewed_ts": "2020-08-27T00:00:00.000+0000",
- "files": [
- {
- "id": "54dc0ee0-fa12-4ce4-a038-6dbed8f314e2",
- "client_id": "0cc9de4b-1b70-406d-b67b-766cf9c53cca",
- "client_type": "string",
- "action": "application_upload",
- "name": "General conditions",
- "description": "Insurance general conditions",
- "icon": "string",
- "image": "string",
- "created": "2020-10-16T11:57:28.059+0000",
- "updated": "2020-10-16T11:57:28.059+0000",
- "entity": "policy",
- "entity_id": "bb6e1769-5685-4fc8-b9f5-f29a9ac6771e"
}
], - "coverages": [
- {
- "id": "b05924ae-f7b6-47dd-a074-3f51ae290459",
- "coverage_id": "08a166a0-e29b-47c2-ab2b-a73b0987ccd8",
- "quotespec_id": "ee0c8f10-0b90-415c-947f-b5d8271d647a",
- "namespace": "family_protection",
- "order_index": 0,
- "classes": [
- "io.habit.operation.mandatory"
], - "properties": [
- {
- "id": "ac58df58-1957-4417-8e07-19de73609bb8",
- "namespace": "number_of_people",
- "label": "Number of people",
- "icon": null,
- "image": null,
- "data": null,
- "options": { },
- "help_text": "string",
- "placeholder": "string",
- "force_data": false,
- "schema": "v1_number",
- "order_index": 0,
- "parent_id": "string",
- "classes": [
- "io.habit.operation.coverages.required"
], - "children": [
- "string"
]
}
]
}
]
}
After a contract is approved by the insurance company, it becomes a Policy.
Use the following method to retrieve an array of created Policies
FIELD | TYPE | DESCRIPTION |
---|---|---|
elements | array | Array of policies |
size | number | Number of policies in elements array |
Every element in the array must contain the following fields:
FIELD | TYPE | DESCRIPTION |
---|---|---|
id | uuid | Policy unique identifier |
code | string | Internal code to identify the Policy |
state | string | Actual policy state (active, inactive, suspend, canceled, renewed) |
custom_state | string | Custom state for the contract (active, inactive, suspended, canceled, renewed) |
user_id | string | ID of the user linked to the policy |
quote_id | uuid | Quote unique identifier |
quote | object | Object with quote's details |
reason_id | string | Reason to explain policy state or custom_state |
classes | array | Array of classes linked to the Policy |
created | string (date) | Policy instance creation date |
updated | string (date) | Policy instance last update date |
active_ts | string (date) | Policy last activation date |
inactive_ts | string (date) | Policy last inactivation date |
suspended_ts | string (date) | Policy last suspension date |
canceled_ts | string (date) | Policy cacelation date |
renewed_ts | string (date) | Policy renovation date |
assets | array | Array of assets linked to the Policy |
id required | string <uuid> Example: 0cc9de4b-1b70-406d-b67b-766cf9c53cca The ID of the desired insurance-product. |
page_size | number <integer> Default: 20 A limit on the number of objects to be returned. Default is 20, minimum is 1, maximum is 100. |
page_start_index | number <integer> Default: 0 Offset the list of returned results by this amount. Default is 0. |
order_by | string Example: order_by=-created The results can be in ascendent (+) or descendent (-) order. Use + or - before the field name to use a specific order. |
fields | string Example: fields=id,name comma separeted fields to return in payload. |
id | string <uuid> entity id to filter by. |
code | string complete entity code to filter by. |
state | string complete entity state to filter by. |
user_id | string <uuid> user id to filter by. |
quote_id | string <uuid> quote id to filter by. |
reason_id | string reason id to filter by |
custom_state | string custom state to filter by |
Content-Type required | string Default: application/json |
Authorization required | string Example: Bearer {access_token} |
{- "elements": [
- {
- "id": "bb6e1769-5685-4fc8-b9f5-f29a9ac6771e",
- "code": "ABC789",
- "state": "active",
- "custom_state": "string",
- "user_id": "string",
- "quote_id": "1ea47dd4-6c9c-4b05-8575-549e04cfee81",
- "quote": {
- "id": "1ea47dd4-6c9c-4b05-8575-549e04cfee81",
- "code": "ABC123",
- "session_id": "14990e13-1663-48e5-b14f-362c463dad84",
- "user_id": "2ec8ea29-ee45-4ee5-a7e3-bf04a156d4ae",
- "classes": [
- "io.habit.operations.required.quotes.create"
], - "created": "2020-08-27T00:00:00.000+0000",
- "updated": "2020-08-27T00:00:00.000+0000",
- "open_ts": "2020-08-27T00:00:00.000+0000",
- "simulated_ts": "2020-08-27T00:00:00.000+0000",
- "processing_ts": "2020-08-27T00:00:00.000+0000",
- "error_ts": "2020-08-27T00:00:00.000+0000",
- "closed_ts": "2020-08-27T00:00:00.000+0000",
- "canceled_ts": "2020-08-27T00:00:00.000+0000",
- "service_id": "11539368-524f-4b79-8902-28e1935fdf8e",
- "service": { },
- "state": "open"
}, - "reason_id": "io.habit.policies.other",
- "created": "2020-08-27T00:00:00.000+0000",
- "updated": "2020-08-27T00:00:00.000+0000",
- "active_ts": "2020-08-27T00:00:00.000+0000",
- "inactive_ts": "2020-08-27T00:00:00.000+0000",
- "suspended_ts": "2020-08-27T00:00:00.000+0000",
- "canceled_ts": "2020-08-27T00:00:00.000+0000",
- "renewed_ts": "2020-08-27T00:00:00.000+0000",
- "files": [
- {
- "id": "54dc0ee0-fa12-4ce4-a038-6dbed8f314e2",
- "client_id": "0cc9de4b-1b70-406d-b67b-766cf9c53cca",
- "client_type": "string",
- "action": "application_upload",
- "name": "General conditions",
- "description": "Insurance general conditions",
- "icon": "string",
- "image": "string",
- "created": "2020-10-16T11:57:28.059+0000",
- "updated": "2020-10-16T11:57:28.059+0000",
- "entity": "policy",
- "entity_id": "bb6e1769-5685-4fc8-b9f5-f29a9ac6771e"
}
], - "coverages": [
- {
- "id": "b05924ae-f7b6-47dd-a074-3f51ae290459",
- "coverage_id": "08a166a0-e29b-47c2-ab2b-a73b0987ccd8",
- "quotespec_id": "ee0c8f10-0b90-415c-947f-b5d8271d647a",
- "namespace": "family_protection",
- "order_index": 0,
- "classes": [
- "io.habit.operation.mandatory"
], - "properties": [
- {
- "id": "ac58df58-1957-4417-8e07-19de73609bb8",
- "namespace": "number_of_people",
- "label": "Number of people",
- "icon": null,
- "image": null,
- "data": null,
- "options": { },
- "help_text": "string",
- "placeholder": "string",
- "force_data": false,
- "schema": "v1_number",
- "order_index": 0,
- "parent_id": "string",
- "classes": [
- "io.habit.operation.coverages.required"
], - "children": [
- "string"
]
}
]
}
]
}
], - "size": 1
}
To request a cancellation of a policy to the Insurer
FIELD | TYPE | DESCRIPTION |
---|---|---|
reason | string | For available reasons see the chart bellow |
when | string | Available options: on-next-renewal, on-next-payment, immediate, specific_date |
canceled_ts | string (date) | Required if when is immediate or specific_date. Indicates the cancelation date of the policy. |
FIELD | TYPE | DESCRIPTION |
---|---|---|
id | uuid | Policy unique identifier |
code | string | Internal code to identify the Policy |
canceled_ts | string (date) | Policy cancellation timestamp |
reason | date | policy cancellation reason |
REASON | DESCRIPTION |
---|---|
io.habit.policies.distributor.cancellation.other_insurer | Choose another insurance company |
io.habit.policies.distributor.cancellation.dissatisfaction | Dissatisfaction with insurance product |
io.habit.policies.distributor.cancellation.bad_sale | Bad sale |
io.habit.policies.distributor.cancellation.invoice_claim | Invoice claim |
io.habit.policies.distributor.cancellation.unsolicited | Unsolicited insurance |
io.habit.policies.distributor.cancellation.inability_support_payment | Inability to support payment |
io.habit.policies.distributor.cancellation.price_increase | Price increase |
io.habit.policies.distributor.cancellation.extincted_protected_asset | Extinction of the protected asset |
io.habit.policies.cancellation.other | Other reason |
id required | string <uuid> Example: 0cc9de4b-1b70-406d-b67b-766cf9c53cca The ID of the desired insurance-product. |
policy_id required | string <uuid> Example: bb6e1769-5685-4fc8-b9f5-f29a9ac6771e The ID of the desired policy. |
Content-Type required | string Default: application/json |
Authorization required | string Example: Bearer {access_token} |
reason required | string Policy cancellation reason |
when required | string When must the policy be canceled |
{- "reason": "io.habit.reasons.policies.example",
- "when": "on-next-renewal"
}
{- "id": "05255a62-8c1e-460f-8b2b-3decbbb40e77",
- "code": "XYZ-123",
- "canceled_ts": "2021-05-28T10:10:10.000+0000",
- "reason": "io.habit.reasons.policies.example"
}
To request a termination of a policy to the Insurer
FIELD | TYPE | DESCRIPTION |
---|---|---|
reason | string | For available reasons see the chart bellow |
when | string | Available options: on-next-renewal, on-next-payment, immediate, specific_date |
terminated_ts | string (date) | Required if when is immediate or specific_date. Indicates the termination date of the policy. |
FIELD | TYPE | DESCRIPTION |
---|---|---|
id | uuid | Policy unique identifier |
code | string | Internal code to identify the Policy |
terminated_ts | string (date) | Policy termination timestamp |
reason | date | policy termination reason |
id required | string <uuid> Example: 0cc9de4b-1b70-406d-b67b-766cf9c53cca The ID of the desired insurance-product. |
policy_id required | string <uuid> Example: bb6e1769-5685-4fc8-b9f5-f29a9ac6771e The ID of the desired policy. |
Content-Type required | string Default: application/json |
Authorization required | string Example: Bearer {access_token} |
reason required | string Policy termination reason |
when required | string When must the policy be canceled |
terminated_ts | string <timestamp> Date when the policy was, or will be, terminated |
{- "reason": "io.habit.reasons.policies.example",
- "when": "specific_date",
- "terminated_ts": "2025-10-03T10:10:10.000+0000"
}
{- "id": "05255a62-8c1e-460f-8b2b-3decbbb40e77",
- "code": "XYZ-123",
- "terminated_ts": "2025-10-03T10:10:10.000+0000",
- "reason": "io.habit.reasons.policies.example"
}
To request a suspension of a policy to the Insurer
FIELD | TYPE | DESCRIPTION |
---|---|---|
reason | string | For available reasons see the chart bellow |
when | string | Available options: on-next-renewal, on-next-payment, immediate, specific_date |
suspended_ts | string (date) | Required if when is immediate or specific_date. Indicates the suspension date of the policy. |
FIELD | TYPE | DESCRIPTION |
---|---|---|
id | uuid | Policy unique identifier |
code | string | Internal code to identify the Policy |
suspended_ts | string (date) | Policy suspension timestamp |
reason | date | policy suspension reason |
id required | string <uuid> Example: 0cc9de4b-1b70-406d-b67b-766cf9c53cca The ID of the desired insurance-product. |
policy_id required | string <uuid> Example: bb6e1769-5685-4fc8-b9f5-f29a9ac6771e The ID of the desired policy. |
Content-Type required | string Default: application/json |
Authorization required | string Example: Bearer {access_token} |
reason required | string Policy suspension reason |
when required | string When must the policy be canceled |
suspended_ts | string <timestamp> Date when the policy was, or will be, suspended |
{- "reason": "io.habit.reasons.policies.example",
- "when": "specific_date",
- "suspended_ts": "2025-10-03T10:10:10.000+0000"
}
{- "id": "05255a62-8c1e-460f-8b2b-3decbbb40e77",
- "code": "XYZ-123",
- "suspended_ts": "2025-10-03T10:10:10.000+0000",
- "reason": "io.habit.reasons.policies.example"
}
Create a new Protected Asset and link with an existent and active Policy
FIELD | TYPE | DESCRIPTION |
---|---|---|
protectedasset_properties | array | Array with all protected asset properties to be created |
FIELD | TYPE | DESCRIPTION |
---|---|---|
created | object | Object with created Protected Asset |
customized | object | Object with all quote properties updated by Insurer |
id required | string <uuid> Example: 0cc9de4b-1b70-406d-b67b-766cf9c53cca The ID of the desired insurance-product. |
policy_id required | string <uuid> Example: bb6e1769-5685-4fc8-b9f5-f29a9ac6771e The ID of the desired policy. |
Content-Type required | string Default: application/json |
Authorization required | string Example: Bearer {access_token} |
Array of objects (protectedAssetSpecPropNamespace) |
{- "protectedasset_properties": [
- {
- "namespace": ":namespace",
- "data": ":data"
}
]
}
{- "href": "/v3/data-layer/quote-protected-assets/f3ec5688-709f-4c94-94dc-88897c9a2e20",
- "id": "f3ec5688-709f-4c94-94dc-88897c9a2e20",
- "customized": {
- "quote_properties": [
- {
- "id": "9d720479-8269-49cf-9e68-61d0ea6c0316",
- "data": ":data",
- "namespace": ":namespace",
- "quote_id": "1ea47dd4-6c9c-4b05-8575-549e04cfee81"
}
]
}
}
Delete Protected Assets linked to a policy
FIELD | TYPE | DESCRIPTION |
---|---|---|
protectedassets | array | Array with all protected asset ids to be deleted |
FIELD | TYPE | DESCRIPTION |
---|---|---|
protectedasset_id | uuid | Protected Asset ID unique identifier to be deleted. |
FIELD | TYPE | DESCRIPTION |
---|---|---|
n_deleted | number | Number of protected assets deleted |
simulated | object | Object with all quote properties updated by Insurer |
id required | string <uuid> Example: 0cc9de4b-1b70-406d-b67b-766cf9c53cca The ID of the desired insurance-product. |
policy_id required | string <uuid> Example: bb6e1769-5685-4fc8-b9f5-f29a9ac6771e The ID of the desired policy. |
Content-Type required | string Default: application/json |
Authorization required | string Example: Bearer {access_token} |
Array of objects (PADelete) |
{- "protectedassets": [
- {
- "protectedasset_id": "b05924ae-f7b6-47dd-a074-3f51ae290459"
}
]
}
{- "n_deleted": 1,
- "simulated": {
- "quote_properties": [
- {
- "id": "9d720479-8269-49cf-9e68-61d0ea6c0316",
- "data": ":data",
- "namespace": ":namespace",
- "quote_id": "1ea47dd4-6c9c-4b05-8575-549e04cfee81"
}
]
}
}
Use the following method to retrieve an array of Protected Assets linked to a policy
FIELD | TYPE | DESCRIPTION |
---|---|---|
elements | array | Array of Protected Assets |
size | number | Number of Protected Assets in elements array |
Every element in the array must contain the following fields:
FIELD | TYPE | DESCRIPTION |
---|---|---|
id | uuid | Protected Asset unique identifier |
namespace | string | Namespace of the Protected Asset |
quote_id | uuid | Quote unique identifier |
quote | object | Object with quote's details |
classes | array | Array of classes linked to the Protected Asset |
parent_id | uuid | Parent Protected Asset unique identifier |
id required | string <uuid> Example: 0cc9de4b-1b70-406d-b67b-766cf9c53cca The ID of the desired insurance-product. |
policy_id required | string <uuid> Example: bb6e1769-5685-4fc8-b9f5-f29a9ac6771e The ID of the desired policy. |
Content-Type required | string Default: application/json |
Authorization required | string Example: Bearer {access_token} |
{- "elements": [
- {
- "id": "f3ec5688-709f-4c94-94dc-88897c9a2e20",
- "namespace": "string",
- "quote_id": "1ea47dd4-6c9c-4b05-8575-549e04cfee81",
- "quote": {
- "id": "1ea47dd4-6c9c-4b05-8575-549e04cfee81",
- "code": "ABC123",
- "session_id": "14990e13-1663-48e5-b14f-362c463dad84",
- "user_id": "2ec8ea29-ee45-4ee5-a7e3-bf04a156d4ae",
- "classes": [
- "io.habit.operations.required.quotes.create"
], - "created": "2020-08-27T00:00:00.000+0000",
- "updated": "2020-08-27T00:00:00.000+0000",
- "open_ts": "2020-08-27T00:00:00.000+0000",
- "simulated_ts": "2020-08-27T00:00:00.000+0000",
- "processing_ts": "2020-08-27T00:00:00.000+0000",
- "error_ts": "2020-08-27T00:00:00.000+0000",
- "closed_ts": "2020-08-27T00:00:00.000+0000",
- "canceled_ts": "2020-08-27T00:00:00.000+0000",
- "service_id": "11539368-524f-4b79-8902-28e1935fdf8e",
- "service": { },
- "state": "open"
}, - "parent_id": "string",
- "classes": [
- "string"
], - "properties": [
- {
- "id": "ac58df58-1957-4417-8e07-19de73609bb8",
- "namespace": "string",
- "label": "string",
- "icon": "string",
- "image": "string",
- "data": "string",
- "options": { },
- "help_text": "string",
- "placeholder": "string",
- "force_data": true,
- "schema": "string",
- "order_index": 0,
- "parent_id": "string",
- "classes": [
- "string"
], - "children": [
- "string"
]
}
], - "files": [
- {
- "id": "54dc0ee0-fa12-4ce4-a038-6dbed8f314e2",
- "client_id": "0cc9de4b-1b70-406d-b67b-766cf9c53cca",
- "client_type": "string",
- "action": "application_upload",
- "name": "General conditions",
- "description": "Insurance general conditions",
- "icon": "string",
- "image": "string",
- "created": "2020-10-16T11:57:28.059+0000",
- "updated": "2020-10-16T11:57:28.059+0000",
- "entity": "quote-protected-assets",
- "entity_id": "0045c214-af61-41ca-92a0-136c3954d212"
}
]
}
], - "size": 1
}
Use the following method to retrieve an array of Claims linked to a policy
FIELD | TYPE | DESCRIPTION |
---|---|---|
elements | array | Array of Claims |
size | number | Number of Claims in elements array |
Every element in the array must contain the following fields:
FIELD | TYPE | DESCRIPTION |
---|---|---|
id | uuid | Claim unique identifier |
code | string | Internal code to identify the Claim |
policy_id | uuid | ID of the Policy created from this Claim |
state | string | Actual claim state (draft, open, submitted, processing, pending, approved, rejected, canceled) |
created | string (date) | Claim instance creation date |
updated | string (date) | Claim instance last update date |
id required | string <uuid> Example: 0cc9de4b-1b70-406d-b67b-766cf9c53cca The ID of the desired insurance-product. |
policy_id required | string <uuid> Example: bb6e1769-5685-4fc8-b9f5-f29a9ac6771e The ID of the desired policy. |
Content-Type required | string Default: application/json |
Authorization required | string Example: Bearer {access_token} |
{- "elements": [
- {
- "id": "bb6e1769-5685-4fc8-b9f5-f29a9ac6771e",
- "code": "ABC-789",
- "policy_id": "1ea47dd4-6c9c-4b05-8575-549e04cfee81",
- "state": "pending",
- "created": "2020-08-27T00:00:00.000+0000",
- "updated": "2020-08-27T00:00:00.000+0000"
}
], - "size": 1
}
Attach files to a policy. A file can be a document or picture. Use classes to properly identify file type.
FIELD | TYPE | DESCRIPTION |
---|---|---|
files | array | Array with all files to be attached |
Each asset must contain the following information
FIELD | TYPE | DESCRIPTION |
---|---|---|
name | string | Filename from file-upload result |
uri | url | File url from file-upload result |
classes | array | Array of classes to be attached to the file. Find bellow available classes |
FIELD | TYPE | DESCRIPTION |
---|---|---|
files | array | Array with all attached files |
CLASSES |
---|
io.habit.trackableassets.type.document |
id required | string <uuid> Example: 0cc9de4b-1b70-406d-b67b-766cf9c53cca The ID of the desired insurance-product. |
policy_id required | string <uuid> Example: bb6e1769-5685-4fc8-b9f5-f29a9ac6771e The ID of the desired policy. |
Content-Type required | string Default: application/json |
Authorization required | string Example: Bearer {access_token} |
Array of objects (attachFiles) |
{- "files": [
- {
- "name": "c4369b0342cb407c9935f248b7d44c5c_6782311e-3269-4f90-88f0-a22e453aca96.pdf",
- "classes": [
- "io.habit.trackableassets.type.document"
]
}
]
}
{- "files": [
- {
- "id": "07233fbd-e0c0-458c-b9eb-aaf6c6be1b81",
- "name": "c4369b0342cb407c9935f248b7d44c5c_6782311e-3269-4f90-88f0-a22e453aca96.pdf",
}
]
}
Update policy coverages
FIELD | TYPE | DESCRIPTION |
---|---|---|
coverages | array | Array with all coverages to be created/changed |
Each coverage must contain the following information
FIELD | TYPE | DESCRIPTION |
---|---|---|
coverage_id | uuid | Quote Coverage ID unique identifier to be created or updated. Either this or namespace must be specified. |
namespace | string | Quote Coverage Spec namespace to be created or updated. Either this or coverage_id must be specified. |
properties | array (optional) | Data to be set in property |
Each property must contain the following information
FIELD | TYPE | DESCRIPTION |
---|---|---|
quotecoveragepropertyspec_id | uuid | Quote Coverage Property Spec unique identifier to be created or updated. Either this or namespace must be specified. |
namespace | string | Quote Coverage Property Spec namespace to be created or updated. Either this or quotecoveragepropertyspec_id must be specified. |
data | string (required) | Data to be set in property |
FIELD | TYPE | DESCRIPTION |
---|---|---|
coverages | array | Array with all coverages |
n_updated | number | Number of quote coverage properties updated |
id required | string <uuid> Example: 0cc9de4b-1b70-406d-b67b-766cf9c53cca The ID of the desired insurance-product. |
policy_id required | string <uuid> Example: bb6e1769-5685-4fc8-b9f5-f29a9ac6771e The ID of the desired policy. |
Content-Type required | string Default: application/json |
Authorization required | string Example: Bearer {access_token} |
Array of objects (coverage) |
{- "coverages": [
- {
- "namespace": "family_protection",
- "properties": [
- {
- "namespace": "number_of_people",
- "data": "10"
}
]
}
]
}
{- "coverages": [
- {
- "id": "b05924ae-f7b6-47dd-a074-3f51ae290459",
- "coverage_id": "08a166a0-e29b-47c2-ab2b-a73b0987ccd8",
- "quotespec_id": "ee0c8f10-0b90-415c-947f-b5d8271d647a",
- "namespace": "family_protection",
- "order_index": 0,
- "classes": [
- "io.habit.operation.mandatory"
], - "properties": [
- {
- "id": "ac58df58-1957-4417-8e07-19de73609bb8",
- "namespace": "number_of_people",
- "label": "Number of people",
- "icon": null,
- "image": null,
- "data": null,
- "options": { },
- "help_text": "string",
- "placeholder": "string",
- "force_data": false,
- "schema": "v1_number",
- "order_index": 0,
- "parent_id": "string",
- "classes": [
- "io.habit.operation.coverages.required"
], - "children": [
- "string"
]
}
]
}
], - "n_updated": 1
}
Use the following method to retrieve an array of contributions from an insurance product
FIELD | TYPE | DESCRIPTION |
---|---|---|
elements | array | Array of contributions |
size | number | Number of contributions in elements array |
Every element in the array must contain the following fields:
FIELD | TYPE | DESCRIPTION |
---|---|---|
id | uuid | Contribution unique identifier |
amount | float | Contribution amount |
quote_id | uuid | Quote unique identifier |
state | string | Contribution state (see below for details) |
tags | array | Tags used to identify contribution type (see below for details) |
currency_id | string | Currency code (ISO 4217) |
country_id | string | Country code (ISO 3166) |
user_id | uuid | Contribution User ID. Same as Policy User |
emission_date | string (Date) | Payments' emission date when the Contribution takes effect. In some cases could have the same value as created |
expiration_date | string (Date) | Payments' expiration date. After that, the Contribution is no longer acceptable. In some cases could have the same value as created |
due_date | string (Date) | Payments' due date. after that the payment is considered overdue. In some cases could have the same value as created |
initial_provision_date | string (Date) | Payments' start date representing the period for which the payment applies |
final_provision_date | string (Date) | Payments' end date representing the period for which the payment applies |
reason_id | string | Reason to explain contribution state |
authorized_ts | string (Date) | Date when the payment state change to authorized |
canceled_ts | string (Date) | Date when the payment state change to canceled |
error_ts | string (Date) | Date when the payment state change to error |
paid_ts | string (Date) | Date when the payment state change to paid |
refunded_ts | string (Date) | Date when the payment state change to refunded |
created | string (date) | Date when Contribution was created |
updated | string (date) | Date when Contribution was updated |
DISPLAY NAME | STATE | DESCRIPTION |
---|---|---|
Pending | pending | Contribution pending |
Paid | paid | Contribution paid successfully |
Error | error | Contribution failed |
Canceled | canceled | Contribution got canceled within a period of time, before reaching a paid state |
Refunded | refunded | Contribution was refunded |
DISPLAY NAME | DESCRIPTION |
---|---|
new_subscription | Contribution realted to a new contract subscription |
recurrence | Contribution related to a recurrence paymente for a contract |
upfront_premium | Contribution related to a premium paid in advance |
page_size | number <integer> Default: 20 A limit on the number of objects to be returned. Default is 20, minimum is 1, maximum is 100. |
page_start_index | number <integer> Default: 0 Offset the list of returned results by this amount. Default is 0. |
order_by | string Example: order_by=-created The results can be in ascendent (+) or descendent (-) order. Use + or - before the field name to use a specific order. |
fields | string Example: fields=id,name comma separeted fields to return in payload. |
quote_id | string <uuid> quote id to filter by. |
id | string <uuid> entity id to filter by. |
state | string complete entity state to filter by. |
currency_id | string currency id to filter by |
country_id | string country id to filter by |
reason_id | string reason id to filter by |
Content-Type required | string Default: application/json |
Authorization required | string Example: Bearer {access_token} |
{- "elements": [
- {
- "id": "0061843e-5d20-40dd-8c9b-e1256ed633ed",
- "amount": 105.39,
- "quote_id": "e7056447-aa47-4014-8412-2a77e2a85e07",
- "state": "pending",
- "currency_id": "EUR",
- "country_id": "PT",
- "user_id": "08e2294b-4888-469e-bf62-c39d97fa6c6b",
- "emission_date": "2020-01-01T00:00:00.724+0000",
- "expiration_date": "2020-04-01T00:00:00.724+0000",
- "due_date": "2020-04-01T00:00:00.724+0000",
- "initial_provision_date": "2020-01-01T00:00:00.724+0000",
- "final_provision_date": "2020-04-01T00:00:00.724+0000",
- "created": "2020-09-18T14:15:56.095+0000",
- "updated": "2020-09-18T14:15:56.095+0000",
- "tags": [
- "new_subscription"
], - "reason_id": "io.habit.policies.other",
- "authorized_ts": "2020-04-01T00:00:00.724+0000",
- "canceled_ts": "2020-04-01T00:00:00.724+0000",
- "error_ts": "2020-04-01T00:00:00.724+0000",
- "paid_ts": "2020-04-01T00:00:00.724+0000",
- "refunded_ts": "2020-04-01T00:00:00.724+0000"
}
], - "size": 1
}
Use the following method to retrieve an array of Contributions linked to policy
FIELD | TYPE | DESCRIPTION |
---|---|---|
elements | array | Array of Contributions |
size | number | Number of Contributions in elements array |
Every element in the array must contain the following fields:
FIELD | TYPE | DESCRIPTION |
---|---|---|
id | uuid | Contribution unique identifier |
amount | float | Contribution amount |
quote_id | uuid | Quote unique identifier |
state | string | Contribution state (see below for details) |
tags | array | Tags used to identify contribution type (see below for details) |
currency_id | string | Currency code (ISO 4217) |
country_id | string | Country code (ISO 3166) |
user_id | uuid | Contribution User ID. Same as Policy User |
emission_date | string (Date) | Payments' emission date when the Contribution takes effect. In some cases could have the same value as created |
expiration_date | string (Date) | Payments' expiration date. After that, the Contribution is no longer acceptable. In some cases could have the same value as created |
due_date | string (Date) | Payments' due date. after that the payment is considered overdue. In some cases could have the same value as created |
initial_provision_date | string (Date) | Payments' start date representing the period for which the payment applies |
final_provision_date | string (Date) | Payments' end date representing the period for which the payment applies |
reason_id | string | Reason to explain contribution state |
authorized_ts | string (Date) | Date when the payment state change to authorized |
canceled_ts | string (Date) | Date when the payment state change to canceled |
error_ts | string (Date) | Date when the payment state change to error |
paid_ts | string (Date) | Date when the payment state change to paid |
refunded_ts | string (Date) | Date when the payment state change to refunded |
created | string (date) | Date when Contribution was created |
updated | string (date) | Date when Contribution was updated |
DISPLAY NAME | STATE | DESCRIPTION |
---|---|---|
Pending | pending | Contribution pending |
Paid | paid | Contribution paid successfully |
Error | error | Contribution failed |
Canceled | canceled | Contribution got canceled within a period of time, before reaching a paid state |
Refunded | refunded | Contribution was refunded |
DISPLAY NAME | DESCRIPTION |
---|---|
new_subscription | Contribution realted to a new contract subscription |
recurrence | Contribution related to a recurrence paymente for a contract |
upfront_premium | Contribution related to a premium paid in advance |
page_size | number <integer> Default: 20 A limit on the number of objects to be returned. Default is 20, minimum is 1, maximum is 100. |
page_start_index | number <integer> Default: 0 Offset the list of returned results by this amount. Default is 0. |
order_by | string Example: order_by=-created The results can be in ascendent (+) or descendent (-) order. Use + or - before the field name to use a specific order. |
fields | string Example: fields=id,name comma separeted fields to return in payload. |
id | string <uuid> entity id to filter by. |
state | string complete entity state to filter by. |
currency_id | string currency id to filter by |
country_id | string country id to filter by |
reason_id | string reason id to filter by |
Content-Type required | string Default: application/json |
Authorization required | string Example: Bearer {access_token} |
{- "elements": [
- {
- "id": "0061843e-5d20-40dd-8c9b-e1256ed633ed",
- "amount": 105.39,
- "quote_id": "e7056447-aa47-4014-8412-2a77e2a85e07",
- "state": "pending",
- "currency_id": "EUR",
- "country_id": "PT",
- "user_id": "08e2294b-4888-469e-bf62-c39d97fa6c6b",
- "emission_date": "2020-01-01T00:00:00.724+0000",
- "expiration_date": "2020-04-01T00:00:00.724+0000",
- "due_date": "2020-04-01T00:00:00.724+0000",
- "initial_provision_date": "2020-01-01T00:00:00.724+0000",
- "final_provision_date": "2020-04-01T00:00:00.724+0000",
- "created": "2020-09-18T14:15:56.095+0000",
- "updated": "2020-09-18T14:15:56.095+0000",
- "tags": [
- "new_subscription"
], - "reason_id": "io.habit.policies.other",
- "authorized_ts": "2020-04-01T00:00:00.724+0000",
- "canceled_ts": "2020-04-01T00:00:00.724+0000",
- "error_ts": "2020-04-01T00:00:00.724+0000",
- "paid_ts": "2020-04-01T00:00:00.724+0000",
- "refunded_ts": "2020-04-01T00:00:00.724+0000"
}
], - "size": 1
}
Use the following method add a new Transaction to a Contribution.
FIELD | TYPE | DESCRIPTION |
---|---|---|
state | string | Transaction state (see below for details) |
cdata | object (optional) | Transaction Context data |
DISPLAY NAME | STATE | DESCRIPTION |
---|---|---|
Pending | pending | Transaction pending. Indicates Distributor has sent an invoice to the customer |
Paid | received | Indicates the contribution has been received by Distributor |
Paid | sent_for_settle | Transaction sent_for_settle. When Distributor confirms the contribution has been sent to Habit |
Refunded | refunded | To indicate a Contribution has been refunded |
Error | error | Contribution failed |
Canceled | canceled | Contribution got canceled within a period of time, before reaching a paid state |
FIELD | TYPE | DESCRIPTION |
---|---|---|
id | uuid | Transaction unique identifier |
payment_id | uuid | Contribution unique identifier |
state | string | Transaction state (see below for details) |
final_state | boolean | Transaction with a final state |
cdata | object | Transaction Context data |
created | string (date) | Date when quote was created |
updated | string (date) | Date when quote was updated |
id required | string <uuid> Example: 0cc9de4b-1b70-406d-b67b-766cf9c53cca The ID of the desired insurance-product. |
id required | string Example: 0cc9de4b-1b70-406d-b67b-766cf9c53cca The ID of the desired contribution. |
Content-Type required | string Default: application/json |
Authorization required | string Example: Bearer {access_token} |
state | string |
cdata | object |
{- "state": "received",
- "cdata": {
- "reason": ":reason_id",
- "payment_method": {
- "id": "12334-34234234-234234-234234"
}, - "amount_paid": 12.5,
- "type": "rate_base"
}
}
{- "id": "02ac6178-267a-4c0e-af2f-58f2cf76316a",
- "payment_id": "98d0be93-fa33-4e67-acd4-d6835b8f8579",
- "state": "sent_for_settle",
- "final_state": false,
- "cdata": { },
- "created": "2020-09-18T14:15:56.095+0000",
- "updated": "2020-09-18T14:15:56.095+0000"
}
Attach files to a contribution. A file can be a document or picture. Use classes to properly identify file type.
FIELD | TYPE | DESCRIPTION |
---|---|---|
files | array | Array with all files to be attached |
Each asset must contain the following information
FIELD | TYPE | DESCRIPTION |
---|---|---|
name | string | Filename from file-upload result |
uri | url | File url from file-upload result |
classes | array | Array of classes to be attached to the file. Find bellow available classes |
FIELD | TYPE | DESCRIPTION |
---|---|---|
files | array | Array with all attached files |
For "Invoice" use the following 3 classes
CLASSES |
---|
io.habit.payment.asset |
io.habit.payment.asset.invoice |
io.habit.trackableassets.type.document |
For "Premium Notice" use the following 3 classes
CLASSES |
---|
io.habit.payment.asset |
io.habit.payment.asset.notice |
io.habit.trackableassets.type.document |
id required | string <uuid> Example: 0cc9de4b-1b70-406d-b67b-766cf9c53cca The ID of the desired insurance-product. |
quote_id required | string <uuid> Example: 1ea47dd4-6c9c-4b05-8575-549e04cfee81 The ID of the desired quote. |
Content-Type required | string Default: application/json |
Authorization required | string Example: Bearer {access_token} |
Array of objects (attachFiles) |
{- "files": [
- {
- "name": "c4369b0342cb407c9935f248b7d44c5c_6782311e-3269-4f90-88f0-a22e453aca96.pdf",
- "classes": [
- "io.habit.payment.asset",
- "io.habit.payment.asset.invoice",
- "io.habit.trackableassets.type.document"
]
}
]
}
{- "files": [
- {
- "id": "07233fbd-e0c0-458c-b9eb-aaf6c6be1b81",
- "name": "c4369b0342cb407c9935f248b7d44c5c_6782311e-3269-4f90-88f0-a22e453aca96.pdf",
}
]
}
Use the following method to retrieve an array of Transactions linked to Contribution
FIELD | TYPE | DESCRIPTION |
---|---|---|
elements | array | Array of Transactions |
size | number | Number of Transactions in elements array |
Every element in the array must contain the following fields:
FIELD | TYPE | DESCRIPTION |
---|---|---|
id | uuid | Transaction unique identifier |
payment_id | uuid | Contribution unique identifier |
state | string | Transaction state (see below for details) |
final_state | boolean | Transaction with a final state |
cdata | object | Transaction Context data |
DISPLAY NAME | STATE | DESCRIPTION |
---|---|---|
Pending | pending | Transaction pending. Indicates Distributor has sent an invoice to the customer |
Paid | received | Indicates the contribution has been received by Distributor |
Paid | sent_for_settle | Transaction sent_for_settle. When Distributor confirms the contribution has been sent to Habit |
Paid | settled | Habit confirms contribution received. (final state) |
Refunded | refunded | To indicate a Contribution has been refunded |
Error | error | Contribution failed |
Canceled | canceled | Contribution got canceled within a period of time, before reaching a paid state |
page_size | number <integer> Default: 20 A limit on the number of objects to be returned. Default is 20, minimum is 1, maximum is 100. |
page_start_index | number <integer> Default: 0 Offset the list of returned results by this amount. Default is 0. |
order_by | string Example: order_by=-created The results can be in ascendent (+) or descendent (-) order. Use + or - before the field name to use a specific order. |
fields | string Example: fields=id,name comma separeted fields to return in payload. |
id | string <uuid> entity id to filter by. |
state | string complete entity state to filter by. |
final_state | boolean final_state value to filter by. |
Content-Type required | string Default: application/json |
Authorization required | string Example: Bearer {access_token} |
{- "elements": [
- {
- "id": "02ac6178-267a-4c0e-af2f-58f2cf76316a",
- "payment_id": "98d0be93-fa33-4e67-acd4-d6835b8f8579",
- "state": "sent_for_settle",
- "final_state": false,
- "cdata": { },
- "created": "2020-09-18T14:15:56.095+0000",
- "updated": "2020-09-18T14:15:56.095+0000"
}
], - "size": 1
}
Retrieve all available claim specs to update claim properties
FIELD | TYPE | DESCRIPTION |
---|---|---|
elements | array | Array with all available claim properties |
size | number | Number of properties in elements |
id required | string <uuid> Example: 0cc9de4b-1b70-406d-b67b-766cf9c53cca The ID of the desired insurance-product. |
version_id required | string <uuid> Example: 58970c9d-7c6c-4b4e-9664-ec3001899ca0 The ID of the desired version. |
id | string <uuid> entity id to filter by. |
namespace | string complete entity namespace to filter by. |
label | string complete entity label to filter by. |
force_data | boolean boolean indicating force_data state to filter by. |
schema | string complete entity schema to filter by. |
order_index | number <integer> entity order_index to filter by. |
fields | string Example: fields=id,name comma separeted fields to return in payload. |
Content-Type required | string Default: application/json |
Authorization required | string Example: Bearer {access_token} |
{- "elements": [
- {
- "id": "e753ab5c-33b3-4c12-b95c-2da878668eed",
- "namespace": "string",
- "label": "string",
- "icon": "string",
- "image": "string",
- "data": "string",
- "options": { },
- "help_text": "string",
- "placeholder": "string",
- "force_data": true,
- "schema": "string",
- "order_index": 0,
- "parent_id": "string",
- "classes": [
- "string"
], - "children": [
- "string"
]
}
], - "size": 1
}
Use the following method to submit a new claim to a policy
FIELD | TYPE | DESCRIPTION |
---|---|---|
claim_properties | array | Array with all claim properties to be created (properties id or namespace can be used) |
FIELD | TYPE | DESCRIPTION |
---|---|---|
id | uuid | Claim unique identifier |
code | string | Internal code to identify the Claim |
state | string | Actual claim state (draft, open, submitted, processing, pending, approved, rejected) |
created | object | Object with created Offer |
id required | string <uuid> Example: 0cc9de4b-1b70-406d-b67b-766cf9c53cca The ID of the desired insurance-product. |
policy_id required | string <uuid> Example: bb6e1769-5685-4fc8-b9f5-f29a9ac6771e The ID of the desired policy. |
Content-Type required | string Default: application/json |
Authorization required | string Example: Bearer {access_token} |
Array of objects (claimSpecPropNamespace) |
{- "claim_properties": [
- {
- "namespace": ":namespace",
- "data": ":data"
}
]
}
{- "created": {
- "id": "1ea47dd4-6c9c-4b05-8575-549e04cfee81",
- "code": "ABC123",
- "state": "open",
- "created": "2020-09-18T14:15:56.095+0000",
- "updated": "2020-09-18T14:15:56.095+0000"
}
}
Use the following method to retrieve information about a Claim
FIELD | TYPE | DESCRIPTION |
---|---|---|
id | uuid | Claim unique identifier |
code | string | Internal code to identify the Claim |
policy_id | uuid | ID of the Policy associated to this Claim |
state | string | Actual claim state (draft, open, submitted, processing, pending, approved, rejected) |
created | string (date) | Claim instance creation date |
updated | string (date) | Claim instance last update date |
properties | array | Array with all protected asset properties |
id required | string <uuid> Example: 0cc9de4b-1b70-406d-b67b-766cf9c53cca The ID of the desired insurance-product. |
claim_id required | string <uuid> Example: f3ec5688-709f-4c94-94dc-88897c9a2e20 The ID of the desired claim. |
Content-Type required | string Default: application/json |
Authorization required | string Example: Bearer {access_token} |
{- "id": "bb6e1769-5685-4fc8-b9f5-f29a9ac6771e",
- "code": "ABC-789",
- "policy_id": "1ea47dd4-6c9c-4b05-8575-549e04cfee81",
- "state": "pending",
- "created": "2020-08-27T00:00:00.000+0000",
- "updated": "2020-08-27T00:00:00.000+0000"
}
Use the following method to retrieve an array of claims.
FIELD | TYPE | DESCRIPTION |
---|---|---|
elements | array | Array of claims |
size | number | Number of claims in elements array |
Every element in the array must contain the following fields:
FIELD | TYPE | DESCRIPTION |
---|---|---|
id | uuid | Claim unique identifier |
code | string | Internal code to identify the Claim |
policy_id | uuid | ID of the Policy associated to this Claim |
state | string | Actual claim state (draft, open, submitted, processing, pending, approved, rejected) |
created | string (date) | Claim instance creation date |
updated | string (date) | Claim instance last update date |
id required | string <uuid> Example: 0cc9de4b-1b70-406d-b67b-766cf9c53cca The ID of the desired insurance-product. |
page_size | number <integer> Default: 20 A limit on the number of objects to be returned. Default is 20, minimum is 1, maximum is 100. |
page_start_index | number <integer> Default: 0 Offset the list of returned results by this amount. Default is 0. |
order_by | string Example: order_by=-created The results can be in ascendent (+) or descendent (-) order. Use + or - before the field name to use a specific order. |
fields | string Example: fields=id,name comma separeted fields to return in payload. |
id | string <uuid> entity id to filter by. |
code | string complete entity code to filter by. |
state | string complete entity state to filter by. |
Content-Type required | string Default: application/json |
Authorization required | string Example: Bearer {access_token} |
{- "elements": [
- {
- "id": "bb6e1769-5685-4fc8-b9f5-f29a9ac6771e",
- "code": "ABC-789",
- "policy_id": "1ea47dd4-6c9c-4b05-8575-549e04cfee81",
- "state": "pending",
- "created": "2020-08-27T00:00:00.000+0000",
- "updated": "2020-08-27T00:00:00.000+0000"
}
], - "size": 1
}
Update Claim's properties according to payload
FIELD | TYPE | DESCRIPTION |
---|---|---|
properties | array | Array with all claim properties to be updated |
Each property must contain the following information
FIELD | TYPE | DESCRIPTION |
---|---|---|
claimspec_id | uuid | Claim Property Spec unique identifier to be created or updated. Either this or namespace must be specified. |
namespace | string | Claim Property Spec namespace to be created or updated. Either this or claimpropertyspec_id must be specified. |
data | string (required) | Data to be set in property |
FIELD | TYPE | DESCRIPTION |
---|---|---|
properties | array | Array with all created or updated properties |
n_updated | number | Number of quote properties updated |
id required | string <uuid> Example: 0cc9de4b-1b70-406d-b67b-766cf9c53cca The ID of the desired insurance-product. |
claim_id required | string <uuid> Example: f3ec5688-709f-4c94-94dc-88897c9a2e20 The ID of the desired claim. |
Content-Type required | string Default: application/json |
Authorization required | string Example: Bearer {access_token} |
required | Array of objects (Claim Property Create Namespace) |
{- "properties": [
- {
- "namespace": ":namespace",
- "data": ":data"
}
]
}
{- "properties": [
- {
- "id": "14e7bc30-d54e-47b5-b56a-ee3edbae0af5",
- "namespace": "string",
- "label": "string",
- "icon": "string",
- "image": "string",
- "data": "string",
- "options": { },
- "help_text": "string",
- "placeholder": "string",
- "schema": "string",
- "order_index": 0,
- "parent_id": "string",
- "classes": [
- "string"
]
}
], - "n_updated": 1
}
To request a cancellation of a claim to the Insurer
FIELD | TYPE | DESCRIPTION |
---|---|---|
reason | string | For available reasons see the chart bellow |
FIELD | TYPE | DESCRIPTION |
---|---|---|
id | uuid | Claim unique identifier |
canceled_ts | string (date) | Claim cancellation timestamp |
reason | date | claim cancellation reason |
id required | string <uuid> Example: 0cc9de4b-1b70-406d-b67b-766cf9c53cca The ID of the desired insurance-product. |
claim_id required | string <uuid> Example: f3ec5688-709f-4c94-94dc-88897c9a2e20 The ID of the desired claim. |
Content-Type required | string Default: application/json |
Authorization required | string Example: Bearer {access_token} |
reason required | string Claim cancellation reason |
{- "reason": "io.habit.reasons.claims.example"
}
{- "id": "05255a62-8c1e-460f-8b2b-3decbbb40e77",
- "code": "XYZ-123",
- "canceled_ts": "2021-05-28T10:10:10.000+0000",
- "reason": "io.habit.reasons.claims.example"
}
Attach files to a claim. A file can be a document, picture, video, audio or json. Use classes to properly identify file type.
FIELD | TYPE | DESCRIPTION |
---|---|---|
files | array | Array with all files to be attached |
Each asset must contain the following information
FIELD | TYPE | DESCRIPTION |
---|---|---|
name | string | Filename from file-upload result |
uri | url | File url from file-upload result |
icon | url (optional) | File icon from file-upload result |
image | url (optional) | File image from file-upload result |
classes | array (optional) | Array of classes to be attached to the file. Find bellow available classes |
FIELD | TYPE | DESCRIPTION |
---|---|---|
files | array | Array with all attached files |
TYPE | DESCRIPTION |
---|---|
io.habit.trackableassets.type.document | Documents (*.pdf) |
io.habit.trackableassets.type.photo | Images (*.png, *.jpg) |
io.habit.trackableassets.type.video | Videos (*.mp4) |
io.habit.trackableassets.type.json | Json |
io.habit.trackableassets.type.audio | Audio |
id required | string <uuid> Example: 0cc9de4b-1b70-406d-b67b-766cf9c53cca The ID of the desired insurance-product. |
claim_id required | string <uuid> Example: f3ec5688-709f-4c94-94dc-88897c9a2e20 The ID of the desired claim. |
Content-Type required | string Default: application/json |
Authorization required | string Example: Bearer {access_token} |
Array of objects (attachFiles) |
{- "files": [
- {
- "name": "c4369b0342cb407c9935f248b7d44c5c_6782311e-3269-4f90-88f0-a22e453aca96.pdf",
- "classes": [
- "io.habit.trackableassets.type.document"
]
}
]
}
{- "files": [
- {
- "id": "07233fbd-e0c0-458c-b9eb-aaf6c6be1b81",
- "name": "c4369b0342cb407c9935f248b7d44c5c_6782311e-3269-4f90-88f0-a22e453aca96.pdf",
}
]
}
Use the following method to retrieve an array of payables from an insurance product
FIELD | TYPE | DESCRIPTION |
---|---|---|
elements | array | Array of payables |
size | number | Number of payables in elements array |
Every element in the array must contain the following fields:
FIELD | TYPE | DESCRIPTION |
---|---|---|
id | uuid | Payable unique identifier |
amount | float | Payable amount |
claim_id | uuid | Claim unique identifier |
state | string | Payable state (see below for details) |
currency_id | string | Currency code (ISO 4217) |
country_id | string | Country code (ISO 3166) |
user_id | uuid | Payable User ID. Same as Policy User |
start_date | string (Date) | Payable date |
end_date | string (Date) | Payable date |
created | string (date) | Date when Payable was created |
updated | string (date) | Date when Payable was updated |
DISPLAY NAME | STATE | DESCRIPTION |
---|---|---|
Pending | pending | Payable pending |
Paid | paid | Payable paid successfully |
Error | error | Payable failed |
Canceled | canceled | Payable got canceled within a period of time, before reaching a paid state |
Refunded | refunded | Payable was refunded |
page_size | number <integer> Default: 20 A limit on the number of objects to be returned. Default is 20, minimum is 1, maximum is 100. |
page_start_index | number <integer> Default: 0 Offset the list of returned results by this amount. Default is 0. |
order_by | string Example: order_by=-created The results can be in ascendent (+) or descendent (-) order. Use + or - before the field name to use a specific order. |
fields | string Example: fields=id,name comma separeted fields to return in payload. |
claim_id | string <uuid> claim id to filter by. |
id | string <uuid> entity id to filter by. |
state | string complete entity state to filter by. |
currency_id | string currency id to filter by |
country_id | string country id to filter by |
Content-Type required | string Default: application/json |
Authorization required | string Example: Bearer {access_token} |
{- "elements": [
- {
- "id": "0061843e-5d20-40dd-8c9b-e1256ed633ed",
- "amount": 105.39,
- "claim_id": "e7056447-aa47-4014-8412-2a77e2a85e07",
- "state": "pending",
- "currency_id": "EUR",
- "country_id": "PT",
- "user_id": "08e2294b-4888-469e-bf62-c39d97fa6c6b",
- "start_date": "2020-01-01T00:00:00.724+0000",
- "end_date": "2020-04-01T00:00:00.724+0000",
- "created": "2020-09-18T14:15:56.095+0000",
- "updated": "2020-09-18T14:15:56.095+0000"
}
], - "size": 1
}
Use the following method to retrieve an array of Payables linked to claim
FIELD | TYPE | DESCRIPTION |
---|---|---|
elements | array | Array of Payables |
size | number | Number of Payables in elements array |
Every element in the array must contain the following fields:
FIELD | TYPE | DESCRIPTION |
---|---|---|
id | uuid | Payable unique identifier |
amount | float | Payable amount |
claim_id | uuid | Claim unique identifier |
state | string | Payable state (see below for details) |
currency_id | string | Currency code (ISO 4217) |
country_id | string | Country code (ISO 3166) |
user_id | uuid | Payable User ID. Same as Policy User |
start_date | string (Date) | Period start date when the Payable takes effect. In some cases could have the same value as created |
end_date | string (Date) | Period end date when the Payable takes effect. In some cases could have the same value as created |
created | string (date) | Date when Payable was created |
updated | string (date) | Date when Payable was updated |
DISPLAY NAME | STATE | DESCRIPTION |
---|---|---|
Pending | pending | Payable pending |
Paid | paid | Payable paid successfully |
Error | error | Payable failed |
Canceled | canceled | Payable got canceled within a period of time, before reaching a paid state |
Refunded | refunded | Payable was refunded |
page_size | number <integer> Default: 20 A limit on the number of objects to be returned. Default is 20, minimum is 1, maximum is 100. |
page_start_index | number <integer> Default: 0 Offset the list of returned results by this amount. Default is 0. |
order_by | string Example: order_by=-created The results can be in ascendent (+) or descendent (-) order. Use + or - before the field name to use a specific order. |
fields | string Example: fields=id,name comma separeted fields to return in payload. |
id | string <uuid> entity id to filter by. |
state | string complete entity state to filter by. |
currency_id | string currency id to filter by |
country_id | string country id to filter by |
Content-Type required | string Default: application/json |
Authorization required | string Example: Bearer {access_token} |
{- "elements": [
- {
- "id": "0061843e-5d20-40dd-8c9b-e1256ed633ed",
- "amount": 105.39,
- "claim_id": "e7056447-aa47-4014-8412-2a77e2a85e07",
- "state": "pending",
- "currency_id": "EUR",
- "country_id": "PT",
- "user_id": "08e2294b-4888-469e-bf62-c39d97fa6c6b",
- "start_date": "2020-01-01T00:00:00.724+0000",
- "end_date": "2020-04-01T00:00:00.724+0000",
- "created": "2020-09-18T14:15:56.095+0000",
- "updated": "2020-09-18T14:15:56.095+0000"
}
], - "size": 1
}
Use the following method add a new Transaction to a Payable.
FIELD | TYPE | DESCRIPTION |
---|---|---|
state | string | Transaction state (see below for details) |
DISPLAY NAME | STATE | DESCRIPTION |
---|---|---|
Pending | pending | Transaction pending. Indicates Habit has received instructions to do a payable to the customer |
Paid | sent | Indicates the paybale has been transfered to the customer |
Paid | sent_for_settle | Transaction sent_for_settle. When Distributor/Insurer confirms the payable has been sent to Habit |
Paid | settled | Habit confirms payable received. (final state) |
Refunded | refunded | To indicate a Payable has been refunded |
Error | error | Payable failed |
Canceled | canceled | Payable got canceled within a period of time, before reaching a paid state |
FIELD | TYPE | DESCRIPTION |
---|---|---|
id | uuid | Transaction unique identifier |
payment_id | uuid | Payable unique identifier |
state | string | Transaction state (see below for details) |
final_state | boolean | Transaction with a final state |
cdata | object | Transaction Context data |
created | string (date) | Date when quote was created |
updated | string (date) | Date when quote was updated |
id required | string <uuid> Example: 0cc9de4b-1b70-406d-b67b-766cf9c53cca The ID of the desired insurance-product. |
id required | string <uuid> Example: 0cc9de4b-1b70-406d-b67b-766cf9c53cca The ID of the desired payable. |
Content-Type required | string Default: application/json |
Authorization required | string Example: Bearer {access_token} |
state | string |
{- "state": "pending"
}
{- "id": "02ac6178-267a-4c0e-af2f-58f2cf76316a",
- "payment_id": "98d0be93-fa33-4e67-acd4-d6835b8f8579",
- "state": "sent_for_settle",
- "final_state": false,
- "cdata": { },
- "created": "2020-09-18T14:15:56.095+0000",
- "updated": "2020-09-18T14:15:56.095+0000"
}
Attach files to a payable. A file can be a document or picture. Use classes to properly identify file type.
FIELD | TYPE | DESCRIPTION |
---|---|---|
files | array | Array with all files to be attached |
Each asset must contain the following information
FIELD | TYPE | DESCRIPTION |
---|---|---|
name | string | Filename from file-upload result |
uri | url | File url from file-upload result |
classes | array | Array of classes to be attached to the file. Find bellow available classes |
FIELD | TYPE | DESCRIPTION |
---|---|---|
files | array | Array with all attached files |
CLASSES |
---|
io.habit.payment.asset |
io.habit.payment.asset.invoice |
io.habit.trackableassets.type.document |
id required | string <uuid> Example: 0cc9de4b-1b70-406d-b67b-766cf9c53cca The ID of the desired insurance-product. |
id required | string <uuid> Example: 0cc9de4b-1b70-406d-b67b-766cf9c53cca The ID of the desired payable. |
Content-Type required | string Default: application/json |
Authorization required | string Example: Bearer {access_token} |
Array of objects (attachFiles) |
{- "files": [
- {
- "name": "c4369b0342cb407c9935f248b7d44c5c_6782311e-3269-4f90-88f0-a22e453aca96.pdf",
- "classes": [
- "io.habit.payment.asset",
- "io.habit.payment.asset.invoice",
- "io.habit.trackableassets.type.document"
]
}
]
}
{- "files": [
- {
- "id": "07233fbd-e0c0-458c-b9eb-aaf6c6be1b81",
- "name": "c4369b0342cb407c9935f248b7d44c5c_6782311e-3269-4f90-88f0-a22e453aca96.pdf",
}
]
}
Use the following method to retrieve an array of Transactions linked to Payable
FIELD | TYPE | DESCRIPTION |
---|---|---|
elements | array | Array of Transactions |
size | number | Number of Transactions in elements array |
Every element in the array must contain the following fields:
FIELD | TYPE | DESCRIPTION |
---|---|---|
id | uuid | Transaction unique identifier |
payment_id | uuid | Payable unique identifier |
state | string | Transaction state (see below for details) |
final_state | boolean | Transaction with a final state |
cdata | object | Transaction Context data |
DISPLAY NAME | STATE | DESCRIPTION |
---|---|---|
Pending | pending | Transaction pending. Indicates Habit has received instructions to do a payable to the customer |
Paid | sent | Indicates the paybale has been transfered to the customer |
Paid | sent_for_settle | Transaction sent_for_settle. When Distributor/Insurer confirms the payable has been sent to Habit |
Paid | settled | Habit confirms payable received. (final state) |
Refunded | refunded | To indicate a Payable has been refunded |
Error | error | Payable failed |
Canceled | canceled | Payable got canceled within a period of time, before reaching a paid state |
page_size | number <integer> Default: 20 A limit on the number of objects to be returned. Default is 20, minimum is 1, maximum is 100. |
page_start_index | number <integer> Default: 0 Offset the list of returned results by this amount. Default is 0. |
order_by | string Example: order_by=-created The results can be in ascendent (+) or descendent (-) order. Use + or - before the field name to use a specific order. |
fields | string Example: fields=id,name comma separeted fields to return in payload. |
id | string <uuid> entity id to filter by. |
state | string complete entity state to filter by. |
final_state | boolean final_state value to filter by. |
Content-Type required | string Default: application/json |
Authorization required | string Example: Bearer {access_token} |
{- "elements": [
- {
- "id": "02ac6178-267a-4c0e-af2f-58f2cf76316a",
- "payment_id": "98d0be93-fa33-4e67-acd4-d6835b8f8579",
- "state": "sent_for_settle",
- "final_state": false,
- "cdata": { },
- "created": "2020-09-18T14:15:56.095+0000",
- "updated": "2020-09-18T14:15:56.095+0000"
}
], - "size": 1
}
Uploads a new file
id required | string <uuid> Example: 0cc9de4b-1b70-406d-b67b-766cf9c53cca The ID of the desired insurance-product. |
Authorization required | string Example: Bearer {access_token} |
Content-Type required | string Default: multipart/form-data |
content required | string <binary> file to upload |
{- "filename": "c4369b0342cb407c9935f248b7d44c5c_6782311e-3269-4f90-88f0-a22e453aca96.pdf",
}
Custom actions defined by project and distributor
id required | string <uuid> Example: 0cc9de4b-1b70-406d-b67b-766cf9c53cca The ID of the desired insurance-product. |
action required | string Example: help custom action to be executed. |
Content-Type required | string Default: application/json |
Authorization required | string Example: Bearer {access_token} |
data | object Object with key value pairs to be used in action context |
{- "data": { }
}
{- "custom_data": { }
}
Proceed with the retrieval, updating, or creation of the user on our platform
FIELD | TYPE | DESCRIPTION |
---|---|---|
target | string | selfcare, sales_portal_authenticated_user or customer_selfcare |
remote_code | string (optional) | Distributor custom code to be linked to the user |
name | string | required if target is selfcare |
string | User's e-mail, required if target is selfcare | |
mobile | string (optional) | User's mobile number |
type | string (optional) | seller or lead |
user_id | uuid | required if target is customer_selfcare or sales_portal_authenticated_user |
insuranceproduct_id | uuid | required if target is customer_selfcare or sales_portal_authenticated_user |
policy_id | uuid | required if target is customer_selfcare |
distributionpoint_id | string (optional) | |
distributionpoint | string (optional) | |
scope | array | required if target is selfcare |
redirect_uri | string (optional) | |
redirect_context | string (optional) |
FIELD | TYPE | DESCRIPTION |
---|---|---|
message | string | user friendly result description |
success | boolean | true or false |
user | dict | dictionary with user details |
webview_uri | string | webview url to redirect after successfully retrieving the authentication details |
Content-Type required | string Default: application/json |
Authorization required | string Example: Bearer {access_token} |
target | string |
insuranceproduct_id | uuid |
user_id | uuid |
policy_id | uuid |
object |
{- "target": "customer_selfcare",
- "insuranceproduct_id": "e1c2c4fa-2d95-4d1b-9b17-8e3030e073ff",
- "user_id": "7817293f-6c01-4a04-b8fb-894294dc5d8f",
- "policy_id": "bec698c9-c421-46c3-8320-6d60d1d9a989",
- "redirect_context": {
- "key": "value",
- "test": [
- "PT",
- "BR"
], - "sample_key": false
}
}
{- "message": "user retrieved",
- "success": true,
- "user": {
- "id": "d5ceaae9-0c2c-602e-83c1-42a32c53982b",
- "code": "mz..rd",
- "confirmation_hash": "f0..rl",
- "new_user": false
}, - "webview_uri": "https://my.habit.io/partners/:uuid/products/:uuid/third-party-auth?client_id=d5ceaae9-0c2c-602e-83c1- 42a32c53982b&confirmation_hash=f0..rl&redirect_uri=/%3Fcontext%3DewogICAgImhhYml0X2lkIjogIjY1NDkwNzc4LTQ2NGYtNDg4NS05N2U2LTM0M zEzZjE2ZmQyMiIsCiAgICAibGFuZ3VhZ2UiOiAiUFQiLAoJInN1YnNjcmliZXJzIjogWwoJCXsKCQkJImhhYml0X2lkIjogImM0OWI4NWQ4LTE1NmEtNDQ2MS1iNWM wLTM4MGI3NWE1M2Q0ZiIKCQl9CgldLAoJImFzc29jaWF0ZXMiOiBbCgkJewoJCQkiaGFiaXRfaWQiOiAiYzQ5Yjg1ZDgtMTU2YS00NDYxLWI1YzAtMzgwYjc1YTUzZ DRmIgoJCX0KCV0KfQ%3D%3D"
}
In this seccion you will find possible error codes accross the api
Response errors will have the following format
{ "error": "error message", "code": 0 }
CODE | MESSAGE |
---|---|
4021 | Session belongs to a different user |
4022 | Invalid fingerprint session |
4090 | Invalid mobile number, required E.164 international format |
4091 | Invalid value for email |
4092 | Invalid value for partner_code |
4093 | Missing user information |
4140 | User already exists |
1200 | Missing required data |
1201 | Key must not be empty |
1202 | Invalid value type |
1203 | Invalid value for data |
1210 | Invalid field name |
1810 | page_size out of range [:dynamic_content] |
9000 | Quote generic error |
9001 | Retrieve Quote failed |
9002 | Quote from another service |
9003 | You dont have access to this quote |
9004 | Quote expired |
9005 | Error: user-create call |
9006 | Invalid product |
9007 | You cant change an immutable property: [:dynamic_content] |
9008 | Missing required data for property: [:dynamic_content] |
9009 | The code [:dynamic_content] already belongs to another quote |
9010 | There are more than one existent policy holder with the same identifier to be selected |
9011 | Properties not found on payload |
9012 | Duplicated property namespaces found on payload |
9030 | Quote property not found with classes |
9031 | Invalid data for Quote property with namespace [:dynamic_content] |
9032 | Quote properties cant be changed with quote in current state [:dynamic_content] |
9033 | Invalid data value for insurer [:dynamic_content] |
9034 | Error on insurer api [:dynamic content] |
9035 | Quote properties with duplicated namespace found |
9200 | Protected Asset generic error |
9201 | Retrieve Protected Asset failed |
9202 | Protected Asset from another service |
9203 | Invalid protectedassets specs |
9230 | PA property not found with classes |
9231 | Invalid data for PA property with namespace [:dynamic_content] |
9232 | Invalid data in specific insurer validation process for PA property with namespace [:dynamic content] |
9233 | PA properties with duplicated namespace found |
9300 | Coverage generic error |
9301 | There is no Coverages to be deleted in this Quote |
9302 | Quote Coverages cant be changed with quote in current state [:dynamic_content] |
9303 | None of the sent Coverages are valid to be deleted |
9304 | Unknown coverage [:dynamic_content] |
9305 | Invalid EnabledServiceCoverages [:dynamic_content] |
9306 | Quote Coverages Properties with duplicated namespace found |
9400 | Policy generic error |
9401 | Retrieve Policy failed |
9402 | Policy from another service |
9403 | You dont have access to this policy |
9404 | Invalid policy pin |
9405 | You cant change policy state to [:dynamic_content] |
9406 | Invalid policy state [:dynamic_content] |
9407 | The code [:dynamic_content] already belongs to another policy |
9408 | Policy is not active |
9409 | Policy in renewed state. Cant be updated. |
9410 | Policy already in state [:dynamic_content] |
9411 | Invalid when parameter [:dynamic_content] |
9412 | Policy already set to be canceled on [:dynamic_content] |
9413 | Invalid cancellation reason [:dynamic_content] |
9414 | It was not possible to validate cancellation [:dynamic_content] |
9500 | Insuree generic error |
9501 | Retrieve Insuree failed |
9502 | Insuree from another service |
9503 | Invalid Policy Holder |
9504 | Policy Holder cant be updated in state [:dynamic_content] |
9531 | Invalid data for Policy Holder property with namespace [:dynamic_content] |
9532 | Policy Holder properties with duplicated namespace found |
9600 | Claim generic error |
9700 | Block generic error |
9800 | Subscription generic error |
9801 | Insurer API error |
9900 | Distributor generic error |
9901 | Quote cant be submitted in state: [:dynamic_content] |
9902 | Missing user information |
9903 | Invalid user information |
9908 | Invalid user namespace |
9910 | You dont have access to this user |
9911 | User from another app |
9920 | You dont have access to this product |
9970 | BRE generic error |
9971 | Invalid action: [:dynamic_content] |
9980 | Payment generic error |
9981 | Invalid confirmation hash for transaction |
9982 | Contribution is already on a final state |
9983 | Latest transaction is already on [:dynamic_content] state |
9984 | Missing Payment configuration |
9985 | Invalid Payment |
9986 | Invalid transaction state |
All list API resources have support to fetch paginated results. This resources share a common structure, taking at least these two parameters page_start_index and page_size. Combined the full collection can be retrieved.
Default amount of elements by page is 20, maximum is currently 100. Additionally results can be sorted in chronological (or reverse) order.
A status_code 204 means there are no results found with the requested parameters.
Example:
For a full collection of 40 elements.
GET /v3/insurance-products/{id}/policies?page_start_index=0&page_size=20&order_by=created
Response: 200
GET /v3/insurance-products/{id}/policies?page_start_index=20&page_size=20&order_by=created
Response: 200
GET /v3/insurance-products/{id}/policies?page_start_index=40&page_size=20&order_by=created
Response: 204
GET /v3/insurance-products/{id}/policies?page_size=101&order_by=created
Response: 412
{ "code": 1810, "error": "Page size out of range [1 - 100]" }
Send information about the properties updated
insuraceproduct_id | string <uuid> |
policy_id | string <uuid> |
policy_code | string Policy code |
Array of objects (propertiesList) | |
Array of objects (propertiesList) | |
Array of objects (updatedProtectedAssets) | |
Array of objects (updatedCoverages) |
{- "insuraceproduct_id": "a99ed66f-4360-4ebb-9039-0c5494fee9c4",
- "policy_id": "ee9b03e0-6495-427a-85a5-34444d24ae04",
- "policy_code": "ABC-123",
- "quote_properties": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "namespace": "string",
- "data": "string",
- "updated": "2020-08-27T00:00:00.000+0000"
}
], - "policyholder_properties": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "namespace": "string",
- "data": "string",
- "updated": "2020-08-27T00:00:00.000+0000"
}
], - "protectedassets": [
- {
- "code": "string",
- "properties": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "namespace": "string",
- "data": "string",
- "updated": "2020-08-27T00:00:00.000+0000"
}
]
}
], - "coverages": [
- {
- "namespace": "string",
- "properties": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "namespace": "string",
- "data": "string",
- "updated": "2020-08-27T00:00:00.000+0000"
}
]
}
]
}
Send information about the contract cancelation
insuraceproduct_id | string <uuid> |
policy_id | string <uuid> |
policy_code | string Policy code |
cancelation_ts | string <timestamp> |
reason_id | string |
{- "insuraceproduct_id": "a99ed66f-4360-4ebb-9039-0c5494fee9c4",
- "policy_id": "ee9b03e0-6495-427a-85a5-34444d24ae04",
- "policy_code": "ABC-123",
- "cancelation_ts": "2021-05-28T10:10:10.000+0000",
- "reason_id": "io.habit.policies.distributor.cancellation.extincted_service"
}