People
Update an address
Update an existing address for a person
PATCH
/
v1
/
people
/
{person_id}
/
addresses
/
{id}
Update an address
curl --request PATCH \
--url https://api.slant.app/v1/people/{person_id}/addresses/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"line1": "456 Oak Ave",
"line2": "Apt 2B",
"city": "Boulder",
"state": "CO",
"zip": "80301",
"country_code": "US",
"address_type": "work",
"is_primary": true
}
'import requests
url = "https://api.slant.app/v1/people/{person_id}/addresses/{id}"
payload = {
"line1": "456 Oak Ave",
"line2": "Apt 2B",
"city": "Boulder",
"state": "CO",
"zip": "80301",
"country_code": "US",
"address_type": "work",
"is_primary": True
}
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({
line1: '456 Oak Ave',
line2: 'Apt 2B',
city: 'Boulder',
state: 'CO',
zip: '80301',
country_code: 'US',
address_type: 'work',
is_primary: true
})
};
fetch('https://api.slant.app/v1/people/{person_id}/addresses/{id}', 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.slant.app/v1/people/{person_id}/addresses/{id}",
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([
'line1' => '456 Oak Ave',
'line2' => 'Apt 2B',
'city' => 'Boulder',
'state' => 'CO',
'zip' => '80301',
'country_code' => 'US',
'address_type' => 'work',
'is_primary' => true
]),
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.slant.app/v1/people/{person_id}/addresses/{id}"
payload := strings.NewReader("{\n \"line1\": \"456 Oak Ave\",\n \"line2\": \"Apt 2B\",\n \"city\": \"Boulder\",\n \"state\": \"CO\",\n \"zip\": \"80301\",\n \"country_code\": \"US\",\n \"address_type\": \"work\",\n \"is_primary\": true\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.slant.app/v1/people/{person_id}/addresses/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"line1\": \"456 Oak Ave\",\n \"line2\": \"Apt 2B\",\n \"city\": \"Boulder\",\n \"state\": \"CO\",\n \"zip\": \"80301\",\n \"country_code\": \"US\",\n \"address_type\": \"work\",\n \"is_primary\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.slant.app/v1/people/{person_id}/addresses/{id}")
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 \"line1\": \"456 Oak Ave\",\n \"line2\": \"Apt 2B\",\n \"city\": \"Boulder\",\n \"state\": \"CO\",\n \"zip\": \"80301\",\n \"country_code\": \"US\",\n \"address_type\": \"work\",\n \"is_primary\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"person_id": "<string>",
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"country_code": "<string>",
"address_type": "<string>",
"is_primary": true
}{
"error": "invalid_json",
"detail": "<string>"
}{
"detail": "<string>"
}Authorizations
OAuth 2.0 Bearer Token from Clerk authentication
Body
application/json
⌘I
Update an address
curl --request PATCH \
--url https://api.slant.app/v1/people/{person_id}/addresses/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"line1": "456 Oak Ave",
"line2": "Apt 2B",
"city": "Boulder",
"state": "CO",
"zip": "80301",
"country_code": "US",
"address_type": "work",
"is_primary": true
}
'import requests
url = "https://api.slant.app/v1/people/{person_id}/addresses/{id}"
payload = {
"line1": "456 Oak Ave",
"line2": "Apt 2B",
"city": "Boulder",
"state": "CO",
"zip": "80301",
"country_code": "US",
"address_type": "work",
"is_primary": True
}
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({
line1: '456 Oak Ave',
line2: 'Apt 2B',
city: 'Boulder',
state: 'CO',
zip: '80301',
country_code: 'US',
address_type: 'work',
is_primary: true
})
};
fetch('https://api.slant.app/v1/people/{person_id}/addresses/{id}', 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.slant.app/v1/people/{person_id}/addresses/{id}",
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([
'line1' => '456 Oak Ave',
'line2' => 'Apt 2B',
'city' => 'Boulder',
'state' => 'CO',
'zip' => '80301',
'country_code' => 'US',
'address_type' => 'work',
'is_primary' => true
]),
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.slant.app/v1/people/{person_id}/addresses/{id}"
payload := strings.NewReader("{\n \"line1\": \"456 Oak Ave\",\n \"line2\": \"Apt 2B\",\n \"city\": \"Boulder\",\n \"state\": \"CO\",\n \"zip\": \"80301\",\n \"country_code\": \"US\",\n \"address_type\": \"work\",\n \"is_primary\": true\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.slant.app/v1/people/{person_id}/addresses/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"line1\": \"456 Oak Ave\",\n \"line2\": \"Apt 2B\",\n \"city\": \"Boulder\",\n \"state\": \"CO\",\n \"zip\": \"80301\",\n \"country_code\": \"US\",\n \"address_type\": \"work\",\n \"is_primary\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.slant.app/v1/people/{person_id}/addresses/{id}")
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 \"line1\": \"456 Oak Ave\",\n \"line2\": \"Apt 2B\",\n \"city\": \"Boulder\",\n \"state\": \"CO\",\n \"zip\": \"80301\",\n \"country_code\": \"US\",\n \"address_type\": \"work\",\n \"is_primary\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"person_id": "<string>",
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"country_code": "<string>",
"address_type": "<string>",
"is_primary": true
}{
"error": "invalid_json",
"detail": "<string>"
}{
"detail": "<string>"
}