Market Applications
Retrieves status of a specific market object for the current user, e.g. if the current user may post a new application for the market object or the status of an existing application linked to the market object.
Request
Example
GET /v2/market/objects/{id}/status
Parameters
Name |
Description |
id |
Required The market object's identifier (string) or access key (string). |
removedApplications |
Set to true to include removed applications in the applications property. The Default value for this property is false. |
Response
Example
{
"applied": true,
"allowContact": true,
"commands": [
{
"command": "apply",
"displayName": "Intresseanmäl",
"checklist": [
{
"passed": false,
"type": "applied",
"message": "Intresseanmälan redan gjord"
},
{
"passed": true,
"type": "open",
"message": "Intresseanmälan möjlig t o m 2021-02-17 23:59"
},
{
"passed": true,
"type": "applicant"
},
{
"passed": true,
"type": "login"
},
{
"passed": true,
"type": "queue"
},
{
"passed": true,
"type": "age"
}
]
}
],
"applications": [
//Example of an application requiring input via an online form:
{
"id": "MxjFvMdYVvmtwr7KKYCpmcgJ",
"created": "/Date(1675243915900)/",
"removed": false,
"etag": "1839026",
"statusDisplayName": "Dina uppgifter",
"active": true,
"presentation": {
"type": "form",
"data": {
"message": "Vi behöver några fler uppgifter",
"created": "/Date(1677661869310+0100)/",
"answerBefore": "/Date(1677797999000+0100)/",
"form": {
"__type": "Momentum.Pm.PortalApi.Version2.Client.Interfaces.ViewElement, Momentum.Pm.PortalApi.Client.Interfaces",
"elements": [
{
"id": "Yxp6YycfTw",
"type": "section",
"section": {
"title": "Vad har ni för inkomst?",
"elements": [
{
"id": "cvPFGDM7JK",
"type": "input",
"input": {
"storage": "applicant",
"field": "income",
"options": {
"required": true
}
}
}
]
}
},
{
"id": "ym6bGvpyCr",
"type": "section",
"section": {
"title": "Var bor ni idag?",
"elements": [
{
"id": "QCWyYBPx7w",
"type": "input",
"input": {
"storage": "applicant",
"field": "accommodation",
"options": {
"required": true
}
}
}
]
}
},
{
"id": "qPTBV8C6Rm",
"type": "section",
"section": {
"title": "Hur många ingår i hushållet?",
"elements": [
{
"id": "BCWbK9JCCh",
"type": "input",
"input": {
"storage": "applicant",
"field": "household",
"options": {
"required": false
}
}
}
]
}
}
]
}
},
"executing": false
},
"commands": [
{
"command": "remove",
"displayName": "Ta bort"
},
{
"command": "done",
"displayName": "Klar"
}
],
"history": {
"steps": [
{
"id": "1839026",
"occurred": "/Date(1677661869310+0100)/",
"statusDisplayName": "Dina uppgifter",
"presentation": {
"type": "form",
"data": {
"message": "Vi behöver några fler uppgifter"
}
}
},
{
"id": "1838986",
"occurred": "/Date(1677484738550+0100)/",
"statusDisplayName": "Du har gått vidare",
"presentation": {
"type": "questionYesNo",
"data": {
"question": "Är du fortsatt intresserad?",
"answer": "yes"
}
}
}
]
}
},
// Example of an application waiting for answer:
{
"id": "111934",
"statusDisplayName": "Fortsatt intresse",
"active": true,
"presentation": {
"type": "questionYesNo",
"data": {
"question": "Är du fortsatt intresserad?",
"created": "/Date(1611665308337+0100)/",
"answerBefore": "/Date(1611665429267+0100)/"
},
"execution": "true",
},
"commands": [
{
"command": "yes",
"displayName": "Ja"
},
{
"command": "no",
"displayName": "Nej"
}
]
},
// Example of an application not waiting for the user:
{
"id": "111933",
"statusDisplayName": "Anmäld",
"active": false
},
// Example of an application that has been closed:
{
"id": "111932",
"statusDisplayName": "Avslutad",
"closed": "/Date(1611663387097-0000)/",
"active": false
},
// Example of an application that has been closed due to not answered in time:
{
"id": "111931",
"statusDisplayName": "Ej svarat i tid",
"closed": "/Date(1611663955037-0000)/",
"active": false
},
// Example of an application that can be deleted:
{
"id": "139649",
"statusDisplayName": "Intresseanmäld",
"commands": [
{
"command": "remove",
"displayName": "Ta bort"
}
]
},
// Example of an application that has been removed:
{
"id": "139649",
"statusDisplayName": "Borttagen",
"closed": "/Date(1611663955037-0000)/",
"removed": true
}
]
}
Name |
Description |
applied |
True if the actor has applied for the market object. |
allowContact |
True if the contact property can be set on the POST /v2/market/object/{id}/applications API. |
commands |
Available commands to perform on the market object. |
applications |
List of applications for the current market object and the current user. In the above example the market object has multiple applications for the same user, which is allowed, but not normal. |
.commands
Name |
Description |
command |
Non numerical identity of the command e.g. apply . Att present apply is the only command supported. |
displayName |
Display name of the command to be presented to the user. |
checklist |
A set of criteria that must be fulfilled in able to perform the command. |
.checklist
Name |
Description |
passed |
If the user's profile fulfils the criteria. |
type |
Name of the criteria to be fulfilled. |
message |
Message to be presented to the user if the criteria has not been fulfilled in the passed property. |
.applications
Name |
Description |
id |
Identifier of the application. |
statusDisplayName |
Current market object application status. |
removed |
True if the application has been removed, otherwise false. |
active |
True if the system is actively waiting for a response from the currently signed in user (e.g. Question that the applicant should answer), otherwise false (e.g. Waiting for contract to be created, Closed/Archived application, etc). |
closed |
Date and time when the application was closed/archived, otherwise null. The client typically displays closed applications under a history header. |
presentation |
If present, the client should display a user-interface described below. |
commands |
Set of commands that can be performed in the current state of the application. |
.applications.presentation
Name |
Description |
type |
API name of component to present for the user. E.g. questionYesNo . |
data |
Data dictionary containing information specific to the type of presentation. |
execution |
If true then a application is being processed by the system and it's data is not ready yet. Retry the call and when execution is false then it´s data is accurate and up to date. |
Currently the following presentation types are available:
Type |
Description |
questionYesNo |
Display a simple yes or no question. Post a command to answer the question and use the commands.displayName properties as button labels. Data parameter question : Question to be asked (required) Data parameter created : Date and time when the question was first created (required) Data parameter answerBefore : Question must be answered before this date and time (if specified, optional)
|
signing |
Display a button to sign a signing. Data parameter signingId : Identification of the signing.
|
form |
Display a system defined form to be presented by the client to enable the input of information such as income, current accommodation and household members as part of an application process. The form is intended to be used in conjunction with the applicant profile options model obtained via the GET /v2/market/applicant/profile/options endpoint.
|
Post New Application
Register a new application for a market object for the current user. Use the status api described above to retrieve information whether the current user may submit an application for the market object or not.
Request
Example
POST /v2/market/{id}/applications
{
"command":
{
"type": "apply"
}
}
Parameters
Name |
Description |
id |
Required The market object's identifier (string), access key (string) or guid. |
contact |
Contact information. Can only be set with the apply command type and when allowContact is True in GET /v2/market/objects/{id}/status API. |
.command
Name |
Description |
type |
Name of the command to execute on the market object. At present the only command supported by the API is apply |
Name |
Description |
name |
Name of the actor. |
phone |
Phone number of the actor. |
mobile |
Mobile number of the actor. |
email |
Email for the actor. |
Response
Example
Not signed in or signed in user is not registered:
{
"id": [
"bfHjVD9PbJ4mtkRVF9ht6YxX"
]
}
Name |
Description |
id |
List (List<string> ) of identifiers for all applications created in the request. |
Get a List of Applications for the Current User
Retrieve a list of applications for the current user. By default only open applications and applications that have been closed within the last 90 days are returned.
Request
Example
GET /v2/market/applications
Parameters
Name |
Description |
marketObjectType |
Filter the result to a specific type of market object as defined by the Ids of the market object types found in the api /v2/client/configuration property market e.g. residential , senior , parking , commercial , if not supplied all market object types are returned. |
queueType |
Filter the result to a specific type of queue as defined by the Ids of the queue types found in the api /v2/actor/status property queue.types e.g residential , senior , parking , commercial , if not supplied all queue types are returned. |
removed |
Set to true to include removed applications, default value is false. |
closed |
Set to true to include closed applications, default value is false. |
Response
Example
{
"itemsCount": 2,
"block": {
"displayName": "Ej godkänd",
"displayDescription": "Du uppfyller inte kraven i vår uthyrningspolicy.",
"blockedUntilDate": "2023-05-22 23:59"
},
"items": [
{
"id": "12",
"created": "2021-01-25T14:17:53.357+01:00",
"removed": true,
"statusDisplayName": "Borttagen",
"closed": "2021-01-26T11:18:38.567+01:00"
},
{
"id": "13",
"created": "2021-03-11T13:23:49.33+01:00",
"etag": "2001310",
"placeSorted": "2",
"marketObject": {
"id": "2597125",
"number": "AN-1004",
"type": "residential",
"displayName": "Linnégatan 3",
"description": "Centralt och bra",
"pricing": {
"price": 4880.0000
},
"location": {
"area": {
"displayName": "Centrum"
},
"areaPath": [
{
"id": "vptr6YqBVQgY9fhRBcDJQPbg",
"displayName": "Sidsjö"
}
],
"floor": "2"
},
"availability": {
"availableFrom": "2021-03-05T00:00:00+01:00"
},
"publishing": {
"publishedFrom": "2021-03-01T00:00:00+01:00",
"publishedTo": "2021-03-31T00:00:00+02:00"
},
"application": {
"openFrom": "2021-03-01T00:00:00+01:00",
"openTo": "2021-03-31T00:00:00+02:00"
},
"size": {
"area": 104.0000,
"rooms": 5.0000,
"roomsDisplayName": "5 RK",
"shortRoomsDisplayName": "5 rum och kök"
},
"thumbnail": {
"displayName": "Fasaden"
}
},
"statusDisplayName": "Anmäld",
"history": {
"steps": [
{
"id": "1826055",
"occured": "2021-03-15T13:25:40.993+01:00",
"statusDisplayName": "Fortfarande intresserad?",
"presentation": {
"type": "questionYesNo",
"data": {
"question": "Är du fortsatt intresserad?",
"answer": "yes"
},
"execution": "true"
}
}
]
}
}
]
}
Name |
Description |
itemsCount |
Number of applications in items . |
block |
If the current user is blocked for the current queue type. |
items |
List of applications. |
.block
Name |
Description |
displayName |
Name of the block. |
displayDescription |
Description of the block. |
blockedUntilDate |
For how long the block is valid. |
.items
Name |
Description |
id |
Identifier of the application. |
created |
Date and time the application was made. |
etag |
Identifier of the current application process step. Use this for etag in POST /v2/market/{id}/applications |
placeSorted |
Current position for the application among other applications on the market object. |
marketObject |
Basic market object information, see example above. |
statusDisplayName |
Current market object application status. |
removed |
True if the application has been removed, otherwise false. |
closed |
Date and time when the application was closed/archived, otherwise null. The client typically displays closed application under a history header. |
active |
True if the system is actively waiting for a response from the currently signed in user (e.g. Question that the applicant should answer), otherwise false (e.g. Waiting for contract to be created, Closed/Archived application, etc). |
presentation |
If present, the client should display a user-interface described below. |
commands |
Set of commands that can be performed in the current state of the application. |
history |
List of previous process steps for which the user has provided a reply such as Fortfarande intresserad? . |
.items.presentation
Name |
Description |
type |
API name of an api consumer defined user-interface used to present information to the user. For instance questionYesNo could be a graphical component used to pose a question requiring a yes/no answer. See table below. |
data |
Data dictionary containing information specific to the type of presentation. See table below. |
execution |
If true then a application is being processed by the system and it's data is not ready yet. Retry the call and when execution is false then it´s data is accurate and up to date. |
Currently the following presentation types are used:
Type |
Description |
Data |
questionYesNo |
A question requiring a yes/no answer. |
question : Text with the question to display to the user.
created : The date and time when the question was created/asked.
answerBefore : The date and time the question must be answered at the latest (optional). |
removed |
The individual application has been removed/deleted. |
(no additional data) |
annulled |
The individual application had an unrecoverable processing error, the user answered no, too late or similar. |
(no additional data). |
cancelled |
The ad has been cancelled/withdrawn. |
description : Text describing the reason for the withdrawal (optional). |
completed |
The allocation process has been completed and the ad was allocated to another applicant. |
(no additional data) |
contractSigned |
The application has been completed and the applicant has signed a contract. |
(no additional data) |
viewingInfo |
Information about the viewing for the ad's market object. |
text : Text with specific information regarding the viewing.
notes : General information about the viewing.
continues : Date and time when the viewing is over and the rental process automatically continues. |
Please note: New presentation types will be added in the future without prior notice and should be handled gracefully when not understood/supported by the client.
.items.history
Name |
Description |
steps |
List of historical steps. |
.items.history.step
Name |
Description |
id |
Internal identifier of the process step/state. |
occurred |
Timestamp of the user response that gave rise to the change in process step/state. |
statusDisplayName |
Display name of the the question posed, e.g Fortfarande intresserad? , that gave rise to the change in process step/state. |
presentation |
Information to be used when presenting the process history. |
.items.history.step.presentation
Name |
Description |
type |
API name of an api consumer defined user-interface used to present historical information to the user. For instance questionYesNo could be a graphical component used to present a question previously posed by the system and the answer given by the user. See table above for the .items.presentation property. |
data |
A key value structure containing information to be used in the presentation of the historical process step. |
Retrieve an application by its id
Retrieves a specific application by its id please note it is a requirement that the user is signed in when calling this endpoint.
Request
Example
GET /v2/market/applications/{id}
Parameters
Name |
Description |
id |
Required The identifier of the application (string). |
Response
Example
{
"application": {
"id": "13",
"created": "2021-03-11T13:23:49.33+01:00",
"etag": "2266536",
"placeSorted": "2",
"marketObject": {
"id": "2597125",
"number": "AN-1004",
"type": "residential",
"displayName": "Linnégatan 3",
"description": "Centralt och bra",
"pricing": {
"price": 4880.0000
},
"location": {
"area": {
"displayName": "Centrum"
},
"areaPath": [
{
"id": "vptr6YqBVQgY9fhRBcDJQPbg",
"displayName": "Sidsjö"
}
],
"floor": "2"
},
"availability": {
"availableFrom": "2021-03-05T00:00:00+01:00"
},
"publishing": {
"publishedFrom": "2021-03-01T00:00:00+01:00",
"publishedTo": "2021-03-31T00:00:00+02:00"
},
"application": {
"openFrom": "2021-03-01T00:00:00+01:00",
"openTo": "2021-03-31T00:00:00+02:00"
},
"size": {
"area": 104.0000,
"rooms": 5.0000,
"roomsDisplayName": "5 rum och kök",
"shortRoomsDisplayName": "5 RK"
},
"thumbnail": {
"displayName": "Fasaden"
}
},
"statusDisplayName": "Anmäld",
"history": {
"steps": [
{
"id": "1826055",
"occured": "2021-03-15T13:25:40.993+01:00",
"statusDisplayName": "Fortfarande intresserad?",
"presentation": {
"type": "questionYesNo",
"data": {
"question": "Är du fortsatt intresserad?",
"answer": "yes"
}
}
}
]
}
}
}
.application
Name |
Description |
id |
Identifier of the application. |
created |
Date and time the application was made. |
etag |
Identifier of the current application process step. Use this for etag in POST /v2/market/{id}/applications |
placeSorted |
Current position for the application among other applications on the market object. |
marketObject |
Basic market object information, see example above. |
statusDisplayName |
Current market object application status. |
removed |
True if the application has been removed, otherwise false. |
closed |
Date and time when the application was closed/archived, otherwise null. The client typically displays closed application under a history header. |
active |
True if the system is actively waiting for a response from the currently signed in user (e.g. Question that the applicant should answer), otherwise false (e.g. Waiting for contract to be created, Closed/Archived application, etc). |
presentation |
If present, the client should display a user-interface described below. |
commands |
Set of commands that can be performed in the current state of the application. |
history |
List of previous process steps for which the user has provided a reply such as Fortfarande intresserad? . |
.presentation
Name |
Description |
type |
API name of an api consumer defined user-interface used to present information to the user. For instance questionYesNo could be a graphical component used to pose a question requiring a yes/no answer. See table below. |
data |
Data dictionary containing information specific to the type of presentation. See table below. |
Currently the following presentation types are used:
Type |
Description |
Data |
questionYesNo |
A question requiring a yes/no answer. |
question : Text with the question to display to the user.
created : The date and time when the question was created/asked.
answerBefore : The date and time the question must be answered at the latest (optional). |
removed |
The individual application has been removed/deleted. |
(no additional data) |
annulled |
The individual application had an unrecoverable processing error, the user answered no, too late or similiar. |
(no additional data). |
cancelled |
The ad has been cancelled/withdrawn. |
description : Text describing the reason for the withdrawal (optional). |
completed |
The allocation process has been completed and the ad was allocated to another applicant. |
(no additional data) |
contractSigned |
The application has been completed and the applicant has signed a contract. |
(no additional data) |
viewingInfo |
Information about the viewing for the ad's market object. |
text : Text with specific information regarding the viewing.
notes : General information about the viewing.
continues : Date and time when the viewing is over and the rental process automatically continues. |
lock |
The individual application has been locked. |
type : Type of the lock.
description : Description of the lock for the user (optional in the system). |
Please note: New presentation types will be added in the future without prior notice and should be handled gracefully when not understood/supported by the client.
.history
Name |
Description |
steps |
List of historical steps. |
.history.step
Name |
Description |
id |
Internal identifier of the process step/state. |
occurred |
Timestamp of the user response that gave rise to the change in process step/state. |
statusDisplayName |
Display name of the the question posed, e.g Fortfarande intresserad? , that gave rise to the change in process step/state. |
presentation |
Information to be used when presenting the process history. |
.history.step.presentation
Name |
Description |
type |
API name of an api consumer defined user-interface used to present historical information to the user. For instance questionYesNo could be a graphical component used to present a question previously posed by the system and the answer given by the user. See table above for the .items.presentation property. |
data |
A key value structure containing information to be used in the presentation of the historical process step. |
Post Command for Existing Application
Post commands from the list of available commands in GET /v2/market/objects/{id}/status
for the application and the current actor. Use this API to answer questions for the current user.
Request
Example
POST /v2/market/{marketObjectId}/applications/{id}
{
"etag": "2266536",
"command":
{
"type": "yes"
}
}
Parameters
Name |
Description |
id |
Id of the application. |
marketObjectId |
Id (local database id, guid or access key) of the market object found in the api /v2/market/objects property MarketObjects.id |
etag |
Identifier of the current application process step. If this is not the current id for the most current process step for the application a HTTP code 409 is thrown. This is used for preventing the scenario when a user is trying to post with old data. |
command |
Command to execute on the application for the current user. |
.command
Name |
Description |
type |
Type of command to execute on the application. E.g. yes or no . |
Response
(none)