curl --request PATCH \
--url https://api.anhome.tuanle.dev/api/v1/me/notification-preferences \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email_enabled": true,
"invoice_updates": true,
"maintenance_updates": false,
"message_updates": true,
"push_enabled": false
}
'import requests
url = "https://api.anhome.tuanle.dev/api/v1/me/notification-preferences"
payload = {
"email_enabled": True,
"invoice_updates": True,
"maintenance_updates": False,
"message_updates": True,
"push_enabled": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
email_enabled: true,
invoice_updates: true,
maintenance_updates: false,
message_updates: true,
push_enabled: false
})
};
fetch('https://api.anhome.tuanle.dev/api/v1/me/notification-preferences', 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.anhome.tuanle.dev/api/v1/me/notification-preferences",
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([
'email_enabled' => true,
'invoice_updates' => true,
'maintenance_updates' => false,
'message_updates' => true,
'push_enabled' => false
]),
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.anhome.tuanle.dev/api/v1/me/notification-preferences"
payload := strings.NewReader("{\n \"email_enabled\": true,\n \"invoice_updates\": true,\n \"maintenance_updates\": false,\n \"message_updates\": true,\n \"push_enabled\": false\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.anhome.tuanle.dev/api/v1/me/notification-preferences")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"email_enabled\": true,\n \"invoice_updates\": true,\n \"maintenance_updates\": false,\n \"message_updates\": true,\n \"push_enabled\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.anhome.tuanle.dev/api/v1/me/notification-preferences")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email_enabled\": true,\n \"invoice_updates\": true,\n \"maintenance_updates\": false,\n \"message_updates\": true,\n \"push_enabled\": false\n}"
response = http.request(request)
puts response.read_body{
"data": {
"email_enabled": true,
"push_enabled": true,
"invoice_updates": true,
"maintenance_updates": true,
"message_updates": true,
"updated_at": "2023-11-07T05:31:56Z"
},
"request_id": "<string>",
"meta": {}
}{
"error": {
"message": "<string>",
"request_id": "<string>",
"fields": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"details": "<unknown>"
}
}{
"error": {
"message": "<string>",
"request_id": "<string>",
"fields": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"details": "<unknown>"
}
}{
"error": {
"message": "<string>",
"request_id": "<string>",
"fields": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"details": "<unknown>"
}
}{
"error": {
"message": "<string>",
"request_id": "<string>",
"fields": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"details": "<unknown>"
}
}{
"error": {
"message": "<string>",
"request_id": "<string>",
"fields": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"details": "<unknown>"
}
}{
"error": {
"message": "<string>",
"request_id": "<string>",
"fields": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"details": "<unknown>"
}
}{
"error": {
"message": "<string>",
"request_id": "<string>",
"fields": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"details": "<unknown>"
}
}{
"error": {
"message": "<string>",
"request_id": "<string>",
"fields": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"details": "<unknown>"
}
}{
"error": {
"message": "<string>",
"request_id": "<string>",
"fields": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"details": "<unknown>"
}
}Update owner notification preferences
Documents an AnHome API operation.
curl --request PATCH \
--url https://api.anhome.tuanle.dev/api/v1/me/notification-preferences \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email_enabled": true,
"invoice_updates": true,
"maintenance_updates": false,
"message_updates": true,
"push_enabled": false
}
'import requests
url = "https://api.anhome.tuanle.dev/api/v1/me/notification-preferences"
payload = {
"email_enabled": True,
"invoice_updates": True,
"maintenance_updates": False,
"message_updates": True,
"push_enabled": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
email_enabled: true,
invoice_updates: true,
maintenance_updates: false,
message_updates: true,
push_enabled: false
})
};
fetch('https://api.anhome.tuanle.dev/api/v1/me/notification-preferences', 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.anhome.tuanle.dev/api/v1/me/notification-preferences",
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([
'email_enabled' => true,
'invoice_updates' => true,
'maintenance_updates' => false,
'message_updates' => true,
'push_enabled' => false
]),
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.anhome.tuanle.dev/api/v1/me/notification-preferences"
payload := strings.NewReader("{\n \"email_enabled\": true,\n \"invoice_updates\": true,\n \"maintenance_updates\": false,\n \"message_updates\": true,\n \"push_enabled\": false\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.anhome.tuanle.dev/api/v1/me/notification-preferences")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"email_enabled\": true,\n \"invoice_updates\": true,\n \"maintenance_updates\": false,\n \"message_updates\": true,\n \"push_enabled\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.anhome.tuanle.dev/api/v1/me/notification-preferences")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email_enabled\": true,\n \"invoice_updates\": true,\n \"maintenance_updates\": false,\n \"message_updates\": true,\n \"push_enabled\": false\n}"
response = http.request(request)
puts response.read_body{
"data": {
"email_enabled": true,
"push_enabled": true,
"invoice_updates": true,
"maintenance_updates": true,
"message_updates": true,
"updated_at": "2023-11-07T05:31:56Z"
},
"request_id": "<string>",
"meta": {}
}{
"error": {
"message": "<string>",
"request_id": "<string>",
"fields": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"details": "<unknown>"
}
}{
"error": {
"message": "<string>",
"request_id": "<string>",
"fields": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"details": "<unknown>"
}
}{
"error": {
"message": "<string>",
"request_id": "<string>",
"fields": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"details": "<unknown>"
}
}{
"error": {
"message": "<string>",
"request_id": "<string>",
"fields": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"details": "<unknown>"
}
}{
"error": {
"message": "<string>",
"request_id": "<string>",
"fields": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"details": "<unknown>"
}
}{
"error": {
"message": "<string>",
"request_id": "<string>",
"fields": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"details": "<unknown>"
}
}{
"error": {
"message": "<string>",
"request_id": "<string>",
"fields": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"details": "<unknown>"
}
}{
"error": {
"message": "<string>",
"request_id": "<string>",
"fields": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"details": "<unknown>"
}
}{
"error": {
"message": "<string>",
"request_id": "<string>",
"fields": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"details": "<unknown>"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
JSON payload used to update owner notification preferences.
Request payload for owner update notification preferences.
email enabled value for owner update notification preferences request.
push enabled value for owner update notification preferences request.
invoice updates value for owner update notification preferences request.
maintenance updates value for owner update notification preferences request.
message updates value for owner update notification preferences request.
Response
Updated owner notification preferences; omitted fields keep their previous value
Endpoint-specific response payload. See the referenced schema for the resource fields.
Show child attributes
Show child attributes
Request correlation identifier returned from X-Request-Id or generated by the API.
Optional response metadata such as pagination limits, counts, or export context.