PATCH
/
api
/
v1
/
onboarding
/
step-3-description
Onboarding step 3 — description
curl --request PATCH \
  --url https://api.example.com/api/v1/onboarding/step-3-description
import 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_body

Overview

Submits the listing’s free-text description. This is the companion to step 3 — photos: both must be present before currentStep 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 100..150 characters inclusive (deliberate — short enough for one card, long enough to be more than a tweet). Preconditions:
  • currentStep is exactly 3.
  • 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

FieldTypeRequiredAllowed values / ConstraintsExample
descriptionstringyes100..150 characters inclusiveBright 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.
FieldTypeAllowed valuesExample
onboardingStatusenumIN_PROGRESS, COMPLETEIN_PROGRESS
currentStepinteger | nulladvances to 44
tenancyStatusenumunchangedPENDING

Example response

{
  "onboardingStatus": "IN_PROGRESS",
  "currentStep": 4,
  "tenancyStatus": "PENDING"
}

Error responses

StatusCodeMeaning
400VALIDATION_FAILEDDescription is shorter than 100 or longer than 150 characters.
401UNAUTHENTICATEDMissing, malformed, or expired access token.
409STATE_CONFLICTcurrentStep 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.description to 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."
  }'