Change your viewing schedule
curl --request PATCH \
--url https://staging.housera.ro/api/v1/account/viewing-schedule \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"hours": {},
"confirm_pending": true,
"blocked_dates": [
{
"from": "2023-12-25",
"to": "2023-12-25"
}
]
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://staging.housera.ro/api/v1/account/viewing-schedule",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'hours' => [
],
'confirm_pending' => true,
'blocked_dates' => [
[
'from' => '2023-12-25',
'to' => '2023-12-25'
]
]
]),
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;
}const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
hours: {},
confirm_pending: true,
blocked_dates: [{from: '2023-12-25', to: '2023-12-25'}]
})
};
fetch('https://staging.housera.ro/api/v1/account/viewing-schedule', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://staging.housera.ro/api/v1/account/viewing-schedule"
payload = {
"hours": {},
"confirm_pending": True,
"blocked_dates": [
{
"from": "2023-12-25",
"to": "2023-12-25"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"data": {
"saved": true,
"hours": {},
"duration_min": 123,
"buffer_min": 123,
"notice_min": 123,
"horizon_days": 123,
"confirmation": "<string>",
"blocked_dates": [
{
"from": "<string>",
"to": "<string>"
}
],
"effective": {
"duration_min": 123,
"buffer_min": 123,
"notice_min": 123,
"horizon_days": 123
},
"options": {
"duration_min": [
123
],
"buffer_min": [
123
],
"notice_min": [
123
],
"horizon_days": [
123
]
},
"listings_following": 123,
"confirmed_pending": {
"confirmed": 123,
"still_waiting": 123
}
}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"existing": {
"code": "<string>",
"external_ref": "<string>"
}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"existing": {
"code": "<string>",
"external_ref": "<string>"
}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"existing": {
"code": "<string>",
"external_ref": "<string>"
}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"existing": {
"code": "<string>",
"external_ref": "<string>"
}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"existing": {
"code": "<string>",
"external_ref": "<string>"
}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"errors": [
{
"pointer": "<string>",
"code": "<string>",
"detail": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"existing": {
"code": "<string>",
"external_ref": "<string>"
}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"existing": {
"code": "<string>",
"external_ref": "<string>"
}
}Viewings
Change your viewing schedule
Only the fields you send change; the others stay as they were. null brings back the default, and hours, when sent, replaces the whole week (a day left out is closed). With confirmation: auto and confirm_pending: true, the requests waiting on the listings that follow your setting are confirmed too, at most 100 at a time. The new hours reach the listings within moments; the answer does not wait for them.
PATCH
/
account
/
viewing-schedule
Change your viewing schedule
curl --request PATCH \
--url https://staging.housera.ro/api/v1/account/viewing-schedule \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"hours": {},
"confirm_pending": true,
"blocked_dates": [
{
"from": "2023-12-25",
"to": "2023-12-25"
}
]
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://staging.housera.ro/api/v1/account/viewing-schedule",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'hours' => [
],
'confirm_pending' => true,
'blocked_dates' => [
[
'from' => '2023-12-25',
'to' => '2023-12-25'
]
]
]),
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;
}const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
hours: {},
confirm_pending: true,
blocked_dates: [{from: '2023-12-25', to: '2023-12-25'}]
})
};
fetch('https://staging.housera.ro/api/v1/account/viewing-schedule', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://staging.housera.ro/api/v1/account/viewing-schedule"
payload = {
"hours": {},
"confirm_pending": True,
"blocked_dates": [
{
"from": "2023-12-25",
"to": "2023-12-25"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"data": {
"saved": true,
"hours": {},
"duration_min": 123,
"buffer_min": 123,
"notice_min": 123,
"horizon_days": 123,
"confirmation": "<string>",
"blocked_dates": [
{
"from": "<string>",
"to": "<string>"
}
],
"effective": {
"duration_min": 123,
"buffer_min": 123,
"notice_min": 123,
"horizon_days": 123
},
"options": {
"duration_min": [
123
],
"buffer_min": [
123
],
"notice_min": [
123
],
"horizon_days": [
123
]
},
"listings_following": 123,
"confirmed_pending": {
"confirmed": 123,
"still_waiting": 123
}
}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"existing": {
"code": "<string>",
"external_ref": "<string>"
}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"existing": {
"code": "<string>",
"external_ref": "<string>"
}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"existing": {
"code": "<string>",
"external_ref": "<string>"
}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"existing": {
"code": "<string>",
"external_ref": "<string>"
}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"existing": {
"code": "<string>",
"external_ref": "<string>"
}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"errors": [
{
"pointer": "<string>",
"code": "<string>",
"detail": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"existing": {
"code": "<string>",
"external_ref": "<string>"
}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"existing": {
"code": "<string>",
"external_ref": "<string>"
}
}Query Parameters
The response language, ro or en. It changes error messages (title, detail), labels and, when the listing has an approved translation in that language, its title and description. Codes are the same in every language. It takes precedence over Accept-Language and over the account's language.
Available options:
ro, en Body
application/json