Skip to main content
PATCH
/
v1
/
worker-addresses
/
{id}
Update a worker address
curl --request PATCH \
  --url https://api.plane.com/v1/worker-addresses/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "place": "<string>",
  "correction": true,
  "starts": "<string>",
  "ends": "<string>",
  "line1": "<string>",
  "line2": "<string>",
  "city": "<string>",
  "state": "<string>",
  "postal_code": "<string>",
  "country": "<string>"
}
'
import requests

url = "https://api.plane.com/v1/worker-addresses/{id}"

payload = {
"place": "<string>",
"correction": True,
"starts": "<string>",
"ends": "<string>",
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"country": "<string>"
}
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({
place: '<string>',
correction: true,
starts: '<string>',
ends: '<string>',
line1: '<string>',
line2: '<string>',
city: '<string>',
state: '<string>',
postal_code: '<string>',
country: '<string>'
})
};

fetch('https://api.plane.com/v1/worker-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.plane.com/v1/worker-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([
'place' => '<string>',
'correction' => true,
'starts' => '<string>',
'ends' => '<string>',
'line1' => '<string>',
'line2' => '<string>',
'city' => '<string>',
'state' => '<string>',
'postal_code' => '<string>',
'country' => '<string>'
]),
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.plane.com/v1/worker-addresses/{id}"

payload := strings.NewReader("{\n \"place\": \"<string>\",\n \"correction\": true,\n \"starts\": \"<string>\",\n \"ends\": \"<string>\",\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"country\": \"<string>\"\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.plane.com/v1/worker-addresses/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"place\": \"<string>\",\n \"correction\": true,\n \"starts\": \"<string>\",\n \"ends\": \"<string>\",\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"country\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.plane.com/v1/worker-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 \"place\": \"<string>\",\n \"correction\": true,\n \"starts\": \"<string>\",\n \"ends\": \"<string>\",\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"country\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body

Parameters

id
string
required
ID of the worker address to update.
place
string
Correct this worker address so it points at another place already referenced by the same worker’s addresses.
correction
boolean
deprecated
Deprecated and ignored. Every PATCH to a worker address is a correction: it changes what the existing record claims, never records a new address.
starts
date
Correct the date this worker address became effective.
ends
date
Correct the date this worker address stopped being effective.
line1
string
Correct address line 1.
line2
string
Correct address line 2.
city
string
Correct city.
state
string
Correct state, province, or subdivision.
postal_code
string
Correct postal code.
country
string
Correct two-letter country code.

Returns

Returns the updated Worker address object.
Use POST /v1/worker-addresses when the worker has moved or a new effective row should be created. Use PATCH only when the existing row or place reference was recorded incorrectly — every PATCH is a correction. Field corrections update the shared place and affect every worker address and location that points at it.
Date corrections cascade to the adjacent record. When the corrected date is a boundary shared with the previous or next address of the same purpose, that record’s matching date moves with it.