> ## Documentation Index
> Fetch the complete documentation index at: https://docs.now-os.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Floor plan import

> One-shot onboarding: push your canvas, get the table-id mapping back.

At onboarding, push your floor plan once with
`POST /api/provider/v1/floorplan/import`. NowOS creates the **draft**
(rooms, tables, decorations — the canvas is coordinate-compatible) and
the response hands you the mapping you need:

```json theme={null}
{
  "rooms": [{ "externalRoomId": "room-12", "roomId": "…", "name": "Terrasse" }],
  "mapping": [
    { "externalTableId": "t-991", "tableId": "8c0f…", "label": "T12" }
  ]
}
```

Persist `tableId` against your own table records (EatNow:
`pos_table_id`) **in the same transaction as the import call** — it is
the only table reference every other endpoint and webhook uses. There is
no manual mapping screen anywhere.

The flow end to end:

1. `POST /floorplan/import` → store the mapping.
2. The operator reviews and **publishes** the plan in the NowOS
   backoffice (the import only fills the draft).
3. You receive `floorplan.published` → `GET /floorplan` and verify your
   mapping still resolves (published tables can be renamed or
   deactivated, never deleted).

Rules:

* The import is refused with `draft_not_empty` when the location already
  has rooms — re-send with `"replaceDraft": true` to overwrite a draft
  that was never published.
* After the **first publish**, the import path closes permanently
  (published table ids may already be referenced by orders and by your
  reservations). Later corrections happen in the backoffice editor.
* Geometry: abstract canvas units (default room 1000×1000), tables carry
  `x`/`y`/`rotation`, the footprint derives from `shape` + `seatCount`.
