Skip to main content
PATCH
/
addresses
/
{address_id}
Update address information by id
curl --request PATCH \
  --url https://api-sandbox.synctera.com/v0/addresses/{address_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "address_line_1": "100 Main St.",
  "address_line_2": "Suite 99",
  "city": "New York",
  "country_code": "US",
  "is_active": true,
  "is_registered_agent": true,
  "nickname": "Home",
  "postal_code": "28620",
  "state": "NY"
}
'
import requests

url = "https://api-sandbox.synctera.com/v0/addresses/{address_id}"

payload = {
"address_line_1": "100 Main St.",
"address_line_2": "Suite 99",
"city": "New York",
"country_code": "US",
"is_active": True,
"is_registered_agent": True,
"nickname": "Home",
"postal_code": "28620",
"state": "NY"
}
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({
address_line_1: '100 Main St.',
address_line_2: 'Suite 99',
city: 'New York',
country_code: 'US',
is_active: true,
is_registered_agent: true,
nickname: 'Home',
postal_code: '28620',
state: 'NY'
})
};

fetch('https://api-sandbox.synctera.com/v0/addresses/{address_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-sandbox.synctera.com/v0/addresses/{address_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([
'address_line_1' => '100 Main St.',
'address_line_2' => 'Suite 99',
'city' => 'New York',
'country_code' => 'US',
'is_active' => true,
'is_registered_agent' => true,
'nickname' => 'Home',
'postal_code' => '28620',
'state' => 'NY'
]),
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-sandbox.synctera.com/v0/addresses/{address_id}"

payload := strings.NewReader("{\n \"address_line_1\": \"100 Main St.\",\n \"address_line_2\": \"Suite 99\",\n \"city\": \"New York\",\n \"country_code\": \"US\",\n \"is_active\": true,\n \"is_registered_agent\": true,\n \"nickname\": \"Home\",\n \"postal_code\": \"28620\",\n \"state\": \"NY\"\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-sandbox.synctera.com/v0/addresses/{address_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"address_line_1\": \"100 Main St.\",\n \"address_line_2\": \"Suite 99\",\n \"city\": \"New York\",\n \"country_code\": \"US\",\n \"is_active\": true,\n \"is_registered_agent\": true,\n \"nickname\": \"Home\",\n \"postal_code\": \"28620\",\n \"state\": \"NY\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api-sandbox.synctera.com/v0/addresses/{address_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 \"address_line_1\": \"100 Main St.\",\n \"address_line_2\": \"Suite 99\",\n \"city\": \"New York\",\n \"country_code\": \"US\",\n \"is_active\": true,\n \"is_registered_agent\": true,\n \"nickname\": \"Home\",\n \"postal_code\": \"28620\",\n \"state\": \"NY\"\n}"

response = http.request(request)
puts response.read_body
{
  "creation_date": "2019-01-01T00:00:00Z",
  "is_active": true,
  "last_updated_time": "2010-05-06T12:23:34.321Z",
  "address_line_1": "100 Main St.",
  "country_code": "US",
  "id": "7d943c51-e4ff-4e57-9558-08cab6b963c7",
  "business_id": "7d943c51-e4ff-4e57-9558-08cab6b963c7",
  "customer_id": "7d943c51-e4ff-4e57-9558-08cab6b963c7",
  "address_line_2": "Suite 99",
  "address_type": "SHIPPING",
  "city": "New York",
  "is_registered_agent": true,
  "nickname": "Home",
  "postal_code": "28620",
  "state": "NY"
}
{
"code": "BAD_REQUEST_BODY",
"detail": "missing required fields: first_name, dob",
"status": 400,
"title": "Bad Request Body",
"type": "https://dev.synctera.com/errors/bad-request-body"
}
{
"code": "BAD_REQUEST_BODY",
"detail": "missing required fields: first_name, dob",
"status": 400,
"title": "Bad Request Body",
"type": "https://dev.synctera.com/errors/bad-request-body"
}
{
"code": "BAD_REQUEST_BODY",
"detail": "missing required fields: first_name, dob",
"status": 400,
"title": "Bad Request Body",
"type": "https://dev.synctera.com/errors/bad-request-body"
}
{
"code": "BAD_REQUEST_BODY",
"detail": "missing required fields: first_name, dob",
"status": 400,
"title": "Bad Request Body",
"type": "https://dev.synctera.com/errors/bad-request-body"
}
{
"code": "BAD_REQUEST_BODY",
"detail": "missing required fields: first_name, dob",
"status": 400,
"title": "Bad Request Body",
"type": "https://dev.synctera.com/errors/bad-request-body"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

address_id
string<uuid>
required

ID of the address

Example:

"1a582c51-e4ff-4e57-9558-08cab6b963aa"

Body

application/json

Address patch details

address_line_1
string

Street address line 1

Example:

"100 Main St."

address_line_2
string

Street address line 2

Example:

"Suite 99"

city
string

City

Example:

"New York"

country_code
string

ISO-3166-1 Alpha-2 country code

Pattern: ^[A-Z]{2}$
Example:

"US"

is_active
boolean

Whether the address is active or not

Example:

true

is_registered_agent
boolean

Indicates whether an address is a registered agent. Omitted if the address is not a registered agent.

Example:

true

nickname
string

A nickname for the address. This is used to identify the address in the UI.

Example:

"Home"

postal_code
string

Postal code. For US, formats of 12345 or 12345-1234 are accepted. For CA, formats of A1A 1A1 or A1A1A1 (regardless of case) are accepted, and will be converted to A1A 1A1 format.

Example:

"28620"

state
string

State, region, province, or prefecture. This is the ISO-3166-2 subdivision code, excluding the country prefix. For example, TX for Texas USA or TAM for Tamaulipas Mexico. Its length varies by country, e.g. 2 characters for US, 3 for MX.

Example:

"NY"

Response

Updated address information

creation_date
string<date-time>
required

Date and time when the address was created.

Example:

"2019-01-01T00:00:00Z"

is_active
boolean
required

Whether the address is active or not

Example:

true

last_updated_time
string<date-time>
required
Example:

"2010-05-06T12:23:34.321Z"

address_line_1
string
required

Street address line 1

Example:

"100 Main St."

country_code
string
required

ISO-3166-1 Alpha-2 country code

Pattern: ^[A-Z]{2}$
Example:

"US"

id
string<uuid>
required
read-only

The unique identifier for this resource.

Example:

"7d943c51-e4ff-4e57-9558-08cab6b963c7"

business_id
string<uuid>

The identifier for the business customer associated with address.

Example:

"7d943c51-e4ff-4e57-9558-08cab6b963c7"

customer_id
string<uuid>

The identifier for the personal customer associated with address.

Example:

"7d943c51-e4ff-4e57-9558-08cab6b963c7"

address_line_2
string

Street address line 2

Example:

"Suite 99"

address_type
enum<string>
read-only

Specifies the address type.

Available options:
BILLING,
LEGAL,
OPERATING,
OTHER,
SHIPPING
Example:

"SHIPPING"

city
string

City

Example:

"New York"

is_registered_agent
boolean

Indicates whether an address is a registered agent. Omitted if the address is not a registered agent.

Example:

true

nickname
string

A nickname for the address. This is used to identify the address in the UI.

Example:

"Home"

postal_code
string

Postal code. For US, formats of 12345 or 12345-1234 are accepted. For CA, formats of A1A 1A1 or A1A1A1 (regardless of case) are accepted, and will be converted to A1A 1A1 format.

Example:

"28620"

state
string

State, region, province, or prefecture. This is the ISO-3166-2 subdivision code, excluding the country prefix. For example, TX for Texas USA or TAM for Tamaulipas Mexico. Its length varies by country, e.g. 2 characters for US, 3 for MX.

Example:

"NY"