Skip to main content
PUT
/
tenants
/
update-tenant
/
{tenantId}
Update Tenant
curl --request PUT \
  --url https://api.skortorent.com/api/v1/tenants/update-tenant/{tenantId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "email": "jsmith@example.com",
  "fname": "<string>",
  "lname": "<string>",
  "dni_nie": "<string>",
  "passport_id": "<string>",
  "post_code": "<string>",
  "dob": "2023-12-25",
  "current_annual_income": 1,
  "currency": "<string>",
  "phone_number": "<string>",
  "protected_housing_docs": [
    "<string>"
  ],
  "about_me": "<string>"
}
'
import requests

url = "https://api.skortorent.com/api/v1/tenants/update-tenant/{tenantId}"

payload = {
"email": "jsmith@example.com",
"fname": "<string>",
"lname": "<string>",
"dni_nie": "<string>",
"passport_id": "<string>",
"post_code": "<string>",
"dob": "2023-12-25",
"current_annual_income": 1,
"currency": "<string>",
"phone_number": "<string>",
"protected_housing_docs": ["<string>"],
"about_me": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
email: 'jsmith@example.com',
fname: '<string>',
lname: '<string>',
dni_nie: '<string>',
passport_id: '<string>',
post_code: '<string>',
dob: '2023-12-25',
current_annual_income: 1,
currency: '<string>',
phone_number: '<string>',
protected_housing_docs: ['<string>'],
about_me: '<string>'
})
};

fetch('https://api.skortorent.com/api/v1/tenants/update-tenant/{tenantId}', 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.skortorent.com/api/v1/tenants/update-tenant/{tenantId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'email' => 'jsmith@example.com',
'fname' => '<string>',
'lname' => '<string>',
'dni_nie' => '<string>',
'passport_id' => '<string>',
'post_code' => '<string>',
'dob' => '2023-12-25',
'current_annual_income' => 1,
'currency' => '<string>',
'phone_number' => '<string>',
'protected_housing_docs' => [
'<string>'
],
'about_me' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.skortorent.com/api/v1/tenants/update-tenant/{tenantId}"

payload := strings.NewReader("{\n \"email\": \"jsmith@example.com\",\n \"fname\": \"<string>\",\n \"lname\": \"<string>\",\n \"dni_nie\": \"<string>\",\n \"passport_id\": \"<string>\",\n \"post_code\": \"<string>\",\n \"dob\": \"2023-12-25\",\n \"current_annual_income\": 1,\n \"currency\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"protected_housing_docs\": [\n \"<string>\"\n ],\n \"about_me\": \"<string>\"\n}")

req, _ := http.NewRequest("PUT", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.put("https://api.skortorent.com/api/v1/tenants/update-tenant/{tenantId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"jsmith@example.com\",\n \"fname\": \"<string>\",\n \"lname\": \"<string>\",\n \"dni_nie\": \"<string>\",\n \"passport_id\": \"<string>\",\n \"post_code\": \"<string>\",\n \"dob\": \"2023-12-25\",\n \"current_annual_income\": 1,\n \"currency\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"protected_housing_docs\": [\n \"<string>\"\n ],\n \"about_me\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.skortorent.com/api/v1/tenants/update-tenant/{tenantId}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"jsmith@example.com\",\n \"fname\": \"<string>\",\n \"lname\": \"<string>\",\n \"dni_nie\": \"<string>\",\n \"passport_id\": \"<string>\",\n \"post_code\": \"<string>\",\n \"dob\": \"2023-12-25\",\n \"current_annual_income\": 1,\n \"currency\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"protected_housing_docs\": [\n \"<string>\"\n ],\n \"about_me\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "status": "success",
  "message": "<string>",
  "data": {}
}
{
"status": "error",
"message": "<string>"
}
{
"status": "error",
"message": "<string>"
}
{
"status": "error",
"message": "<string>"
}
{
"status": "error",
"message": "<string>"
}

Authorizations

Authorization
string
header
required

HTTP Bearer Authentication. Pass the token generated via /keys/generate-token as Authorization: Bearer <token>.

Path Parameters

tenantId
string
required

Body

application/json
email
string<email>
fname
string
lname
string
dni_nie
string

Either dni_nie or passport_id is required. At least one of these identification fields must be provided.

passport_id
string

Either dni_nie or passport_id is required. At least one of these identification fields must be provided.

post_code
string

Postal code (numbers only)

Required string length: 5
dob
string<date>
employment_status
enum<string>
Available options:
employed,
self_employed,
student,
unemployed,
retired,
public_servant
employment_category
enum<string>
Available options:
public_servant,
military,
permanent,
temporary,
permanent_seasonal_worker,
paternity_or_maternity_leave,
medical_leave,
ownACompany,
freelancer
current_annual_income
number
Required range: x >= 0
currency
string
Required string length: 3
phone_number
string

Phone number (numbers only)

Required string length: 6 - 15
protected_housing_docs
string[]
about_me
string

Response

Successful response

status
enum<string>
Available options:
success
message
string
data
object