---
title: "Backfill device_mappings for a batch of assets"
method: POST
path: "/machine-to-machine/assets/backfill-device-mappings"
tags: ["Assets"]
---

# Backfill device_mappings for a batch of assets

`POST /machine-to-machine/assets/backfill-device-mappings`

## Request

- Base URL: `https://api.equipmentshare.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.equipmentshare.com/machine-to-machine/assets/backfill-device-mappings`
- Auth: HTTP bearer

Populates device_mappings from tracker_id and asset_tracker_assignments history. M2M authentication required. By default, skips assets that already have device_mappings populated. Use force=true to regenerate from history (preserves supplemental entries). Use dry_run=true to preview changes without writing.

## Request body

- BackfillDeviceMappingsRequest
  - `asset_ids` integer[], required
  - `dry_run` boolean
  - `force` boolean

## Response `200`

- BackfillDeviceMappingsResponse
  - `results` BackfillResult[]
    - `asset_id` integer
    - `devices_count` integer, nullable
    - `dry_run` boolean, nullable
    - `reason` string, nullable
    - `status` string
  - `summary` BackfillSummary
    - `error` integer
    - `populated` integer
    - `skipped` integer

---

[API](https://skmtc.dev/equipmentshare/apis/es-api.md) - [All operations](https://skmtc.dev/equipmentshare/apis/es-api/llms.txt) - [OpenAPI document](https://skmtc.dev/equipmentshare/apis/es-api/revisions/40651e1558ac?raw)
