---
title: "Updates rules associations for devices"
method: PUT
path: "/associations/v3/devices/batchUpdate"
tags: ["Associations"]
---

# Updates rules associations for devices

`PUT /associations/v3/devices/batchUpdate`

Updates rules associated with devices.

## Request body

- object — Body containing arrays of ruleIds and geofenceIds to disassociate (oldRules) from and associate (newRules) to the devices identified in trackingIds array.
  - `newRules` object, required — Rules to be associated to the devices
    - `geofenceIds` string[], required — Array of geofence IDs
    - `ruleIds` string[], required — Array of rule IDs
  - `oldRules` object, required — Rules to be disassociated from the devices
    - `geofenceIds` string[], required — Array of geofence IDs
    - `ruleIds` string[], required — Array of rule IDs
  - `trackingIds` string[], required — Array of tracking IDs (external IDs are also permitted here)

## Response `201`

Successful (no content)

## Other responses

- `400` — Bad request The request object is in an incorrect format or has values that are invalid or out of range. If available, further error details are provided in the response body.
- `401` — Unauthorized The request did not provide correct authentication details
- `403` — Forbidden The account does not have the correct privileges

---

[API](https://skmtc.net/here/apis/tracking.md) · [All operations](https://skmtc.net/here/apis/tracking/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/here/tracking/versions/efa162f7023c/schema)
