Webhook Events
Contract deleted
Aira sends this event after it deletes a contract, which the deletion of its customer deletes.
WEBHOOK
contract.deleted
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"event": "contract.deleted",
"payload": {
"contract": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contractNumber": "MERCA-CTR-01",
"customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"startDate": "2023-12-25",
"endDate": "2023-12-25",
"retroactiveDate": "2023-12-25",
"invoicingStartDate": "2023-12-25",
"customFields": {
"customField1": "value1",
"customField2": [
"value2",
"value3"
]
},
"includeNewSubsidiariesOnUsageScope": true,
"usageScopes": [
{
"customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"allocations": [
{
"paymentAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"allocationPercentage": "50.000000"
}
],
"billingSchedule": {
"anchorDay": 16
},
"planInstances": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"planId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Plano Essencial"
}
],
"legalEntityId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"taxRegimeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"autoIssue": true,
"billingSettings": {
"invoiceMinimumAmount": 1,
"productId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"paymentGatewaySettings": {
"dueDateMode": "days_after_issue",
"dueOffsetDays": 1,
"dueDay": 16,
"dueMonthOffset": 0,
"rollDueDateToBusinessDay": true
}
}
}
}Headers
Body
application/json
The event, with its identifier, its name and its payload.
Response
2XX
Answer with a 2XX status to confirm the delivery. Aira retries a delivery that gets another status, a redirect or no answer.
⌘I
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"event": "contract.deleted",
"payload": {
"contract": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contractNumber": "MERCA-CTR-01",
"customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"startDate": "2023-12-25",
"endDate": "2023-12-25",
"retroactiveDate": "2023-12-25",
"invoicingStartDate": "2023-12-25",
"customFields": {
"customField1": "value1",
"customField2": [
"value2",
"value3"
]
},
"includeNewSubsidiariesOnUsageScope": true,
"usageScopes": [
{
"customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"allocations": [
{
"paymentAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"allocationPercentage": "50.000000"
}
],
"billingSchedule": {
"anchorDay": 16
},
"planInstances": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"planId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Plano Essencial"
}
],
"legalEntityId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"taxRegimeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"autoIssue": true,
"billingSettings": {
"invoiceMinimumAmount": 1,
"productId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"paymentGatewaySettings": {
"dueDateMode": "days_after_issue",
"dueOffsetDays": 1,
"dueDay": 16,
"dueMonthOffset": 0,
"rollDueDateToBusinessDay": true
}
}
}
}