Skip to main content
PATCH
/
addresses
/
{id}
Update an address
curl --request PATCH \
  --url https://api.samsara.com/addresses/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "addressTypes": [
    "yard"
  ],
  "contactIds": [
    "22408"
  ],
  "externalIds": {
    "maintenanceId": "250020",
    "payrollId": "ABFS18600"
  },
  "formattedAddress": "350 Rhode Island St, San Francisco, CA",
  "geofence": {
    "settings": {
      "showAddresses": false
    }
  },
  "latitude": 37.765363,
  "longitude": -122.4029238,
  "name": "Samsara HQ",
  "notes": "Hours of operation: 8am - 6pm; Truck entrance on the Rhode Island street side.",
  "tagIds": [
    "3914"
  ]
}
'
{
  "data": {
    "formattedAddress": "350 Rhode Island St, San Francisco, CA",
    "geofence": {
      "circle": {
        "radiusMeters": 25,
        "latitude": 37.765363,
        "longitude": -122.4029238
      },
      "polygon": {
        "vertices": [
          {
            "latitude": 37.765363,
            "longitude": -122.403098
          },
          {
            "latitude": 38.765363,
            "longitude": -122.403098
          },
          {
            "latitude": 37.765363,
            "longitude": -123.403098
          }
        ]
      },
      "settings": {
        "showAddresses": false
      }
    },
    "id": "22408",
    "name": "Samsara HQ",
    "addressTypes": [
      "yard"
    ],
    "contacts": [
      {
        "firstName": "Jane",
        "id": "22408",
        "lastName": "Jones"
      }
    ],
    "createdAtTime": "2019-05-18T20:27:35Z",
    "externalIds": {
      "maintenanceId": "250020",
      "payrollId": "ABFS18600"
    },
    "latitude": 37.765363,
    "longitude": -122.4029238,
    "notes": "Hours of operation: 8am - 6pm; Truck entrance on the Rhode Island street side.",
    "tags": [
      {
        "id": "3914",
        "name": "East Coast",
        "parentTagId": "4815"
      }
    ]
  }
}

Documentation Index

Fetch the complete documentation index at: https://samsara-showcase.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

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

Path Parameters

id
string
required

ID of the Address. This can either be the Samsara-provided ID or an external ID. External IDs are customer-specified key-value pairs created in the POST or PATCH requests of this resource. To specify an external ID as part of a path parameter, use the following format: key:value. For example, crmId:abc123

Body

application/json

The address fields to update.

A request body to update an Address.

addressTypes
enum<string>[]

Reporting location type associated with the address (used for ELD reporting purposes). Valid values: yard, shortHaul, workforceSite, riskZone, industrialSite, alertsOnly, agricultureSource, avoidanceZone, knownGPSJammingZone, authorizedZone, unauthorizedZone, vendor, inventory.

Available options:
yard,
shortHaul,
workforceSite,
riskZone,
industrialSite,
alertsOnly,
agricultureSource,
avoidanceZone,
knownGPSJammingZone,
authorizedZone,
unauthorizedZone,
vendor,
inventory
contactIds
string[]

An array of Contact IDs associated with this Address.

externalIds
object

The external IDs for the given object.

Example:
{
"maintenanceId": "250020",
"payrollId": "ABFS18600"
}
formattedAddress
string

The full street address for this address/geofence, as it might be recognized by Google Maps.

Maximum string length: 1024
Example:

"350 Rhode Island St, San Francisco, CA"

geofence
object

The geofence that defines this address and its bounds. This can either be a circle or a polygon, but not both.

latitude
number<double>

Latitude of the address. Will be geocoded from formattedAddress if not provided.

Example:

37.765363

longitude
number<double>

Longitude of the address. Will be geocoded from formattedAddress if not provided.

Example:

-122.4029238

name
string

Name of the address.

Maximum string length: 255
Example:

"Samsara HQ"

notes
string

Notes about the address.

Maximum string length: 280
Example:

"Hours of operation: 8am - 6pm; Truck entrance on the Rhode Island street side."

tagIds
string[]

An array of IDs of tags to associate with this address.

Response

Updated address object with ID.

An Address response body.

data
object
required

An Address object.