Policies
Полисы являются связанной сущностью продукта. На этой странице мы подробно рассмотрим различные конечные точки полисов, которые вы можете использовать для программного управления полисами. Мы рассмотрим, как запрашивать, создавать, обновлять и удалять полисы.
The policies model
Модель полисов содержит всю информацию о ваших полисах, такую как: номер полиса, страховая сумма, страховая премия и т.д. Несколько полисов могут иметь ссылку на один полис, если он является генеральным, групповым, многолетним или комбинированным.
Свойства
- Name
id- Type
- integer
- Description
Первичный ключ, уникальное поле.
- Name
CC- Type
- double
- Description
Страховая сумма.
- Name
CP- Type
- double
- Description
Страховая премия.
- Name
beneficiary- Type
- string
- Description
Выгодоприобретатель.
- Name
chatId- Type
- string
- Description
ID чат комнаты связанной с этим полисом.
- Name
currency- Type
- string
- Description
Валюта полиса.
- Name
date_end- Type
- timestamp
- Description
Дата начала действия полиса.
- Name
date_start- Type
- timestamp
- Description
Дата окончания действия полиса.
- Name
time_update- Type
- timestamp
- Description
Дата и время обновления полиса.
- Name
days_left_before_the_next_payment- Type
- number
- Description
Через сколько дней очередной платеж.
- Name
delete- Type
- boolean
- Description
Есть ли права на удаление полиса.
- Name
expert_info- Type
- string
- Description
Экспертная информация.
- Name
franchise- Type
- string
- Description
Франшиза.
- Name
franchise_type- Type
- string
- Description
Тип франшизы.
- Name
holdings- Type
- string
- Description
Холдинг.
- Name
insurance_conditions_options- Type
- array objects
- Description
Условия и опции страхования.
- Name
insurance_object- Type
- string
- Description
Объект страхования.
- Name
insurance_objects_id- Type
- number
- Description
ID объекта страхования.
- Name
insurance_type- Type
- string
- Description
Вид страхования.
- Name
insurant- Type
- string
- Description
Страхователь.
- Name
insurer- Type
- string
- Description
Страховщик.
- Name
is_close- Type
- boolean
- Description
Закрыт ли полис.
- Name
policy- Type
- string
- Description
Наименование полиса.
- Name
product- Type
- string
- Description
Наименование продукта связанного с полисом.
- Name
prolongation_type- Type
- string
- Description
Тип пролонгации.
- Name
settlement_id- Type
- integer
- Description
Внешний ключ на урегулирование страхового случая.
- Name
tarif- Type
- dobule
- Description
Тариф
- Name
time_update- Type
- timestamp
- Description
Дата и время последнего изменения полиса.
- Name
update- Type
- boolean
- Description
Есть ли права на изменение полиса.
- Name
user_update- Type
- string
- Description
Пользователь изменивший полис.
List all policies
Эта конечная точка позволяет вам получить список всех ваших полисов.
Обязательные атрибуты
- Name
public_key- Type
- string
- Description
API key.
Request
curl -G https://backend.aiins.online/api/v1/aiins/policies
-H "Authorization: JWT {token}" \
-H "Accept: application/json" \
-d "public_key={API key}"
Response
{
"update": true,
"delete": true,
"chatId": "policy_6973",
"id": 6973,
"CC": 3811332,
"CP": 56026.58,
"tarif": "1.4700000",
"policy": "6283261726UF",
"currency": "Рубль",
"product": "0356114064YJ",
"beneficiary": "ЛИЗИНГОВАЯ КОМПАНИЯ КАМАЗ, КЛИЕНТ",
"date_start": "04/09/2022",
"date_end": "03/09/2023",
"days_left_before_the_next_payment": "Оплачено",
"insurance_object": "КАМАЗ 5490-S5 (VFUBG68YD379FPR27, M342CK54)",
"insurance_type": "КАСКО",
"prolongation_type": "Не требуется",
"holdings": null,
"insurer": "ВСК",
"insurant": "ЛИЗИНГОВАЯ КОМПАНИЯ КАМАЗ",
"executor": "Adept Insurance",
"is_close": true,
"user_update": "Таранец",
"time_update": "27-10-2023 00:00::00",
"expert_info": null,
"insurance_objects_id": 5131,
"insurance_conditions_options": {
"options": [
{
"gap": true,
"name": "gap",
"type": "boolean",
"label": "GAP",
"tooltip": "Гарантия сохранения стоимости автомобиля."
},
{
"name": "avarkom",
"type": "boolean",
"label": "Аварком",
"avarkom": true,
"tooltip": "Специалист по оценке причиненного ущерба."
},
{
"name": "without_inspection",
"type": "boolean",
"label": "Без осмотра",
"tooltip": "Принятие на страхование без осмотра.",
"without_inspection": true
},
{
"name": "one_hundred_dealer",
"type": "boolean",
"label": "СТО дилера",
"tooltip": "Страховая компания выдает направление на ремонт ТС только в компании, представляющие автомобильный бренд (торговую марку).",
"one_hundred_dealer": true
},
{
"name": "service_station_in_the_direction_of_the_insurance",
"type": "boolean",
"label": "СТО по направлению СК",
"tooltip": "Страховая компания сама выбирает СТО, с которыми есть договорные отношения, для обслуживания и ремонта автомобиля. СТО может быть как дилер, так и не дилер.",
"service_station_in_the_direction_of_the_insurance": true
},
{
"name": "technical_assistance",
"type": "boolean",
"label": "Техпомощь",
"tooltip": "Техническая помощь на дороге, оказываемая водителю в случае поломки автомобиля.",
"technical_assistance": true
}
],
"insurance_conditions": {
"insurance_cover": "",
"individual_conditions": "",
"purpose_of_using_the_vehicle": "Прочее"
}
},
"product_id": 4646,
"is_withdrawn": false,
"settlement_id": 77,
"owner": "ЛИЗИНГОВАЯ КОМПАНИЯ КАМАЗ",
"borrower": "",
"creditor": null,
"leasingTaker": "КЛИЕНТ",
"leasingGiver": "ЛИЗИНГОВАЯ КОМПАНИЯ КАМАЗ",
"pledgeHolder": null,
"franchise": "10000",
"franchiseType": "Безусловная",
"renter": null,
"status": "Закрыт"
}
Create a policy
Эта конечная точка позволяет вам создать новый полис.
Обязательные атрибуты
- Name
public_key- Type
- string
- Description
API key в GET-параметре
- Name
body- Type
- string
- Description
Тело запроса
Request
curl -X POST "https://backend.aiins.online/api/v1/aiins/policies?public_key={API key}"
-H "Authorization: JWT {token}" \
-H "Accept: application/json" \
-d 'body'
Payload
{
"id": null,
"agreements": [],
"checkboxControl": 6,
"policy": "1402137551KNF",
"date_start": "2021-06-16",
"date_end": "2021-09-30",
"prolongation_type": "Не требуется",
"insurance_type": "Страхование грузов",
"insurance_object": "оборудование для металлообработки: станок (P24887385)",
"insurance_object_id": 4659,
"insuranceObjectType": "cargo",
"insurance_conditions_options": {
"insurance_conditions": {
"insurer_cost": "0",
"need_security": "",
"escort": "",
"сlosed_body": "",
"tent": "",
"plomb": ""
},
"options": [
{
"name": "load_unload_coverage",
"sort": 3,
"type": "boolean",
"label": "Покрытие погрузки/выгрузки",
"load_unload_coverage": true
},
{
"name": "ref_risk",
"sort": 4,
"type": "boolean",
"label": "Реф. риск",
"ref_risk": true
},
{
"name": "responsibility_all",
"sort": 3,
"type": "boolean",
"label": "С ответственностью за все риски",
"responsibility_all": true
},
{
"name": "responsibility_private",
"sort": 3,
"type": "boolean",
"label": "С ответственностью за частную аварию",
"responsibility_private": true
}
]
},
"objectIdOfInsuranceObject": 2460,
"multipleObejcts": false,
"beneficiaries": [
{
"personId": 933,
"name": {
"id": "933_ap",
"personId": 933,
"type": "ARTIFICIAL_PERSON",
"inn": "7807245361",
"name": "ГРУЗЫ МИРА",
"ogrn": "1207800173096",
"opf": "ООО",
"address": "198206, г Санкт-Петербург, Красносельский р-н, Петергофское шоссе, д 78 к 10 литера а, помещ 8Н офис 1",
"birthDate": null,
"seriesNumber": null,
"kpp": "780701001"
},
"type": "ARTIFICIAL_PERSON"
}
],
"renter": null,
"creditor": null,
"pledgeHolder": null,
"borrowers": [],
"leasingGiver": null,
"leasingTaker": null,
"currency": "Доллар",
"CC": 75255,
"CP": 68,
"franchises": [
{
"value": 200,
"valueType": null,
"type": "Безусловная",
"criteria": null
}
],
"tarif": 0.0904,
"productId": 3908,
"fee_percentage": null,
"anticipation_fee_in_currency": null,
"anticipation_fee_in_rub": null,
"fee_payment_status": null,
"time_update": null,
"user_update": null,
"make_by_request": false,
"old_id": null,
"update": true,
"delete": true,
"insuranceObjectsHistoryId": null
}
Response
{
"update": null,
"delete": null,
"id": 8835,
"CC": 75255,
"CP": 68,
"tarif": 0.0904,
"policy": "1402137551KNF",
"currency": "Доллар",
"product": 3908,
"status": "Закрыт",
"insurance_object": "оборудование для металлообработки: станок (P24887385)",
"insurance_object_id": 4659,
"insuranceObjectType": "cargo",
"objectIdOfInsuranceObject": 2460,
"insurance_type": "Страхование грузов",
"prolongation_type": "Не требуется",
"date_start": "2021-06-16",
"date_end": "2021-09-30",
"fee_percentage": null,
"anticipation_fee_in_currency": null,
"anticipation_fee_in_rub": null,
"fee_payment_status": null,
"user_update": "Таранец",
"time_update": "27-10-2023 15:44::36",
"payment_user_update": null,
"payment_time_update": null,
"insurance_conditions_options": {
"insurance_conditions": {
"insurer_cost": "0",
"need_security": "",
"escort": "",
"сlosed_body": "",
"tent": "",
"plomb": ""
},
"options": [
{
"name": "load_unload_coverage",
"sort": 3,
"type": "boolean",
"label": "Покрытие погрузки/выгрузки",
"load_unload_coverage": true
},
{
"name": "ref_risk",
"sort": 4,
"type": "boolean",
"label": "Реф. риск",
"ref_risk": true
},
{
"name": "responsibility_all",
"sort": 3,
"type": "boolean",
"label": "С ответственностью за все риски",
"responsibility_all": true
},
{
"name": "responsibility_private",
"sort": 3,
"type": "boolean",
"label": "С ответственностью за частную аварию",
"responsibility_private": true
}
]
},
"make_by_request": false,
"chatId": "policy_8835",
"beneficiaries": [
{
"personId": 933,
"name": "ГРУЗЫ МИРА",
"type": "ARTIFICIAL_PERSON"
}
],
"borrowers": [],
"franchises": [
{
"criteria": null,
"type": "Безусловная",
"value": 200,
"valueType": null
}
],
"creditor": null,
"leasingGiver": null,
"leasingTaker": null,
"pledgeHolder": null,
"renter": null
}
Retrieve a policy
Обратите внимание, что идентификтором для получия полисов является ID продукта
Эта конечная точка позволяет вам получить полис, указав его идентификатор. Обратитесь к списку вверху этой страницы, чтобы узнать, какие свойства включены в полис.
Обязательные атрибуты
- Name
public_key- Type
- string
- Description
API key в GET-параметре
Request
curl -G https://backend.aiins.online/api/v1/aiins/policies/:productId
-H "Authorization: JWT {token}" \
-H "Accept: application/json" \
-d "public_key={API key}"
Response
[
{
"update": true,
"delete": true,
"id": 7843,
"CC": 66924341,
"CP": 60232,
"tarif": 0.09,
"policy": "8748017046MS",
"currency": "Рубль",
"product": 3908,
"status": "Закрыт",
"insurance_object": "оборудование для металлообработки (W08627522)",
"insurance_object_id": 5317,
"insuranceObjectType": "cargo",
"objectIdOfInsuranceObject": 2628,
"insurance_type": "Страхование грузов",
"prolongation_type": "Не требуется",
"date_start": "2021-12-17",
"date_end": "2021-12-22",
"fee_percentage": null,
"anticipation_fee_in_currency": null,
"anticipation_fee_in_rub": null,
"fee_payment_status": null,
"user_update": "Adept Insurance",
"time_update": "17-12-2021 17:09::13",
"payment_user_update": "Adept Insurance",
"payment_time_update": "11-01-2022 11:24::27",
"insurance_conditions_options": null,
"make_by_request": false,
"chatId": "policy_7843",
"beneficiaries": [
{
"personId": 705,
"name": "МАРВЕЛ ДИСТРИБУЦИЯ",
"type": "ARTIFICIAL_PERSON"
}
],
"borrowers": [],
"franchises": [
{
"criteria": null,
"type": "Процентная ставка",
"value": 0.25,
"valueType": null
}
],
"creditor": null,
"leasingGiver": null,
"leasingTaker": null,
"pledgeHolder": null,
"renter": null
},
{
"update": true,
"delete": true,
"id": 8835,
"CC": 75255,
"CP": 68,
"tarif": 0.0904,
"policy": "1402137551KNF",
"currency": "Доллар",
"product": 3908,
"status": "Закрыт",
"insurance_object": "оборудование для металлообработки: станок (P24887385)",
"insurance_object_id": 4659,
"insuranceObjectType": "cargo",
"objectIdOfInsuranceObject": 2460,
"insurance_type": "Страхование грузов",
"prolongation_type": "Не требуется",
"date_start": "2021-06-16",
"date_end": "2021-09-30",
"fee_percentage": null,
"anticipation_fee_in_currency": null,
"anticipation_fee_in_rub": null,
"fee_payment_status": null,
"user_update": "Оксана Таранец",
"time_update": "27-10-2023 15:44::36",
"payment_user_update": " ",
"payment_time_update": null,
"insurance_conditions_options": {
"options": [
{
"name": "load_unload_coverage",
"sort": 3,
"type": "boolean",
"label": "Покрытие погрузки/выгрузки",
"load_unload_coverage": true
},
{
"name": "ref_risk",
"sort": 4,
"type": "boolean",
"label": "Реф. риск",
"ref_risk": true
},
{
"name": "responsibility_all",
"sort": 3,
"type": "boolean",
"label": "С ответственностью за все риски",
"responsibility_all": true
},
{
"name": "responsibility_private",
"sort": 3,
"type": "boolean",
"label": "С ответственностью за частную аварию",
"responsibility_private": true
}
],
"insurance_conditions": {
"tent": "",
"plomb": "",
"escort": "",
"insurer_cost": "0",
"сlosed_body": "",
"need_security": ""
}
},
"make_by_request": false,
"chatId": "policy_8835",
"beneficiaries": [
{
"personId": 933,
"name": "ГРУЗЫ МИРА",
"type": "ARTIFICIAL_PERSON"
}
],
"borrowers": [],
"franchises": [
{
"criteria": null,
"type": "Безусловная",
"value": 200,
"valueType": null
}
],
"creditor": null,
"leasingGiver": null,
"leasingTaker": null,
"pledgeHolder": null,
"renter": null
}
]
Update a policy
Эта конечная точка позволяет вам изменить текущий полис.
Обязательные атрибуты
- Name
public_key- Type
- string
- Description
API key в GET-параметре
- Name
body- Type
- string
- Description
Тело запроса
Request
curl -X PUT "https://backend.aiins.online/api/v1/aiins/policies/:id?public_key={API key}"
-H "Authorization: JWT {token}" \
-H "Accept: application/json" \
-d 'body'
Payload
{
"id": 6169,
"checkboxControl": 0,
"policy": "1402137551KN",
"date_start": "2021-06-16",
"date_end": "2021-09-30",
"prolongation_type": "Не требуется",
"insurance_type": "Страхование грузов",
"insurance_object": "оборудование для металлообработки: станок (P24887385)",
"insurance_object_id": 4659,
"insuranceObjectType": "cargo",
"insurance_conditions_options": null,
"objectIdOfInsuranceObject": 2460,
"multipleObejcts": false,
"beneficiaries": [],
"renter": null,
"creditor": null,
"pledgeHolder": null,
"borrowers": [],
"leasingGiver": null,
"leasingTaker": null,
"currency": "Доллар",
"CC": 75255,
"CP": 70,
"franchises": [
{
"value": 200,
"valueType": null,
"type": "Безусловная",
"criteria": null
}
],
"tarif": 0.0930170752773902,
"productId": 3908,
"fee_percentage": null,
"anticipation_fee_in_currency": null,
"anticipation_fee_in_rub": null,
"fee_payment_status": null,
"time_update": "13-12-2021 15:17::12",
"user_update": "Adept Insurance",
"make_by_request": false,
"old_id": null,
"update": true,
"delete": true,
"insuranceObjectsHistoryId": null,
"status": "Закрыт"
}
Response
{
"update": null,
"delete": null,
"id": 6169,
"CC": 75255,
"CP": 70,
"tarif": 0.0930170752773902,
"policy": "1402137551KN",
"currency": "Доллар",
"product": 3908,
"status": "Закрыт",
"insurance_object": "оборудование для металлообработки: станок (P24887385)",
"insurance_object_id": 4659,
"insuranceObjectType": "cargo",
"objectIdOfInsuranceObject": 2460,
"insurance_type": "Страхование грузов",
"prolongation_type": "Не требуется",
"date_start": "2021-06-16",
"date_end": "2021-09-30",
"fee_percentage": null,
"anticipation_fee_in_currency": null,
"anticipation_fee_in_rub": null,
"fee_payment_status": null,
"user_update": "Таранец",
"time_update": "27-10-2023 15:54::17",
"payment_user_update": "Insurance",
"payment_time_update": "19-08-2021 15:45::49",
"insurance_conditions_options": null,
"make_by_request": false,
"chatId": "policy_6169",
"beneficiaries": [],
"borrowers": [],
"franchises": [
{
"value": 200,
"valueType": null,
"type": "Безусловная",
"criteria": null
}
],
"creditor": null,
"leasingGiver": null,
"leasingTaker": null,
"pledgeHolder": null,
"renter": null
}
Delete a policy
Эта конечная точка позволяет вам удалять полисы.
Request
curl -X DELETE "https://backend.aiins.online/api/v1/aiins/policies/:id?public_key={API key}"
-H "Authorization: JWT {token}" \
-H "Accept: application/json"