Activities in Core
Introduction
There are many types of activities in Core, such as a showing, inspection, transfer, and more. Please refer to our Swagger documentation for more details.
To retrieve activities for a given case, you must have the permissions:
Cases - Read
Activities - Read
If you do not have these permission, please read the FAQ section of this documentation.
Retrieving activities on a case
Use the following endpoint:
GET /flow/api/Cases/{caseId}/Activities?
$skip=0
&$top=100
&$orderby=DateTime asc
&$inlinecount=allpages
&$filter=(
ActivityType eq 'ContractMeetingActivity' or
ActivityType eq 'InspectionActivity' or
ActivityType eq 'MeetingActivity' or
ActivityType eq 'TransferActivity' or
ActivityType eq 'ShowingActivity'
)
By adjusting the OData filter query, you can refine the results to retrieve only specific activity types, such as ShowingActivity. For example:
GET /flow/api/Cases/12345/Activities?
$skip=0
&$top=50
&$orderby=DateTime desc
&$inlinecount=allpages
&$filter=(
ActivityType eq 'ShowingActivity'
)
You should get a similar response to:
{
"Count": 1,
"Results": [
{
"Id": 112233,
"CaseId": 98765,
"Subject": "Visning",
"Description": "Beskrivelse for denne aktiviteten",
"CreatedOn": "2024-04-16T12:15:50.1479198+02:00",
"LastModified": "2024-04-16T12:15:50.1479215+02:00",
"DateTime": "2024-04-16T12:15:32+02:00",
"IsCompleted": false,
"OrganizerId": 5,
"ActivityType": "ShowingActivity",
"IsPrivate": true,
"IsAllDay": false,
"NoEndDate": false,
"LastModifiedById": 5,
"CreatedById": 5,
"IsDraft": false,
"IsRecurring": false
}
]
}
Retrieving activities using ‘Advanced Search’
When retrieving common property information using ‘advanced search’ as outlined in the ‘API-Methods - Search’ section of the documentation, you will also receive some activity information. The specific details provided will depend on the activity type.
Showing activity information from ‘Advanced Search’
ShowingIds: IDs for a case's showing activities, excluding private showings.
ShowingDates: All showing dates for a case.
Transfer activity information from ‘Advanced Search’
TransferLocation: Location of a case's latest transfer activity
TransferDate: The date of a case's latest transfer activity
Inspection activity information from ‘Advanced Search’
InspectionDate: The date of a case's latest inspection activity
Contract meeting activity information from ‘Advanced Search’
ContractMeetingDate: The date of a case's latest contract meeting activity
Retrieving upcoming showings through a public endpoint
Information about showings is also accessible through a public endpoint, providing some general showing-information of a specific case without requiring any permissions. Note that the information returned from this endpoint is limited.
Use the following endpoint, replacing caseGuid with a case’s GUID:
GET /flow/api/Public/Properties/{caseGuid}/Showings
You should get a similar response to:
[
{
"Guid": "19eab286-286a-4b4a-b8c5-9c969a6caf18",
"StartDate": "2024-10-30T07:16:00+01:00",
"EndDate": "2024-10-30T07:16:00+01:00",
"NumberOfParticipants": 1
}
]
Note that you will only be able to retrieve up to 6 upcoming showings from this endpoint that are not marked as private. Each showing activity’s GUID returned from this endpoint can be used to register an attendee’s participation.
Registering showing attendance through a public endpoint
To register attendance for a showing you can use the following endpoint, which allows you to submit details for one or more participants for a specific showing activity:
POST /flow/api/Public/Cases/{caseGuid}/Stakeholders
In the request body you should include details such as the participant’s first name, surname, email, contact number and any comments. Also make sure to include a showing activity GUID, for example:
{
{
"FirstName": "Ola",
"SurName": "Nordmann",
"Email": "ola.nordmann@visma.com",
"CountryPrefix": "+47",
"Telephone": "99999999",
"Comments": "Vi er 2 stk. som kommer på visning. Gleder oss!",
"ContactMethodType": "Showing",
"PrivateShowing": false,
"NumberOfParticipants": 2,
"ShowingActivityGuid": "19eab286-286a-4b4a-b8c5-9c969a6caf18",
"CheckedProcessingBases": []
}
}
Request a private showing without specifying a showing activity
It is also possible to request a private showing without specifying a showing activity.
To do this, use the same endpoint:
POST /flow/api/Public/Cases/{caseGuid}/Stakeholders
Set PrivateShowing to true and do not include a ShowingActivityGuid:
{
{
"FirstName": "Ola",
"SurName": "Nordmann",
"Email": "ola.nordmann@visma.com",
"CountryPrefix": "+47",
"Telephone": "99999999",
"Comments": "Vi er 2 stk. som kommer på visning. Gleder oss!",
"ContactMethodType": "Showing",
"PrivateShowing": true,
"NumberOfParticipants": 2,
"CheckedProcessingBases": []
}
}
This will create a stakeholder on the case for the responsible broker to see. The new stakeholder will not be added to any specific showing, but will be registered with the source Private showing.