Skip to main content
If your central systems already hold the list of sites and the equipment on each floor, you can push all of it with POST /v1/locations:sync instead of editing each location by hand. The operator console edits the same data, so use whichever suits your team: most organizations use the console, and a chain with its own systems uses the sync. Read Locations and equipment first: the sync sets the same baseline, locations and overrides described there. Set these two values once in your terminal. Every example in these docs reads them, so no example has a host or a key typed into it.
Use a test key (it starts with tf_test_) while you build. Never paste a live key into a page, a ticket or a chat. A key needs the locations:write scope.
A sync is a dry run until you send "dry_run": false, and a request is written whole or not at all. Only a location whose equipment changes sends a webhook.

The request

One request sets the baseline and creates or updates up to 100 locations:

Overrides as differences

Send a location’s overrides only where it differs from the baseline. A site that has exactly the baseline sends no overrides at all. When you later change the baseline, every location follows it, and each keeps its own overrides: an item a location marked missing stays out, and an item it added stays in.

Locations you leave out

A location that is not in the request is left exactly as it is. A sync never archives a location unless the request sends "archive_missing": true, and then it archives every active location the request does not list. Use it only when one request lists every location of the organization. With more than 100 locations, archive closed sites one at a time with DELETE /v1/locations/{location_external_id}. An archived location that a sync lists again becomes active, as a PUT does.

The answer

A dry run and an apply answer in the same shape; applied tells them apart. The dry run answers exactly what applying the same body would change.
200
Only locations whose equipment changes re-plan anyone. A change to a name, a count or a note re-plans nobody. The count is the same one the applied sync reports in each location’s location.inventory_changed webhook (teammates_affected): the teammates homed there now. Re-planning itself is not switched on yet; see Locations and equipment. When the same body is applied with "dry_run": false, each location whose equipment changed sends its own webhook:
location.inventory_changed

All or nothing

A request is applied whole or not at all. If one location is invalid, nothing is written, and the error lists every failing field at once, in the error format. Each field’s path points into your request, so locations[3].overrides[0].token is the first override of the fourth location you sent. An unknown equipment name carries suggestions, the closest known equipment.

Syncing more than 100 locations

Split the list into batches of 100. The sync is idempotent by external_id: sending the same batch again changes nothing, with no new revision, webhook or new plan. So a batch that failed on the network, or answered rate_limit_exceeded or a server error, can be sent again as it is. Send the baseline in a call of its own ("locations": []), then the locations in batches without it. Run the whole thing as a dry run first, look at the totals, then apply it.
A dry run writes nothing, so each dry-run batch compares with what is stored now. The baseline call’s dry run lists every location a baseline change reaches; the location batches after it still see the old baseline until you apply.