Onboarding step 3 — description
curl --request PATCH \
--url https://api.example.com/api/v1/onboarding/step-3-descriptionimport requests
url = "https://api.example.com/api/v1/onboarding/step-3-description"
response = requests.patch(url)
print(response.text)const options = {method: 'PATCH'};
fetch('https://api.example.com/api/v1/onboarding/step-3-description', 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/step-3-description",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
]);
$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/step-3-description"
req, _ := http.NewRequest("PATCH", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.example.com/api/v1/onboarding/step-3-description")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/onboarding/step-3-description")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
response = http.request(request)
puts response.read_bodyOnboarding
Onboarding step 3 — description
Submit the listing description. Companion to step 3 — photos.
PATCH
/
api
/
v1
/
onboarding
/
step-3-description
Onboarding step 3 — description
curl --request PATCH \
--url https://api.example.com/api/v1/onboarding/step-3-descriptionimport requests
url = "https://api.example.com/api/v1/onboarding/step-3-description"
response = requests.patch(url)
print(response.text)const options = {method: 'PATCH'};
fetch('https://api.example.com/api/v1/onboarding/step-3-description', 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/step-3-description",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
]);
$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/step-3-description"
req, _ := http.NewRequest("PATCH", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.example.com/api/v1/onboarding/step-3-description")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/onboarding/step-3-description")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
response = http.request(request)
puts response.read_bodyOverview
Submits the listing’s free-text description. This is the companion to step 3 — photos: both must be present beforecurrentStep advances to 4.
Saving the description sets currentStep = 4. Photos must already be on the listing — submitting the description first returns 409 STATE_CONFLICT.
The description is constrained to 50..150 characters inclusive (deliberate — short enough for one card, long enough to be more than a tweet).
Preconditions:
currentStepis exactly3.- A step-2 listing exists with at least one photo (i.e. step-3-photos has already fired).
Authentication
Bearer <accessToken> required. Scope: user.
Path parameters
None.Query parameters
None.Request body
| Field | Type | Required | Allowed values / Constraints | Example |
|---|---|---|---|---|
description | string | yes | 50..150 characters inclusive | Bright 2-bed flat in Camden, two minutes from the tube, recently refurbished kitchen, south-facing balcony with a view of the canal. |
Example payload
{
"description": "Bright 2-bed flat in Camden, two minutes from the tube, recently refurbished kitchen, south-facing balcony with a view of the canal."
}
Response — 200 OK
Returns the refreshed onboarding state.currentStep advances to 4.
| Field | Type | Allowed values | Example |
|---|---|---|---|
onboardingStatus | enum | IN_PROGRESS, COMPLETE | IN_PROGRESS |
currentStep | integer | null | advances to 4 | 4 |
tenancyStatus | enum | unchanged | PENDING |
Example response
{
"onboardingStatus": "IN_PROGRESS",
"currentStep": 4,
"tenancyStatus": "PENDING"
}
Error responses
| Status | Code | Meaning |
|---|---|---|
| 400 | VALIDATION_FAILED | Description is shorter than 100 or longer than 150 characters. |
| 401 | UNAUTHENTICATED | Missing, malformed, or expired access token. |
| 409 | STATE_CONFLICT | currentStep is not 3, the step-2 listing is missing, or no photos have been submitted yet. |
Example error — 400
{
"type": "https://api.swappr.co.uk/errors/validation-failed",
"title": "Validation failed",
"status": 400,
"code": "VALIDATION_FAILED",
"detail": "Request body failed validation",
"instance": "/api/v1/onboarding/step-3-description",
"requestId": "01HZQ7K3M4N5P6Q7R8S9T0V1W2",
"errors": [
{ "path": "description", "message": "Too small: expected string to have >=100 characters", "code": "too_small" }
]
}
Side effects
- Sets
current_homes.descriptionto the submitted text. - Sets
users.currentStep = 4.
See also
curl
curl -X PATCH https://api.swappr.co.uk/api/v1/onboarding/step-3-description \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"description": "Bright 2-bed flat in Camden, two minutes from the tube, recently refurbished kitchen, south-facing balcony with a view of the canal."
}'