People
Create an address for a person
Add a new address to an existing person
POST
/
v1
/
people
/
{person_id}
/
addresses
Create an address for a person
curl --request POST \
--url https://api.slant.app/v1/people/{person_id}/addresses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"line1": "123 Main St",
"line2": "Apt 4B",
"city": "New York",
"state": "NY",
"zip": "10001",
"country_code": "US",
"address_type": "home",
"is_primary": true
}
'import requests
url = "https://api.slant.app/v1/people/{person_id}/addresses"
payload = {
"line1": "123 Main St",
"line2": "Apt 4B",
"city": "New York",
"state": "NY",
"zip": "10001",
"country_code": "US",
"address_type": "home",
"is_primary": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
line1: '123 Main St',
line2: 'Apt 4B',
city: 'New York',
state: 'NY',
zip: '10001',
country_code: 'US',
address_type: 'home',
is_primary: true
})
};
fetch('https://api.slant.app/v1/people/{person_id}/addresses', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'line1' => '123 Main St',
'line2' => 'Apt 4B',
'city' => 'New York',
'state' => 'NY',
'zip' => '10001',
'country_code' => 'US',
'address_type' => 'home',
'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"
payload := strings.NewReader("{\n \"line1\": \"123 Main St\",\n \"line2\": \"Apt 4B\",\n \"city\": \"New York\",\n \"state\": \"NY\",\n \"zip\": \"10001\",\n \"country_code\": \"US\",\n \"address_type\": \"home\",\n \"is_primary\": true\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.slant.app/v1/people/{person_id}/addresses")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"line1\": \"123 Main St\",\n \"line2\": \"Apt 4B\",\n \"city\": \"New York\",\n \"state\": \"NY\",\n \"zip\": \"10001\",\n \"country_code\": \"US\",\n \"address_type\": \"home\",\n \"is_primary\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.slant.app/v1/people/{person_id}/addresses")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"line1\": \"123 Main St\",\n \"line2\": \"Apt 4B\",\n \"city\": \"New York\",\n \"state\": \"NY\",\n \"zip\": \"10001\",\n \"country_code\": \"US\",\n \"address_type\": \"home\",\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
Path Parameters
The person ID
Body
application/json
⌘I
Create an address for a person
curl --request POST \
--url https://api.slant.app/v1/people/{person_id}/addresses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"line1": "123 Main St",
"line2": "Apt 4B",
"city": "New York",
"state": "NY",
"zip": "10001",
"country_code": "US",
"address_type": "home",
"is_primary": true
}
'import requests
url = "https://api.slant.app/v1/people/{person_id}/addresses"
payload = {
"line1": "123 Main St",
"line2": "Apt 4B",
"city": "New York",
"state": "NY",
"zip": "10001",
"country_code": "US",
"address_type": "home",
"is_primary": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
line1: '123 Main St',
line2: 'Apt 4B',
city: 'New York',
state: 'NY',
zip: '10001',
country_code: 'US',
address_type: 'home',
is_primary: true
})
};
fetch('https://api.slant.app/v1/people/{person_id}/addresses', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'line1' => '123 Main St',
'line2' => 'Apt 4B',
'city' => 'New York',
'state' => 'NY',
'zip' => '10001',
'country_code' => 'US',
'address_type' => 'home',
'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"
payload := strings.NewReader("{\n \"line1\": \"123 Main St\",\n \"line2\": \"Apt 4B\",\n \"city\": \"New York\",\n \"state\": \"NY\",\n \"zip\": \"10001\",\n \"country_code\": \"US\",\n \"address_type\": \"home\",\n \"is_primary\": true\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.slant.app/v1/people/{person_id}/addresses")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"line1\": \"123 Main St\",\n \"line2\": \"Apt 4B\",\n \"city\": \"New York\",\n \"state\": \"NY\",\n \"zip\": \"10001\",\n \"country_code\": \"US\",\n \"address_type\": \"home\",\n \"is_primary\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.slant.app/v1/people/{person_id}/addresses")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"line1\": \"123 Main St\",\n \"line2\": \"Apt 4B\",\n \"city\": \"New York\",\n \"state\": \"NY\",\n \"zip\": \"10001\",\n \"country_code\": \"US\",\n \"address_type\": \"home\",\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>"
}