Civimatica Developers

Data model

The objects the API returns and how they relate.

Everything the API returns is measured by Civimatica devices and processed by Civimatica models. You receive structured results, never imagery.

Geography

A city is addressed by its identifier. Pass it as city.

Inside a city, parking is organised into city zones. List them with GET /v1/city-zones. A zone id is canonical with a hyphen. The same id written with a space or a slash is accepted on input, and responses always use the hyphen form.

A street that runs through several zones comes back once per zone when you ask for the chance of finding a spot.

Objects

City zone

A parking area you can query:

  • id — zone id, such as 702-16
  • name — short name, such as Area 16
  • tariff_band — the pricing band
  • tariff_eur_hour — the hourly price in euros
  • hours — when that tariff applies, in local time
  • area — the main streets around the zone
  • also_tariffs — another band and its hourly price, included only when the zone has one

A zone that is turned off is left out of this list. Asking for its spots returns 400 with code zone_disabled.

Spot

A space a vehicle found free in the last 10 minutes. The list contains only free spots.

  • id — stable id, prefixed cv-
  • lat, lon — position
  • available_at — when a vehicle last found it free
  • size — small, medium, or large
  • in_shade — whether it is currently shaded
  • shade_until — when it next sees sun. An ISO 8601 time, or night when it stays shaded. Null when it is sunlit.

window_minutes on the response is the look-back, currently 10.

Spots stay stored for up to 60 days after the last detection. A spot that is not seen again in that window expires.

Vehicle

One detection vehicle patrols each city zone.

  • id — cv-veh- plus the zone id
  • lat, lon — live position
  • heading_deg — compass bearing, 0 to 360
  • speed_kmh
  • direction — outbound or return along its route

Event

A record from the detection service. Each has a monotonic seq (your cursor), a type, and ts.

  • spot_detected — a vehicle found a spot free
  • spot_free — a later pass finds a taken spot free again
  • spot_occupied — a later pass finds a free spot taken
  • spot_expired — the spot was not detected again within 60 days
  • engine_started — the detection service started

spot_detected, spot_free, and spot_occupied also carry spot_id, coordinates, street, size, free, city, city_zone, in_shade, and shade_until. spot_expired carries spot_id, coordinates, street, and reason. engine_started carries stored_spots. Events whose zone is turned off are omitted.

Spot type

The parking class at a coordinate:

  • blue — paid
  • white — free
  • yellow — reserved
  • disabled — a disabled bay
  • loading — a loading zone
  • unknown — no street within 400 m

Along with type you get type_label, the nearest street, city, and city_zone. paid_until is the local HH:MM when paid hours end, or null when there is none. product is a tariff code when that street has one, otherwise null. A turned-off zone comes back with city_zone, paid_until, and product null.

Street chance

One street inside one city zone:

  • street
  • city_zone — null when the street never enters a zone
  • probability — 0 to 1
  • percent — the same chance as a whole number
  • chance — easy above 60%, possible above 30%, otherwise hard
  • length_m — how much of the street lies in that zone
  • lat, lon — a point on the longest stretch
  • near — another street beside that stretch, or null

Rows are easiest first. evaluated_at is the time used for the chance, in UTC.

Time

Timestamps are ISO 8601 UTC. available_at, event ts, and evaluated_at are moments on the street or on the service clock. hours and paid_until are local clock times for the tariff.

On this page