Contratos (Contracts)
O domínio CONTRACT envia os eventos de webhook para atualizações ocorridas nos Contratos.
Eventos Disponíveis
CONTRACT_WAS_CANCELEDCONTRACT_WAS_CREATED_FROM_REQUISITION_FILECONTRACT_WAS_FINISHEDCONTRACT_BASIC_FIELDS_WAS_UPDATEDCONTRACT_WAS_CREATEDCONTRACT_WAS_REOPENED
Nota: Em todos os eventos de webhook despachados pelo sistema, o campo
eventTypesempre receberá o sufixo_WEBHOOK(ex:CONTRACT_WAS_CREATED_WEBHOOK).
Estrutura do Payload de Contrato
Para todos os eventos do domínio CONTRACT, o Linte envia o objeto completo do contrato detalhado na chave "contract", incluindo a lista de participantes (ContractWebhook).
Exemplo de Payload: Contrato Criado
json
{
"__typename": "WebhookEvent",
"eventType": "CONTRACT_WAS_CREATED_WEBHOOK",
"domain": "CONTRACT",
"organizationId": "5e9f8f8f-8f8f-8f8f-8f8f-8f8f8f8f8f8f",
"actor": {
"userId": "123e4567-e89b-12d3-a456-426614174000",
"email": "joao.silva@empresa.com",
"name": "João Silva"
},
"contract": {
"id": "e98e4d25-7033-4f9e-a89a-0e9e7b39a444",
"createdById": "123e4567-e89b-12d3-a456-426614174000",
"organizationId": "5e9f8f8f-8f8f-8f8f-8f8f-8f8f8f8f8f8f",
"statusId": "2c9384bc-7c91-4db8-9eb3-92f70b797b5e",
"status": "DRAFT",
"type": "Nda",
"kind": "CONTRACT",
"slug": 1024,
"requestingArea": "Jurídico",
"currency": "BRL",
"value": 1500000,
"effectiveDate": "2023-11-01T00:00:00.000Z",
"expirationDate": "2024-11-01T00:00:00.000Z",
"createdFromRequisitionId": "c76b9d62-628d-429a-9e12-8e798e167e41",
"typeformResponseId": null,
"participants": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"createdAt": "2023-10-25T14:30:00.000Z",
"role": "VIEWER",
"userGroup": null,
"user": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "João Silva",
"email": "joao.silva@empresa.com",
"area": "Jurídico",
"jobTitle": "Advogado",
"isDisabled": false,
"hasAvatar": false,
"hexColor": "#FF5733",
"languageId": "pt-BR",
"organizationId": "5e9f8f8f-8f8f-8f8f-8f8f-8f8f8f8f8f8f",
"phoneNumber": "+5511999999999",
"roleId": "ADMIN",
"customRoleId": null
}
}
]
}
}Exemplo de Payload: Status Básico Atualizado
Este evento carrega as mesmas informações base do contrato anterior com as respectivas atualizações (ex: modificação do valor status ou data).
json
{
"__typename": "WebhookEvent",
"eventType": "CONTRACT_BASIC_FIELDS_WAS_UPDATED_WEBHOOK",
"domain": "CONTRACT",
"organizationId": "5e9f8f8f-8f8f-8f8f-8f8f-8f8f8f8f8f8f",
"actor": {
"userId": "123e4567-e89b-12d3-a456-426614174000",
"email": "joao.silva@empresa.com",
"name": "João Silva"
},
"contract": {
"id": "e98e4d25-7033-4f9e-a89a-0e9e7b39a444",
"status": "ACTIVE",
"...": "..."
}
}