Get my preferences
curl --request GET \
--url https://api.example.com/api/v1/preferences/meimport requests
url = "https://api.example.com/api/v1/preferences/me"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/v1/preferences/me', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/v1/preferences/me",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/preferences/me"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/v1/preferences/me")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/preferences/me")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyPreferences
Get my preferences
Return the authenticated user’s match preferences.
GET
/
api
/
v1
/
preferences
/
me
Get my preferences
curl --request GET \
--url https://api.example.com/api/v1/preferences/meimport requests
url = "https://api.example.com/api/v1/preferences/me"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/v1/preferences/me', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/v1/preferences/me",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/preferences/me"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/v1/preferences/me")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/preferences/me")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyOverview
Returns the caller’suser_preferences document — the “desired home” filter persisted at onboarding step 4 and editable thereafter via PUT /preferences/me.
Returns 404 NOT_FOUND if the user has not yet completed onboarding step 4 (i.e. the document was never created). Once created the document always exists; there is no soft-delete for preferences.
This is a pure read — no preferences write, no match.recompute enqueue.
Authentication
Bearer <accessToken> required. Scope: user.
Path parameters
None.Query parameters
None.Request body
None.Response — 200 OK
| Field | Type | Notes | Example |
|---|---|---|---|
preferences | object | See Preferences object. |
Preferences object
| Field | Type | Allowed values / Notes | Example |
|---|---|---|---|
id | string | 24-char ObjectId of the preferences document. | 66400a8f1c2b4d5e6f7a8f00 |
userId | string | 24-char ObjectId of the owner (the caller). | 66400a8f1c2b4d5e6f7a8b00 |
desiredPropertyTypes | string[] | Non-empty subset of: DETACHED, SEMI_DETACHED, TERRACED, FLAT, MAISONETTE, BUNGALOW, STUDIO. | ["FLAT", "MAISONETTE"] |
minBedrooms | integer | 0..10. Always <= maxBedrooms. | 1 |
maxBedrooms | integer | 0..10. Always >= minBedrooms. | 3 |
maxRent | object | { amountMinor: integer > 0, frequency: "WEEKLY" | "MONTHLY" }. | { "amountMinor": 150000, "frequency": "MONTHLY" } |
maxRentMonthlyMinor | integer | Server-derived monthly pence (weekly → amountMinor * 52 / 12 rounded). Used by the matcher. | 150000 |
preferredLocations | object[] | 1..5 entries. See PreferredLocation object. | |
searchRadiusMiles | integer | One of: 0, 1, 3, 5, 10, 25. (0 means “exact postcode only”.) | 5 |
desiredFeatures | string[] | Possibly-empty subset of: GARDEN, PARKING, BALCONY, LIFT, GROUND_FLOOR, PETS_ALLOWED, WHEELCHAIR_ACCESS, NEW_BUILD. | ["BALCONY"] |
createdAt | string | ISO 8601 UTC with ms precision. | 2026-05-22T14:32:08.412Z |
updatedAt | string | ISO 8601 UTC with ms precision. | 2026-05-22T14:32:08.412Z |
PreferredLocation object
The server stores locations as GeoJSON Points internally and returns them in the same shape on the wire.| Field | Type | Notes / Constraints | Example |
|---|---|---|---|
label | string | 1..200 chars. Human-readable area name. | Camden, London |
location | object | { type: "Point", coordinates: [lng, lat] }. WGS-84 decimal degrees, longitude first. | { "type": "Point", "coordinates": [-0.1426, 51.5390] } |
postcode | string | null | 1..16 chars, or null when the user selected an area rather than a postcode. | NW1 7JE |
Example response
{
"preferences": {
"id": "66400a8f1c2b4d5e6f7a8f00",
"userId": "66400a8f1c2b4d5e6f7a8b00",
"desiredPropertyTypes": [
"FLAT", // enum (multi): "DETACHED" | "SEMI_DETACHED" | "TERRACED" | "FLAT" | "MAISONETTE" | "BUNGALOW" | "STUDIO"
"MAISONETTE"
],
"minBedrooms": 1, // integer 0..10
"maxBedrooms": 3, // integer 0..10
"maxRent": {
"amountMinor": 150000, // integer pence; 150000 = £1,500.00
"frequency": "MONTHLY" // enum: "WEEKLY" | "MONTHLY"
},
"maxRentMonthlyMinor": 150000,
"preferredLocations": [
{
"label": "Camden, London",
"location": {
"type": "Point",
"coordinates": [-0.1426, 51.5390] // [lng, lat] WGS-84
},
"postcode": "NW1 7JE" // string | null
}
],
"searchRadiusMiles": 5, // enum: 0 | 1 | 3 | 5 | 10 | 25
"desiredFeatures": [
"BALCONY" // enum (multi): "GARDEN" | "PARKING" | "BALCONY" | "LIFT" | "GROUND_FLOOR" | "PETS_ALLOWED" | "WHEELCHAIR_ACCESS" | "NEW_BUILD"
],
"createdAt": "2026-05-22T14:30:00.123Z",
"updatedAt": "2026-05-22T14:32:08.412Z"
}
}
Error responses
| Status | Code | Meaning |
|---|---|---|
| 401 | UNAUTHENTICATED | Missing, malformed, or expired access token. |
| 404 | NOT_FOUND | The user has no user_preferences document yet (onboarding step 4 has not been completed). |
Example error — 404
{
"type": "https://api.swappr.co.uk/errors/not-found",
"title": "Not found",
"status": 404,
"code": "NOT_FOUND",
"detail": "No preferences for user",
"instance": "/api/v1/preferences/me",
"requestId": "01HZQ7K3M4N5P6Q7R8S9T0V1W2"
}
Side effects
None — this is a pure read.See also
- Replace my preferences
- Step 4 — desired home — creates the document.
- Publish listing
curl
curl -X GET https://api.swappr.co.uk/api/v1/preferences/me \
-H "Authorization: Bearer $ACCESS_TOKEN"