MarketSubscriptions
A way for an logged in user to subscribe for notifications on certain market objects when they are published.
Get List of MarketSubscriptions for an logged in user
Returns a list of active market subscriptions on rental property ads for a logged in user.
Request
Example
GET /v2/market/subscriptions
Response
Example
{
"count": 1,
"items": [
{
"id": "7tbJ9mjt49YkM8XqjPpKH6KB",
"marketObjectType": "residential",
"priceMin": 1500.0000,
"priceMax": 4000.0000,
"sizeRoomsMin": 3.0000,
"sizeRoomsMax": 5.0000,
"sizeAreaMin": 100.0000,
"sizeAreaMax": 125.0000,
"areas": [
{
"id": "152ed189fc8b46dbaf893265505bec0f",
"displayName": "Centrum väst",
"parentId": "MtFTDCW9xchjfCcdVTQp9B6t",
"parentDisplayName": "Timrå"
},
{
"id": "d1416da26adc40f3b6ad8901ed309e66",
"displayName": "Centrum öst",
"parentId": "MtFTDCW9xchjfCcdVTQp9B6t",
"parentDisplayName": "Timrå"
}
],
"attributes": [
{
"id": "bYtCFgTKmGJydmfTRYHkPpgB",
"type": "balcony",
"displayName": "Balkongtyp",
"isNumber": false,
"IsText": false,
"isDate": false,
"isBool": false,
"isAlternative": true,
"alternatives": [
{
"id": "jDWJGJBvDXh8X4r9TyqgDF7K",
"type": "yes",
"value": "Standard"
},
{
"id": "GtCqqD6rVfkPbtrYq8Rw4BkV",
"type": "yesCorner",
"value": "Hörn"
},
{
"id": "FCVKpgrdy8YkMGRkBvcYg6Qp",
"type": "yesGlazed",
"value": "Inglasad"
}
]
},
{
"id": "xyVbHP9pM4rwd6FCpPcBvT7j",
"type": "balconyCompassPoint",
"displayName": "Balkong vädersträck",
"isNumber": false,
"IsText": false,
"isDate": false,
"isBool": false,
"isAlternative": true,
"alternatives": [
{
"id": "pMgYhTJxqVbq6gyGkdw6fjgt",
"type": "east",
"value": "Ö"
},
{
"id": "fkRhhjpTj7FQp6bVcgXdWCym",
"type": "southEast",
"value": "SÖ"
},
{
"id": "BT8vqF8KWJjH777TrfKB9FRR",
"type": "south",
"value": "S"
}
]
},
{
"id": "R7Y67DFBmDyP9Qj8KwyfbtTb",
"type": "lift",
"displayName": "Hiss",
"isNumber": false,
"IsText": false,
"isDate": false,
"isBool": true,
"isAlternative": false,
"value": "True"
}
]
}
]
}
Name |
Description |
count |
Total number of market subscriptions. |
id |
Identifier of the market subscription. |
marketObjectType |
Identification of the market object type for the subscription. |
priceMin |
Minimum price the market object can cost. |
priceMax |
Maximum price the market object can cost. |
sizeRoomsMin |
Minimum number of rooms for the market object. |
sizeRoomsMax |
Maximum number of rooms for the market object. |
sizeAreaMin |
Minimum size of the market object. |
sizeAreaMax |
Maximum size of the market object. |
areas |
Identifier of the area where the market object is located in. |
attributes |
List (List<MarketSubscriptionsAttributeListItem> ) of attributes such as balcony type, balcony compass point etc. the user has subscribed to. |
|
|
.areas
Name |
Description |
id |
Identifier of the area. |
displayName |
Display name of the area. |
parentId |
Id of the parent to the area. |
parentDisplayName |
Display name of the parent to the area. |
.MarketSubscriptionsAttributeListItem
Name |
Description |
id |
Unique identifier of the subscription attribute e.g. "bYtCFgTKmGJydmfTRYHkPpgB". |
type |
The attribute type's unique identifier e.g. "balconyCompassPoint", "internet". |
isNumber |
Indicates that the value subscribed to is numerical. |
isText |
Indicates that the value subscribed to is in text form. |
isDate |
Indicates that the value subscribed to is in date form. |
isBool |
Indicates that the value subscribed to is in boolean form. |
isAlternative |
Indicates that the value subscribed to is in the form of a list of alternatives. |
value |
The value or values the applicant has to subscribeed to. The property value can be a simple string e.g. "Malmö", a range of numbers or dates separated by the delimiter “;” e.g. “10;100” or “18-06-1999;18-06-2009” or a Boolean value e.g. “true”. The value property is intended to be used when the isNumber, isText, isData or isBool properties are true. |
alternatives |
List (List<MarketSubscriptionsAttributeAlternativeListItem> ) of attribute alternatives such as "yes", "yesFrench", "yesCorner", "yesGlazed" (balcony type) the user has subscribed to. Please note the list of alternatives is intended to be used in conjunction with the isAlternative property i.e. only used when the isAlternative property is true. |
.MarketSubscriptionsAttributeAlternativeListItem
Name |
Description |
id |
Unique identifier of the subscription attribute alternative e.g. "pMgYhTJxqVbq6gyGkdw6fjgt". |
type |
The attribute type's unique identifier e.g. "east", "southEast", "south". |
value |
The attribute alternative's value e.g. "Ö", "SÖ", "S". |
Get list of market objects types for use when posting a subscription
Returns a list of market object types for use when saving a subscription.
Request
Example
GET /v2/market/subscriptions/marketobjects/types
Response
Example
{
"count": 2,
"items": [
{
"id": "residential",
"displayName": "Bostad"
},
{
"id": "parking",
"displayName": "Fordonsplats"
}
]
}
Name |
Description |
count |
Total number of market object types. |
id |
Identifier of the market object type. |
|
|
Save a MarketSubscription for an logged in user
Saves a new market subscription on rental property ads for a logged in user.
Request
Example
PUT /v2/market/subscriptions/{id}
{
"marketObjectType": "residential",
"priceMax": "5000",
"sizeRoomsMin": "3",
"sizeAreaMin": "100",
"areas": "152ed189fc8b46dbaf893265505bec0f,d1416da26adc40f3b6ad8901ed309e66",
"attributes": [
{
"type": "balcony",
"isNumber": false,
"isText": false,
"isDate": false,
"isBool": false,
"isAlternative": true,
"value": "yes;yesCorner;yesGlazed"
},
{
"type": "balconyCompassPoint",
"isNumber": false,
"isText": false,
"isDate": false,
"isBool": false,
"isAlternative": true,
"value": "east;southEast;south"
},
{
"type": "lift",
"isNumber": false,
"isText": false,
"isDate": false,
"isBool": true,
"isAlternative": false,
"value": "true"
}
]
}
Parameters
Name |
Description |
id |
Required The market subscription's identifier (string), access key (string) or guid. If a subscription with the provided id exists the subscription will be updated otherwise a new subscription will be created. |
marketObjectType |
The market object type identifier. Allowed identification id's can be fetched using the GET /v2/market/subscriptions/marketobjects/types API documented above. |
priceMin |
Minimum price the market object can cost. |
priceMax |
Maximum price the market object can cost. |
sizeRoomsMin |
Minimum number of rooms for the market object. |
sizeRoomsMax |
Maximum number of rooms for the market object. |
sizeAreaMin |
Minimum size of the market object. |
sizeAreaMax |
Maximum size of the market object. |
areas |
Identifier of the area where the market object is located in. If multiple area identifiers is used then it must be separeted with a comma sign. The areas´s identifiers can be retrieved using the following api GET /v2/market/objects/areas |
attributes |
List (List<MarketSubscriptionsPutAttribute> ) of attributes such as balcony type, balcony compass point etc. the user wishes to subscribe to. |
.MarketSubscriptionsPutAttribute
Name |
Description |
type |
The attribute type's unique identifier e.g. "balconyCompassPoint", "internet". |
isNumber |
Indicates that the value to be subscribed is numerical. |
isText |
Indicates that the value to be subscribed is in text form. |
isDate |
Indicates that the value to be subscribed is in date form. |
isBool |
Indicates that the value to be subscribed is in Boolean form. |
isAlternative |
Indicates that the value to be subscribed is in the form of a list of alternatives. |
value |
The value or values the applicant wishes to subscribe to. The property value can be a simple string e.g. "municipalityName", a range of numbers or dates separated by the delimiter “;” e.g. “10;100” or “18-06-1999;18-06-2009”, a Boolean value e.g. “true” or a list of attribute alternatives separated by delimiter “;” e.g. “north;northeast;east”. |
Deletes a MarketSubscription for an logged in user
Deletes an existing market subscription on rental property ads for a logged in user.
Request
Example
DELETE /v2/market/subscriptions/{id}
Parameters
Name |
Description |
id |
Required The market subscription's identifier (string), access key (string) or guid. |