Webhooks
Contract updated
Aira sends this event after a field of a contract changes: an edit of the draft or of the active contract, its activation, its completion, its cancellation, a plan instance that it gains, loses, completes or moves to another plan, and a subsidiary that its usage scope gains when the organization gains it.
WEBHOOK
contract.updated
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"event": "contract.updated",
"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
}
},
"previousValues": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contractNumber": "MERCA-CTR-01",
"customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"legalEntityId": "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"
]
},
"taxRegimeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"includeNewSubsidiariesOnUsageScope": true,
"autoIssue": true,
"usageScopes": [
{
"customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"allocations": [
{
"paymentAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"allocationPercentage": "50.000000"
}
],
"billingSettings": {
"invoiceMinimumAmount": 1,
"productId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"paymentGatewaySettings": {
"dueDateMode": "days_after_issue",
"dueOffsetDays": 1,
"dueDay": 16,
"dueMonthOffset": 0,
"rollDueDateToBusinessDay": true
},
"planInstances": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"planId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Plano Essencial"
}
]
}
}
}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.updated",
"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
}
},
"previousValues": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contractNumber": "MERCA-CTR-01",
"customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"legalEntityId": "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"
]
},
"taxRegimeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"includeNewSubsidiariesOnUsageScope": true,
"autoIssue": true,
"usageScopes": [
{
"customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"allocations": [
{
"paymentAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"allocationPercentage": "50.000000"
}
],
"billingSettings": {
"invoiceMinimumAmount": 1,
"productId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"paymentGatewaySettings": {
"dueDateMode": "days_after_issue",
"dueOffsetDays": 1,
"dueDay": 16,
"dueMonthOffset": 0,
"rollDueDateToBusinessDay": true
},
"planInstances": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"planId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Plano Essencial"
}
]
}
}
}