devices
Register, manipulate, and retrieve devices.
POST /devices
Register a new device
Fields
| Field | Type | Description | Required |
|---|---|---|---|
| token | The registrationId/token that registering for messages returns | NO | |
| platform | Device platform ios|android | YES | |
| language | User language | YES | |
| version | Application version | YES | |
| favoritesMergeKey | NO |
Request
Headers
| Header | Value |
|---|---|
| Accept | application/vnd.nybolig.v1+json
application/hal+json
application/json |
| Content-Type | application/vnd.nybolig.v1+json
application/json |
Body
{
"token": "The registrationId/token that registering for messages returns.",
"platform": "Device platform ios|android",
"language": "User language",
"version": "Application version"
}
Response
Status Codes
- 406: Not Acceptable
- 415: Unsupported Media Type
- 201: Created
- 400: Client Error
- 422: Unprocessable Entity
Headers
| Header | Value |
|---|---|
| Content-Type | application/vnd.nybolig.v1+json
application/hal+json
application/json |
| Allow | Comma-separated list of all HTTP methods allowed |
Body
{
"_links": {
"self": {
"href": "/devices[/:device_id]"
}
}
"token": "The registrationId/token that registering for messages returns.",
"platform": "Device platform ios|android",
"language": "User language",
"version": "Application version"
}
GET /devices[/:device_id]
Retrieve a device.
Fields
| Field | Type | Description | Required |
|---|---|---|---|
| token | The registrationId/token that registering for messages returns | NO | |
| platform | Device platform ios|android | YES | |
| language | User language | YES | |
| version | Application version | YES | |
| favoritesMergeKey | NO |
Request
Headers
| Header | Value |
|---|---|
| Accept | application/vnd.nybolig.v1+json
application/hal+json
application/json |
Response
Status Codes
- 406: Not Acceptable
- 415: Unsupported Media Type
- 200: OK
- 404: Not Found
Headers
| Header | Value |
|---|---|
| Content-Type | application/vnd.nybolig.v1+json
application/hal+json
application/json |
| Allow | Comma-separated list of all HTTP methods allowed |
Body
{
"_links": {
"self": {
"href": "/devices[/:device_id]"
}
}
"token": "The registrationId/token that registering for messages returns",
"platform": "Device platform ios|android",
"language": "User language",
"version": "Application version"
}
PATCH /devices[/:device_id]
Update a device.
Fields
| Field | Type | Description | Required |
|---|---|---|---|
| token | The registrationId/token that registering for messages returns | NO | |
| platform | Device platform ios|android | YES | |
| language | User language | YES | |
| version | Application version | YES | |
| favoritesMergeKey | NO |
Request
Headers
| Header | Value |
|---|---|
| Accept | application/vnd.nybolig.v1+json
application/hal+json
application/json |
| Content-Type | application/vnd.nybolig.v1+json
application/json |
Body
{
"token": "The registrationId/token that registering for messages returns",
"platform": "Device platform ios|android",
"language": "User language",
"version": "Application version"
}
Response
Status Codes
- 406: Not Acceptable
- 415: Unsupported Media Type
- 200: OK
- 404: Not Found
- 400: Client Error
- 422: Unprocessable Entity
Headers
| Header | Value |
|---|---|
| Content-Type | application/vnd.nybolig.v1+json
application/hal+json
application/json |
| Allow | Comma-separated list of all HTTP methods allowed |
Body
{
"_links": {
"self": {
"href": "/devices[/:device_id]"
}
}
"token": "The registrationId/token that registering for messages returns",
"platform": "Device platform ios|android",
"language": "User language",
"version": "Application version"
}
PUT /devices[/:device_id]
Create a device on specific identifier.
Fields
| Field | Type | Description | Required |
|---|---|---|---|
| token | The registrationId/token that registering for messages returns | NO | |
| platform | Device platform ios|android | YES | |
| language | User language | YES | |
| version | Application version | YES | |
| favoritesMergeKey | NO |
Request
Headers
| Header | Value |
|---|---|
| Accept | application/vnd.nybolig.v1+json
application/hal+json
application/json |
| Content-Type | application/vnd.nybolig.v1+json
application/json |
Body
{
"token": "The registrationId/token that registering for messages returns",
"platform": "Device platform ios|android",
"language": "User language",
"version": "Application version"
}
Response
Status Codes
- 406: Not Acceptable
- 415: Unsupported Media Type
- 200: OK
- 404: Not Found
- 400: Client Error
- 422: Unprocessable Entity
- 409: Conflict
Headers
| Header | Value |
|---|---|
| Content-Type | application/vnd.nybolig.v1+json
application/hal+json
application/json |
| Allow | Comma-separated list of all HTTP methods allowed |
Body
{
"_links": {
"self": {
"href": "/devices[/:device_id]"
}
}
"token": "The registrationId/token that registering for messages returns",
"platform": "Device platform ios|android",
"language": "User language",
"version": "Application version"
}
}
searches
Save, update and retrieve searches for a registered device.
POST /devices[/:device_id]/searches
Create a new search.
Fields
| Field | Type | Description | Required |
|---|---|---|---|
| title | Search title. | NO | |
| street | Property street name. | NO | |
| zipcode | Property zip code. | NO | |
| place | Property place name. | NO | |
| municipality | Property municipality. | NO | |
| fullAddress | Full property address. | NO | |
| geoFence | Search area boundaries. Polygon (must contain at least 4 points, every point should have "lat" and "lon" keys, point values should be numbers, start and end points should match) | NO | |
| isNearMeSearch | Should only search for properties that are near me. | NO | |
| nearMeDistance | Search radius for nearby properties. | NO | |
| propertyType | Property type. | NO | |
| priceMin | Property min price. | NO | |
| priceMax | Property max price. | NO | |
| areaHousingMin | Property area min housing. | NO | |
| areaHousingMax | Property area max housing. | NO | |
| roomAmountMin | Property min room amount. | NO | |
| groundAreaMin | Property ground area lower bound. | NO | |
| yearBuiltMin | Property year of construction lower bound. | NO | |
| yearBuiltMax | Property year of construction upper bound. | NO | |
| openHouse | Is open house enabled for the property. | NO | |
| notifications | Should notifications be enabled. | NO |
Request
Headers
| Header | Value |
|---|---|
| Accept | application/vnd.nybolig.v1+json
application/hal+json
application/json |
| Content-Type | application/vnd.nybolig.v1+json
application/json |
Body
{
"title": "Search title.",
"street": "Property street name.",
"zipcode": "Property zip code.",
"place": "Property place name.",
"municipality": "Property municipality.",
"fullAddress": "Full property address.",
"geoFence": [{"lat":0,"lon":0},{"lat":1,"lon":1},{"lat":2,"lon":2},{"lat":0,"lon":0}],
"isNearMeSearch": "Should only search for properties that are near me.",
"nearMeDistance": "Search radius for nearby properties.",
"propertyType": "Property type.",
"priceMin": "Property min price.",
"priceMax": "Property max price.",
"areaHousingMin": "Property area min housing.",
"areaHousingMax": "Property area max housing.",
"roomAmountMin": "Property min room amount.",
"groundAreaMin": "Property ground area lower bound.",
"yearBuiltMin": "Property year of construction lower bound.",
"yearBuiltMax": "Property year of construction upper bound.",
"openHouse": "Is open house enabled for the property.",
"notifications": "Should notifications be enabled."
}
Response
Status Codes
- 406: Not Acceptable
- 415: Unsupported Media Type
- 201: Created
- 400: Client Error
- 422: Unprocessable Entity
Headers
| Header | Value |
|---|---|
| Content-Type | application/vnd.nybolig.v1+json
application/hal+json
application/json |
| Allow | Comma-separated list of all HTTP methods allowed |
Body
{
"_links": {
"self": {
"href": "/devices[/:device_id]/searches[/:search_id]"
}
}
"id": "Search id.",
"title": "Search title.",
"street": "Property street name.",
"zipcode": "Property zip code.",
"place": "Property place name.",
"municipality": "Property municipality.",
"fullAddress": "Full property address.",
"geoFence": [{"lat":0,"lon":0},{"lat":1,"lon":1},{"lat":2,"lon":2},{"lat":0,"lon":0}],
"isNearMeSearch": "Should only search for properties that are near me.",
"nearMeDistance": "Search radius for nearby properties.",
"propertyType": "Property type.",
"priceMin": "Property min price.",
"priceMax": "Property max price.",
"areaHousingMin": "Property area min housing.",
"areaHousingMax": "Property area max housing.",
"roomAmountMin": "Property min room amount.",
"groundAreaMin": "Property ground area lower bound.",
"yearBuiltMin": "Property year of construction lower bound.",
"yearBuiltMax": "Property year of construction upper bound.",
"openHouse": "Is open house enabled for the property.",
"notifications": "Should notifications be enabled."
}
GET /devices[/:device_id]/searches
Get a list of searches for a device.
Fields
| Field | Type | Description | Required |
|---|---|---|---|
| title | Search title. | NO | |
| street | Property street name. | NO | |
| zipcode | Property zip code. | NO | |
| place | Property place name. | NO | |
| municipality | Property municipality. | NO | |
| fullAddress | Full property address. | NO | |
| geoFence | Search area boundaries. Polygon (must contain at least 4 points, every point should have "lat" and "lon" keys, point values should be numbers, start and end points should match) | NO | |
| isNearMeSearch | Should only search for properties that are near me. | NO | |
| nearMeDistance | Search radius for nearby properties. | NO | |
| propertyType | Property type. | NO | |
| priceMin | Property min price. | NO | |
| priceMax | Property max price. | NO | |
| areaHousingMin | Property area min housing. | NO | |
| areaHousingMax | Property area max housing. | NO | |
| roomAmountMin | Property min room amount. | NO | |
| groundAreaMin | Property ground area lower bound. | NO | |
| yearBuiltMin | Property year of construction lower bound. | NO | |
| yearBuiltMax | Property year of construction upper bound. | NO | |
| openHouse | Is open house enabled for the property. | NO | |
| notifications | Should notifications be enabled. | NO |
Request
Headers
| Header | Value |
|---|---|
| Accept | application/vnd.nybolig.v1+json
application/hal+json
application/json |
Response
Status Codes
- 406: Not Acceptable
- 415: Unsupported Media Type
- 200: OK
Headers
| Header | Value |
|---|---|
| Content-Type | application/vnd.nybolig.v1+json
application/hal+json
application/json |
| Allow | Comma-separated list of all HTTP methods allowed |
Body
{
"_links": {
"self": {
"href": "/devices[/:device_id]/searches"
},
"first": {
"href": "/devices[/:device_id]/searches?page={page}"
},
"prev": {
"href": "/devices[/:device_id]/searches?page={page}"
},
"next": {
"href": "/devices[/:device_id]/searches?page={page}"
},
"last": {
"href": "/devices[/:device_id]/searches?page={page}"
}
}
"_embedded": {
"searches": [
{
"_links": {
"self": {
"href": "/devices[/:device_id]/searches[/:search_id]"
}
}
"id": "Search id.",
"title": "Search title.",
"street": "Property street name.",
"zipcode": "Property zip code.",
"place": "Property place name.",
"municipality": "Property municipality.",
"fullAddress": "Full property address.",
"geoFence": [{"lat":0,"lon":0},{"lat":1,"lon":1},{"lat":2,"lon":2},{"lat":0,"lon":0}],
"isNearMeSearch": "Should only search for properties that are near me.",
"nearMeDistance": "Search radius for nearby properties.",
"propertyType": "Property type.",
"priceMin": "Property min price.",
"priceMax": "Property max price.",
"areaHousingMin": "Property area min housing.",
"areaHousingMax": "Property area max housing.",
"roomAmountMin": "Property min room amount.",
"groundAreaMin": "Property ground area lower bound.",
"yearBuiltMin": "Property year of construction lower bound.",
"yearBuiltMax": "Property year of construction upper bound.",
"openHouse": "Is open house enabled for the property.",
"notifications": "Should notifications be enabled."
}
]
}
}
PATCH /devices[/:device_id]/searches[/:search_id]
Update search parameters.
Fields
| Field | Type | Description | Required |
|---|---|---|---|
| title | Search title. | NO | |
| street | Property street name. | NO | |
| zipcode | Property zip code. | NO | |
| place | Property place name. | NO | |
| municipality | Property municipality. | NO | |
| fullAddress | Full property address. | NO | |
| geoFence | Search area boundaries. Polygon (must contain at least 4 points, every point should have "lat" and "lon" keys, point values should be numbers, start and end points should match) | NO | |
| isNearMeSearch | Should only search for properties that are near me. | NO | |
| nearMeDistance | Search radius for nearby properties. | NO | |
| propertyType | Property type. | NO | |
| priceMin | Property min price. | NO | |
| priceMax | Property max price. | NO | |
| areaHousingMin | Property area min housing. | NO | |
| areaHousingMax | Property area max housing. | NO | |
| roomAmountMin | Property min room amount. | NO | |
| groundAreaMin | Property ground area lower bound. | NO | |
| yearBuiltMin | Property year of construction lower bound. | NO | |
| yearBuiltMax | Property year of construction upper bound. | NO | |
| openHouse | Is open house enabled for the property. | NO | |
| notifications | Should notifications be enabled. | NO |
Request
Headers
| Header | Value |
|---|---|
| Accept | application/vnd.nybolig.v1+json
application/hal+json
application/json |
| Content-Type | application/vnd.nybolig.v1+json
application/json |
Body
{
"title": "Search title.",
"street": "Property street name.",
"zipcode": "Property zip code.",
"place": "Property place name.",
"municipality": "Property municipality.",
"fullAddress": "Full property address.",
"geoFence": [{"lat":0,"lon":0},{"lat":1,"lon":1},{"lat":2,"lon":2},{"lat":0,"lon":0}],
"isNearMeSearch": "Should only search for properties that are near me.",
"nearMeDistance": "Search radius for nearby properties.",
"propertyType": "Property type.",
"priceMin": "Property min price.",
"priceMax": "Property max price.",
"areaHousingMin": "Property area min housing.",
"areaHousingMax": "Property area max housing.",
"roomAmountMin": "Property min room amount.",
"groundAreaMin": "Property ground area lower bound.",
"yearBuiltMin": "Property year of construction lower bound.",
"yearBuiltMax": "Property year of construction upper bound.",
"openHouse": "Is open house enabled for the property.",
"notifications": "Should notifications be enabled."
}
Response
Status Codes
- 406: Not Acceptable
- 415: Unsupported Media Type
- 200: OK
- 404: Not Found
- 400: Client Error
- 422: Unprocessable Entity
Headers
| Header | Value |
|---|---|
| Content-Type | application/vnd.nybolig.v1+json
application/hal+json
application/json |
| Allow | Comma-separated list of all HTTP methods allowed |
Body
{
"_links": {
"self": {
"href": "/devices[/:device_id]/searches[/:search_id]"
}
}
"title": "Search title.",
"street": "Property street name.",
"zipcode": "Property zip code.",
"place": "Property place name.",
"municipality": "Property municipality.",
"fullAddress": "Full property address.",
"geoFence": [{"lat":0,"lon":0},{"lat":1,"lon":1},{"lat":2,"lon":2},{"lat":0,"lon":0}],
"isNearMeSearch": "Should only search for properties that are near me.",
"nearMeDistance": "Search radius for nearby properties.",
"propertyType": "Property type.",
"priceMin": "Property min price.",
"priceMax": "Property max price.",
"areaHousingMin": "Property area min housing.",
"areaHousingMax": "Property area max housing.",
"roomAmountMin": "Property min room amount.",
"groundAreaMin": "Property ground area lower bound.",
"yearBuiltMin": "Property year of construction lower bound.",
"yearBuiltMax": "Property year of construction upper bound.",
"openHouse": "Is open house enabled for the property.",
"notifications": "Should notifications be enabled."
}
DELETE /devices[/:device_id]/searches[/:search_id]
Remove saved search.
Fields
| Field | Type | Description | Required |
|---|---|---|---|
| title | Search title. | NO | |
| street | Property street name. | NO | |
| zipcode | Property zip code. | NO | |
| place | Property place name. | NO | |
| municipality | Property municipality. | NO | |
| fullAddress | Full property address. | NO | |
| geoFence | Search area boundaries. Polygon (must contain at least 4 points, every point should have "lat" and "lon" keys, point values should be numbers, start and end points should match) | NO | |
| isNearMeSearch | Should only search for properties that are near me. | NO | |
| nearMeDistance | Search radius for nearby properties. | NO | |
| propertyType | Property type. | NO | |
| priceMin | Property min price. | NO | |
| priceMax | Property max price. | NO | |
| areaHousingMin | Property area min housing. | NO | |
| areaHousingMax | Property area max housing. | NO | |
| roomAmountMin | Property min room amount. | NO | |
| groundAreaMin | Property ground area lower bound. | NO | |
| yearBuiltMin | Property year of construction lower bound. | NO | |
| yearBuiltMax | Property year of construction upper bound. | NO | |
| openHouse | Is open house enabled for the property. | NO | |
| notifications | Should notifications be enabled. | NO |
Request
Headers
| Header | Value |
|---|---|
| Accept | application/vnd.nybolig.v1+json
application/hal+json
application/json |
Response
Status Codes
- 406: Not Acceptable
- 415: Unsupported Media Type
- 204: No Content
- 404: Not Found
Headers
| Header | Value |
|---|---|
| Content-Type | application/vnd.nybolig.v1+json
application/hal+json
application/json |
| Allow | Comma-separated list of all HTTP methods allowed |
favorites
Manipulate, add and list favorites
GET /devices[/:device_id]/favorites
List of favored properties.
Fields
| Field | Type | Description | Required |
|---|---|---|---|
| propertyId | Property identification | YES | |
| rating | Hearts count | YES |
Request
Headers
| Header | Value |
|---|---|
| Accept | application/vnd.nybolig.v1+json
application/hal+json
application/json |
Response
Status Codes
- 406: Not Acceptable
- 415: Unsupported Media Type
- 200: OK
Headers
| Header | Value |
|---|---|
| Content-Type | application/vnd.nybolig.v1+json
application/hal+json
application/json |
| Allow | Comma-separated list of all HTTP methods allowed |
Body
{
"_links": {
"self": {
"href": "/devices/:device_id/favorites"
},
"first": {
"href": "/devices/:device_id/favorites?page={page}"
},
"prev": {
"href": "/devices/:device_id/favorites?page={page}"
},
"next": {
"href": "/devices/:device_id/favorites?page={page}"
},
"last": {
"href": "/devices/:device_id/favorites?page={page}"
}
}
"_embedded": {
"favorites": [
{
"_links": {
"self": {
"href": "/devices/:device_id/favorites[/:property_id]"
}
},
"property_id": "Property identification",
"rating": "Hearts count"
}
]
}
}
POST /devices[/:device_id]/favorites
Add a new favorite.
Fields
| Field | Type | Description | Required |
|---|---|---|---|
| propertyId | Property identification | YES | |
| rating | Hearts count | YES |
Request
Headers
| Header | Value |
|---|---|
| Accept | application/vnd.nybolig.v1+json
application/hal+json
application/json |
| Content-Type | application/vnd.nybolig.v1+json
application/json |
Body
{
"propertyId": "Property identification",
"rating": "Hearts count"
}
Response
Status Codes
- 406: Not Acceptable
- 415: Unsupported Media Type
- 201: Created
- 400: Client Error
- 422: Unprocessable Entity
Headers
| Header | Value |
|---|---|
| Content-Type | application/vnd.nybolig.v1+json
application/hal+json
application/json |
| Allow | Comma-separated list of all HTTP methods allowed |
Body
{
"_links": {
"self": {
"href": "/devices/:device_id/favorites[/:property_id]"
}
},
"propertyId": "Property identification",
"rating": "Hearts count"
}
PATCH /devices[/:device_id]/favorites[/:property_id]
Update favored item rating.
Fields
| Field | Type | Description | Required |
|---|---|---|---|
| propertyId | Property identification | YES | |
| rating | Hearts count | YES |
Request
Headers
| Header | Value |
|---|---|
| Accept | application/vnd.nybolig.v1+json
application/hal+json
application/json |
| Content-Type | application/vnd.nybolig.v1+json
application/json |
Body
{
"rating": "Hearts count"
}
Response
Status Codes
- 406: Not Acceptable
- 415: Unsupported Media Type
- 200: OK
- 404: Not Found
- 400: Client Error
- 422: Unprocessable Entity
Headers
| Header | Value |
|---|---|
| Content-Type | application/vnd.nybolig.v1+json
application/hal+json
application/json |
| Allow | Comma-separated list of all HTTP methods allowed |
Body
{
"_links": {
"self": {
"href": "/devices/:device_id/favorites[/:property_id]"
}
},
"propertyId": "Property identification",
"rating": "Hearts count"
}
DELETE /devices[/:device_id]/favorites[/:property_id]
Remove favored item.
Fields
| Field | Type | Description | Required |
|---|---|---|---|
| propertyId | Property identification | YES | |
| rating | Hearts count | YES |
Request
Headers
| Header | Value |
|---|---|
| Accept | application/vnd.nybolig.v1+json
application/hal+json
application/json |
Response
Status Codes
- 406: Not Acceptable
- 415: Unsupported Media Type
- 204: No Content
- 404: Not Found
Headers
| Header | Value |
|---|---|
| Content-Type | application/vnd.nybolig.v1+json
application/hal+json
application/json |
| Allow | Comma-separated list of all HTTP methods allowed |