SmartGare
API referenceEndpoints

Declare a station's floor plan

Replaces the station's whole plan — its floors by level and the outline of each placed unit. An identical declaration writes nothing and answers changed false. A unit whose drawn surface departs from its recorded one beyond the tolerance is warned about; the plan is saved. **Required permission:** `referential.commercial-unit:write`

PUT/referential/v1/stations/{stationId}/floor-plan

Replaces the station's whole plan — its floors by level and the outline of each placed unit. An identical declaration writes nothing and answers changed false. A unit whose drawn surface departs from its recorded one beyond the tolerance is warned about; the plan is saved.

Required permission: referential.commercial-unit:write

AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

body*DeclareFloorPlanRequest

Response Body

*/*

curl -X PUT "https://example.com/referential/v1/stations/{stationId}/floor-plan" \  -H "Content-Type: application/json" \  -d '{    "floors": [      {        "drawing_svg": "string",        "height_m": 0,        "level": 0,        "name": "string",        "width_m": 0      }    ],    "placements": [      {        "commercial_unit_id": "string",        "level": 0,        "outline": [          {            "x": 0.1,            "y": 0.1          }        ]      }    ]  }'
{  "changed": true,  "plan": {    "floors": [      {        "drawing_svg": "string",        "height_m": 0,        "id": "string",        "level": 0,        "name": "string",        "sample": true,        "width_m": 0      }    ],    "placements": [      {        "commercial_unit_id": "string",        "drawn_m2": 0,        "floor_id": "string",        "level": 0,        "outline": [          {            "x": 0.1,            "y": 0.1          }        ]      }    ],    "station_id": "string"  },  "warnings": [    {      "commercial_unit_id": "string",      "drawn_m2": 0,      "recorded_m2": 0,      "unit_name": "string"    }  ]}