API Models
Files (No changes)
To fetch the file
GET <server>/files/<file-metadata-id>
To save the file
POST: <server>/files
Example:
https://dev.life-connect.fr/files?metaData={"type":"FileMetaData","target":{"targetId":"668bd59f3dd9044178698d50","targetType":"Contract","type":"TargetObject"},"fileType":{"type":"CatalogValue","code":"FILE_TYPE","id":"FILE_TYPE.OTHER","value":"OTHER"},"lifePeriod":null,"fileName":"RC-00000049.txt"}
Response examples:
{
"traceId": "traceId",
"durationInMillis": 364,
"domainObjects": [
{
"type": "FileMetaData",
"id": "673da97d187c3636f73d6c5f",
"organisationId": "5fd3768f801994528cb34423",
"creationDateTime": "2024-11-20 10:18:53.000 +0000",
"lastModificationDateTime": "2024-11-20 10:18:53.195 +0000",
"fileName": "RC-00000049.txt",
"target": {
"type": "TargetObject",
"targetId": "668bd59f3dd9044178698d50",
"targetType": "Contract"
},
"fileType": {
"type": "CatalogValue",
"id": "FILE_TYPE.OTHER",
"code": "FILE_TYPE",
"value": "OTHER",
"label": "Other document"
}
}
]
}
Contract events
Create event
POST: https://dev.life-connect.fr/contracts/events
Request examples:
{
"type": "ContractNotifyEventInfo",
"target": {
"type": "TargetObject",
"targetType": "Contract",
"targetId": "668bd59f3dd9044178698d50"
},
"noticePeriod": {
"type": "CatalogValue",
"id": "RENTAL_CONTRACT_NOTICE_PERIOD.SHORTENED",
"value": null,
"label": null
},
"isCompliant": false,
"nonComplianceReason": {
"id": "TENANT_LEAVE_NON_COMPLIANCE_REASON.PLACEHOLDER1",
"type": "CatalogValue",
"value": null,
"label": null
},
"nonComplianceReasonDetails": "Some reason",
"shortenPeriodReason": {
"id": "TENANT_LEAVE_SHORTEN_REASON.PLACEHOLDER1",
"type": "CatalogValue",
"value": null,
"label": null
},
"shortenPeriodReasonDetails": "Some reason 2",
"noticeDate": "2024-11-16",
"endDateIsDifferent": true,
"endDate": "2024-11-22"
}
Response example:
{
"durationInMillis": 0,
"domainObject": {
"type": "ContractNotifyEventInfo",
"target": {
"type": "TargetObject",
"targetId": "668bd59f3dd9044178698d50",
"targetType": "Contract"
},
"noticeDate": "2024-11-16",
"noticePeriod": {
"type": "CatalogValue",
"id": "RENTAL_CONTRACT_NOTICE_PERIOD.SHORTENED",
"code": "RENTAL_CONTRACT_NOTICE_PERIOD"
},
"endDateIsDifferent": true,
"isCompliant": false,
"nonComplianceReason": {
"type": "CatalogValue",
"id": "TENANT_LEAVE_NON_COMPLIANCE_REASON.PLACEHOLDER1",
"code": "TENANT_LEAVE_NON_COMPLIANCE_REASON"
},
"nonComplianceReasonDetails": "Some reason",
"shortenPeriodReason": {
"type": "CatalogValue",
"id": "TENANT_LEAVE_SHORTEN_REASON.PLACEHOLDER1",
"code": "TENANT_LEAVE_SHORTEN_REASON"
},
"shortenPeriodReasonDetails": "Some reason 2",
"endDate": "2024-11-22"
}
}
Get event
Get: https://dev.life-connect.fr/contracts/<contract-id>/notice-info
Response example:
{
"traceId": "traceId",
"durationInMillis": 207,
"domainObject": {
"type": "RentalContractNoticeInfo",
"noticeDate": "2024-12-01",
"noticePeriod": {
"type": "CatalogValue",
"id": "RENTAL_CONTRACT_NOTICE_PERIOD.SHORTENED",
"code": "RENTAL_CONTRACT_NOTICE_PERIOD",
"value": "SHORTENED",
"label": "notice period shortened"
},
"end": "2024-12-02",
"isCompliant": false,
"nonComplianceReason": {
"type": "CatalogValue",
"id": "TENANT_LEAVE_NON_COMPLIANCE_REASON.PLACEHOLDER1",
"code": "TENANT_LEAVE_NON_COMPLIANCE_REASON",
"value": "PLACEHOLDER1",
"label": "Non-compliance reason 1"
},
"nonComplianceReasonDetails": "some non compliance reason details",
"shortenPeriodReason": {
"type": "CatalogValue",
"id": "TENANT_LEAVE_SHORTEN_REASON.PLACEHOLDER1",
"code": "TENANT_LEAVE_SHORTEN_REASON",
"value": "PLACEHOLDER1",
"label": "Shorten reason 1"
},
"shortenPeriodReasonDetails": "some shorten period reason details"
}
}