---
title: "Associates rules with a device"
method: POST
path: "/associations/v3/devices/{trackingId}/batchCreate"
tags: ["Associations"]
---

# Associates rules with a device

`POST /associations/v3/devices/{trackingId}/batchCreate`

Associates rules with the device `trackingId`.

## Request body

- object — Body containing arrays of ruleIds and geofenceIds to associate with the shipment or device.
  - `geofenceIds` string[], required — Array of geofence IDs
  - `ruleIds` string[], required — Array of rule IDs

## Response `201`

Successful

Device has been associated with provided rules.

## 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/revisions/efa162f7023c/schema)
