Skip to content
Sign in Sign up

A building's units

GETapi.baseray.ai/v1/buildings/{building_id}/units

The units a building's record lists (flats, shops, parking spaces, storage), each with its number, name or door, its floor as the record words it and as a kind and number, and its entrance, kind, use, area, rooms and cadastral number where the record states them. unit finds units by their number or name ("275" finds 275, "Ap. 275" and "Parcare 275", never 1275); without it the list comes a page at a time. meta.list_is_complete is false when the record states a total that differs from its list: a unit missing from the list may then still exist. A building with no units listed has unknown units, never none. Costs what opening the building costs: free once opened.

Requires an API key. How to authenticate.

Path parameters

building_idstring (uuid)required
The building's baseray id, a UUID returned by the other building endpoints.

Query parameters

unitstring1–100 characters
The number or name of the unit(s) to find, e.g. 275, 12A or Parcare 3; 1 to 100 characters.
limitinteger1–500default 200
Units per page, 1 to 500. Default 200.
offsetinteger0–100000default 0
Matched units to skip, 0 to 100,000. Default 0.

Response 200

OK

dataarray of BuildingUnitrequired
The page of matched units, by number, then by name.
designationstring or nullrequired
The unit's number, name or door as the record writes it, e.g. 275, Parcare 12.
floorstring or nullrequired
The floor as the record words it, e.g. P, ETAJ 7; null when the record names none for the unit.
floor_kindbasement | semi_basement | ground | upper | attic or nullrequired
Which kind of floor it is on; null when not known.
floor_numberinteger or nullrequired
Basements and upper floors only, counted from 1.
entrancestring or nullrequired
The entrance the unit is reached by, as the record names it.
kinddwelling | commercial | parking | storage | other or nullrequired
dwelling, commercial, parking, storage or other; null when the record gives none.
usestring or nullrequired
The use the record states for the unit, in its wording.
area_m2number or nullrequired≥ 0
The unit's area as the record states it.
roomsinteger or nullrequired≥ 0
The rooms the record states.
cadastral_numberstring or nullrequired
The unit's own cadastral number, where the record keeps one.
metaBuildingUnitPageMetarequired
How the page stands against the building's whole list of units.
listedintegerrequired≥ 0
The units the record lists; 0 when it lists none, which says nothing of how many there are.
statedinteger or nullrequired≥ 0
The units the record states the building has; null when it states no total.
list_is_completebooleanrequired
True when the record lists units and its list matches every total it states.
matchedintegerrequired≥ 0
The listed units the answer is about: every one, or those unit finds.
limitintegerrequired≥ 1
The page size asked for.
offsetintegerrequired≥ 0
The matched units skipped.
linksLinksrequired
nextstring (uri) or nullrequired
The next page's URL; null on the last page.

Errors

400
A parameter is missing, malformed or out of range (invalid_parameter).
401
No API key, or one that does not work: missing_api_key, invalid_api_key, revoked_api_key or expired_api_key.
402
insufficient_credits: the answer's buildings need more credits than the workspace has left this month. Nothing was returned or charged.
403
The key may not do this: insufficient_scope, or workspace_access_revoked when the key's creator no longer belongs to its workspace.
404
No building has this id (not_found).
429
rate_limited (the key's per-minute limit) or quota_exceeded (the workspace's daily quota).
503
The building catalogue is unavailable right now (upstream_unavailable); retry after Retry-After seconds.

Every error has the same shape. Error codes.