Back to top

API Documentation

Domain Events

ComplaintWasCreated

{
    "id"          : 1,
    "type_name"   : "Sah\Complaints\Domain\Complaints\Events\ComplaintWasCreated",
    "occurred_on" : "2018-01-18 12:01:43",
    "event_body"  : {
        "id"        : "8f2dbe69-b68f-4423-bc93-b8b036727a032",
        "metadata"  : {"occurredOn": {"date": "2017-12-18 09:55:06", "timezone": "UTC", "timezone_type": 3}},
        "bookingId" : "25340a00-12b5-48f7-8531-b6bc2642b22c",
        "locator"   : "GF56TG",
        "ric"       : "HY",
        "cic"       : "02",
        "stage"     : 1,
        "priority"  : "1",
        "motive"    : "1",
        "guilty"    : "1",
        "createdBy" : "tenant",
        "desiredResolution" : "cancellation",
        "version"   : 1,
        "platformSource" : "spotahome",
        "happinessNotes" : "anything",
        "attachmentPaths" : ["path1", "path2"]
    }
}

ComplaintWasInitiated

{
    "id"          : 1,
    "type_name"   : "Sah\Complaints\Domain\Complaints\Events\ComplaintWasInitiated",
    "occurred_on" : "2018-01-18 12:01:43",
    "event_body"  : {
        "id"        : "8f2dbe69-b68f-4423-bc93-b8b036727a032",
        "metadata"  : {"occurredOn": {"date": "2017-12-18 09:55:06", "timezone": "UTC", "timezone_type": 3}},
        "version"   : 1,
    }
}

AgentWasAssigned

{
    "id"          : 1,
    "type_name"   : "Sah\Complaints\Domain\Complaints\Events\AgentWasAssigned",
    "occurred_on" : "2018-01-18 12:01:43",
    "event_body"  : {
        "id"        : "8f2dbe69-b68f-4423-bc93-b8b036727a032",
        "metadata"  : {"occurredOn": {"date": "2017-12-18 09:55:06", "timezone": "UTC", "timezone_type": 3}},
        "agentId"   : "25340a00-12b5-48f7-8531-b6bc2642b22c",
        "version"   : 1,
    }
}

ComplaintWasEdited

{
    "id"          : 1,
    "type_name"   : "Sah\Complaints\Domain\Complaints\Events\ComplaintWasEdited",
    "occurred_on" : "2017-12-18T09:55:06.000Z",
    "event_body"  : {
        "id"             : "8f2dbe69-b68f-4423-bc93-b8b036727a032",
        "metadata"       : {"occurredOn": {"date": "2017-12-18 09:55:06", "timezone": "UTC", "timezone_type": 3}},
        "type"           : "1",
        "guilty"         : "GF56TG",
        "motive"         : "HY",
        "agentId"        : "25340a00-12b5-48f7-8531-b6bc2642b22c",
        "channel"        : "2",
        "priority"       : "1",
        "publicReview"   : 4,
        "zendeskNumber"  : "90a4ee94-1eff-4c93-8844-f6db9300d332",
        "happinessNotes" : "anything",
        "version"        : 1,
    }
}

ResolveComplaintWithAgreementWasRequested

{
    "id"          : 1,
    "type_name"   : "Sah\Complaints\Domain\Complaints\Events\ResolveComplaintWithAgreementWasRequested",
    "occurred_on" : "2017-12-18T09:55:06.000Z",
    "event_body"  : {
        "id"                     : "8f2dbe69-b68f-4423-bc93-b8b036727a032",
        "metadata"               : {"occurredOn": {"date": "2017-12-18 09:55:06", "timezone": "UTC", "timezone_type": 3}},
        "agentId"                : "25340a00-12b5-48f7-8531-b6bc2642b22c",
        "isCompanyLoss"          : true,
        "cancelSplitFeePayments" : false, 
        "cancelRentPayments"     : false, 
        "version"                : 1,
    }
}

ResolveComplaintWithCancellationWasRequested

{
    "id"          : 1,
    "type_name"   : "Sah\Complaints\Domain\Complaints\Events\ResolveComplaintWithCancellationWasRequested",
    "occurred_on" : "2017-12-18T09:55:06.000Z",
    "event_body"  : {
        "id"                     : "8f2dbe69-b68f-4423-bc93-b8b036727a032",
        "metadata"               : {"occurredOn": {"date": "2017-12-18 09:55:06", "timezone": "UTC", "timezone_type": 3}},
        "agentId"                : "25340a00-12b5-48f7-8531-b6bc2642b22c",
        "guilty"                 : "1",
        "motive"                 : "2",
        "isCompanyLoss"          : true,
        "cancelSplitFeePayments" : false, 
        "cancelRentPayments"     : false, 
        "version"                : 1,
    }
}

ResolveComplaintWithNewConditionsWasRequested

{
    "id"          : 1,
    "type_name"   : "Sah\Complaints\Domain\Complaints\Events\ResolveComplaintWithNewConditionsWasRequested",
    "occurred_on" : "2017-12-18T09:55:06.000Z",
    "event_body"  : {
        "id"                     : "8f2dbe69-b68f-4423-bc93-b8b036727a032",
        "metadata"               : {"occurredOn": {"date": "2017-12-18 09:55:06", "timezone": "UTC", "timezone_type": 3}},
        "agentId"                : "25340a00-12b5-48f7-8531-b6bc2642b22c",
        "moveIn"                 : "2018-01-01",
        "moveOut"                : "2018-05-30",
        "endContractDate"        : "2018-05-30",
        "startContractDate"      : "2018-01-01"}
        "seasonalPricing"        : [10000, 10000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 8000, 8000, 8000],
        "isCompanyLoss"          : true,
        "cancelSplitFeePayments" : false, 
        "cancelRentPayments"     : false, 
        "version"                : 1,
    }
}

ResolveComplaintWithNewLandlordConditionsWasRequested

{
    "id"          : 1,
    "type_name"   : "Sah\Complaints\Domain\Complaints\Events\ResolveComplaintWithNewLandlordConditionsWasRequested",
    "occurred_on" : "2017-12-18T09:55:06.000Z",
    "event_body"  : {
        "id"                     : "8f2dbe69-b68f-4423-bc93-b8b036727a032",
        "metadata"               : {"occurredOn": {"date": "2017-12-18 09:55:06", "timezone": "UTC", "timezone_type": 3}},
        "agentId"                : "25340a00-12b5-48f7-8531-b6bc2642b22c",
        "landlordCommission"     : 6,
        "isCompanyLoss"          : true,
        "cancelSplitFeePayments" : false, 
        "cancelRentPayments"     : false, 
        "version"                : 1,
    }
}

ResolveComplaintWithRelocationWasRequested

{
    "id"          : 1,
    "type_name"   : "Sah\Complaints\Domain\Complaints\Events\ResolveComplaintWithRelocationWasRequested",
    "occurred_on" : "2017-12-18T09:55:06.000Z",
    "event_body"  : {
        "id"                     : "8f2dbe69-b68f-4423-bc93-b8b036727a032",
        "metadata"               : {"occurredOn": {"date": "2017-12-18 09:55:06", "timezone": "UTC", "timezone_type": 3}},
        "guilty"                 : "1",
        "motive"                 : "1",
        "agentId"                : "32a68c2d-d60c-4d8f-a0cb-52fed140adfd",
        "isCompanyLoss"          : true,
        "cancelSplitFeePayments" : false, 
        "cancelRentPayments"     : false, 
        "version"                : 1,
    }
}

ComplaintWasResolved

{
    "id"         : 1,
    "type_name"   : "Sah\Complaints\Domain\Complaints\Events\ComplaintWasResolved",
    "occurred_on" : "2017-12-18T09:55:06.000Z",
    "event_body"  : {
        "id"       : "8f2dbe69-b68f-4423-bc93-b8b036727a032",
        "metadata" : {"occurredOn": {"date": "2017-12-18 09:55:06", "timezone": "UTC", "timezone_type": 3}},
        "version"  : 1,
    }
}

ComplaintWasDiscarded

{
    "id"          : 1,
    "type_name"   : "Sah\Complaints\Domain\Complaints\Events\ComplaintWasDiscarded",
    "occurred_on" : "2018-01-18 12:01:43",
    "event_body"  : {
        "id"        : "8f2dbe69-b68f-4423-bc93-b8b036727a032",
        "metadata"  : {"occurredOn": {"date": "2017-12-18 09:55:06", "timezone": "UTC", "timezone_type": 3}},
        "discarded" : true,
        "version"   : 1,
    }
}

ComplaintWasAmendedAfterBeingSolved

{
    "id"          : 1,
    "type_name"   : "Sah\Complaints\Domain\Complaints\Events\ComplaintWasAmendedAfterBeingSolved",
    "occurred_on" : "2017-12-18T09:55:06.000Z",
    "event_body"  : {
        "id"       : "8f2dbe69-b68f-4423-bc93-b8b036727a032",
        "metadata" : {"occurredOn": {"date": "2017-12-18 09:55:06", "executedBy": "1234-5678", "timezone": "UTC", "timezone_type": 3}},
        "guilty"   : "2",
    }
}

ComplaintMotiveWasUpdated

{
    "id"          : 1,
    "type_name"   : "Sah\Complaints\Domain\Complaints\Events\ComplaintMotiveWasUpdated",
    "occurred_on" : "2018-01-18 12:01:43",
    "event_body"  : {
        "id"        : "8f2dbe69-b68f-4423-bc93-b8b036727a032",
        "motive"    : "125",
        "metadata"  : {"occurredOn": {"date": "2017-12-18 09:55:06", "timezone": "UTC", "timezone_type": 3}},
        "discarded" : true,
        "version"   : 1,
    }
}

Generated by aglio on 08 Dec 2025