Para realizar o acompanhamento de apólices, sinistros e outras ações existentes no sistema,
usamos o processo de notificação via `webhooks`. Este processo consiste em registrar uma URL
que será chamada sempre que uma ação mapeada for executada.
### Como registrar um Webhook
Disponibilizamos uma interface no portal de parcerias para que seja realizado o processo de registro da URL
e de quais notificações são desejadas acompanhar.

Assim que realizar o processo de registro da URL e de quais serão as notificações ouvidas, um token para validação será apresentado. Mais para frente falaremos desse token.
### Como será enviado a notificação
As notificações serão enviadas através de requisições do tipo POST direto na URL cadastrada no portal de parcerias.
Um exemplo de chamada que será realizada:
```
curl -XPOST https://your.url.com/
```
### Como validar se a requisição pertence ao sistema da YOUSE
A validação da requisição pode ser feita através da verificaçao hash enviada
no cabeçalho da mensagem comparando com a geração de hash juntando as informações
de timestamp + corpo da mensagem + chave gerada no cadastro do WEBHOOK
Ex:
Informações que vem no header da requisição
```json
{
"host": "eo9nxbrwt58bybr.host.net",
"content-length": "307",
"user-agent": "Faraday v1.10.3",
"timestamp": "1692725519",
"content-type": "application/json",
"youse-signature": "453b57791ea950e8fee0428611de83a7c6002d609cf8e445bc2b8e0815074a8c",
"x-request-id": "8dc4c1f8-6ba6-4459-832b-838144fe3682",
"x-datadog-trace-id": "3938195952544231274",
"x-datadog-parent-id": "4231012128596514484",
"x-datadog-sampling-priority": "2",
"x-datadog-tags": "_dd.p.dm=-3",
"accept-encoding": "gzip;q=1.0,deflate;q=0.6,identity;q=0.3",
"accept": "*/*"
}
```
Informações que vem no corpo de resposta
```json
{
"request": { "id": "91b391b2-547e-4c34-b3f5-c998c562feed" },
"type": "policy-cancellation",
"timestamp": 1692725519,
"data": {
"policy_number": "3003110007825",
"policy_product": "auto",
"cancellation_reason": "TESTE GG",
"protocol_number": "202308221431E4854243",
"canceled_by": "XHY2xsfM8driDCr1Ph9x",
"requester": "carrier"
}
}
```
Chave secreta gerada no registro da URL

Executando a validação do assinatura em código ruby
```ruby
concatenated_payload= ["vmDuSsbPWnMbJ9zHkXx0Yq49NlyUPccuCW99leM1YWQ", 1692725519, '{"request":{"id":"91b391b2-547e-4c34-b3f5-c998c562feed"},"type":"policy-cancellation","timestamp":1692725519,"data":{"policy_number":"3003110007825","policy_product":"auto","cancellation_reason":"TESTE GG","protocol_number":"202308221431E4854243","canceled_by":"XHY2xsfM8driDCr1Ph9x","requester":"carrier"}}'].join('.')
signature = Digest::SHA256.hexdigest(concatenated_payload)
youse_signature = "8c31f8c8136e5e6cf24794af3b0235ca2fea9c952eb7407dd5f7e799d7c5e83d"
signature == youse_signature
```
Para testar com execução no shell linux, primeiro crie um arquivo contendo o token, o timestamp e o conteúdo do corpo
```bash
echo 'vmDuSsbPWnMbJ9zHkXx0Yq49NlyUPccuCW99leM1YWQ.1692725519.{"request":{"id":"91b391b2-547e-4c34-b3f5-c998c562feed"},"type":"policy-cancellation","timestamp":1692725519,"data":{"policy_number":"3003110007825","policy_product":"auto","cancellation_reason":"TESTE GG","protocol_number":"202308221431E4854243","canceled_by":"XHY2xsfM8driDCr1Ph9x","requester":"carrier"}}' > data.txt
cat data.txt | tr -d '\n' | sha256sum
```
A saída do comando deve ter o mesmo valor que a assinatura no header da requisição.
### Quais tipos de notificações estão disponíveis
Atualmente estão disponíveis as notificações abaixo. Todas seguem o padrão de corpo:
```json
{
"request": { "id": "beb2504a-bd8d-4860-8e99-467d66a83160" },
"type": "event-name",
"timestamp": 1692212775,
"data": {}
}
```
O corpo da informação dentro do atributo `data` segue o schema em cada tipo de notificação disponível, e uma lista dos schemas de suporte segue abaixo
Endereço
{
"type": "object",
"required": [
"city",
"state",
"number",
"country",
"complement",
"zip_code",
"neighborhood",
"full_address"
],
"properties": {
"city": {
"type": "string"
},
"state": {
"type": "string"
},
"number": {
"type": "string"
},
"street": {
"type": "string"
},
"complement": {
"type": "string"
},
"full_address": {
"type": "string"
},
"country": {
"type": "string"
},
"zip_code": {
"type": "string"
},
"neighborhood": {
"type": "string"
}
}
}
Assistências
{
"type": "array",
"uniqueItems": true,
"items": {
"type": "object",
"required": [
"id",
"name",
"description",
"services"
],
"properties": {
"id": {
"type": "string"
},
"assistance_id": {
"type": ["string", null]
},
"name": {
"type": "string"
},
"description": {
"type": ["string", null]
},
"services": {
"type": ["array", null],
"uniqueItems": true,
"items": {
"type": "object",
"required": [
"id",
"service_id",
"name",
"description"
],
"properties": {
"id": {
"type": "string"
},
"service_id": {
"type": "string"
},
"name": {
"type": ["string", null]
},
"description": {
"type": ["string", null]
},
"service_options": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "object",
"required": [
"id",
"option_id",
"name"
],
"properties": {
"id": {
"type": "string"
},
"option_id": {
"type": "string"
},
"name": {
"type": "string"
}
}
}
}
}
}
}
}
}
}
Coberturas
{
"type": "array",
"minItems": 1,
"uniqueItems": true,
"items": {
"type": "object",
"required": [
"id",
"name",
"description",
"deductible",
"deductible_type",
"lmi"
],
"properties": {
"id": {
"type": "string"
},
"coverage_id": {
"type": ["string", null]
},
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"deductible": {
"type": "number"
},
"deductible_type": {
"type": ["string", null]
},
"lmi": {
"type": [null, "number"]
},
"fragments": {
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"description",
"deductible",
"deductible_type",
"lmi"
],
"properties": {
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"deductible": {
"type": "number"
},
"deductible_type": {
"type": [null, "string"]
},
"lmi": {
"type": [null, "number"]
},
"coverage_id": {
"type": [null, "string"]
}
}
}
}
}
}
}
Motorista
{
"type": "object",
"required": [
"name",
"gender",
"birthdate",
"document_type",
"document_number",
"bonuses_class"
],
"properties": {
"name": {
"type": "string"
},
"gender": {
"type": "string"
},
"birthdate": {
"type": "string"
},
"document_type": {
"type": "string"
},
"document_number": {
"type": "string"
},
"bonuses_class": {
"type": [null, "number"]
}
}
}
Segurado
{
"type": "object",
"required": [
"name",
"email",
"phone",
"gender",
"nationality",
"birthdate",
"document_type",
"document_number",
"marital_status",
"salary_range",
"occupation_id",
"address"
],
"properties": {
"name": {
"type": "string"
},
"email": {
"type": "string"
},
"phone": {
"type": "string"
},
"gender": {
"type": "string"
},
"nationality": {
"type": "string"
},
"birthdate": {
"type": "string"
},
"document_type": {
"type": "string"
},
"document_number": {
"type": "string"
},
"marital_status": {
"type": [null, "string"]
},
"salary_range": {
"type": [null, "string"]
},
"occupation_id": {
"type": [null, "string"]
},
"address": {
"type": "object",
"required": [
"city",
"state",
"number",
"street",
"country",
"zip_code",
"complement",
"neighborhood",
"full_address"
],
"properties": {
"city": {
"type": "string"
},
"state": {
"type": "string"
},
"full_address": {
"type": [null, "string"]
},
"number": {
"type": "string"
},
"street": {
"type": "string"
},
"complement": {
"type": [null, "string"]
},
"country": {
"type": "string"
},
"zip_code": {
"type": "string"
},
"neighborhood": {
"type": "string"
}
}
}
}
}
Condições de pagamento
{
"type": "object",
"required": [
"payment_method",
"installments_per_year",
"installments_frequency"
],
"properties": {
"payment_method": {
"type": "string"
},
"contract_duration": {
"type": [null, "integer"]
},
"installments_per_year": {
"type": "integer"
},
"installments_frequency": {
"type": "string"
}
}
}
Histórico de preço
{
"type": "array",
"minItems": 1,
"uniqueItems": true,
"items": {
"type": "object",
"required": [
"pricing_id",
"effective_from",
"effective_until"
],
"properties": {
"pricing_id": {
"type": "string"
},
"efective_from": {
"type": "string"
},
"efective_until": {
"type": "string"
}
}
}
}
Propriedade
{
"type": "object",
"required": [
"type",
"price",
"usage",
"address",
"neighbor_of_vacant_lot"
],
"properties": {
"type": {
"type": "string"
},
"price": {
"type": "float"
},
"usage": {
"type": "string"
},
"neighbor_of_vacant_lot": {
"type": "boolean"
},
"address": {
"$ref": "./address.json"
}
}
}
Veículo
{
"type": "object",
"required": [
"vin",
"make",
"year",
"model",
"price",
"usage",
"address",
"auction",
"version",
"brand_new",
"fuel_type",
"fipe_code",
"fipe_compensation_factor",
"license_plate",
"passenger_capacity",
"needs_inspection",
"needs_online_inspection"
],
"properties": {
"vin": {
"type": "string"
},
"make": {
"type": "string"
},
"year": {
"type": "integer"
},
"model": {
"type": "string"
},
"price": {
"type": "string"
},
"usage": {
"type": "string"
},
"fipe_code": {
"type": [null, "string"]
},
"fipe_compensation_factor": {
"type": [null, "string"]
},
"address": {
"type": "object",
"required": [
"city",
"state",
"number",
"street",
"country",
"complement",
"full_address",
"zip_code",
"neighborhood"
],
"properties": {
"city": {
"type": "string"
},
"state": {
"type": "string"
},
"number": {
"type": "string"
},
"complement": {
"type": [null, "string"]
},
"full_address": {
"type": [null, "string"]
},
"street": {
"type": "string"
},
"country": {
"type": "string"
},
"zip_code": {
"type": "string"
},
"neighborhood": {
"type": "string"
}
}
},
"auction": {
"type": [null, "boolean"]
},
"version": {
"type": "string"
},
"brand_new": {
"type": "boolean"
},
"fuel_type": {
"type": "string"
},
"license_plate": {
"type": "string"
},
"passenger_capacity": {
"type": "integer"
},
"needs_inspection": {
"type": "boolean"
},
"needs_online_inspection": {
"type": "boolean"
}
}
}
Precificação
{
"type": "object",
"properties": {
"total_cost": {
"type": [null, "string"]
},
"total_premium": {
"type": [null, "string"]
},
"taxes_cost": {
"type": [null, "string"]
},
"net_premium": {
"type": [null, "string"]
},
"premium_taxes_cost": {
"type": [null, "string"]
},
"assistances_taxes_cost": {
"type": [null, "string"]
},
"assistances_total_cost": {
"type": [null, "string"]
}
}
}
Agendamento de emissão
{
"type": "object",
"required": [
"charge_attempts",
"issue_policy_at",
"cancellation_request_at",
"effective_from"
],
"properties": {
"charge_attempts": {
"type": "integer"
},
"issue_policy_at": {
"type": "string",
"format": "date-time"
},
"cancellation_request_at": {
"type": "string",
"format": "date-time"
},
"effective_from": {
"type": "string"
},
"effective_until": {
"type": [null, "string"]
}
}
}
Apólice do seguro anterior
{
"type": "object",
"properties": {
"effective_from": {
"type": [null, "string"]
},
"effective_until": {
"type": [null, "string"]
},
"consulted_insurer": {
"type": [null, "string"]
},
"previous_vehicle_vin": {
"type": [null, "string"]
},
"previous_policy_number": {
"type": [null, "string"]
},
"cancellation_date": {
"type": [null, "string"]
},
"consulted_insurer_name": {
"type": [null, "string"]
}
}
}
---
#### policy-status
Sempre que uma apólice mudar de status, esse evento será disparado. Principal campo do evento é o policy_status, podendo assumir valores como active, pending, expired, canceled.
**Schemas**
Policy AUTO
{
"type": "object",
"required": [
"partner_name",
"policy_number",
"policy_status",
"policy_product",
"order_id",
"created_at",
"coverages",
"assistances",
"renewal",
"effective_from",
"effective_until",
"ci_number",
"pricing",
"proposal_number",
"insured_person",
"driver",
"vehicle",
"contract_duration",
"payment_condition",
"terms_and_conditions"
],
"properties": {
"partner_name": {
"type": "string"
},
"policy_number": {
"type": ["string", null]
},
"policy_status": {
"type": "string"
},
"policy_product": {
"type": "string"
},
"order_id": {
"type": "string"
},
"ci_number": {
"type": ["string", null]
},
"proposal_number": {
"type": ["string", null]
},
"renewal": {
"type": "boolean"
},
"created_at": {
"type": ["string", null]
},
"effective_from": {
"type": ["string", null]
},
"effective_until": {
"type": ["string", null]
},
"coverages": {
"$ref": "./support/coverages.json"
},
"assistances": {
"$ref": "./support/assistances.json"
},
"insured_person": {
"$ref": "./support/insured-person.json"
},
"vehicle": {
"$ref": "./support/vehicle.json"
},
"driver": {
"$refs": "./support/driver.json"
},
"contract_duration": {
"type": "number"
},
"pricing": {
"type": "object",
"required": [
"total_cost",
"total_premium",
"taxes_cost",
"net_premium",
"premium_taxes_cost",
"assistances_taxes_cost",
"assistances_total_cost"
],
"properties": {
"total_cost": {
"type": [null, "number"]
},
"total_premium": {
"type": [null, "number"]
},
"taxes_cost": {
"type": [null, "number"]
},
"net_premium": {
"type": [null, "number"]
},
"premium_taxes_cost": {
"type": [null, "number"]
},
"assistances_taxes_cost": {
"type": [null, "number"]
},
"assistances_total_cost": {
"type": [null, "number"]
}
}
},
"payment_condition": {
"$refs": "./support/paymet-condition.json"
},
"terms_and_conditions": {
"type": "string"
},
"pricing_history": {
"$refs": "./support/pricing-history.json"
}
}
}
Policy HOME
{
"type": "object",
"required": [
"partner_name",
"policy_number",
"proposal_number",
"policy_status",
"policy_product",
"order_id",
"created_at",
"coverages",
"assistances",
"renewal",
"effective_from",
"effective_until",
"ci_number",
"pricing",
"insured_person",
"property",
"contract_duration",
"payment_condition",
"terms_and_conditions"
],
"properties": {
"partner_name": {
"type": "string"
},
"policy_number": {
"type": "string"
},
"policy_status": {
"type": "string"
},
"proposal_number": {
"type": [null, "string"]
},
"policy_product": {
"type": "string"
},
"order_id": {
"type": "string"
},
"renewal": {
"type": "boolean"
},
"ci_number": {
"type": ["string", null]
},
"created_at": {
"type": ["string", null]
},
"effective_from": {
"type": ["string", null]
},
"effective_until": {
"type": ["string", null]
},
"coverages": {
"$ref": "./support/coverages.json"
},
"assistances": {
"$ref": "./support/assistances.json"
},
"insured_person": {
"$ref": "./support/insured-person.json"
},
"property": {
"$ref": "./support/property.json"
},
"contract_duration": {
"type": "integer"
},
"payment_condition": {
"$refs": "./support/paymet-condition.json"
},
"terms_and_conditions": {
"type": "string"
},
"pricing_history": {
"$refs": "./support/pricing-history.json"
},
"pricing": {
"type": "object",
"required": [
"total_cost",
"total_premium",
"taxes_cost",
"net_premium",
"premium_taxes_cost",
"assistances_taxes_cost",
"assistances_total_cost"
],
"properties": {
"total_cost": {
"type": [null, "number"]
},
"total_premium": {
"type": [null, "number"]
},
"taxes_cost": {
"type": [null, "number"]
},
"net_premium": {
"type": [null, "number"]
},
"premium_taxes_cost": {
"type": [null, "number"]
},
"assistances_taxes_cost": {
"type": [null, "number"]
},
"assistances_total_cost": {
"type": [null, "number"]
}
}
}
}
}
Policy LIFE
{
"type": "object",
"required": [
"partner_name",
"policy_number",
"proposal_number",
"policy_status",
"policy_product",
"order_id",
"created_at",
"renewal",
"effective_from",
"effective_until",
"ci_number",
"pricing",
"coverages",
"assistances",
"insured_person",
"contract_duration",
"payment_condition",
"terms_and_conditions"
],
"properties": {
"partner_name": {
"type": "string"
},
"policy_number": {
"type": "string"
},
"proposal_number": {
"type": [null, "string"]
},
"policy_status": {
"type": "string"
},
"policy_product": {
"type": "string"
},
"order_id": {
"type": "string"
},
"ci_number": {
"type": ["string", null]
},
"renewal": {
"type": "boolean"
},
"created_at": {
"type": ["string", null]
},
"effective_from": {
"type": ["string", null]
},
"effective_until": {
"type": ["string", null]
},
"coverages": {
"$ref": "./support/coverages.json"
},
"assistances": {
"$ref": "./support/assistances.json"
},
"insured_person": {
"$ref": "./support/insured-person.json"
},
"contract_duration": {
"type": "integer"
},
"payment_condition": {
"$refs": "./support/paymet-condition.json"
},
"terms_and_conditions": {
"type": "string"
},
"pricing": {
"type": "object",
"required": [
"total_cost",
"total_premium",
"taxes_cost",
"net_premium",
"premium_taxes_cost",
"assistances_taxes_cost",
"assistances_total_cost"
],
"properties": {
"total_cost": {
"type": [null, "number"]
},
"total_premium": {
"type": [null, "number"]
},
"taxes_cost": {
"type": [null, "number"]
},
"net_premium": {
"type": [null, "number"]
},
"premium_taxes_cost": {
"type": [null, "number"]
},
"assistances_taxes_cost": {
"type": [null, "number"]
},
"assistances_total_cost": {
"type": [null, "number"]
}
}
},
"pricing_history": {
"$refs": "./support/pricing-history.json"
}
}
}
Exemplo do corpo do evento:
{
"order_id": "b2b212b8-7e03-4ef6-b2f1-6d110fdb0880",
"created_at": "2023-08-16T15:55:30.674-03:00",
"contract_duration": 2,
"payment_condition": {
"installments_per_year": 12,
"installments_frequency": "monthly"
},
"terms_and_conditions": "https://cdn.youse.com.br/docs/v10/condicoes-gerais-plano-auto.pdf",
"partner_name": "partner-name",
"policy_number": "3003110008429",
"policy_product": "auto",
"policy_status": "active",
"pricing_history": [
{
"pricing_id": "d99b1fec-ba62-4ce6-8408-38486336bb3d",
"effective_from": "2023-08-16",
"effective_until": "2025-08-16"
}
],
"insured_person": {
"name": "John Youser",
"email": "john_youser@youse.com.br",
"phone": "(11) 9999-9999",
"gender": "male",
"nationality": "BR",
"birthdate": "1980-01-01",
"document_type": "cpf",
"document_number": "123.456.700-88",
"address": {
"zip_code": "13208-760",
"street": "Rua Barão de Teffé",
"number": "1000",
"neighborhood": "Jardim Ana Maria",
"city": "Jundiaí",
"state": "SP",
"country": "BR"
}
},
"driver": {
"name": "John Youser",
"gender": "male",
"birthdate": "1980-01-01",
"document_type": "cpf",
"document_number": "123.456.700-88"
},
"vehicle": {
"vin": "9999AKFW98B070000",
"make": "PEUGEOT",
"model": "206",
"version": "206 PRESENCE 1.4 / 1.4 FLEX 8V 5P (Gasolina / Flex)",
"year": 2008,
"price": "13623.0",
"brand_new": false,
"license_plate": "YOU-0000",
"usage": "only_private",
"passenger_capacity": 5,
"fuel_type": "gasoline",
"needs_inspection": false,
"needs_online_inspection": false,
"auction": null,
"address": {
"zip_code": "13208-760",
"street": "Rua Barão de Teffé",
"number": "1000",
"neighborhood": "Jardim Ana Maria",
"city": "Jundiaí",
"state": "SP",
"country": "BR"
}
},
"coverages": [
{
"id": "856e4c28-9011-4e84-bf78-54e467103e5c",
"name": "Incêndio, Roubo e Furto – INDENIZAÇÃO INTEGRAL",
"description": ".",
"deductible": 0,
"deductible_type": null,
"fragments": [
{
"name": "Roubo e furto",
"description": "Seu carro foi roubado? Calma, calma. Se em trinta dias ele não for encontrado a gente paga o valor total do seu seguro. Mas se for e estiver bem detonado – deu PT – a gente também cobre o seguro pra você.",
"deductible": 0,
"deductible_type": null
},
{
"name": "Incêndio",
"description": "Se seu veículo der PT porque pegou fogo, explodiu ou caiu um raio, vc recebe seu seguro integral pra compensar o prejuízo.",
"deductible": 0,
"deductible_type": null
}
]
}
],
"assistances": [
{
"id": "019075c0-3516-44d8-a675-b6a38183783b",
"name": "Assistência a automóvel",
"description": "A gente leva seu veículo até a oficina ou concessionária, se precisar. Ah, se o trajeto for maior que o contratado, aí o valor extra fica por sua conta e será pago direto pro reboque."
},
{
"id": "bce0fa1e-794c-4065-9bf1-a15aad305002",
"name": "Carro reserva",
"description": "Se vc ficar sem o seu carro por ter acionado alguma cobertura prevista no contrato, a gente vai providenciar a locação de um veículo reserva por 7, 15 ou 30 dias."
}
]
}
---
#### policy-payment
Schema
{
"type": "object",
"required": [
"policy_number",
"product",
"partner_id",
"amount",
"installment_number",
"status",
"due_at",
"installments_per_year",
"installments_frequency",
"paid_payment_method_name"
],
"properties": {
"policy_number": { "type": "string" },
"product": { "type": "string" },
"partner_id": { "type": "string" },
"amount": { "type": "string" },
"installment_number": { "type": "integer" },
"status": { "type": "string" },
"due_at": { "type": "string" },
"installments_per_year": { "type": "integer" },
"installments_frequency": { "type": "string" },
"paid_payment_method_name": { "type": "string" }
}
}
Exemplo do corpo do evento:
{
"policy_number": "3003110008660",
"product": "auto",
"partner_id": "servicos_sura",
"amount": "2621.61",
"installment_number": 1,
"status": "paid",
"due_at": "2023-08-24",
"paid_payment_method_name": "Cartão de Crédito",
"installments_per_year": 1,
"installments_frequency": "yearly"
}
---
#### policy-plan
Plano de pagamento de uma apólice
Schema
{
"$id": "/schemas/policy-plan",
"type": "object",
"required": [
"policy_number",
"product",
"payment_plan"
],
"properties": {
"policy_number": {
"type": "string"
},
"product": {
"type": "string"
},
"payment_plan": {
"type": "object",
"required": [
"status",
"total_amount",
"initial_date",
"installments_count",
"installments_frequency",
"installments"
],
"properties": {
"status": {
"type": "string"
},
"total_amount": {
"type": "string"
},
"initial_date": {
"type": "string"
},
"installments_count": {
"type": "number"
},
"installments_frequency": {
"type": "string"
},
"installments": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"required": [
"amount",
"number",
"status",
"due_at",
"bill_at"
],
"properties": {
"amount": {
"type": "string"
},
"number": {
"type": "number"
},
"status": {
"type": "string"
},
"due_at": {
"type": "string"
},
"bill_at": {
"type": "string"
}
}
}
}
}
}
}
}
Exemplo do corpo do evento:
{
"policy_number": "3003110013094",
"product": "auto",
"payment_plan": {
"status": "active",
"total_amount": "1522.14",
"initial_date": "2024-03-27",
"installments_count": 24,
"installments_frequency": "monthly",
"installments": [
{
"amount": "63.4",
"number": 1,
"status": "billed",
"due_at": "2024-03-27",
"bill_at": "2024-03-17"
},
{
"amount": "63.4",
"number": 2,
"status": "pending",
"due_at": "2024-04-27",
"bill_at": "2024-04-17"
}
]
}
}
---
### policy-changes
Sempre que uma apólice sofre uma alteração, este evento apresenta a apólice e motivo da alteração
Schema
{
"type": "object",
"required": ["product", "motivation", "created_at", "policy"],
"properties": {
"product": { "type": "string" },
"motivation": { "type": "string" },
"created_at": { "type": "string" },
"policy": {
"type": "object",
"required": [
"partner_name",
"policy_number",
"proposal_number",
"policy_status",
"policy_product",
"order_id",
"created_at",
"coverages",
"assistances",
"renewal",
"effective_from",
"effective_until",
"ci_number",
"pricing",
"insured_person",
"property",
"contract_duration",
"payment_condition",
"terms_and_conditions"
],
"properties": {
"partner_name": {
"type": "string"
},
"policy_number": {
"type": [null, "string"]
},
"policy_status": {
"type": "string"
},
"proposal_number": {
"type": [null, "string"]
},
"policy_product": {
"type": "string"
},
"order_id": {
"type": "string"
},
"renewal": {
"type": "boolean"
},
"ci_number": {
"type": ["string", null]
},
"created_at": {
"type": ["string", null]
},
"updated_at": {
"type": ["string", null]
},
"effective_from": {
"type": ["string", null]
},
"effective_until": {
"type": ["string", null]
},
"coverages": {
"$ref": "./spec/support/webhook/schemas/messages/support/coverages.json"
},
"assistances": {
"$ref": "./spec/support/webhook/schemas/messages/support/assistances.json"
},
"insured_person": {
"$ref": "./spec/support/webhook/schemas/messages/support/insured-person.json"
},
"property": {
"$ref": "./spec/support/webhook/schemas/messages/support/property.json"
},
"contract_duration": {
"type": [null, "number"]
},
"payment_condition": {
"$refs": "./spec/support/webhook/schemas/messages/support/paymet-condition.json"
},
"terms_and_conditions": {
"type": "string"
},
"pricing_history": {
"$refs": "./spec/support/webhook/schemas/messages/support/pricing-history.json"
},
"pricing": {
"type": "object",
"required": [
"total_cost",
"total_premium",
"taxes_cost",
"net_premium",
"premium_taxes_cost",
"assistances_taxes_cost",
"assistances_total_cost"
],
"properties": {
"total_cost": {
"type": [null, "number"]
},
"total_premium": {
"type": [null, "number"]
},
"taxes_cost": {
"type": [null, "number"]
},
"net_premium": {
"type": [null, "number"]
},
"premium_taxes_cost": {
"type": [null, "number"]
},
"assistances_taxes_cost": {
"type": [null, "number"]
},
"assistances_total_cost": {
"type": [null, "number"]
}
}
}
}
}
}
}
Exemplo do corpo do evento:
{
"product": "auto",
"motivation": "proposal_creation",
"created_at": "2018-01-14T08:05:42.782Z",
"policy": {
"order_id": "a6b3b8fd-2fef-4287-bf61-b1ce8402483b",
"created_at": "2018-01-14T08:05:41.399Z",
"updated_at": null,
"contract_duration": null,
"payment_condition": null,
"terms_and_conditions": "https://cdn.youse.com.br/docs/v2/condicoes-gerais-plano-auto.pdf",
"effective_from": "2018-01-14",
"effective_until": "2020-01-14",
"ci_number": null,
"renewal": false,
"proposal_number": "3110020000068328",
"partner_name": "partner_code",
"policy_number": null,
"policy_product": "auto",
"policy_status": "proposal",
"pricing": {
"total_cost": 1482.09,
"total_premium": 1039.39,
"taxes_cost": 71.43,
"net_premium": 967.96,
"premium_taxes_cost": 71.43,
"assistances_taxes_cost": 0.0,
"assistances_total_cost": 442.7
},
"pricing_history": null,
"insured_person": {
"name": "Glauton Vieira",
"email": "endosso.testes@youse.com.br",
"phone": "(99) 66666-6666",
"gender": "female",
"nationality": "br",
"birthdate": "1987-11-08",
"document_type": "cpf",
"document_number": "123.456.795-49",
"marital_status": "single",
"salary_range": "Band3",
"occupation_id": "212410",
"address": {
"zip_code": "85859-270",
"street": "Rua Brinco de Ouro",
"number": "5624",
"complement": "",
"neighborhood": "Parque Morumbi III",
"city": "Foz do Iguaçu",
"state": "PR",
"country": "Brasil",
"full_address": "Rua Brinco de Ouro, 5624, , Parque Morumbi III, Foz do Iguaçu, PR, Brasil, 85859-270"
}
},
"driver": {
"name": "Glauton Vieira",
"gender": "female",
"birthdate": "1987-11-08",
"document_type": "cpf",
"document_number": "123.456.795-49",
"bonuses_class": null
},
"vehicle": {
"vin": "9BWAB45Z6G0000688",
"make": "FORD",
"model": "KA",
"version": "KA+ SEDAN 1.5 SEL 16V FLEX 4P (Gasolina / Flex)",
"year": 2017,
"price": "42595.0",
"brand_new": false,
"license_plate": "YOU-0000",
"usage": "only_private",
"passenger_capacity": 5,
"fuel_type": "gasoline",
"needs_inspection": false,
"needs_online_inspection": false,
"auction": null,
"fipe_code": "003415-0",
"fipe_compensation_factor": 100,
"address": {
"zip_code": "85859-270",
"street": "Rua Brinco de Ouro",
"number": null,
"complement": null,
"neighborhood": "Parque Residencial Morumbi III",
"city": "Foz do Iguaçu",
"state": "PR",
"country": "Brasil",
"full_address": "Rua Brinco de Ouro, Parque Residencial Morumbi III, Foz do Iguaçu, PR, Brasil, 85859-270"
}
},
"coverages": [
{
"id": "b35344a3-355d-463f-9287-631032000399",
"coverage_id": null,
"name": "Incêndio",
"description": "Se seu veículo der PT porque pegou fogo, explodiu ou caiu um raio, vc recebe seu seguro integral pra compensar o prejuízo.",
"deductible": 0,
"deductible_type": null,
"lmi": 42595,
"fragments": []
}
],
"assistances": []
}
}
---
#### policy-cancellation
Quando uma apólice é cancelada
Schema
{
"type": "object",
"required": [
"policy_number",
"policy_product",
"cancellation_reason",
"protocol_number",
"canceled_by",
"canceled_at",
"requester"
],
"properties": {
"policy_number": {
"type": "string"
},
"policy_product": {
"type": "string"
},
"cancellation_reason": {
"type": "string"
},
"protocol_number": {
"type": "string"
},
"canceled_by": {
"type": "string"
},
"canceled_at": {
"type": "string"
},
"requester": {
"type": "string"
}
}
}
Exemplo do corpo do evento:
{
"policy_number": "3003110007825",
"policy_product": "auto",
"cancellation_reason": "TESTE GG",
"protocol_number": "202308221431E4854243",
"canceled_by": "XHY2xsfM8driDCr1Ph9x",
"requester": "carrier"
}
---
#### policy-failed-status
Quando a apólice falha na sua geração
Schema
Endereço
{
"type": "object",
"required": [
"name",
"policy_product",
"product_code",
"order_id",
"proposal_number",
"protocol_number",
"organization_unit",
"failed_at",
"failed_description",
"renewal_proposal_id",
"insurer",
"branch"
],
"properties": {
"name": {
"type": "string"
},
"policy_product": {
"type": "string"
},
"product_code": {
"type": "integer"
},
"order_id": {
"type": "string"
},
"proposal_number": {
"type": "string"
},
"protocol_number": {
"type": "string"
},
"organization_unit": {
"type": "string"
},
"failed_at": {
"type": "string"
},
"failed_description": {
"type": [null, "string"]
},
"renewal_proposal_id": {
"type": [null, "string"]
},
"insurer": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string"
}
}
},
"branch": {
"type": "object",
"required": [
"code",
"description"
],
"properties": {
"code": {
"type": "string"
},
"description": {
"type": "string"
}
}
}
}
}
Exemplo do corpo do evento:
{
"name": "John Youser",
"policy_product": "auto",
"product_code": 1201,
"order_id": "627122fc694e49000ddfd6da",
"proposal_number": "3110031003285071",
"protocol_number": "20220503094132508221C",
"organization_unit": "DIRID",
"failed_at": "03/05/2022",
"failed_description": null,
"renewal_proposal_id": null,
"branch": { "code": "0531", "description": "Automóvel Casco" },
"insurer": { "name": "Caixa Seguradora S/A" }
}
---
#### claims-opened
Quando um sinistro é aberto no sistema
**Schemas**
Sinistro AUTO
{
"$id": "/schemas/claims_opened_serializer",
"type": "object",
"required": [
"policy_number",
"protocol_number",
"product",
"status",
"notified_at",
"created_at",
"contact",
"occurrence"
],
"properties": {
"policy_number": {
"type": "string"
},
"protocol_number": {
"type": "string"
},
"product": {
"type": "string"
},
"status": {
"type": "string"
},
"occurrence": {
"type": "object",
"required": [
"has_victim",
"total_loss",
"description",
"driver_name",
"occurred_at",
"driver_relationship",
"address"
],
"properties": {
"has_victim": {
"type":[null, "string"]
},
"total_loss": {
"type": [null, "string"]
},
"description": {
"type": "string"
},
"driver_name": {
"type": [null, "string"]
},
"occurred_at": {
"type": "string"
},
"driver_relationship": {
"type": [null, "string"]
},
"address": {
"type": "object",
"required": [
"city",
"state",
"number",
"street",
"country",
"zip_code",
"complement",
"neighborhood"
],
"properties": {
"city": {
"type": [null, "string"]
},
"state": {
"type": [null, "string"]
},
"number": {
"type": [null, "string"]
},
"street": {
"type": [null, "string"]
},
"complement": {
"type": [null, "string"]
},
"country": {
"type": [null, "string"]
},
"zip_code": {
"type": [null, "string"]
},
"neighborhood": {
"type": [null, "string"]
},
"full_address": {
"type": [null, "string"]
}
}
}
}
},
"notified_at": {
"type": "string"
},
"created_at": {
"type": "string"
},
"contact": {
"type": "object",
"required": ["name", "email", "phone", "document_type", "document_number"]
}
}
}
Sinistro HOME
{
"$id": "/schemas/claims_opened_serializer",
"type": "object",
"required": [
"policy_number",
"protocol_number",
"product",
"status",
"created_at",
"contact",
"occurrence"
],
"properties": {
"policy_number": {
"type": "string"
},
"protocol_number": {
"type": "string"
},
"product": {
"type": "string"
},
"status": {
"type": "string"
},
"notified_at": {
"type": "string"
},
"created_at": {
"type": "string"
},
"occurrence": {
"type": "object",
"required": [
"has_victim",
"total_loss",
"description",
"driver_name",
"occurred_at",
"driver_relationship",
"address"
],
"properties": {
"has_victim": {
"type":[null, "string"]
},
"total_loss": {
"type": [null, "string"]
},
"description": {
"type": "string"
},
"driver_name": {
"type": [null, "string"]
},
"occurred_at": {
"type": "string"
},
"driver_relationship": {
"type": [null, "string"]
},
"address": {
"type": "object",
"required": [
"city",
"state",
"number",
"street",
"country",
"zip_code",
"complement",
"neighborhood",
"full_address"
],
"properties": {
"city": {
"type": "string"
},
"state": {
"type": "string"
},
"number": {
"type": "string"
},
"street": {
"type": "string"
},
"complement": {
"type": [null, "string"]
},
"country": {
"type": "string"
},
"zip_code": {
"type": "string"
},
"neighborhood": {
"type": [null, "string"]
},
"full_address": {
"type": [null, "string"]
}
}
}
}
},
"contact": {
"type": "object",
"required": [
"name",
"email",
"phone",
"document_type",
"document_number"
]
}
}
}
Exemplo do corpo do evento:
{
"policy_number": "5001410134200",
"protocol_number": "202306031034259925309",
"product": "home",
"status": "open",
"created_at": "2023-06-03T13:34:26.009Z",
"notified_at": "2023-06-03T13:34:25.652Z",
"contact": {
"name": "John Youser",
"email": "john@youse.com",
"phone": "(45) 99999-9090",
"document_type": "cpf",
"document_number": "123.456.700-88"
},
"occurrence": {
"has_victim": null,
"total_loss": null,
"description": "Acidente doméstico (escorregada durante banho) quebrou janela do banheiro.",
"driver_name": null,
"occurred_at": "2023-06-02T10:30:00.000Z",
"driver_relationship": null,
"address": {
"zip_code": "11111-070",
"street": "Rua da Bandeira",
"number": "1",
"complement": null,
"neighborhood": null,
"city": "São Paulo",
"state": "SP",
"country": "bra",
"full_address": "Rua da Bandeira, 1, São Paulo, PR, bra, 11111-070"
}
}
}
---
#### claims-status
Quando um sinistro tem modificação de status
Schema
{
"$id": "/schemas/claims_status_serializer",
"type": "object",
"required": [
"product",
"claim_number",
"protocol_number",
"created_at",
"event_type",
"status",
"policy_number",
"contact"
],
"properties": {
"product": {
"type": "string"
},
"claim_number": {
"type": "string"
},
"protocol_number": {
"type": [null, "string"]
},
"notified_at": {
"type": "string"
},
"created_at": {
"type": "string"
},
"occurrence": {
"type": "object",
"required": [
"has_victim",
"total_loss",
"description",
"driver_name",
"occurred_at",
"driver_relationship",
"address"
],
"properties": {
"has_victim": {
"type":[null, "string"]
},
"total_loss": {
"type": [null, "string"]
},
"description": {
"type": "string"
},
"driver_name": {
"type": [null, "string"]
},
"occurred_at": {
"type": "string"
},
"driver_relationship": {
"type": [null, "string"]
},
"address": {
"type": "object",
"required": [
"city",
"state",
"number",
"street",
"country",
"zip_code",
"complement",
"neighborhood",
"full_address"
],
"properties": {
"city": {
"type": "string"
},
"state": {
"type": "string"
},
"number": {
"type": "string"
},
"street": {
"type": "string"
},
"complement": {
"type": [null, "string"]
},
"country": {
"type": "string"
},
"zip_code": {
"type": "string"
},
"neighborhood": {
"type": [null, "string"]
},
"full_address": {
"type": [null, "string"]
}
}
}
}
},
"event_type": {
"type": "string"
},
"status": {
"type": "string"
},
"policy_number": {
"type": "string"
},
"contact": {
"type": "object",
"required": [
"name",
"email",
"phone",
"document_type",
"document_number"
]
}
}
}
Exemplo do corpo do evento:
{
"product": "auto",
"claim_number": "3003120016927",
"protocol_number": null,
"created_at": "2023-08-23T12:58:36.575Z",
"policy_number": "3003110008592",
"event_type": "claim_accepted",
"status": "accept",
"notified_at": "2023-08-23T12:26:19.709Z",
"contact": {
"name": "John Youser",
"email": "john.youser@youse.com.br",
"phone": "(11) 9715-7254",
"document_type": null,
"document_number": null
},
"occurrence": {
"has_victim": "other",
"total_loss": null,
"description": "bati no poste",
"driver_name": "John Youser",
"occurred_at": "2023-08-23T09:25:00.000Z",
"driver_relationship": null,
"address": {
"zip_code": "01014-030",
"street": "Largo Páteo do Colégio",
"number": "190",
"complement": null,
"neighborhood": "Centro Histórico de São Paulo",
"city": "São Paulo",
"state": "SP",
"country": "Brasil",
"full_address": "Largo Páteo do Colégio, 190 - São Paulo/São Paulo - 01014-030"
}
}
}
---
#### endorsement-status
Quando um endosso é criado, alterado, aceito ou recusado
Schema
{
"type": "object",
"required": [
"status",
"endorsement_operations",
"issued_at",
"endorsement_number",
"policy_number",
"policy_product",
"former_policy",
"updated_policy"
],
"properties": {
"status": {
"type": "string",
"enum": [
"created",
"expired",
"approved",
"cancelled",
"pending",
"refused",
"accepted",
"draft"
]
},
"endorsement_operations": {
"type": "array",
"minItems": 1,
"uniqueItems": true,
"items": {
"type": "object",
"required": [
"code",
"pricing_id"
],
"properties": {
"code": {
"type": "string"
},
"pricing_id": {
"type": [
"string",
null
]
}
}
}
},
"issued_at": {
"type": [
"string",
null
]
},
"endorsement_number": {
"type": [
"string",
null
]
},
"policy_number": {
"type": "string"
},
"policy_product": {
"type": "string"
},
"former_policy": {
"type": "object",
"required": [
"policy_number",
"policy_status",
"policy_product",
"order_id",
"created_at",
"coverages",
"assistances",
"insured_person",
"driver",
"vehicle",
"contract_duration",
"payment_condition",
"terms_and_conditions"
],
"properties": {
"partner_name": {
"type": "string"
},
"policy_number": {
"type": [
"string",
null
]
},
"policy_status": {
"type": "string"
},
"policy_product": {
"type": "string"
},
"order_id": {
"type": "string"
},
"ci_number": {
"type": [
"string",
null
]
},
"proposal_number": {
"type": [
"string",
null
]
},
"renewal": {
"type": "boolean"
},
"created_at": {
"type": [
"string",
null
]
},
"effective_from": {
"type": [
"string",
null
]
},
"effective_until": {
"type": [
"string",
null
]
},
"coverages": {
"$ref": "./support/coverages.json"
},
"assistances": {
"$ref": "./support/assistances.json"
},
"insured_person": {
"$ref": "./support/insured-person.json"
},
"vehicle": {
"$ref": "./support/vehicle.json"
},
"driver": {
"$refs": "./support/driver.json"
},
"contract_duration": {
"type": "number"
},
"payment_condition": {
"$refs": "./support/payment-condition.json"
},
"terms_and_conditions": {
"type": "string"
},
"pricing_history": {
"$refs": "./support/pricing-history.json"
},
"pricing": {
"type": "object",
"required": [
"total_cost",
"total_premium",
"taxes_cost",
"net_premium",
"premium_taxes_cost",
"assistances_taxes_cost",
"assistances_total_cost"
],
"properties": {
"total_cost": {
"type": [
null,
"number"
]
},
"total_premium": {
"type": [
null,
"number"
]
},
"taxes_cost": {
"type": [
null,
"number"
]
},
"net_premium": {
"type": [
null,
"number"
]
},
"premium_taxes_cost": {
"type": [
null,
"number"
]
},
"assistances_taxes_cost": {
"type": [
null,
"number"
]
},
"assistances_total_cost": {
"type": [
null,
"number"
]
}
}
}
}
},
"updated_policy": {
"type": "object",
"required": [
"partner_name",
"policy_number",
"policy_status",
"policy_product",
"order_id",
"created_at",
"coverages",
"assistances",
"insured_person",
"driver",
"vehicle",
"contract_duration",
"payment_condition",
"terms_and_conditions"
],
"properties": {
"partner_name": {
"type": "string"
},
"policy_number": {
"type": [
"string",
null
]
},
"policy_status": {
"type": "string"
},
"policy_product": {
"type": "string"
},
"order_id": {
"type": "string"
},
"ci_number": {
"type": [
"string",
null
]
},
"proposal_number": {
"type": [
"string",
null
]
},
"renewal": {
"type": "boolean"
},
"created_at": {
"type": [
"string",
null
]
},
"effective_from": {
"type": [
"string",
null
]
},
"effective_until": {
"type": [
"string",
null
]
},
"coverages": {
"$ref": "./support/coverages.json"
},
"assistances": {
"$ref": "./support/assistances.json"
},
"insured_person": {
"$ref": "./support/insured-person.json"
},
"vehicle": {
"$ref": "./support/vehicle.json"
},
"driver": {
"$refs": "./support/driver.json"
},
"contract_duration": {
"type": "number"
},
"payment_condition": {
"$refs": "./support/payment-condition.json"
},
"terms_and_conditions": {
"type": "string"
},
"pricing_history": {
"$refs": "./support/pricing-history.json"
},
"pricing": {
"type": "object",
"required": [
"total_cost",
"total_premium",
"taxes_cost",
"net_premium",
"premium_taxes_cost",
"assistances_taxes_cost",
"assistances_total_cost"
],
"properties": {
"total_cost": {
"type": [
null,
"number"
]
},
"total_premium": {
"type": [
null,
"number"
]
},
"taxes_cost": {
"type": [
null,
"number"
]
},
"net_premium": {
"type": [
null,
"number"
]
},
"premium_taxes_cost": {
"type": [
null,
"number"
]
},
"assistances_taxes_cost": {
"type": [
null,
"number"
]
},
"assistances_total_cost": {
"type": [
null,
"number"
]
}
}
}
}
}
}
}
Exemplo do corpo do evento:
{
"status": "draft",
"endorsement_operations": [
{
"code": "remove_coverage",
"pricing_id": null
},
{
"code": "remove_assistance",
"pricing_id": "244702ce-ca3b-4179-93c2-62f87b86cb93"
}
],
"issued_at": null,
"endorsement_number": null,
"policy_product": "auto",
"policy_number": "3003110003484",
"former_policy": {
"order_id": "4c77e172-d81d-44cd-b598-994516aaa620",
"created_at": "2022-07-28T12:36:36.265Z",
"contract_duration": 2.01,
"payment_condition": {
"installments_per_year": 12,
"installments_frequency": "monthly"
},
"terms_and_conditions": "https://cdn.youse.com.br/docs/v7/condicoes-gerais-plano-auto.pdf",
"partner_name": "partner",
"policy_number": "3003110003484",
"policy_product": "auto",
"policy_status": "active",
"pricing_history": [
{
"pricing_id": "26a648f0-3f58-4c07-856c-a2c142f2b2be",
"effective_from": "2022-07-04",
"effective_until": "2022-07-28"
},
{
"pricing_id": "fa739ab4-bb35-4624-8fc7-7989b465ccec",
"effective_from": "2022-07-28",
"effective_until": "2024-07-04"
}
],
"insured_person": {
"name": "John Youser",
"email": "fabricio.albarnaz.codeminer@youse.com.br",
"phone": "(55) 99999-9999",
"gender": "male",
"nationality": "BR",
"birthdate": "1980-01-01",
"document_type": "cpf",
"document_number": "123.456.873-04",
"address": {
"zip_code": "97010-150",
"street": "Rua Daudt",
"number": "1",
"neighborhood": "Nossa Senhora do Rosário",
"city": "Santa Maria",
"state": "RS",
"country": "BR"
}
},
"driver": {
"name": "John Youser",
"gender": "male",
"birthdate": "1980-01-01",
"document_type": "cpf",
"document_number": "123.456.873-04"
},
"vehicle": {
"vin": "9999AKFW98B070000",
"make": "PEUGEOT",
"model": "206",
"version": "206 PRESENCE 1.4 / 1.4 FLEX 8V 5P (Gasolina / Flex)",
"year": 2008,
"price": "14463.0",
"brand_new": false,
"license_plate": "YOU-0000",
"usage": "only_private",
"passenger_capacity": 5,
"fuel_type": "gasoline",
"needs_inspection": false,
"needs_online_inspection": false,
"auction": null,
"address": {
"zip_code": "97010-150",
"street": "Rua Daudt",
"number": "1",
"neighborhood": "Nossa Senhora do Rosário",
"city": "Santa Maria",
"state": "RS",
"country": "BR"
}
},
"coverages": [
{
"id": "c528e469-66cc-4b75-93ee-ba14b32ddd36",
"name": "Danos materiais a terceiros",
"description": "Se acontecer um acidente que envolva os bens de outras pessoas, você conta com uma indenização pra bancar as despesas que tiver com reparos, reposições e até mesmo com advogados, se for o caso.",
"deductible": 0,
"deductible_type": null,
"fragments": []
},
{
"id": "fe30af9a-4fcd-4ec0-8b7c-062b11be6709",
"name": "Compreensiva - Colisão, Incêndio, Roubo, Furto e Alagamento - INDENIZAÇÕES PARCIAIS E INTEGRAIS",
"description": ".",
"deductible": 2068,
"deductible_type": "mandatory",
"fragments": [
{
"name": "Alagamento e eventos da natureza",
"description": "Se seu carro foi pego de surpresa no meio de uma inundação, alagamento, granizo ou ventos fortes e deu PT, não se preocupe. Você tem direito ao valor integral de seu seguro pra cobrir seu prejuízo.",
"deductible": 0,
"deductible_type": null
},
{
"name": "Incêndio",
"description": "Se seu veículo der PT porque pegou fogo, explodiu ou caiu um raio, vc recebe seu seguro integral pra compensar o prejuízo.",
"deductible": 0,
"deductible_type": null
},
{
"name": "Vale para perda total",
"description": "Aconteceu um acidente e não vai ser possível consertar os danos do seu carro? Pode ficar numa boa. Se rolar perda total com batidas, capotagens, queda do veículo ou queda de objetos, a gente te indeniza. O preço do conserto precisa ser maior que 75% do valor do carro de acordo com a tabela FIPE no período do acionamento.",
"deductible": 0,
"deductible_type": null
},
{
"name": "Roubo e furto",
"description": "Seu carro foi roubado? Calma, calma. Se em trinta dias ele não for encontrado a gente paga o valor total do seu seguro. Mas se for e estiver bem detonado – deu PT – a gente também cobre o seguro pra você.",
"deductible": 0,
"deductible_type": null
},
{
"name": "Vale pra qualquer batida",
"description": "Essa cobertura te indeniza se rolar qualquer tipo batida, capotagem, incêndio ou alagamento com o seu carro. Se ele for roubado ou furtado e, depois, encontrado com problemas, você também pode usar essa cobertura que pagamos o conserto pra você. Fique ligado: O preço do conserto precisa ser menor que 75% do valor do seu carro, de acordo com a tabela FIPE no mês do acionamento. O preço do conserto também precisa ser maior do que o valor que você escolheu de franquia, que é o quanto você paga se precisar usar essa cobertura.",
"deductible": 2068,
"deductible_type": "mandatory"
}
]
}
],
"assistances": [
{
"id": "019075c0-3516-44d8-a675-b6a38183783b",
"name": "Assistência a automóvel",
"description": "A gente leva seu veículo até a oficina ou concessionária, se precisar. Ah, se o trajeto for maior que o contratado, aí o valor extra fica por sua conta e será pago direto pro reboque."
},
{
"id": "bce0fa1e-794c-4065-9bf1-a15aad305002",
"name": "Carro reserva",
"description": "Se vc ficar sem o seu carro por ter acionado alguma cobertura prevista no contrato, a gente vai providenciar a locação de um veículo reserva por 7, 15 ou 30 dias."
},
{
"id": "688621d4-53b0-4f37-bc8c-0df02bb51e1f",
"name": "Assistência a bike",
"description": "Montamos a sua bicicleta. Ou se preferir, buscamos e levamos até a autorizada mais próxima."
}
]
},
"updated_policy": {
"order_id": "4c77e172-d81d-44cd-b598-994516aaa620",
"created_at": "2022-07-28T12:36:36.265Z",
"contract_duration": 2.01,
"payment_condition": {
"installments_per_year": 12,
"installments_frequency": "monthly"
},
"terms_and_conditions": "https://cdn.youse.com.br/docs/v7/condicoes-gerais-plano-auto.pdf",
"partner_name": "minuto",
"policy_number": "3003110003484",
"policy_product": "auto",
"policy_status": "active",
"pricing_history": [
{
"pricing_id": "26a648f0-3f58-4c07-856c-a2c142f2b2be",
"effective_from": "2022-07-04",
"effective_until": "2022-07-28"
},
{
"pricing_id": "fa739ab4-bb35-4624-8fc7-7989b465ccec",
"effective_from": "2022-07-28",
"effective_until": "2022-07-29"
},
{
"pricing_id": "244702ce-ca3b-4179-93c2-62f87b86cb93",
"effective_from": "2022-07-29",
"effective_until": "2024-07-04"
}
],
"insured_person": {
"name": "John Youser",
"email": "fabricio.albarnaz.codeminer@youse.com.br",
"phone": "(55) 99999-9999",
"gender": "male",
"nationality": "BR",
"birthdate": "1980-01-01",
"document_type": "cpf",
"document_number": "123.456.873-04",
"address": {
"zip_code": "97010-150",
"street": "Rua Daudt",
"number": "1",
"neighborhood": "Nossa Senhora do Rosário",
"city": "Santa Maria",
"state": "RS",
"country": "BR"
}
},
"driver": {
"name": "John Youser",
"gender": "male",
"birthdate": "1980-01-01",
"document_type": "cpf",
"document_number": "123.456.873-04"
},
"vehicle": {
"vin": "9999AKFW98B070000",
"make": "PEUGEOT",
"model": "206",
"version": "206 PRESENCE 1.4 / 1.4 FLEX 8V 5P (Gasolina / Flex)",
"year": 2008,
"price": "14463.0",
"brand_new": false,
"license_plate": "YOU-0000",
"usage": "only_private",
"passenger_capacity": 5,
"fuel_type": "gasoline",
"needs_inspection": false,
"needs_online_inspection": false,
"auction": null,
"address": {
"zip_code": "97010-150",
"street": "Rua Daudt",
"number": "1",
"neighborhood": "Nossa Senhora do Rosário",
"city": "Santa Maria",
"state": "RS",
"country": "BR"
}
},
"coverages": [
{
"id": "fe30af9a-4fcd-4ec0-8b7c-062b11be6709",
"name": "Compreensiva - Colisão, Incêndio, Roubo, Furto e Alagamento - INDENIZAÇÕES PARCIAIS E INTEGRAIS",
"description": ".",
"deductible": 2068,
"deductible_type": "mandatory",
"fragments": [
{
"name": "Alagamento e eventos da natureza",
"description": "Se seu carro foi pego de surpresa no meio de uma inundação, alagamento, granizo ou ventos fortes e deu PT, não se preocupe. Você tem direito ao valor integral de seu seguro pra cobrir seu prejuízo.",
"deductible": 0,
"deductible_type": null
},
{
"name": "Incêndio",
"description": "Se seu veículo der PT porque pegou fogo, explodiu ou caiu um raio, vc recebe seu seguro integral pra compensar o prejuízo.",
"deductible": 0,
"deductible_type": null
},
{
"name": "Vale para perda total",
"description": "Aconteceu um acidente e não vai ser possível consertar os danos do seu carro? Pode ficar numa boa. Se rolar perda total com batidas, capotagens, queda do veículo ou queda de objetos, a gente te indeniza. O preço do conserto precisa ser maior que 75% do valor do carro de acordo com a tabela FIPE no período do acionamento.",
"deductible": 0,
"deductible_type": null
},
{
"name": "Roubo e furto",
"description": "Seu carro foi roubado? Calma, calma. Se em trinta dias ele não for encontrado a gente paga o valor total do seu seguro. Mas se for e estiver bem detonado – deu PT – a gente também cobre o seguro pra você.",
"deductible": 0,
"deductible_type": null
},
{
"name": "Vale pra qualquer batida",
"description": "Essa cobertura te indeniza se rolar qualquer tipo batida, capotagem, incêndio ou alagamento com o seu carro. Se ele for roubado ou furtado e, depois, encontrado com problemas, você também pode usar essa cobertura que pagamos o conserto pra você. Fique ligado: O preço do conserto precisa ser menor que 75% do valor do seu carro, de acordo com a tabela FIPE no mês do acionamento. O preço do conserto também precisa ser maior do que o valor que você escolheu de franquia, que é o quanto você paga se precisar usar essa cobertura.",
"deductible": 2068,
"deductible_type": "mandatory"
}
]
}
],
"assistances": [
{
"id": "019075c0-3516-44d8-a675-b6a38183783b",
"name": "Assistência a automóvel",
"description": "A gente leva seu veículo até a oficina ou concessionária, se precisar. Ah, se o trajeto for maior que o contratado, aí o valor extra fica por sua conta e será pago direto pro reboque."
},
{
"id": "bce0fa1e-794c-4065-9bf1-a15aad305002",
"name": "Carro reserva",
"description": "Se vc ficar sem o seu carro por ter acionado alguma cobertura prevista no contrato, a gente vai providenciar a locação de um veículo reserva por 7, 15 ou 30 dias."
}
]
}
}
---
#### endorsement-plan
Plano de pagamento de um endosso quando uma apólice é alterada
Schema
{
"$id": "/schemas/endorsement-plan",
"type": "object",
"required": [
"policy_number",
"endorsement_number",
"protocol_number",
"product",
"effective_from",
"payment_plan"
],
"properties": {
"policy_number": {
"type": "string"
},
"endorsement_number": {
"type": "string"
},
"protocol_number": {
"type": "string"
},
"product": {
"type": "string"
},
"effective_from": {
"type": "string"
},
"endorsement_payment_plan": {
"type": "object",
"required": [
"total_amount_delta",
"installments_amount_delta"
],
properties": {
"total_amount_delta": {
"type": "string"
},
"installments_amount_delta": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"required": [
"installment_number",
"amount_delta"
],
"properties": {
"installment_number": {
"type": "number"
},
"amount_delta": {
"type": "string"
}
}
}
}
}
},
"payment_plan": {
"type": "object",
"required": [
"status",
"total_amount",
"initial_date",
"installments_count",
"installments_frequency",
"installments"
],
"properties": {
"status": {
"type": "string"
},
"total_amount": {
"type": "string"
},
"initial_date": {
"type": "string"
},
"installments_count": {
"type": "number"
},
"installments_frequency": {
"type": "string"
},
"installments": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"required": [
"amount",
"number",
"status",
"due_at",
"bill_at"
],
"properties": {
"amount": {
"type": "string"
},
"number": {
"type": "number"
},
"status": {
"type": "string"
},
"due_at": {
"type": "string"
},
"bill_at": {
"type": "string"
}
}
}
}
}
}
}
}
Exemplo do corpo do evento:
{
"policy_number": "4003110024577",
"endorsement_number": "0000051996",
"protocol_number": "202403221000E0757437",
"product": "auto",
"effective_from": "2024-03-22",
"endorsement_payment_plan": {
"total_amount_delta": "424.17", # Delta do valor total do plano após endosso
"installments_amount_delta": [
{
"installment_number": 1,
"amount_delta": "0" # Delta do valor da parcela 1 após endosso
},
{
"installment_number": 2,
"amount_delta": "14.83" # Delta do valor da parcela 2 após endosso
}
]
},
"payment_plan": {
"status": "active",
"total_amount": "3644.89",
"initial_date": "2024-04-21",
"installments_count": 24,
"installments_frequency": "monthly",
"installments": [
{
"amount": "149.02",
"number": 1,
"status": "paid",
"due_at": "2024-03-21",
"bill_at": "2024-03-11"
},
{
"amount": "151.88",
"number": 2,
"status": "pending",
"due_at": "2024-04-21",
"bill_at": "2024-04-11"
}
]
}
}
---
#### renew-policy-status
Quando uma apólice entra no processo de renovação
Schema
{
"type": "object",
"required": [
"id",
"cancellation_origin",
"reason",
"denied_reason",
"renewal_proposal_status",
"renewal_date",
"renewal_policy",
"renewed_policy",
"in_renewal_process",
"expired_policy"
],
"properties": {
"id": {
"type": "string"
},
"cancellation_origin": {
"type": [null, "string"]
},
"reason": {
"type": [null, "string"]
},
"denied_reason": {
"type": [null, "string"]
},
"renewal_proposal_status": {
"type": "string"
},
"renewal_date": {
"type": "string"
},
"renewal_policy": {
"type": "object",
"required": [
"partner_name",
"policy_number",
"policy_status",
"policy_product",
"order_id",
"created_at",
"coverages",
"assistances",
"insured_person",
"driver",
"vehicle",
"contract_duration",
"payment_condition",
"terms_and_conditions"
],
"properties": {
"partner_name": {
"type": "string"
},
"policy_number": {
"type": ["string", null]
},
"policy_status": {
"type": "string"
},
"policy_product": {
"type": "string"
},
"order_id": {
"type": "string"
},
"created_at": {
"type": ["string", null]
},
"proposal_number": {
"type": ["string", null]
},
"renewal": {
"type": "boolean"
},
"effective_from": {
"type": ["string", null]
},
"effective_until": {
"type": ["string", null]
},
"ci_number": {
"type": ["string", null]
},
"coverages": {
"$ref": "./spec/support/webhook/schemas/messages/support/coverages.json"
},
"assistances": {
"$ref": "./spec/support/webhook/schemas/messages/support/assistances.json"
},
"insured_person": {
"$ref": "./spec/support/webhook/schemas/messages/support/insured-person.json"
},
"vehicle": {
"$ref": "./spec/support/webhook/schemas/messages/support/vehicle.json"
},
"driver": {
"$refs": "./spec/support/webhook/schemas/messages/support/driver.json"
},
"contract_duration": {
"type": ["number", "integer"]
},
"payment_condition": {
"$refs": "./spec/support/webhook/schemas/messages/support/payment-condition.json"
},
"terms_and_conditions": {
"type": "string"
},
"pricing_history": {
"$refs": "./spec/support/webhook/schemas/messages/support/pricing-history.json"
},
"pricing": {
"type": "object",
"required": [
"total_cost",
"total_premium",
"taxes_cost",
"net_premium",
"premium_taxes_cost",
"assistances_taxes_cost",
"assistances_total_cost"
],
"properties": {
"total_cost": {
"type": [null, "number"]
},
"total_premium": {
"type": [null, "number"]
},
"taxes_cost": {
"type": [null, "number"]
},
"net_premium": {
"type": [null, "number"]
},
"premium_taxes_cost": {
"type": [null, "number"]
},
"assistances_taxes_cost": {
"type": [null, "number"]
},
"assistances_total_cost": {
"type": [null, "number"]
}
}
}
}
},
"renewed_policy": {
"type": "object",
"required": [
"partner_name",
"policy_number",
"policy_status",
"policy_product",
"order_id",
"created_at",
"coverages",
"assistances",
"insured_person",
"driver",
"vehicle",
"contract_duration",
"payment_condition",
"terms_and_conditions"
],
"properties": {
"partner_name": {
"type": "string"
},
"policy_number": {
"type": ["string", null]
},
"policy_status": {
"type": "string"
},
"policy_product": {
"type": "string"
},
"order_id": {
"type": "string"
},
"created_at": {
"type": ["string", null]
},
"proposal_number": {
"type": ["string", null]
},
"renewal": {
"type": "boolean"
},
"effective_from": {
"type": ["string", null]
},
"effective_until": {
"type": ["string", null]
},
"ci_number": {
"type": ["string", null]
},
"coverages": {
"$ref": "./spec/support/webhook/schemas/messages/support/coverages.json"
},
"assistances": {
"$ref": "./spec/support/webhook/schemas/messages/support/assistances.json"
},
"insured_person": {
"$ref": "./spec/support/webhook/schemas/messages/support/insured-person.json"
},
"vehicle": {
"$ref": "./spec/support/webhook/schemas/messages/support/vehicle.json"
},
"driver": {
"$refs": "./spec/support/webhook/schemas/messages/support/driver.json"
},
"contract_duration": {
"type": ["number", "integer"]
},
"payment_condition": {
"$refs": "./spec/support/webhook/schemas/messages/support/payment-condition.json"
},
"terms_and_conditions": {
"type": "string"
},
"pricing_history": {
"$refs": "./spec/support/webhook/schemas/messages/support/pricing-history.json"
},
"pricing": {
"type": "object",
"required": [
"total_cost",
"total_premium",
"taxes_cost",
"net_premium",
"premium_taxes_cost",
"assistances_taxes_cost",
"assistances_total_cost"
],
"properties": {
"total_cost": {
"type": [null, "number"]
},
"total_premium": {
"type": [null, "number"]
},
"taxes_cost": {
"type": [null, "number"]
},
"net_premium": {
"type": [null, "number"]
},
"premium_taxes_cost": {
"type": [null, "number"]
},
"assistances_taxes_cost": {
"type": [null, "number"]
},
"assistances_total_cost": {
"type": [null, "number"]
}
}
}
}
},
"in_renewal_process": {
"type": "boolean"
},
"expired_policy": {
"type": "object",
"required": [
"partner_name",
"policy_number",
"policy_status",
"policy_product",
"order_id",
"created_at",
"coverages",
"assistances",
"insured_person",
"driver",
"vehicle",
"contract_duration",
"payment_condition",
"terms_and_conditions"
],
"properties": {
"partner_name": {
"type": "string"
},
"policy_number": {
"type": ["string", null]
},
"policy_status": {
"type": "string"
},
"policy_product": {
"type": "string"
},
"order_id": {
"type": "string"
},
"created_at": {
"type": ["string", null]
},
"proposal_number": {
"type": ["string", null]
},
"renewal": {
"type": "boolean"
},
"effective_from": {
"type": ["string", null]
},
"effective_until": {
"type": ["string", null]
},
"ci_number": {
"type": ["string", null]
},
"coverages": {
"$ref": "./spec/support/webhook/schemas/messages/support/coverages.json"
},
"assistances": {
"$ref": "./spec/support/webhook/schemas/messages/support/assistances.json"
},
"insured_person": {
"$ref": "./spec/support/webhook/schemas/messages/support/insured-person.json"
},
"vehicle": {
"$ref": "./spec/support/webhook/schemas/messages/support/vehicle.json"
},
"driver": {
"$refs": "./spec/support/webhook/schemas/messages/support/driver.json"
},
"contract_duration": {
"type": ["number", "integer"]
},
"payment_condition": {
"$refs": "./spec/support/webhook/schemas/messages/support/payment-condition.json"
},
"terms_and_conditions": {
"type": "string"
},
"pricing_history": {
"$refs": "./spec/support/webhook/schemas/messages/support/pricing-history.json"
},
"pricing": {
"type": "object",
"required": [
"total_cost",
"total_premium",
"taxes_cost",
"net_premium",
"premium_taxes_cost",
"assistances_taxes_cost",
"assistances_total_cost"
],
"properties": {
"total_cost": {
"type": [null, "number"]
},
"total_premium": {
"type": [null, "number"]
},
"taxes_cost": {
"type": [null, "number"]
},
"net_premium": {
"type": [null, "number"]
},
"premium_taxes_cost": {
"type": [null, "number"]
},
"assistances_taxes_cost": {
"type": [null, "number"]
},
"assistances_total_cost": {
"type": [null, "number"]
}
}
}
}
}
}
}
Exemplo do corpo do evento:
{
"id": "b8d9f5d5-cfb4-4d5b-8b3f-dea4f3970083",
"cancellation_origin": null,
"reason": null,
"renewal_proposal_status": "accepted",
"renewal_date": "2022-05-19",
"in_renewal_process": true,
"denied_reason": null,
"renewal_policy": {
"order_id": "b8d9f5d5-cfb4-4d5b-8b3f-dea4f3970083",
"created_at": null,
"contract_duration": 2.0,
"payment_condition": {
"installments_per_year": 12,
"installments_frequency": "monthly"
},
"terms_and_conditions": "https://cdn.youse.com.br/docs/v7/condicoes-gerais-plano-auto.pdf",
"effective_from": "2022-05-03",
"effective_until": "2024-05-03",
"ci_number": null,
"renewal": false,
"proposal_number": "3110051003285084",
"partner_name": "minuto",
"policy_number": null,
"policy_product": "auto",
"policy_status": "proposal",
"pricing_history": [],
"insured_person": {
"name": "John Youser",
"email": "joao.vale.rebase@youse.com.br",
"phone": "(11) 92121-9999",
"gender": "male",
"nationality": "BR",
"birthdate": "1980-01-01",
"document_type": "cpf",
"document_number": "123.456.879-91",
"marital_status": "not_informed",
"salary_range": "Band4",
"occupation_id": "212405",
"address": {
"zip_code": "03814-050",
"street": "Rua São Vicente de Minas",
"number": "100",
"complement": "",
"neighborhood": "Jardim Matarazzo",
"city": "São Paulo",
"state": "SP",
"country": "BR",
"full_address": "Rua São Vicente de Minas, 100, , Jardim Matarazzo, São Paulo, SP, BR, 03814-050"
}
},
"pricing": {
"total_cost": 1482.09,
"total_premium": 1039.39,
"taxes_cost": 71.43
},
"driver": {
"name": "John Youser",
"gender": "male",
"birthdate": "1980-01-01",
"document_type": "cpf",
"document_number": "123.456.879-91",
"bonuses_class": null
},
"vehicle": {
"vin": "9999AKFW98B070000",
"make": "PEUGEOT",
"model": "206",
"version": "206 PRESENCE 1.4 / 1.4 FLEX 8V 5P (Gasolina / Flex)",
"year": 2008,
"price": "15055.0",
"brand_new": false,
"license_plate": "YOU-0000",
"usage": "only_private",
"passenger_capacity": 5,
"fuel_type": "gasoline",
"needs_inspection": false,
"needs_online_inspection": false,
"auction": null,
"fipe_code": "024103-2",
"fipe_compensation_factor": 100,
"address": {
"zip_code": "03814-050",
"street": "Rua São Vicente de Minas",
"number": "100",
"complement": "",
"neighborhood": "Jardim Matarazzo",
"city": "São Paulo",
"state": "SP",
"country": "BR",
"full_address": "Rua São Vicente de Minas, 100, , Jardim Matarazzo, São Paulo, SP, BR, 03814-050"
}
},
"coverages": [
{
"id": "856e4c28-9011-4e84-bf78-54e467103e5c",
"name": "Incêndio, Roubo e Furto – INDENIZAÇÃO INTEGRAL",
"description": ".",
"deductible": 0.0,
"deductible_type": null,
"lmi": 15055.0,
"fragments": [
{
"name": "Incêndio",
"description": "Se seu veículo der PT porque pegou fogo, explodiu ou caiu um raio, vc recebe seu seguro integral pra compensar o prejuízo.",
"deductible": 0.0,
"deductible_type": null,
"lmi": 15055.0
},
{
"name": "Roubo e furto",
"description": "Seu carro foi roubado? Calma, calma. Se em trinta dias ele não for encontrado a gente paga o valor total do seu seguro. Mas se for e estiver bem detonado – deu PT – a gente também cobre o seguro pra você.",
"deductible": 0.0,
"deductible_type": null,
"lmi": 15055.0
}
]
}
],
"assistances": [
{
"id": "019075c0-3516-44d8-a675-b6a38183783b",
"name": "Assistência a automóvel",
"description": null
},
{
"id": "bce0fa1e-794c-4065-9bf1-a15aad305002",
"name": "Carro reserva",
"description": null
}
]
},
"renewed_policy": null,
"expired_policy": {
"order_id": "1c1edf3b-05ca-46c7-9c62-801b78064fbc",
"created_at": "2020-05-18T00:00:00.000Z",
"contract_duration": 2.0,
"payment_condition": {
"installments_per_year": 12,
"installments_frequency": "monthly"
},
"terms_and_conditions": "https://cdn.youse.com.br/docs/v7/condicoes-gerais-plano-auto.pdf",
"effective_from": "2020-05-18",
"effective_until": "2022-05-18",
"ci_number": "1122210002950-8",
"renewal": false,
"proposal_number": "3110021003285081",
"partner_name": "minuto",
"policy_number": "3003110002950",
"policy_product": "auto",
"policy_status": "active",
"pricing_history": [
{
"pricing_id": "782b0a74-43e0-4b71-9436-4cb8fb55f33e",
"effective_from": "2022-05-03",
"effective_until": "2022-05-18"
}
],
"insured_person": {
"name": "John Youser",
"email": "joao.vale.rebase@youse.com.br",
"phone": "(11) 92121-9999",
"gender": "male",
"nationality": "BR",
"birthdate": "1980-01-01",
"document_type": "cpf",
"document_number": "123.456.879-91",
"marital_status": "not_informed",
"salary_range": "Band4",
"occupation_id": "212405",
"address": {
"zip_code": "03814-050",
"street": "Rua São Vicente de Minas",
"number": "100",
"complement": "",
"neighborhood": "Jardim Matarazzo",
"city": "São Paulo",
"state": "SP",
"country": "BR",
"full_address": "Rua São Vicente de Minas, 100, , Jardim Matarazzo, São Paulo, SP, BR, 03814-050"
}
},
"pricing": {
"total_cost": 1482.09,
"total_premium": 1039.39,
"taxes_cost": 71.43
},
"driver": {
"name": "John Youser",
"gender": "male",
"birthdate": "1980-01-01",
"document_type": "cpf",
"document_number": "123.456.879-91",
"bonuses_class": null
},
"vehicle": {
"vin": "9999AKFW98B070000",
"make": "PEUGEOT",
"model": "206",
"version": "206 PRESENCE 1.4 / 1.4 FLEX 8V 5P (Gasolina / Flex)",
"year": 2008,
"price": "15055.0",
"brand_new": false,
"license_plate": "YOU-0000",
"usage": "only_private",
"passenger_capacity": 5,
"fuel_type": "gasoline",
"needs_inspection": false,
"needs_online_inspection": false,
"auction": null,
"fipe_code": "024103-2",
"fipe_compensation_factor": 100,
"address": {
"zip_code": "03814-050",
"street": "Rua São Vicente de Minas",
"number": "100",
"complement": "",
"neighborhood": "Jardim Matarazzo",
"city": "São Paulo",
"state": "SP",
"country": "BR",
"full_address": "Rua São Vicente de Minas, 100, , Jardim Matarazzo, São Paulo, SP, BR, 03814-050"
}
},
"coverages": [
{
"id": "856e4c28-9011-4e84-bf78-54e467103e5c",
"name": "Incêndio, Roubo e Furto – INDENIZAÇÃO INTEGRAL",
"description": ".",
"deductible": 0.0,
"deductible_type": null,
"lmi": 15055.0,
"fragments": [
{
"name": "Incêndio",
"description": "Se seu veículo der PT porque pegou fogo, explodiu ou caiu um raio, vc recebe seu seguro integral pra compensar o prejuízo.",
"deductible": 0.0,
"deductible_type": null,
"lmi": 15055.0
},
{
"name": "Roubo e furto",
"description": "Seu carro foi roubado? Calma, calma. Se em trinta dias ele não for encontrado a gente paga o valor total do seu seguro. Mas se for e estiver bem detonado – deu PT – a gente também cobre o seguro pra você.",
"deductible": 0.0,
"deductible_type": null,
"lmi": 15055.0
}
]
}
],
"assistances": [
{
"id": "019075c0-3516-44d8-a675-b6a38183783b",
"name": "Assistência a automóvel",
"description": "A gente leva seu veículo até a oficina ou concessionária, se precisar. Ah, se o trajeto for maior que o contratado, aí o valor extra fica por sua conta e será pago direto pro reboque."
},
{
"id": "bce0fa1e-794c-4065-9bf1-a15aad305002",
"name": "Carro reserva",
"description": "Se vc ficar sem o seu carro por ter acionado alguma cobertura prevista no contrato, a gente vai providenciar a locação de um veículo reserva por 7, 15 ou 30 dias."
}
]
}
}
---
#### inspection-status
Quando uma vistoria tem modificação de status.
Schema
{
"type": "object",
"required": [
"id",
"created_at",
"updated_at",
"status",
"provider",
"policy_number",
"requester"
],
"properties": {
"id": {
"type": "string"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"deadline": {
"type": ["string", null],
"format": "date-time"
},
"document_number": {
"type": ["string", null]
},
"inspectable_number": {
"type": ["string", null]
},
"inspection_type": {
"type": ["string", null]
},
"updated_at": {
"type": "string",
"format": "date-time"
},
"moved_reason": {
"type": ["string", null]
},
"moved_to_inspection_type": {
"type": ["string", null]
},
"exempted_reason": {
"type": ["string", null]
},
"scheduled": {
"type": ["boolean", null]
},
"status": {
"type": "string"
},
"bookings": {
"type": ["array"],
"items": {
"type": "object",
"required": [
"created_at",
"notes",
"period",
"place_type",
"protocol",
"status",
"updated_at",
"date"
],
"properties": {
"created_at": {
"type": "string",
"format": "date-time"
},
"notes": {
"type": "string"
},
"period": {
"type": "string"
},
"place_type": {
"type": "string"
},
"protocol": {
"type": "string"
},
"status": {
"type": "string"
},
"updated_at": {
"type": "string",
"format": "date-time"
},
"date": {
"type": "string",
"format": "date-time"
},
"address": {
"type": "object",
"required": [
"street",
"number",
"neighborhood",
"city",
"state",
"country",
"latitude",
"longitude",
"zip_code"
],
"properties": {
"street": {
"type": "string"
},
"number": {
"type": "string"
},
"complement": {
"type": ["string", null]
},
"neighborhood": {
"type": "string"
},
"city": {
"type": "string"
},
"state": {
"type": "string"
},
"country": {
"type": "string"
},
"latitude": {
"type": "number"
},
"longitude": {
"type": "number"
},
"zip_code": {
"type": "string"
}
}
}
}
}
},
"provider": {
"type": "object",
"required": [
"name",
"created_at",
"inspection_type",
"active"
],
"properties": {
"name": {
"type": "string"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"inspection_type": {
"type": "string"
},
"active": {
"type": "boolean"
}
}
},
"reschedule_link": {
"type": ["string", null]
},
"reject_reasons": {
"type": ["array"]
},
"refused_reasons": {
"type": ["array"],
"items": {
"type": "object",
"properties": {
"code": {
"type": ["string", null]
},
"description": {
"type": ["string", null]
}
}
}
},
"insured_name": {
"type": ["string", null]
},
"license_plate": {
"type": ["string", null]
},
"expires_in": {
"type": ["string", null]
},
"policy_number": {
"type": "string"
},
"requester": {
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string"
}
}
},
"steps": {
"type": ["array"],
"items": {
"type": "object",
"required": [
"type",
"date"
],
"properties": {
"type": {
"type": "string"
},
"date": {
"type": "string",
"format": "date-time"
},
"protocol": {
"type": ["string", null]
}
}
}
},
"inspection_schedule_link": {
"type": ["string", null]
},
"inspection_link": {
"type": ["string", null]
},
"short_inspection_link": {
"type": ["string", null]
},
"inspection_mode": {
"type": ["string", null]
}
}
}
Exemplo do corpo do evento:
{
"id": "5a487d56-54bd-4dd0-8c5b-0a6e3f031f7c",
"created_at": "2026-08-11T13:06:29.096Z",
"deadline": "2026-08-24T02:59:59.999Z",
"document_number": "045.187.876-09",
"inspectable_number": "9BGEX76H0PB203919",
"inspection_type": "physical",
"updated_at": "2026-08-11T13:06:29.096Z",
"moved_reason": null,
"moved_to_inspection_type": null,
"exempted_reason": null,
"scheduled": null,
"status": "pending",
"bookings": [],
"provider": {
"name":"dekra",
"created_at": "2021-09-16T14:53:18.108Z",
"inspection_type": "physical",
"active": true
},
"reschedule_link": "https://qa.youse.io/auto/insurance_policies/inspections/3003110029497/edit?origin=partner&partner_id=marcessoria_5",
"reject_reasons": [],
"refused_reasons": [],
"insured_name": "JOHN YOUSER",
"license_plate": "YOU-0003",
"expires_in": "2026-08-24T02:59:59.999Z",
"policy_number": "3003110029497",
"requester": {
"type":"issuance"
},
"steps": [
{
"type": "pending",
"date": "2026-08-11T13:06:29.303Z",
"protocol": null
}
],
"inspection_schedule_link": null,
"inspection_link": "https://qa-inspections.youse.io/?token=eyJhbGciOiJIUzI1NiJ9.eyJwb2xpY3lfbnVtYmVyIjoiMzAwMzExMDAyOTQ5NyIsImV4cCI6MTc4Nzc0OTU4OH0.KZC_L4vEEl-WcRB486BEK1Ws67lvHrGm1cARtYqgBHY",
"short_inspection_link": "https://qa.youse.link/0wIirwc",
"inspection_mode": null
}
---
#### order-issuance-scheduled
Cotações com agendamento de emissão confirmado.
Schema
{
"type": "object",
"required": [
"id",
"product",
"protocol_number",
"status"
],
"properties": {
"id": {
"type": "string"
},
"product": {
"type": "string"
},
"protocol_number": {
"type": "string"
},
"status": {
"type": "string"
},
"policy_number": {
"type": [null, "string"]
},
"expires_in": {
"type": "string"
},
"created_at": {
"type": "string"
},
"updated_at": {
"type": "string"
},
"pricing": {
"$ref": "./support/pricing.json"
},
"payment_condition": {
"$ref": "./support/payment-condition.json"
},
"former_insurance_policy": {
"$ref": "./support/former-insurance-policy.json"
},
"coverages": {
"$ref": "./support/coverages.json"
},
"assistances": {
"$ref": "./support/assistances.json"
},
"insured_person": {
"$ref": "./support/insured-person.json"
},
"vehicle": {
"$ref": "./support/vehicle.json"
},
"driver": {
"$ref": "./support/driver.json"
},
"issuance_schedule": {
"$ref": "./support/issuance-schedule.json"
}
}
}
Exemplo do corpo do evento:
{
"id": "6a9025038dec1c56275d998b",
"product": "auto",
"protocol_number": "20260827085235563613",
"policy_number": null,
"status": "scheduled",
"expires_in": "2026-09-01T23:59:59.999-03:00",
"created_at": "2026-08-27T08:52:35.516-03:00",
"updated_at": "2026-08-27T08:55:06.577-03:00",
"pricing": {
"total_cost": "1575.41",
"total_premium": "1038.13",
"taxes_cost": "71.31",
"net_premium": "966.82",
"premium_taxes_cost": null,
"assistances_taxes_cost": null,
"assistances_total_cost": "537.28"
},
"payment_condition": {
"payment_method": "credit_card",
"contract_duration": 2,
"installments_per_year": 12,
"installments_frequency": "monthly"
},
"issuance_schedule": {
"charge_attempts": 0,
"issue_policy_at": "2026-09-05",
"cancellation_request_at": null,
"effective_from": "2026-09-05",
"effective_until": "2028-09-05"
},
"broker": {
"name": "Minuto Corretora",
"regulatory_code": "19970219"
},
"insured_person": {
"name": "Eduardo Aloj",
"email": "eduardo.gris+aloj@youse.com.br",
"phone": "(11) 96666-6666",
"gender": "male",
"nationality": "BR",
"birthdate": "1980-01-01",
"document_type": null,
"document_number": null,
"marital_status": "single",
"salary_range": "range_6",
"occupation_id": null,
"address": {
"zip_code": "03632-020",
"street": "Rua Santo Afonso",
"number": "111",
"complement": null,
"neighborhood": "Penha de França",
"city": "São Paulo",
"state": "SP",
"country": "BR",
"full_address": "Rua Santo Afonso, 111, Penha de França, São Paulo, SP, BR, 03632-020"
}
},
"former_insurance_policy": {
"effective_from": "2025-10-04",
"effective_until": "2026-09-04",
"consulted_insurer": 1122,
"previous_vehicle_vin": "9999AKFW98B070000",
"previous_policy_number": "3471474956475",
"cancellation_date": null,
"consulted_insurer_name": "Youse"
},
"driver": {
"name": "Eduardo Aloj",
"gender": "male",
"birthdate": "1980-01-01",
"document_type": null,
"document_number": null,
"bonuses_class": 8
},
"vehicle": {
"vin": "9999AKFW98B070000",
"make": "PEUGEOT",
"model": "206",
"version": "206 PRESENCE 1.4 / 1.4 FLEX 8V 5P",
"year": 2008,
"brand_new": false,
"license_plate": "YOU-0000",
"usage": "only_private",
"passenger_capacity": 5,
"fuel_type": "gasoline",
"needs_inspection": false,
"needs_online_inspection": false,
"inspection_type": null,
"inspection_subtype": null,
"reason_message": null,
"reason_uid": null,
"auction": false,
"fipe_code": "024103-2",
"fipe_compensation_factor": 100,
"price": "12784.0",
"address": {
"zip_code": "03632-020",
"street": null,
"number": null,
"complement": null,
"neighborhood": null,
"city": null,
"state": null,
"country": "BR",
"full_address": "BR, 03632-020"
}
},
"coverages": [
{
"id": "6a9025158dec1c56275d9a3e",
"coverage_id": "a8c75223-48b2-4963-a531-4c427b599820",
"name": "Incêndio",
"description": "Se seu veículo der PT porque pegou fogo, explodiu ou caiu um raio, vc recebe seu seguro integral pra compensar o prejuízo.",
"deductible_type": null,
"deductible": "#",
"lmi": null,
"fragments": []
},
{
"id": "6a9025158dec1c56275d9a3f",
"coverage_id": "c88cedae-21e5-4b82-a9b3-90f2a3ee94f8",
"name": "Roubo e furto",
"description": "Seu carro foi roubado? Calma, calma. Se em trinta dias ele não for encontrado a gente paga o valor total do seu seguro. Mas se for e estiver bem detonado – deu PT – a gente também cobre o seguro pra você.",
"deductible_type": null,
"deductible": "#",
"lmi": null,
"fragments": []
},
{
"id": "6a9025158dec1c56275d9a41",
"coverage_id": "0d347a70-200a-44e2-b50b-8461afd1e6b6",
"name": "Vale para perda total",
"description": "Aconteceu um acidente e não vai ser possível consertar os danos do seu carro? Pode ficar numa boa. Se rolar perda total com batidas, capotagens, queda do veículo ou queda de objetos, a gente te indeniza. O preço do conserto precisa ser maior que 75% do valor do carro de acordo com a tabela FIPE no período do acionamento.",
"deductible_type": null,
"deductible": "#",
"lmi": null,
"fragments": []
},
{
"id": "6a9025158dec1c56275d9a43",
"coverage_id": "63ce8bea-92b9-451a-93ef-44bba162cf56",
"name": "Alagamento e eventos da natureza",
"description": "Se seu carro foi pego de surpresa no meio de uma inundação, alagamento, granizo ou ventos fortes e deu PT, não se preocupe. Você tem direito ao valor integral de seu seguro pra cobrir seu prejuízo.",
"deductible_type": null,
"deductible": "#",
"lmi": null,
"fragments": []
},
{
"id": "6a9025158dec1c56275d9a45",
"coverage_id": "f0781c3c-2af7-4d99-b424-2b36209f16c4",
"name": "Danos corporais a terceiros",
"description": "Se você se envolver em algum acidente com pessoas feridas, a gente te ajuda nas despesas que for obrigado a pagar. Ah, você também pode usar essa cobertura pra pagar os advogados, se alguém te processar. É só escolher o valor da indenização.",
"deductible_type": null,
"deductible": "#",
"lmi": null,
"fragments": []
},
{
"id": "6a9025158dec1c56275d9a47",
"coverage_id": "c528e469-66cc-4b75-93ee-ba14b32ddd36",
"name": "Danos materiais a terceiros",
"description": "Se acontecer um acidente que envolva os bens de outras pessoas, você conta com uma indenização pra bancar as despesas que tiver com reparos, reposições e até mesmo com advogados, se for o caso.",
"deductible_type": null,
"deductible": "#",
"lmi": null,
"fragments": []
}
],
"assistances": [
{
"id": "6a9025168dec1c56275d9a50",
"name": "Assistência a automóvel",
"assistance_id": "019075c0-3516-44d8-a675-b6a38183783b",
"description": "A gente leva seu veículo até a oficina ou concessionária, se precisar. Ah, se o trajeto for maior que o contratado, aí o valor extra fica por sua conta e será pago direto pro guincho.",
"services": null
}
]
}
---
#### renewal-pricing-notification
Quando uma renovação sofre reajuste de preço.
Exemplo do corpo do evento:
// Em breve
---
#### payment-notification
Quando iniciado o processo de tentativa de cobrança,
(Em breve) Exemplo do corpo do evento:
{}
---
#### installment-notification
Quando acontece a notificação de cobrança.
(Em breve) Exemplo do corpo do evento:
{}
---
#### partner-invoice
Quando iniciar o processo de pagamento externo
(Em breve) Exemplo do corpo do evento:
{}
---
#### reconciliation-process
Quando processo do arquivo de conciliação termina o processo, sendo sucesso ou falha
(Em breve) Exemplo do corpo do evento:
{}
---
#### payment-transaction
Usado pelo pagamento externo
(Em breve) Exemplo do corpo do evento:
{}
---
#### payment-partner-operation
Usado pelo pagamento externo
(Em breve) Exemplo do corpo do evento:
{}
---
#### endorsement-refund
Quando há operação de reembolso em endosso
(Em breve) Exemplo do corpo do evento:
{}
---
#### policy-refund
Quando há operação de reembolso em apólice
(Em breve) Exemplo do corpo do evento:
{}
---
#### recurrence-payment
Quando a recorrencia de pagamento acontece
(Em breve) Exemplo do corpo do evento:
{}
---