Onboarding state
curl --request GET \
--url https://api.example.com/api/v1/onboarding/stateimport requests
url = "https://api.example.com/api/v1/onboarding/state"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/v1/onboarding/state', 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/onboarding/state",
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/onboarding/state"
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/onboarding/state")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/onboarding/state")
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_bodyOnboarding
Onboarding state
Read the authenticated user’s onboarding progress (resume oracle).
GET
/
api
/
v1
/
onboarding
/
state
Onboarding state
curl --request GET \
--url https://api.example.com/api/v1/onboarding/stateimport requests
url = "https://api.example.com/api/v1/onboarding/state"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/v1/onboarding/state', 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/onboarding/state",
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/onboarding/state"
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/onboarding/state")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/onboarding/state")
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 authenticated user’s current position in the four-step onboarding flow. The mobile client calls this on app launch and after every disconnect to know where to resume the user — it is the resume oracle for the onboarding state machine.currentStep is the step the user is currently expected to submit next. Once onboardingStatus becomes COMPLETE, currentStep is set to null and all onboarding step endpoints return 409 STATE_CONFLICT. From that point further edits go through the post-onboarding surfaces (/current-home/me, /preferences/me).
Authentication
Bearer <accessToken> required. Scope: user.
Path parameters
None.Query parameters
None.Request body
None.Response — 200 OK
| Field | Type | Allowed values | Example |
|---|---|---|---|
onboardingStatus | enum | IN_PROGRESS, COMPLETE | IN_PROGRESS |
currentStep | integer | null | 1, 2, 3, 4, or null when status is COMPLETE | 3 |
tenancyStatus | enum | NOT_SUBMITTED, PENDING, APPROVED, REJECTED | PENDING |
Example response
{
"onboardingStatus": "IN_PROGRESS", // enum: "IN_PROGRESS" | "COMPLETE"
"currentStep": 3, // integer 1..4 or null when COMPLETE
"tenancyStatus": "PENDING" // enum: "NOT_SUBMITTED" | "PENDING" | "APPROVED" | "REJECTED"
}
Error responses
| Status | Code | Meaning |
|---|---|---|
| 401 | UNAUTHENTICATED | Missing, malformed, or expired access token. |
| 404 | NOT_FOUND | User not found (token references a deleted account). |
Example error — 401
{
"type": "https://api.swappr.co.uk/errors/unauthenticated",
"title": "Authentication required",
"status": 401,
"code": "UNAUTHENTICATED",
"detail": "Authenticated user required",
"instance": "/api/v1/onboarding/state",
"requestId": "01HZQ7K3M4N5P6Q7R8S9T0V1W2"
}
Side effects
None — this is a pure read.See also
- Onboarding state machine — the full lifecycle diagram.
- Step 1 — tenancy
- Step 2 — current home
- Step 3 — photos
- Step 3 — description
- Step 4 — desired home
curl
curl -X GET https://api.swappr.co.uk/api/v1/onboarding/state \
-H "Authorization: Bearer $ACCESS_TOKEN"