{"openapi":"3.0.1","info":{"title":"Geofences","description":"Geofences and toll geofences: definitions, assets in/around them, and geofence events.","version":"v3"},"servers":[{"url":"https://talk.perspio.io/geofences/v3","description":"AU Region"},{"url":"https://us-talk.perspio.io/geofences/v3","description":"US Region"}],"paths":{"/{id}/groups":{"get":{"tags":["Geofences"],"summary":"Get Geofence Asset Groups","description":"Returns the asset groups associated with the geofence, scoped to the groups the caller is permitted to see.","operationId":"getgeofenceassetgroups","parameters":[{"name":"id","in":"path","description":"Geofence Id","required":true,"schema":{"type":"string","example":"in-gf-000123"}},{"name":"includedisabledassets","in":"header","description":"When true, disabled assets are included in the asset scope used to resolve the caller’s data permissions for this request. Defaults to false.","schema":{"type":"boolean"},"example":"False"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"geofenceId":{"type":"string","description":"Id of the geofence this record is linked to."},"groupId":{"type":"string","description":"Identifier of the asset group."},"groupName":{"type":"string","description":"Display name of the asset group."}}}},"example":[{"geofenceId":"in-gf-000001","groupId":"group-101","groupName":"Delivery Zones"},{"geofenceId":"in-gf-000002","groupId":"group-102","groupName":"Restricted Areas"},{"geofenceId":"in-gf-000003","groupId":"group-103","groupName":"Warehouse Perimeter"}]}}},"400":{"description":"Invalid Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerspioError"},"example":{"functionName":"Perspio.API.GeoFences.GeoFenceApi.GetGeofenceAssetGroups","errorType":"ArgumentException","statusCode":400,"request":"GET /api/geofences/in-gf-000123/groups","tenantId":"in-93b1a4c6-1234-4c1c-9d2a-1f2e3d4c5b6a","message":"Invalid geofence id format: 'abc123'. Expected format: xx-gf-nnnnnn"}}}},"401":{"description":"Invalid API Key provided or Invalid Access token"},"403":{"description":"Forbidden. The caller is not permitted to access the requested tenant or geofence, or lacks the required role."},"404":{"description":"Resource Not Found"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerspioError"},"example":{"functionName":"Perspio.API.GeoFences.GeoFenceApi.GetGeofenceAssetGroups","errorType":"NullReferenceException","statusCode":500,"request":"GET /api/geofences/in-gf-000123/groups","tenantId":"in-93b1a4c6-1234-4c1c-9d2a-1f2e3d4c5b6a","message":"Internal Server Error: Object reference not set to an instance of an object."}}}}}}},"/{id}/events":{"get":{"tags":["Events"],"summary":"Get Geofence Events","description":"Returns geofence entry/exit events for the geofence, within an optional time range and severity filter. When `page_size` is supplied the response is paged and the ContinuationToken, ResultCount and TotalCount values are returned as response headers; pass the ContinuationToken back via the `token` query parameter (or the ContinuationToken request header) to fetch the next page. Results are scoped to the assets the caller is permitted to see.","operationId":"getgeofenceevents","parameters":[{"name":"id","in":"path","description":"Geofence Id","required":true,"schema":{"type":"string","example":"in-gf-000123"}},{"name":"from","in":"query","description":"Start of the event time range (ISO 8601, UTC). When omitted the service default window applies.","schema":{"type":"string","format":"date-time"},"example":"2025-06-01T12:00:00.0000000+00:00"},{"name":"to","in":"query","description":"End of the event time range (ISO 8601, UTC).","schema":{"type":"string","format":"date-time"},"example":"2025-06-30T11:59:59.0000000+00:00"},{"name":"severityTypes","in":"query","description":"Filter to specific event severities. Repeat the parameter or comma-separate values. When omitted, all severities are returned.","schema":{"type":"array","items":{"type":"string"}},"example":["Critical","Warning"]},{"name":"daterange","in":"query","description":"Named date range shortcut (alternative to from/to), evaluated in the supplied timezone.","schema":{"type":"string"},"example":"last7days"},{"name":"timezone","in":"query","description":"IANA timezone used to evaluate daterange. Defaults to UTC.","schema":{"type":"string"},"example":"Australia/Sydney"},{"name":"page_size","in":"query","description":"Maximum number of events per page. When greater than 0 the response is PAGED and returns the ContinuationToken, ResultCount and TotalCount response headers; when omitted or 0 all matching events are returned in a single unpaged response.","schema":{"type":"integer"},"example":100},{"name":"token","in":"query","description":"Continuation token used to fetch the next page. Pass the value of the ContinuationToken response header from the previous call. May also be supplied via the ContinuationToken request header.","schema":{"type":"string"},"example":"eyJ0b2tlbiI6IjEwMDAifQ=="},{"name":"includedisabledassets","in":"header","description":"When true, disabled assets are included in the asset scope used to resolve the caller’s data permissions for this request. Defaults to false.","schema":{"type":"boolean"},"example":"False"},{"name":"ContinuationToken","in":"header","description":"Continuation token to fetch the next page, taken from the previous response's ContinuationToken header. Equivalent to the `token` query parameter.","schema":{"type":"string"},"example":"eyJ0b2tlbiI6IjEwMDAifQ=="}],"responses":{"200":{"description":"Success","headers":{"ContinuationToken":{"description":"Token to pass as the `token` query parameter (or `ContinuationToken` request header) to retrieve the next page. Empty or absent when there are no further pages. Only present when `page_size` > 0.","schema":{"type":"string"},"example":"eyJyaWQiOiJETlFMQUpjVm95S3FhRUFEQUFBQUFnPT0iLCJza2lwIjoxfQ=="},"ResultCount":{"description":"Number of events returned in the current page. Only present when `page_size` > 0.","schema":{"type":"integer","format":"int64"},"example":2},"TotalCount":{"description":"Total number of events matching the request across all pages. Only present when `page_size` > 0.","schema":{"type":"integer","format":"int64"},"example":57}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeofenceEvents"},"example":{"key":"eyJ0b2tlbiI6IjEwMDAifQ==","value":[{"objectId":"br-000807","assetId":"br-000807","eventTypeId":27,"location":{"dateTime":"2025-01-16T01:54:11.0000000+00:00","coordinates":[-87.220253,30.5120773],"type":"Point"},"deviceId":"dev-000807","eventTimeUTC":"2025-01-16T01:54:11.0000000+00:00","eventTimeEpoch":1736992451,"tenantId":"br-876aec24-5645-425d-a7a1-cb2f14b0432e","eventObject":{"geofenceId":"br-gf-000042","geofenceTitle":"B0012 - Pensacola","geofenceType":"Branch","timeInGeofence":5.21,"info":"B0012 - Pensacola (Branch)","eventId":"EVT-2025-000182"},"pipelineId":"GeofenceProcessor","id":"br-000807-27-1736992451210-15b8d08167","type":"AssetEvent","correlationId":"strm-20250116-015500-502-b7cc0|40bd8","_ts":1736992692}]}}}},"400":{"description":"Invalid Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerspioError"},"example":{"functionName":"Perspio.API.GeoFences.GeoFenceApi.GetGeofenceEvents","errorType":"ArgumentException","statusCode":400,"request":"GET /api/geofences/in-gf-000123/events","tenantId":"in-93b1a4c6-1234-4c1c-9d2a-1f2e3d4c5b6a","message":"Invalid geofence id format: 'abc123'. Expected format: xx-gf-nnnnnn"}}}},"401":{"description":"Invalid API Key provided or Invalid Access token"},"403":{"description":"Forbidden. The caller is not permitted to access the requested tenant or geofence, or lacks the required role."},"404":{"description":"Resource Not Found"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerspioError"},"example":{"functionName":"Perspio.API.GeoFences.GeoFenceApi.GetGeofenceEvents","errorType":"NullReferenceException","statusCode":500,"request":"GET /api/geofences/in-gf-000123/events","tenantId":"in-93b1a4c6-1234-4c1c-9d2a-1f2e3d4c5b6a","message":"Internal Server Error: Object reference not set to an instance of an object."}}}}}}},"/{id}/assets":{"get":{"tags":["Geofences"],"summary":"Get Geofence Assets","description":"Returns the assets currently inside the geofence as hydrated asset states, including the entry timestamp. Use `signals` to limit which fields are returned. Scoped to the assets the caller is permitted to see.","operationId":"getgeofenceassets","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","example":"in-gf-000123"}},{"name":"signals","in":"query","schema":{"type":"array","items":{"type":"string"}},"example":["location","status"]},{"name":"x-perspio-filter","in":"header","description":"Global data filter (JSON-serialised) scoping results to matching assets. Optional keys, each an array of strings: locationHierarchyL1..L3, productHierarchyL1..L3, operationalHierarchyL1..L3, groupIds; plus boolean 'enabled'. Omit for no additional filtering (security-group scoping always applies). Example: {\"locationHierarchyL1\":[\"NSW\"],\"enabled\":true}","schema":{"type":"string"}},{"name":"includedisabledassets","in":"header","description":"When true, disabled assets are included in the tenant scope applied to this request. Defaults to false.","schema":{"type":"boolean"},"example":"False"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"altitude":{},"crankingVoltage":{"type":"number"},"engineCoolantTemp":{"type":"number"},"engineOilTemp":{},"engineRoadSpeed":{"type":"number"},"engineSpeed":{"type":"number"},"fuelLevelPct":{"type":"number"},"heading":{"type":"number"},"outsideAirTemp":{"type":"number"},"parkingBrake":{"type":"boolean"},"speed":{"type":"number"},"totalFuel":{},"externalBatteryVoltage":{"type":"number"},"cITMode":{"type":"boolean"},"vIAMode":{"type":"boolean"},"doorOpenedForTooLong":{"type":"boolean"},"driverDoor":{"type":"boolean"},"electronicCabinetDoor":{"type":"boolean"},"engineKill":{"type":"boolean"},"geofenceValetMode":{"type":"boolean"},"pRANIOXIgnition":{"type":"boolean"},"messengerDoor":{"type":"boolean"},"passengerDoor":{"type":"boolean"},"rearDoor":{"type":"boolean"},"remoteCIA":{"type":"boolean"},"safeDoor":{"type":"boolean"},"truckCIA":{"type":"boolean"},"valetModeOverride":{"type":"boolean"},"valetMode":{"type":"boolean"},"pRANIgnition":{"type":"boolean"},"pRANSystemConnected":{"type":"boolean"},"assetName":{"type":"string","description":"Display name of the asset."},"assetTypeId":{"type":"number","description":"Asset type identifier."},"assetId":{"type":"string","description":"Id of the asset that generated the event."},"customerAssetId":{"type":"string"},"sourceSysAssetId":{"type":"string"},"timeZone":{"type":"string"},"encodedSystemFlags":{"type":"number"},"systemFlags":{"type":"object","properties":{"encodedSystemFlags":{"type":"number"},"enabled":{"type":"boolean"},"customCountersEnabled":{"type":"boolean"},"geofencingEnabled":{"type":"boolean"},"tollEnabled":{"type":"boolean"},"tripsEnabled":{"type":"boolean"},"computeOdometerEnabled":{"type":"boolean"},"computeRunhoursEnabled":{"type":"boolean"},"notificationsEnabled":{"type":"boolean"},"systemFlagsEnabled":{"type":"boolean"},"workflowsEnabled":{"type":"boolean"},"validated":{"type":"boolean"}}},"odometer":{"type":"number"},"odometerSource":{"type":"number"},"driverId":{"type":"string"},"perspioOdometer":{"type":"number"},"customerOdometer":{},"runHours":{"type":"number"},"runHoursSource":{"type":"number"},"preferredMetersSource":{"type":"number"},"preferredRunHoursSource":{"type":"number"},"preferredOdometerSource":{"type":"number"},"preferredRunHours":{"type":"number"},"preferredOdometer":{"type":"number"},"perspioRunHours":{"type":"number"},"customerRunHours":{},"perspioCounter1":{},"perspioCounter2":{},"perspioCounter3":{},"locationHierarchyL1":{"type":"string"},"locationHierarchyL2":{"type":"string"},"locationHierarchyL3":{"type":"string"},"productHierarchyL1":{"type":"string"},"productHierarchyL2":{"type":"string"},"productHierarchyL3":{"type":"string"},"operationalHierarchyL1":{"type":"string"},"operationalHierarchyL2":{"type":"string"},"operationalHierarchyL3":{"type":"string"},"markerChoice":{"type":"string"},"markerType":{"type":"number"},"relatedObjectsCount":{"type":"number"},"deviceDataJson":{"type":"string"},"insideGeofenceJson":{"type":"string"},"deviceData":{"type":"object","properties":{"G9D621DUU43H":{"type":"object","properties":{"lastCommunicatedUtc":{"type":"string","description":"UTC timestamp of the asset's most recent communication."},"active":{"type":"boolean","description":"Whether the asset is currently active/enabled."}}},"LT-MV00794056":{"type":"object","properties":{"lastCommunicatedUtc":{"type":"string","description":"UTC timestamp of the asset's most recent communication."},"active":{"type":"boolean","description":"Whether the asset is currently active/enabled."}}},"G77E20DFA01D":{"type":"object","properties":{"lastCommunicatedUtc":{"type":"string","description":"UTC timestamp of the asset's most recent communication."},"active":{"type":"boolean","description":"Whether the asset is currently active/enabled."}}},"LT-MV00232755":{"type":"object","properties":{"lastCommunicatedUtc":{"type":"string","description":"UTC timestamp of the asset's most recent communication."},"active":{"type":"boolean","description":"Whether the asset is currently active/enabled."}}},"G99FPS81C1W7":{"type":"object","properties":{"lastCommunicatedUtc":{"type":"string","description":"UTC timestamp of the asset's most recent communication."},"active":{"type":"boolean","description":"Whether the asset is currently active/enabled."}}},"G78E20DFA0ED":{"type":"object","properties":{"lastCommunicatedUtc":{"type":"string","description":"UTC timestamp of the asset's most recent communication."},"active":{"type":"boolean","description":"Whether the asset is currently active/enabled."}}},"LT-MV00805567":{"type":"object","properties":{"lastCommunicatedUtc":{"type":"string","description":"UTC timestamp of the asset's most recent communication."},"active":{"type":"boolean","description":"Whether the asset is currently active/enabled."}}},"G9C4211031C0":{"type":"object","properties":{"lastCommunicatedUtc":{"type":"string","description":"UTC timestamp of the asset's most recent communication."},"active":{"type":"boolean","description":"Whether the asset is currently active/enabled."}}},"LT-QM00045165":{"type":"object","properties":{"lastCommunicatedUtc":{"type":"string","description":"UTC timestamp of the asset's most recent communication."},"active":{"type":"boolean","description":"Whether the asset is currently active/enabled."}}},"G71920DFA773":{"type":"object","properties":{"lastCommunicatedUtc":{"type":"string","description":"UTC timestamp of the asset's most recent communication."},"active":{"type":"boolean","description":"Whether the asset is currently active/enabled."}}},"LT-MV00781923":{"type":"object","properties":{"lastCommunicatedUtc":{"type":"string","description":"UTC timestamp of the asset's most recent communication."},"active":{"type":"boolean","description":"Whether the asset is currently active/enabled."}}}}},"insideGeofences":{"type":"object","properties":{"GeofenceEntries":{"type":"array","items":{"type":"object","properties":{"geofenceId":{"type":"string","description":"Id of the geofence this record is linked to."},"enteredEpoch":{"type":"number"},"geofenceTitle":{"type":"string","description":"Title of the geofence involved in the event."},"geofenceType":{"type":"string","description":"Geometry type of the fence (e.g. Polygon, Circle)."}}}}}},"lastSynchronizedUtc":{"type":"string"},"lastCommunicatedOrderedUtc":{"type":"string"},"lastCommunicatedOrderedEpoch":{"type":"number"},"lastLocatedUtc":{"type":"string"},"lastLocatedEpoch":{"type":"number"},"groupIds":{"type":"array","items":{"type":"string"}},"isLatLonOverrideEnabled":{"type":"boolean"},"enteredEpoch":{"type":"number"},"containsCustomCounters":{"type":"boolean"},"correlationId":{"type":"string","description":"Client-supplied correlation id, echoed back for end-to-end request tracing."},"tenantId":{"type":"string","description":"Identifier of the owning tenant."},"active":{"type":"boolean","description":"Whether the asset is currently active/enabled."},"latitude":{"type":"number","description":"Latitude of the last known position."},"longitude":{"type":"number","description":"Longitude of the last known position."},"coordinates":{"type":"string","description":"Coordinate array defining the geometry ([lon, lat] order)."},"lastCommunicatedUtc":{"type":"string","description":"UTC timestamp of the asset's most recent communication."},"lastCommunicatedEpoch":{"type":"number"},"id":{"type":"string","description":"Unique identifier of this record."},"_ts":{"type":"number"},"createdBy":{"type":"string","description":"User principal or system that created the record."},"createdDate":{"type":"string","description":"UTC timestamp when the record was created."},"updatedBy":{"type":"string","description":"User principal or system that last modified the record."},"updatedDate":{"type":"string","description":"UTC timestamp when the record was last modified."},"enabled":{"type":"boolean"}}}},"example":[{"altitude":250.5,"crankingVoltage":12.6,"engineCoolantTemp":85,"engineOilTemp":90,"engineRoadSpeed":65,"engineSpeed":3000,"fuelLevelPct":45.7,"heading":120,"outsideAirTemp":22,"parkingBrake":false,"speed":65.2,"totalFuel":150,"externalBatteryVoltage":13.2,"cITMode":true,"vIAMode":false,"doorOpenedForTooLong":false,"driverDoor":true,"electronicCabinetDoor":false,"engineKill":false,"geofenceValetMode":true,"pRANIOXIgnition":false,"messengerDoor":false,"passengerDoor":true,"rearDoor":false,"remoteCIA":true,"safeDoor":false,"truckCIA":true,"valetModeOverride":false,"valetMode":true,"pRANIgnition":true,"pRANSystemConnected":true,"assetName":"Truck 1234","assetTypeId":7,"assetId":"asset-00123","customerAssetId":"cust-45678","sourceSysAssetId":"sys-99999","timeZone":"Australia/Sydney","encodedSystemFlags":1023,"systemFlags":{"encodedSystemFlags":1023,"enabled":true,"customCountersEnabled":false,"geofencingEnabled":true,"tollEnabled":false,"tripsEnabled":true,"computeOdometerEnabled":true,"computeRunhoursEnabled":true,"notificationsEnabled":true,"systemFlagsEnabled":true,"workflowsEnabled":false,"validated":true},"odometer":123456.7,"odometerSource":2,"driverId":"driver-789","perspioOdometer":123450.5,"customerOdometer":123460,"runHours":4500.3,"runHoursSource":1,"preferredMetersSource":2,"preferredRunHoursSource":1,"preferredOdometerSource":2,"preferredRunHours":4500,"preferredOdometer":123456,"perspioRunHours":4499.8,"customerRunHours":4501,"perspioCounter1":100,"perspioCounter2":200,"perspioCounter3":300,"locationHierarchyL1":"Australia","locationHierarchyL2":"New South Wales","locationHierarchyL3":"Sydney","productHierarchyL1":"Logistics","productHierarchyL2":"Trucking","productHierarchyL3":"Heavy Vehicles","operationalHierarchyL1":"Operations","operationalHierarchyL2":"Fleet","operationalHierarchyL3":"Region 1","markerChoice":"default","markerType":1,"relatedObjectsCount":5,"deviceDataJson":"{\"device\":\"active\"}","insideGeofenceJson":"{\"GeofenceEntries\":[]}","deviceData":{"G9D621DUU43H":{"lastCommunicatedUtc":"2025-06-25T06:30:00.0000000+00:00","active":true},"LT-MV00794056":{"lastCommunicatedUtc":"2025-06-25T06:32:15.0000000+00:00","active":false}},"insideGeofences":{"GeofenceEntries":[{"geofenceId":"in-gf-000123","enteredEpoch":1687654321,"geofenceTitle":"Warehouse Area","geofenceType":"Restricted"}]},"lastSynchronizedUtc":"2025-06-25T06:33:00.0000000+00:00","lastCommunicatedOrderedUtc":"2025-06-25T06:34:00.0000000+00:00","lastCommunicatedOrderedEpoch":1687654440,"lastLocatedUtc":"2025-06-25T06:34:30.0000000+00:00","lastLocatedEpoch":1687654470,"groupIds":["group-001","group-002"],"isLatLonOverrideEnabled":false,"enteredEpoch":1687654000,"containsCustomCounters":true,"correlationId":"corr-555","tenantId":"tenant-789","active":true,"latitude":-33.8688,"longitude":151.2093,"coordinates":"-33.8688,151.2093","lastCommunicatedUtc":"2025-06-25T06:34:15.0000000+00:00","lastCommunicatedEpoch":1687654455,"id":"in-000052","_ts":1687654500,"createdBy":"system","createdDate":"2024-01-01T12:00:00.0000000+00:00","updatedBy":"operator","updatedDate":"2025-06-24T18:00:00.0000000+00:00","enabled":true}]}}},"400":{"description":"Invalid Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerspioError"},"example":{"functionName":"Perspio.API.GeoFences.GeoFenceApi.GetGeofenceAssets","errorType":"ArgumentException","statusCode":400,"request":"GET /api/in-gf-000123/assets","tenantId":"in-93b1a4c6-1234-4c1c-9d2a-1f2e3d4c5b6a","message":"Invalid geofence id format: 'abc123'. Expected format: xx-gf-nnnnnn"}}}},"401":{"description":"Invalid API Key provided or Invalid Access token"},"403":{"description":"Forbidden. The caller is not permitted to access the requested tenant or geofence, or lacks the required role."},"404":{"description":"Resource Not Found"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerspioError"},"example":{"functionName":"Perspio.API.GeoFences.GeoFenceApi.GetGeofenceAssets","errorType":"NullReferenceException","statusCode":500,"request":"GET /api/in-gf-000123/assets","tenantId":"in-93b1a4c6-1234-4c1c-9d2a-1f2e3d4c5b6a","message":"Internal Server Error: Object reference not set to an instance of an object."}}}}}}},"/{id}":{"patch":{"tags":["Geofences"],"summary":"Update Geofence Asset Group","description":"Adds or removes this geofence from one or more asset groups using a JSON Patch body (add/remove operations whose values are group ids).","operationId":"updategeofenceassetgroup","parameters":[{"name":"id","in":"path","description":"Geofence Id","required":true,"schema":{"type":"string"},"example":"in-gf-000123"},{"name":"includedisabledassets","in":"header","description":"When true, disabled assets are included in the asset scope used to resolve the caller’s data permissions for this request. Defaults to false.","schema":{"type":"boolean"},"example":"False"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchRequestObject"},"example":[{"value":"in-astg-000001","path":"/groupId","op":"add"}]}}},"responses":{"200":{"description":"Asset-group membership updated."},"400":{"description":"Invalid Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerspioError"},"example":{"functionName":"Perspio.API.GeoFences.GeoFenceApi.UpdateGeofenceAssetGroup","errorType":"ArgumentException","statusCode":400,"request":"PATCH /api/geofences/in-gf-000123","tenantId":"in-93b1a4c6-1234-4c1c-9d2a-1f2e3d4c5b6a","message":"Invalid geofence id format: 'abc123'. Expected format: xx-gf-nnnnnn"}}}},"401":{"description":"Invalid API Key provided or Invalid Access token"},"403":{"description":"Forbidden. The caller is not permitted to access the requested tenant or geofence, or lacks the required role."},"404":{"description":"Not found. No geofence exists for the supplied id."},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerspioError"},"example":{"functionName":"Perspio.API.GeoFences.GeoFenceApi.UpdateGeofenceAssetGroup","errorType":"NullReferenceException","statusCode":500,"request":"PATCH /api/geofences/in-gf-000123","tenantId":"in-93b1a4c6-1234-4c1c-9d2a-1f2e3d4c5b6a","message":"Internal Server Error: Object reference not set to an instance of an object."}}}}}},"get":{"tags":["Geofences"],"summary":"Get Geofence","description":"Returns a single tenant geofence by id as GeoJSON, hydrated with the assets currently inside it. Scoped to geofences the caller is permitted to see.","operationId":"getGeofence","parameters":[{"name":"id","in":"path","description":"Geofence Id","required":true,"schema":{"type":"string","example":"in-gf-000123"}},{"name":"x-perspio-filter","in":"header","description":"Global data filter (JSON-serialised) scoping results to matching assets. Optional keys, each an array of strings: locationHierarchyL1..L3, productHierarchyL1..L3, operationalHierarchyL1..L3, groupIds; plus boolean 'enabled'. Omit for no additional filtering (security-group scoping always applies). Example: {\"locationHierarchyL1\":[\"NSW\"],\"enabled\":true}","schema":{"type":"string"}},{"name":"includedisabledassets","in":"header","description":"When true, disabled assets are included in the tenant scope applied to this request. Defaults to false.","schema":{"type":"boolean"},"example":"False"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"areaSquare":{"type":"number","description":"Area of the geofence in square metres.","format":"double"},"h3IndexingMode":{"type":"integer","description":"H3 indexing mode (H3IndexingModes enum, serialized as its integer value).","format":"int32"},"h3MinCellCount":{"type":"integer","description":"Minimum H3 cell count used when indexing the geofence.","format":"int32"},"h3PolygonIndexes":{"type":"object","description":"H3 polygon index data; null on read responses.","nullable":true},"expireDateUtc":{"type":"string","description":"UTC time the geofence expires, or null if it never expires.","format":"date-time","nullable":true},"contactName":{"type":"string","description":"Contact name for the geofence.","nullable":true},"contactEmail":{"type":"string","description":"Contact email for the geofence.","nullable":true},"contactPhone":{"type":"string","description":"Contact phone for the geofence.","nullable":true},"assetCount":{"type":"integer","description":"Number of assets currently within the geofence. Present on retrieval responses.","format":"int32"},"correlationId":{"type":"string","description":"Client-supplied correlation id, echoed back for end-to-end request tracing."},"createdBy":{"type":"string","description":"User principal or system that created the record."},"createdDate":{"type":"string","description":"UTC timestamp when the record was created.","format":"date-time"},"description":{"type":"string","description":"Free-text description of the geofence."},"geofenceType":{"type":"string","description":"Geometry type of the fence (e.g. Polygon, Circle)."},"geojson":{"type":"object","properties":{"geometry":{"type":"object","properties":{"coordinates":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"number","format":"double"}}},"description":"Coordinate array defining the geometry ([lon, lat] order)."},"type":{"type":"string"}},"description":"GeoJSON geometry object."},"properties":{"type":"object"},"type":{"type":"string"}},"description":"GeoJSON geometry defining the fence boundary."},"id":{"type":"string","description":"Unique identifier of this record."},"includeAllDevices":{"type":"boolean","description":"When true, every device in the tenant is evaluated against this geofence rather than only assigned assets."},"isActive":{"type":"boolean","description":"Whether the geofence is active; inactive geofences are excluded from evaluation unless explicitly requested."},"type":{"type":"string"},"title":{"type":"string","description":"Display name of the geofence."},"updatedBy":{"type":"string","description":"User principal or system that last modified the record."},"updatedDate":{"type":"string","description":"UTC timestamp when the record was last modified.","format":"date-time"}}},"example":{"areaSquare":15230.5,"h3IndexingMode":0,"h3MinCellCount":50,"h3PolygonIndexes":null,"expireDateUtc":null,"contactName":"Jane Smith","contactEmail":"jane.smith@example.com","contactPhone":"+61 400 000 000","assetCount":4,"correlationId":"corr-123456","createdBy":"john.doe@example.com","createdDate":"2025-07-01T09:00:00.0000000+00:00","description":"Geofence for Warehouse Area","geofenceType":"Polygon","geojson":{"geometry":{"type":"Polygon","coordinates":[[[150.644,-34.397],[150.645,-34.398],[150.646,-34.397],[150.644,-34.397]]]},"properties":{"color":"blue","alertLevel":"high"},"type":"Feature"},"id":"in-gf-000123","includeAllDevices":true,"isActive":true,"type":"Geofence","title":"Warehouse Boundary","updatedBy":"jane.smith@example.com","updatedDate":"2025-07-02T09:00:00.0000000+00:00"}}}},"400":{"description":"Invalid Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerspioError"},"example":{"functionName":"Perspio.API.GeoFences.GeoFenceApi.GetGeoJsonGeofence","errorType":"ArgumentException","statusCode":400,"request":"GET /api/geofences/in-gf-000123","tenantId":"in-93b1a4c6-1234-4c1c-9d2a-1f2e3d4c5b6a","message":"Invalid geofence id format: 'abc123'. Expected format: xx-gf-nnnnnn"}}}},"401":{"description":"Invalid API Key provided or Invalid Access token"},"403":{"description":"Forbidden. The caller is not permitted to access the requested tenant or geofence, or lacks the required role."},"404":{"description":"Resource Not Found"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerspioError"},"example":{"functionName":"Perspio.API.GeoFences.GeoFenceApi.GetGeoJsonGeofence","errorType":"NullReferenceException","statusCode":500,"request":"GET /api/geofences/in-gf-000123","tenantId":"in-93b1a4c6-1234-4c1c-9d2a-1f2e3d4c5b6a","message":"Internal Server Error: Object reference not set to an instance of an object."}}}}}},"delete":{"tags":["Geofences"],"summary":"Delete Geofence","description":"Deletes a tenant geofence by id and triggers a geofence re-fix so asset membership is recalculated.","operationId":"deleteGeofence","parameters":[{"name":"id","in":"path","description":"Geofence Id","required":true,"schema":{"type":"string","example":"in-gf-000123"}},{"name":"includedisabledassets","in":"header","description":"When true, disabled assets are included in the asset scope used to resolve the caller’s data permissions for this request. Defaults to false.","schema":{"type":"boolean"},"example":"False"}],"responses":{"200":{"description":"Geofence deleted."},"400":{"description":"Invalid Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerspioError"},"example":{"functionName":"Perspio.API.GeoFences.GeoFenceApi.DeleteGeoJsonGeofence","errorType":"ArgumentException","statusCode":400,"request":"DELETE /api/geofences/in-gf-000123","tenantId":"in-93b1a4c6-1234-4c1c-9d2a-1f2e3d4c5b6a","message":"Invalid geofence id format: 'abc123'. Expected format: xx-gf-nnnnnn"}}}},"401":{"description":"Invalid API Key provided or Invalid Access token"},"403":{"description":"Forbidden. The caller is not permitted to access the requested tenant or geofence, or lacks the required role."},"404":{"description":"Not found. No geofence exists for the supplied id."},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerspioError"},"example":{"functionName":"Perspio.API.GeoFences.GeoFenceApi.DeleteGeoJsonGeofence","errorType":"NullReferenceException","statusCode":500,"request":"DELETE /api/geofences/in-gf-000123","tenantId":"in-93b1a4c6-1234-4c1c-9d2a-1f2e3d4c5b6a","message":"Internal Server Error: Object reference not set to an instance of an object."}}}}}},"put":{"tags":["Geofences"],"summary":"Update Geofence","description":"Updates an existing tenant geofence from a GeoJSON definition. For global (all-device) geofences any existing per-group associations are cleared. Triggers a geofence re-fix.","operationId":"updateGeofence","parameters":[{"name":"id","in":"path","description":"Geofence Id","required":true,"schema":{"type":"string","example":"in-gf-000123"}},{"name":"includedisabledassets","in":"header","description":"When true, disabled assets are included in the asset scope used to resolve the caller’s data permissions for this request. Defaults to false.","schema":{"type":"boolean"},"example":"False"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateGeoJsonGeoFence-RequestObject"},"example":{"geofenceType":"Depot","title":"wParkLand5szd","description":"wParkLand 1111asd","includeAllDevices":true,"isActive":false,"geojson":{"type":"Feature","properties":{"stroke":"#555554","stroke-width":3,"stroke-opacity":1,"fill":"#FF1493","fill-opacity":0.8},"geometry":{"type":"Polygon","coordinates":[[[150.028681780922,-33.8710805002085],[150.028681780922,-33.8710805002085],[150.028681780922,-33.8710805002085],[150.028681780922,-33.8710805002085],[150.028681780922,-33.8710805002085],[150.028681780922,-33.8710805002085],[150.108332659829,-33.8676597270491],[150.181117083657,-33.9132587624284],[150.074000384438,-33.940606479816],[150.028681780922,-33.8710805002085]]]}}}}}},"responses":{"200":{"description":"Geofence updated."},"400":{"description":"Invalid Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerspioError"},"example":{"functionName":"Perspio.API.GeoFences.GeoFenceApi.UpdateGeoJsonGeofence","errorType":"ArgumentException","statusCode":400,"request":"PUT /api/geofences/in-gf-000123","tenantId":"in-93b1a4c6-1234-4c1c-9d2a-1f2e3d4c5b6a","message":"Invalid geofence id format: 'abc123'. Expected format: xx-gf-nnnnnn"}}}},"401":{"description":"Invalid API Key provided or Invalid Access token"},"403":{"description":"Forbidden. The caller is not permitted to access the requested tenant or geofence, or lacks the required role."},"404":{"description":"Not found. No geofence exists for the supplied id."},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerspioError"},"example":{"functionName":"Perspio.API.GeoFences.GeoFenceApi.UpdateGeoJsonGeofence","errorType":"NullReferenceException","statusCode":500,"request":"PUT /api/geofences/in-gf-000123","tenantId":"in-93b1a4c6-1234-4c1c-9d2a-1f2e3d4c5b6a","message":"Internal Server Error: Object reference not set to an instance of an object."}}}}}}},"/regions":{"get":{"tags":["Regions"],"summary":"Get Region Geofences","description":"Returns the region (administrative-boundary) geofences available to the tenant as GeoJSON.","operationId":"getregiongeofences","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegionGeofences"},"example":[{"domain":"logistics.company.com","title":"New South Wales","description":"Region geofence for the state of New South Wales.","isActive":true,"geojson":{"type":"Feature","properties":{"name":"Main Warehouse"},"geometry":{"type":"Polygon","coordinates":[[[151.2093,-33.8688],[151.21,-33.8688],[151.21,-33.8695],[151.2093,-33.8695],[151.2093,-33.8688]]]}},"createdBy":"admin_user","createdDate":"2025-06-20T08:30:00.0000000+00:00","updatedBy":"admin_user","updatedDate":"2025-06-24T03:45:00.0000000+00:00","id":"AU-New-South-Wales","type":"RegionGeofence"}]}}},"400":{"description":"Invalid Request"},"401":{"description":"Invalid API Key provided or Invalid Access token"},"403":{"description":"Forbidden. The caller is not permitted to access the requested tenant or geofence, or lacks the required role."},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerspioError"},"example":{"functionName":"Perspio.API.GeoFences.GeoFenceApi.GetRegionGeofences","errorType":"NullReferenceException","statusCode":500,"request":"GET /api/regions","tenantId":"in-93b1a4c6-1234-4c1c-9d2a-1f2e3d4c5b6a","message":"Internal Server Error: Object reference not set to an instance of an object."}}}}}}},"/weatheralerts":{"get":{"tags":["Weather Alerts"],"summary":"Get Weather Alert Geofences","description":"Returns the active weather-alert geofences available to the tenant as GeoJSON.","operationId":"getweatheralertgeofences","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WeatherAlertGeofences"},"example":[{"id":"urn:oid:2.49.0.1.840.0.f6fe2043ece10fb9965489eb1dba0e51480742f2.002.2","type":"WeatherGeofence","geofenceType":"WeatherAlert","title":"Severe Thunderstorm Warning","description":"Severe thunderstorms detected over the Greater Melbourne area. Damaging winds and large hailstones are likely; take shelter and secure loose items.","isActive":true,"geojson":{"type":"Feature","properties":{"Sender":"Bureau of Meteorology","Event":"Severe Thunderstorm Warning","Instructions":"Move vehicles under cover and away from trees. Secure loose outdoor items.","Urgency":"Immediate","Severity":"Severe","Certainty":"Observed"},"geometry":{"type":"Polygon","coordinates":[[[144.85,-37.95],[145.15,-37.95],[145.15,-37.7],[144.85,-37.7],[144.85,-37.95]]]}},"areaSquare":712340000,"h3IndexingMode":2,"h3MinCellCount":50,"h3PolygonIndexes":{"innerIndexes":["8bbe8d12a807fff","8bbe8d12a80efff"],"edgeIndexes":["8bbe8d12a801fff","8bbe8d12a803fff"]},"expireDateUtc":"2026-06-24T09:30:00.0000000+00:00","createdBy":"weather-ingestion","createdDate":"2026-06-24T07:30:00.0000000+00:00","updatedBy":"weather-ingestion","updatedDate":"2026-06-24T07:30:00.0000000+00:00","correlationId":"5f2c1a9e-7b3d-4e8a-9c12-2a4b6d8e0f11","_ts":1782286200}]}}},"400":{"description":"Invalid Request"},"401":{"description":"Invalid API Key provided or Invalid Access token"},"403":{"description":"Forbidden. The caller is not permitted to access the requested tenant or geofence, or lacks the required role."},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerspioError"},"example":{"functionName":"Perspio.API.GeoFences.GeoFenceApi.GetWeatherAlertGeofences","errorType":"NullReferenceException","statusCode":500,"request":"GET /api/weatheralerts","tenantId":"in-93b1a4c6-1234-4c1c-9d2a-1f2e3d4c5b6a","message":"Internal Server Error: Object reference not set to an instance of an object."}}}}}}},"/":{"post":{"tags":["Geofences"],"summary":"Create Geofence","description":"Creates a geofence for the tenant from a GeoJSON definition and returns the created geofence. Triggers a geofence re-fix so asset membership is recalculated.","operationId":"createGeofence","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGeoJsonGeoFence-RequestObject"},"example":{"geofenceType":"Depot","title":"wParkLand5szd","description":"wParkLand 1111asd","includeAllDevices":true,"isActive":false,"geojson":{"type":"Feature","properties":{"stroke":"#555554","stroke-width":3,"stroke-opacity":1,"fill":"#FF1493","fill-opacity":0.8},"geometry":{"type":"Polygon","coordinates":[[[150.028681780922,-33.8710805002085],[150.028681780922,-33.8710805002085],[150.028681780922,-33.8710805002085],[150.028681780922,-33.8710805002085],[150.028681780922,-33.8710805002085],[150.028681780922,-33.8710805002085],[150.108332659829,-33.8676597270491],[150.181117083657,-33.9132587624284],[150.074000384438,-33.940606479816],[150.028681780922,-33.8710805002085]]]}}}}}},"responses":{"200":{"description":"OK. The created geofence.","content":{"application/json":{"schema":{"type":"object","properties":{"areaSquare":{"type":"number","description":"Area of the geofence in square metres.","format":"double"},"h3IndexingMode":{"type":"integer","description":"H3 indexing mode (H3IndexingModes enum, serialized as its integer value).","format":"int32"},"h3MinCellCount":{"type":"integer","description":"Minimum H3 cell count used when indexing the geofence.","format":"int32"},"h3PolygonIndexes":{"type":"object","description":"H3 polygon index data; null on read responses.","nullable":true},"expireDateUtc":{"type":"string","description":"UTC time the geofence expires, or null if it never expires.","format":"date-time","nullable":true},"contactName":{"type":"string","description":"Contact name for the geofence.","nullable":true},"contactEmail":{"type":"string","description":"Contact email for the geofence.","nullable":true},"contactPhone":{"type":"string","description":"Contact phone for the geofence.","nullable":true},"correlationId":{"type":"string","description":"Client-supplied correlation id, echoed back for end-to-end request tracing."},"createdBy":{"type":"string","description":"User principal or system that created the record."},"createdDate":{"type":"string","description":"UTC timestamp when the record was created.","format":"date-time"},"description":{"type":"string","description":"Free-text description of the geofence."},"geofenceType":{"type":"string","description":"Geometry type of the fence (e.g. Polygon, Circle)."},"geojson":{"type":"object","properties":{"geometry":{"type":"object","properties":{"coordinates":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"number","format":"double"}}},"description":"Coordinate array defining the geometry ([lon, lat] order)."},"type":{"type":"string"}},"description":"GeoJSON geometry object."},"properties":{"type":"object"},"type":{"type":"string"}},"description":"GeoJSON geometry defining the fence boundary."},"id":{"type":"string","description":"Unique identifier of this record."},"includeAllDevices":{"type":"boolean","description":"When true, every device in the tenant is evaluated against this geofence rather than only assigned assets."},"isActive":{"type":"boolean","description":"Whether the geofence is active; inactive geofences are excluded from evaluation unless explicitly requested."},"type":{"type":"string"},"title":{"type":"string","description":"Display name of the geofence."},"updatedBy":{"type":"string","description":"User principal or system that last modified the record."},"updatedDate":{"type":"string","description":"UTC timestamp when the record was last modified.","format":"date-time"}}},"example":{"areaSquare":15230.5,"h3IndexingMode":0,"h3MinCellCount":50,"h3PolygonIndexes":null,"expireDateUtc":null,"contactName":"Jane Smith","contactEmail":"jane.smith@example.com","contactPhone":"+61 400 000 000","correlationId":"corr-9f2a7c","createdBy":"john.doe@example.com","createdDate":"2026-06-25T04:12:00.0000000+00:00","description":"Geofence for Warehouse Area","geofenceType":"Polygon","geojson":{"geometry":{"type":"Polygon","coordinates":[[[150.644,-34.397],[150.645,-34.398],[150.646,-34.397],[150.644,-34.397]]]},"properties":{"color":"blue","alertLevel":"high"},"type":"Feature"},"id":"in-gf-000457","includeAllDevices":true,"isActive":true,"type":"Geofence","title":"Warehouse Boundary","updatedBy":"jane.smith@example.com","updatedDate":"2026-06-25T04:12:00.0000000+00:00"}}}},"400":{"description":"Invalid Request"},"401":{"description":"Invalid API Key provided or Invalid Access token"},"403":{"description":"Forbidden. The caller is not permitted to access the requested tenant or geofence, or lacks the required role."},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerspioError"},"example":{"functionName":"Perspio.API.GeoFences.GeoFenceApi.CreateGeoJsonGeofence","errorType":"NullReferenceException","statusCode":500,"request":"POST /api/geofences","tenantId":"in-93b1a4c6-1234-4c1c-9d2a-1f2e3d4c5b6a","message":"Internal Server Error: Object reference not set to an instance of an object."}}}}}},"get":{"tags":["Geofences"],"summary":"Get Geofences","description":"Returns all geofences defined for the tenant as GeoJSON, filtered to those the caller is permitted to see and hydrated with the assets currently inside each one.","operationId":"getGeofences","parameters":[{"name":"x-perspio-filter","in":"header","description":"Global data filter (JSON-serialised) scoping results to matching assets. Optional keys, each an array of strings: locationHierarchyL1..L3, productHierarchyL1..L3, operationalHierarchyL1..L3, groupIds; plus boolean 'enabled'. Omit for no additional filtering (security-group scoping always applies). Example: {\"locationHierarchyL1\":[\"NSW\"],\"enabled\":true}","schema":{"type":"string"}},{"name":"includedisabledassets","in":"header","description":"When true, disabled assets are included in the tenant scope applied to this request. Defaults to false.","schema":{"type":"boolean"},"example":"False"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"areaSquare":{"type":"number","description":"Area of the geofence in square metres.","format":"double"},"h3IndexingMode":{"type":"integer","description":"H3 indexing mode (H3IndexingModes enum, serialized as its integer value).","format":"int32"},"h3MinCellCount":{"type":"integer","description":"Minimum H3 cell count used when indexing the geofence.","format":"int32"},"h3PolygonIndexes":{"type":"object","description":"H3 polygon index data; null on read responses.","nullable":true},"expireDateUtc":{"type":"string","description":"UTC time the geofence expires, or null if it never expires.","format":"date-time","nullable":true},"contactName":{"type":"string","description":"Contact name for the geofence.","nullable":true},"contactEmail":{"type":"string","description":"Contact email for the geofence.","nullable":true},"contactPhone":{"type":"string","description":"Contact phone for the geofence.","nullable":true},"assetCount":{"type":"integer","description":"Number of assets currently within the geofence. Present on retrieval responses.","format":"int32"},"correlationId":{"type":"string","description":"Client-supplied correlation id, echoed back for end-to-end request tracing."},"createdBy":{"type":"string","description":"User principal or system that created the record."},"createdDate":{"type":"string","description":"UTC timestamp when the record was created.","format":"date-time"},"description":{"type":"string","description":"Free-text description of the geofence."},"geofenceType":{"type":"string","description":"Geometry type of the fence (e.g. Polygon, Circle)."},"geojson":{"type":"object","properties":{"geometry":{"type":"object","properties":{"coordinates":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"number","format":"double"}}},"description":"Coordinate array defining the geometry ([lon, lat] order)."},"type":{"type":"string"}},"description":"GeoJSON geometry object."},"properties":{"type":"object"},"type":{"type":"string"}},"description":"GeoJSON geometry defining the fence boundary."},"id":{"type":"string","description":"Unique identifier of this record."},"includeAllDevices":{"type":"boolean","description":"When true, every device in the tenant is evaluated against this geofence rather than only assigned assets."},"isActive":{"type":"boolean","description":"Whether the geofence is active; inactive geofences are excluded from evaluation unless explicitly requested."},"type":{"type":"string"},"title":{"type":"string","description":"Display name of the geofence."},"updatedBy":{"type":"string","description":"User principal or system that last modified the record."},"updatedDate":{"type":"string","description":"UTC timestamp when the record was last modified.","format":"date-time"}}}},"example":[{"areaSquare":15230.5,"h3IndexingMode":0,"h3MinCellCount":50,"h3PolygonIndexes":null,"expireDateUtc":null,"contactName":"Jane Smith","contactEmail":"jane.smith@example.com","contactPhone":"+61 400 000 000","assetCount":4,"correlationId":"corr-123456","createdBy":"john.doe@example.com","createdDate":"2025-07-01T09:00:00.0000000+00:00","description":"Geofence for Warehouse Area","geofenceType":"Polygon","geojson":{"geometry":{"type":"Polygon","coordinates":[[[150.644,-34.397],[150.645,-34.398],[150.646,-34.397],[150.644,-34.397]]]},"properties":{"color":"blue","alertLevel":"high"},"type":"Feature"},"id":"in-gf-000123","includeAllDevices":true,"isActive":true,"type":"Geofence","title":"Warehouse Boundary","updatedBy":"jane.smith@example.com","updatedDate":"2025-07-02T09:00:00.0000000+00:00"}]}}},"400":{"description":"Invalid Request"},"401":{"description":"Invalid API Key provided or Invalid Access token"},"403":{"description":"Forbidden. The caller is not permitted to access the requested tenant or geofence, or lacks the required role."},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerspioError"},"example":{"functionName":"Perspio.API.GeoFences.GeoFenceApi.GetGeoJsonGeofences","errorType":"NullReferenceException","statusCode":500,"request":"GET /api/geofences","tenantId":"in-93b1a4c6-1234-4c1c-9d2a-1f2e3d4c5b6a","message":"Internal Server Error: Object reference not set to an instance of an object."}}}}}}},"/tollgates/{id}":{"get":{"tags":["Toll"],"summary":"Get Toll Geofence","description":"Returns a single toll-gate geofence by id as GeoJSON. Toll geofence ids use non-tenant formats (e.g. VIC-M3-50).","operationId":"getTollGeofence","parameters":[{"name":"id","in":"path","description":"Toll geofence id. Toll geofences use road-based ids (e.g. VIC-M3-50), not tenant geofence ids.","required":true,"schema":{"type":"string","example":"VIC-M3-50"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"correlationId":{"type":"string","description":"Client-supplied correlation id, echoed back for end-to-end request tracing."},"createdBy":{"type":"string","description":"User principal or system that created the record."},"createdDate":{"type":"string","description":"UTC timestamp when the record was created.","format":"date-time"},"description":{"type":"string","description":"Free-text description of the geofence."},"geofenceType":{"type":"string","description":"Geometry type of the fence (e.g. Polygon, Circle)."},"geojson":{"type":"object","properties":{"geometry":{"type":"object","properties":{"coordinates":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"number","format":"double"}}},"description":"Coordinate array defining the geometry ([lon, lat] order)."},"type":{"type":"string"}},"description":"GeoJSON geometry object."},"properties":{"type":"object"},"type":{"type":"string"}},"description":"GeoJSON geometry defining the fence boundary."},"id":{"type":"string","description":"Unique identifier of this record."},"includeAllDevices":{"type":"boolean","description":"When true, every device in the tenant is evaluated against this geofence rather than only assigned assets."},"isActive":{"type":"boolean","description":"Whether the geofence is active; inactive geofences are excluded from evaluation unless explicitly requested."},"masterDataType":{"type":"string","description":"Master-data classification of the toll geofence."},"rate":{"type":"number","description":"Toll charge rate applied within this toll geofence.","format":"double"},"rateDescription":{"type":"string","description":"Human-readable description of the toll rate."},"type":{"type":"string"},"title":{"type":"string","description":"Display name of the geofence."},"tollChargeId":{"type":"integer","description":"Identifier of the toll-charge scheme applied.","format":"int32"},"tollChargeType":{"type":"string","description":"Type of toll charge (e.g. per-trip or distance-based)."},"tollRoadState":{"type":"string","description":"State or region in which the toll road operates."},"updatedBy":{"type":"string","description":"User principal or system that last modified the record."},"updatedDate":{"type":"string","description":"UTC timestamp when the record was last modified.","format":"date-time"}}},"example":{"correlationId":"corr-78901","createdBy":"john.doe@example.com","createdDate":"2025-07-01T09:00:00.0000000+00:00","description":"Toll zone for highway entry","geofenceType":"Polygon","geojson":{"geometry":{"type":"Polygon","coordinates":[[[150.644,-34.397],[150.645,-34.398],[150.646,-34.397],[150.644,-34.397]]]},"properties":{"color":"red","tollZone":true},"type":"Feature"},"id":"VIC-M3-50","includeAllDevices":true,"isActive":true,"masterDataType":"TollZone","rate":5.5,"rateDescription":"Toll charge for heavy vehicles","type":"TollGeofence","title":"Highway Entry Toll Zone","tollChargeId":501,"tollChargeType":"Fixed","tollRoadState":"NSW","updatedBy":"jane.smith@example.com","updatedDate":"2025-07-02T09:00:00.0000000+00:00"}}}},"400":{"description":"Invalid Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerspioError"},"example":{"functionName":"Perspio.API.GeoFences.GeoFenceApi.GetGeoJsonTollGeofence","errorType":"ArgumentException","statusCode":400,"request":"GET /api/tollgates/VIC-M3-50","tenantId":"in-93b1a4c6-1234-4c1c-9d2a-1f2e3d4c5b6a","message":"Invalid geofence id format: 'abc123'. Expected format: xx-gf-nnnnnn"}}}},"401":{"description":"Invalid API Key provided or Invalid Access token"},"403":{"description":"Forbidden. The caller is not permitted to access the requested tenant or geofence, or lacks the required role."},"404":{"description":"Resource Not Found"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerspioError"},"example":{"functionName":"Perspio.API.GeoFences.GeoFenceApi.GetGeoJsonTollGeofence","errorType":"NullReferenceException","statusCode":500,"request":"GET /api/tollgates/VIC-M3-50","tenantId":"in-93b1a4c6-1234-4c1c-9d2a-1f2e3d4c5b6a","message":"Internal Server Error: Object reference not set to an instance of an object."}}}}}}},"/tollgates":{"get":{"tags":["Toll"],"summary":"Get Toll Geofences","description":"Returns all toll-gate geofences available to the tenant as GeoJSON.","operationId":"getTollGeofences","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"correlationId":{"type":"string","description":"Client-supplied correlation id, echoed back for end-to-end request tracing."},"createdBy":{"type":"string","description":"User principal or system that created the record."},"createdDate":{"type":"string","description":"UTC timestamp when the record was created.","format":"date-time"},"description":{"type":"string","description":"Free-text description of the geofence."},"geofenceType":{"type":"string","description":"Geometry type of the fence (e.g. Polygon, Circle)."},"geojson":{"type":"object","properties":{"geometry":{"type":"object","properties":{"coordinates":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"number","format":"double"}}},"description":"Coordinate array defining the geometry ([lon, lat] order)."},"type":{"type":"string"}},"description":"GeoJSON geometry object."},"properties":{"type":"object"},"type":{"type":"string"}},"description":"GeoJSON geometry defining the fence boundary."},"id":{"type":"string","description":"Unique identifier of this record."},"includeAllDevices":{"type":"boolean","description":"When true, every device in the tenant is evaluated against this geofence rather than only assigned assets."},"isActive":{"type":"boolean","description":"Whether the geofence is active; inactive geofences are excluded from evaluation unless explicitly requested."},"masterDataType":{"type":"string","description":"Master-data classification of the toll geofence."},"rate":{"type":"number","description":"Toll charge rate applied within this toll geofence.","format":"double"},"rateDescription":{"type":"string","description":"Human-readable description of the toll rate."},"type":{"type":"string"},"title":{"type":"string","description":"Display name of the geofence."},"tollChargeId":{"type":"integer","description":"Identifier of the toll-charge scheme applied.","format":"int32"},"tollChargeType":{"type":"string","description":"Type of toll charge (e.g. per-trip or distance-based)."},"tollRoadState":{"type":"string","description":"State or region in which the toll road operates."},"updatedBy":{"type":"string","description":"User principal or system that last modified the record."},"updatedDate":{"type":"string","description":"UTC timestamp when the record was last modified.","format":"date-time"}}}},"example":[{"correlationId":"corr-0001","createdBy":"admin@example.com","createdDate":"2025-07-01T09:00:00.0000000+00:00","description":"Toll zone covering highway entry section.","geofenceType":"Polygon","geojson":{"geometry":{"type":"Polygon","coordinates":[[[150.644,-34.397],[150.645,-34.398],[150.646,-34.397],[150.644,-34.397]]]},"properties":{"color":"red","zoneType":"toll"},"type":"Feature"},"id":"VIC-M3-50","includeAllDevices":true,"isActive":true,"masterDataType":"TollZone","rate":7.5,"rateDescription":"Flat rate for heavy vehicles.","type":"TollGeofence","title":"Highway Entry Toll","tollChargeId":101,"tollChargeType":"Fixed","tollRoadState":"NSW","updatedBy":"admin@example.com","updatedDate":"2025-07-02T10:05:00.0000000+00:00"},{"correlationId":"corr-0002","createdBy":"planner@example.com","createdDate":"2025-07-01T12:00:00.0000000+00:00","description":"Toll zone for the main city bridge.","geofenceType":"Polygon","geojson":{"geometry":{"type":"Polygon","coordinates":[[[151.2,-33.86],[151.201,-33.861],[151.202,-33.86],[151.2,-33.86]]]},"properties":{"color":"blue","zoneType":"toll"},"type":"Feature"},"id":"VIC-M3-51","includeAllDevices":false,"isActive":true,"masterDataType":"TollZone","rate":4.25,"rateDescription":"Bridge crossing charge for light vehicles.","type":"TollGeofence","title":"City Bridge Toll","tollChargeId":102,"tollChargeType":"Variable","tollRoadState":"VIC","updatedBy":"planner@example.com","updatedDate":"2025-07-02T12:35:00.0000000+00:00"}]}}},"400":{"description":"Invalid Request"},"401":{"description":"Invalid API Key provided or Invalid Access token"},"403":{"description":"Forbidden. The caller is not permitted to access the requested tenant or geofence, or lacks the required role."},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerspioError"},"example":{"functionName":"Perspio.API.GeoFences.GeoFenceApi.GetGeoJsonTollGeofences","errorType":"NullReferenceException","statusCode":500,"request":"GET /api/tollgates","tenantId":"in-93b1a4c6-1234-4c1c-9d2a-1f2e3d4c5b6a","message":"Internal Server Error: Object reference not set to an instance of an object."}}}}}}},"/tollgates/{id}/events":{"get":{"tags":["Events"],"summary":"Get Toll Geofence Events","description":"Returns toll-gate crossing events for the toll geofence, within an optional time range and severity filter. When `page_size` is supplied the response is paged and the ContinuationToken, ResultCount and TotalCount values are returned as response headers; pass the ContinuationToken back via the `token` query parameter (or the ContinuationToken request header) to fetch the next page.","operationId":"getTollGeofenceEvents","parameters":[{"name":"id","in":"path","description":"Toll geofence id. Toll geofences use road-based ids (e.g. VIC-M3-50), not tenant geofence ids.","required":true,"schema":{"type":"string","example":"IN-TG-000045"}},{"name":"from","in":"query","description":"Start of the event time range (ISO 8601, UTC). When omitted the service default window applies.","schema":{"type":"string","format":"date-time"},"example":"2025-06-01T12:00:00.0000000+00:00"},{"name":"to","in":"query","description":"End of the event time range (ISO 8601, UTC).","schema":{"type":"string","format":"date-time"},"example":"2025-06-30T11:59:59.0000000+00:00"},{"name":"severityTypes","in":"query","description":"Filter to specific event severities. Repeat the parameter or comma-separate values. When omitted, all severities are returned.","schema":{"type":"array","items":{"type":"string"}},"example":["Critical","Warning"]},{"name":"daterange","in":"query","description":"Named date range shortcut (alternative to from/to), evaluated in the supplied timezone.","schema":{"type":"string"},"example":"last7days"},{"name":"timezone","in":"query","description":"IANA timezone used to evaluate daterange. Defaults to UTC.","schema":{"type":"string"},"example":"Australia/Sydney"},{"name":"page_size","in":"query","description":"Maximum number of events per page. When greater than 0 the response is PAGED and returns the ContinuationToken, ResultCount and TotalCount response headers; when omitted or 0 all matching events are returned in a single unpaged response.","schema":{"type":"integer"},"example":100},{"name":"token","in":"query","description":"Continuation token used to fetch the next page. Pass the value of the ContinuationToken response header from the previous call. May also be supplied via the ContinuationToken request header.","schema":{"type":"string"},"example":"eyJ0b2tlbiI6IjEwMDAifQ=="},{"name":"ContinuationToken","in":"header","description":"Continuation token to fetch the next page, taken from the previous response's ContinuationToken header. Equivalent to the `token` query parameter.","schema":{"type":"string"},"example":"eyJ0b2tlbiI6IjEwMDAifQ=="}],"responses":{"200":{"description":"Success","headers":{"ContinuationToken":{"description":"Token to pass as the `token` query parameter (or `ContinuationToken` request header) to retrieve the next page. Empty or absent when there are no further pages. Only present when `page_size` > 0.","schema":{"type":"string"},"example":"eyJyaWQiOiJETlFMQUpjVm95S3FhRUFEQUFBQUFnPT0iLCJza2lwIjoxfQ=="},"ResultCount":{"description":"Number of events returned in the current page. Only present when `page_size` > 0.","schema":{"type":"integer","format":"int64"},"example":2},"TotalCount":{"description":"Total number of events matching the request across all pages. Only present when `page_size` > 0.","schema":{"type":"integer","format":"int64"},"example":57}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeofenceEvents"},"example":{"key":"eyJ0b2tlbiI6IjEwMDAifQ==","value":[{"objectId":"br-000807","assetId":"br-000807","eventTypeId":27,"location":{"dateTime":"2025-01-16T01:54:11.0000000+00:00","coordinates":[-87.220253,30.5120773],"type":"Point"},"deviceId":"dev-000807","eventTimeUTC":"2025-01-16T01:54:11.0000000+00:00","eventTimeEpoch":1736992451,"tenantId":"br-876aec24-5645-425d-a7a1-cb2f14b0432e","eventObject":{"geofenceId":"br-gf-000042","geofenceTitle":"B0012 - Pensacola","geofenceType":"Branch","timeInGeofence":5.21,"info":"B0012 - Pensacola (Branch)","eventId":"EVT-2025-000182"},"pipelineId":"GeofenceProcessor","id":"br-000807-27-1736992451210-15b8d08167","type":"AssetEvent","correlationId":"strm-20250116-015500-502-b7cc0|40bd8","_ts":1736992692}]}}}},"400":{"description":"Bad request. A query parameter (e.g. from/to/page_size) is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerspioError"},"example":{"functionName":"Perspio.API.GeoFences.GeoFenceApi.GetTollGeofenceEvents","errorType":"ArgumentException","statusCode":400,"request":"GET /api/tollgates/IN-TG-000045/events","tenantId":"in-93b1a4c6-1234-4c1c-9d2a-1f2e3d4c5b6a","message":"Invalid geofence id format: 'abc123'. Expected format: xx-gf-nnnnnn"}}}},"401":{"description":"Unauthorized. Authentication is missing or invalid."},"403":{"description":"Forbidden. The caller is not permitted to access the requested tenant or geofence, or lacks the required role."},"404":{"description":"Resource Not Found"},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerspioError"},"example":{"functionName":"Perspio.API.GeoFences.GeoFenceApi.GetTollGeofenceEvents","errorType":"NullReferenceException","statusCode":500,"request":"GET /api/tollgates/IN-TG-000045/events","tenantId":"in-93b1a4c6-1234-4c1c-9d2a-1f2e3d4c5b6a","message":"Internal Server Error: Object reference not set to an instance of an object."}}}}}}},"/zonelibrary":{"get":{"tags":["Zones"],"summary":"Get Zone Library Geofences","description":"Returns the zone-library geofences available to the tenant as GeoJSON.","operationId":"getZoneGeofences","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZoneGeofenceListResponse"},"example":[{"domain":"US","id":"US-SanFrancisco","geofenceType":"ZoneLibrary","title":"San Francisco","description":"San Francisco","isActive":true,"geojson":{"type":"Feature","properties":{"STATEFP":"06","COUNTYFP":"075","COUNTYNS":"00277302","AFFGEOID":"0500000US06075","GEOID":"06075","NAME":"San Francisco","LSAD":"06","ALAND":121485107,"AWATER":479107241},"geometry":{"type":"Polygon","coordinates":[[[-122.511983,37.7711299990863],[-122.465396,37.800878999086],[-122.398139,37.805629999086],[-122.385323,37.7907239990861],[-122.376462,37.7385579990865],[-122.356784,37.7295049990866],[-122.361749,37.7150099990867],[-122.389826876588,37.7083309990868],[-122.500678019083,37.7081325671047],[-122.505601251345,37.7355674643272],[-122.511983,37.7711299990863]]]}},"areaSquare":105.581392924474,"createdBy":"bhanu@inauro.io","createdDate":"2025-10-02T12:02:52.0000000+00:00","updatedBy":"bhanu@inauro.io","updatedDate":"2025-10-02T12:02:52.0000000+00:00","type":"ZoneLibrary","correlationId":"api-20251002-120250-808-41d4e","_ts":1759406646},{"domain":"US","id":"US-Suffolk","geofenceType":"ZoneLibrary","title":"Suffolk","description":"Suffolk","isActive":true,"geojson":{"type":"Feature","properties":{"STATEFP":"36","COUNTYFP":"103","COUNTYNS":"00974149","AFFGEOID":"0500000US36103","GEOID":"36103","NAME":"Suffolk","LSAD":"06","ALAND":2360846288,"AWATER":3785546967},"geometry":{"type":"MultiPolygon","coordinates":[[[[-72.018926,41.2741139990645],[-71.926802,41.2901219990645],[-71.917281,41.2513329990646],[-72.034754,41.2348179990647],[-72.018926,41.2741139990645]]],[[[-73.485365,40.946396999066],[-73.436664,40.934896999066],[-73.392862,40.9552969990659],[-73.33136,40.929596999066],[-73.2358274066785,40.9066897665985],[-73.229285,40.9051209990662],[-73.148994,40.9288979990661],[-73.144673,40.9558419990659],[-73.110368,40.9719379990659],[-73.040445,40.9644979990659],[-72.859831,40.9660879990659],[-72.708069,40.9778509990658],[-72.585327,40.9975869990657],[-72.504305,41.0433289990655],[-72.445242,41.0861159990653],[-72.389809,41.1083039990652],[-72.354123,41.1399519990651],[-72.291109,41.155873999065],[-72.189163,41.1935489990649],[-72.182033,41.1783449990649],[-72.254704,41.1108519990652],[-72.283093,41.0678739990654],[-72.217476,41.0406109990655],[-72.162898,41.0531869990655],[-72.126704,41.1151389990652],[-72.084207,41.1015239990653],[-72.095711,41.0540199990655],[-72.051928,41.0205059990656],[-71.959595,41.0712369990654],[-71.919385,41.0805169990654],[-71.856214,41.0705979990654],[-71.936977,41.0061369990657],[-72.097369,40.9588799990659],[-72.298727,40.9031509990662],[-72.39585,40.8666599990663],[-72.757176,40.7643709990668],[-72.923214,40.7132819990671],[-73.012545,40.6796509990672],[-73.1460808692108,40.6464079671687],[-73.20844,40.6308839990675],[-73.306396,40.6207559990675],[-73.351465,40.6304999990675],[-73.4239766175572,40.6132448766271],[-73.423253,40.6709199990673],[-73.436006,40.7394579990669],[-73.4385,40.7513109990669],[-73.462259,40.8667099990663],[-73.4973510386263,40.9231822723605],[-73.485365,40.946396999066]]]]}},"areaSquare":2694.54413428319,"createdBy":"bhanu@inauro.io","createdDate":"2025-10-02T12:06:16.0000000+00:00","updatedBy":"bhanu@inauro.io","updatedDate":"2025-10-02T12:06:16.0000000+00:00","type":"ZoneLibrary","correlationId":"api-20251002-120250-808-41d4e","_ts":1759406850}]}}},"400":{"description":"Invalid Request"},"401":{"description":"Invalid API Key provided or Invalid Access token"},"403":{"description":"Forbidden. The caller is not permitted to access the requested tenant or geofence, or lacks the required role."},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerspioError"},"example":{"functionName":"Perspio.API.GeoFences.GeoFenceApi.GetZoneLibraryGeofences","errorType":"NullReferenceException","statusCode":500,"request":"GET /api/zonelibrary","tenantId":"in-93b1a4c6-1234-4c1c-9d2a-1f2e3d4c5b6a","message":"Internal Server Error: Object reference not set to an instance of an object."}}}}}}}},"components":{"schemas":{"PerspioError":{"type":"object","properties":{"functionName":{"type":"string","description":"Name of the backend function that raised the error."},"errorType":{"type":"string","description":"Exception/error type name."},"statusCode":{"type":"integer","description":"HTTP status code of the error.","format":"int32"},"request":{"type":"string","description":"Method and URL of the failing request."},"tenantId":{"type":"string","description":"Tenant the request was executed for."},"message":{"type":"string","description":"Human-readable error message."}},"description":"Standard Perspio backend error body (ErrorResultObject emitted by the error-handling middleware)."},"CreateGeoJsonGeoFence-RequestObject":{"type":"object","properties":{"geofenceType":{"type":"string","description":"Geometry type of the fence (e.g. Polygon, Circle)."},"title":{"type":"string","description":"Display name of the geofence."},"description":{"type":"string","description":"Free-text description of the geofence."},"includeAllDevices":{"type":"boolean","description":"When true, every device in the tenant is evaluated against this geofence rather than only assigned assets."},"isActive":{"type":"boolean","description":"Whether the geofence is active; inactive geofences are excluded from evaluation unless explicitly requested."},"geojson":{"type":"object","properties":{"type":{"type":"string"},"properties":{"type":"object","properties":{"stroke":{"type":"string"},"stroke-width":{"type":"integer"},"stroke-opacity":{"type":"integer"},"fill":{"type":"string"},"fill-opacity":{"type":"number"}}},"geometry":{"type":"object","properties":{"type":{"type":"string"},"coordinates":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"number"}}},"description":"Coordinate array defining the geometry ([lon, lat] order)."}},"description":"GeoJSON geometry object."}},"description":"GeoJSON geometry defining the fence boundary."}}},"UpdateGeoJsonGeoFence-RequestObject":{"type":"object","properties":{"geofenceType":{"type":"string","description":"Geometry type of the fence (e.g. Polygon, Circle)."},"title":{"type":"string","description":"Display name of the geofence."},"description":{"type":"string","description":"Free-text description of the geofence."},"includeAllDevices":{"type":"boolean","description":"When true, every device in the tenant is evaluated against this geofence rather than only assigned assets."},"isActive":{"type":"boolean","description":"Whether the geofence is active; inactive geofences are excluded from evaluation unless explicitly requested."},"geojson":{"type":"object","properties":{"type":{"type":"string"},"properties":{"type":"object","properties":{"stroke":{"type":"string"},"stroke-width":{"type":"integer"},"stroke-opacity":{"type":"integer"},"fill":{"type":"string"},"fill-opacity":{"type":"number"}}},"geometry":{"type":"object","properties":{"type":{"type":"string"},"coordinates":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"number"}}},"description":"Coordinate array defining the geometry ([lon, lat] order)."}},"description":"GeoJSON geometry object."}},"description":"GeoJSON geometry defining the fence boundary."}}},"PatchRequestObject":{"type":"array","items":{"required":["value","path","op"],"type":"object","properties":{"value":{"type":"string","description":"Asset-group id to add or remove (paired with op 'add' or 'remove')."},"path":{"type":"string"},"op":{"type":"string"}}}},"Key":{"type":"string","description":"Opaque continuation token. Pass it back as the ContinuationToken header (or the token query param) to fetch the next page; null/empty when there are no more pages.","nullable":true,"example":"eyJ0b2tlbiI6IjEwMDAifQ=="},"Location":{"type":"object","properties":{"dateTime":{"type":"string","description":"UTC timestamp of the location fix.","format":"date-time","example":"2025-01-16T01:54:11.0000000+00:00"},"coordinates":{"type":"array","items":{"type":"number"},"description":"Coordinate array defining the geometry ([lon, lat] order).","example":[-87.220253,30.5120773]},"type":{"type":"string","example":"Point"}}},"EventObject":{"type":"object","properties":{"geofenceId":{"type":"string","description":"Id of the geofence this record is linked to.","example":"br-gf-000042"},"geofenceTitle":{"type":"string","description":"Title of the geofence involved in the event.","example":"B0012 - Pensacola"},"geofenceType":{"type":"string","description":"Geometry type of the fence (e.g. Polygon, Circle).","example":"Branch"},"timeInGeofence":{"type":"number","example":5.21},"info":{"type":"string","example":"B0012 - Pensacola (Branch)"},"eventId":{"type":"string","nullable":true,"example":null}}},"AssetEvent":{"type":"object","properties":{"objectId":{"type":"string","description":"Id of the object (asset) the event relates to.","example":"br-000807"},"assetId":{"type":"string","description":"Id of the asset that generated the event.","example":"br-000807"},"eventTypeId":{"type":"integer","description":"Event type code (PerspioEvents), serialised as its integer value.","example":27},"location":{"$ref":"#/components/schemas/Location"},"deviceId":{"type":"string","description":"Id of the device that reported the event; null for asset-level events.","nullable":true,"example":null},"eventTimeUTC":{"type":"string","description":"UTC time at which the event occurred.","format":"date-time","example":"2025-01-16T01:54:11.0000000+00:00"},"eventTimeEpoch":{"type":"integer","description":"Event time as Unix epoch seconds (derived from eventTimeUTC).","example":1736992451},"tenantId":{"type":"string","description":"Identifier of the owning tenant.","example":"br-876aec24-5645-425d-a7a1-cb2f14b0432e"},"eventObject":{"$ref":"#/components/schemas/EventObject"},"pipelineId":{"type":"string","description":"Id of the processing pipeline that produced the event.","example":"GeofenceProcessor"},"id":{"type":"string","description":"Unique identifier of this record.","example":"br-000807-27-1736992451210-15b8d08167"},"type":{"type":"string","example":"AssetEvent"},"correlationId":{"type":"string","description":"Client-supplied correlation id, echoed back for end-to-end request tracing.","example":"strm-20250116-015500-502-b7cc0|40bd8"},"_ts":{"type":"integer","example":1736992692}}},"Value":{"type":"array","items":{"$ref":"#/components/schemas/AssetEvent"}},"GeofenceEvents":{"type":"object","properties":{"key":{"$ref":"#/components/schemas/Key"},"value":{"$ref":"#/components/schemas/Value"}}},"RegionGeofenceItem":{"type":"object","properties":{"domain":{"type":"string","description":"Region domain/grouping the geofence belongs to."},"geofenceType":{"type":"string","description":"Geometry type of the fence (e.g. Polygon, Circle)."},"title":{"type":"string","description":"Display name of the geofence."},"description":{"type":"string","description":"Free-text description of the geofence."},"isActive":{"type":"boolean","description":"Whether the geofence is active; inactive geofences are excluded from evaluation unless explicitly requested."},"geojson":{"type":"object","properties":{"type":{"type":"string"},"properties":{"type":"object"},"geometry":{"type":"object","properties":{"type":{"type":"string"},"coordinates":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"number","format":"double"}}},"description":"Coordinate array defining the geometry ([lon, lat] order)."}},"description":"GeoJSON geometry object."}},"description":"GeoJSON geometry defining the fence boundary."},"createdBy":{"type":"string","description":"User principal or system that created the record."},"createdDate":{"type":"string","description":"UTC timestamp when the record was created.","format":"date-time"},"updatedBy":{"type":"string","description":"User principal or system that last modified the record."},"updatedDate":{"type":"string","description":"UTC timestamp when the record was last modified.","format":"date-time"},"id":{"type":"string","description":"Unique identifier of this record."}}},"RegionGeofences":{"type":"array","items":{"$ref":"#/components/schemas/RegionGeofenceItem"}},"WeatherAlertGeofenceItem":{"type":"object","properties":{"id":{"type":"string","description":"Unique alert identifier (the CAP urn:oid of the source warning)."},"type":{"type":"string","description":"Storage record-type discriminator (\"WeatherGeofence\")."},"correlationId":{"type":"string","description":"Correlation id of the ingestion that created or last updated the record.","nullable":true},"_ts":{"type":"integer","description":"Record last-modified time as a Unix epoch (seconds).","format":"int64"},"geofenceType":{"type":"string","description":"Geofence classification; \"WeatherAlert\" for weather-alert geofences."},"title":{"type":"string","description":"Alert headline."},"description":{"type":"string","description":"Alert summary."},"isActive":{"type":"boolean","description":"Whether the geofence is currently active."},"geojson":{"type":"object","properties":{"type":{"type":"string","description":"GeoJSON object type (\"Feature\")."},"properties":{"type":"object","description":"Alert metadata: Sender, Event, Instructions, Urgency, Severity and Certainty."},"geometry":{"type":"object","properties":{"type":{"type":"string","description":"Geometry type, e.g. \"Polygon\" or \"MultiPolygon\"."},"coordinates":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"number","format":"double"}}},"description":"Coordinate array following the GeoJSON convention for the geometry type."}},"description":"GeoJSON geometry of the alert area."}},"description":"GeoJSON Feature describing the alert area."},"areaSquare":{"type":"number","description":"Computed area of the geofence polygon in square metres.","format":"double"},"h3IndexingMode":{"enum":[0,1,2],"type":"integer","description":"H3 indexing mode: 0 = General, 1 = InnerOnly, 2 = InnerWithEdge.","format":"int32"},"h3MinCellCount":{"type":"integer","description":"Minimum H3 cell count used when indexing the polygon.","format":"int32"},"h3PolygonIndexes":{"type":"object","properties":{"innerIndexes":{"type":"array","items":{"type":"string"},"description":"H3 indexes wholly inside the polygon."},"edgeIndexes":{"type":"array","items":{"type":"string"},"description":"H3 indexes on the polygon edge."}},"description":"H3 cell indexes covering the geofence polygon."},"expireDateUtc":{"type":"string","description":"UTC time at which the alert geofence expires.","format":"date-time","nullable":true},"region":{"type":"string","description":"Region label for the geofence, when set.","nullable":true}},"description":"A weather-alert geofence sourced from a severe-weather warning, expressed as a GeoJSON Feature."},"WeatherAlertGeofences":{"type":"array","items":{"$ref":"#/components/schemas/WeatherAlertGeofenceItem"}},"ZoneGeofenceLibrary":{"type":"object","properties":{"domain":{"type":"string","description":"Region domain/grouping the geofence belongs to.","example":"US"},"id":{"type":"string","description":"Unique identifier of this record.","example":"US-SanFrancisco"},"geofenceType":{"type":"string","description":"Geometry type of the fence (e.g. Polygon, Circle).","example":"ZoneLibrary"},"title":{"type":"string","description":"Display name of the geofence.","example":"San Francisco"},"description":{"type":"string","description":"Free-text description of the geofence.","example":"San Francisco"},"isActive":{"type":"boolean","description":"Whether the geofence is active; inactive geofences are excluded from evaluation unless explicitly requested.","example":true},"geojson":{"type":"object","properties":{"type":{"enum":["Feature"],"type":"string","example":"Feature"},"properties":{"type":"object","properties":{"STATEFP":{"type":"string"},"COUNTYFP":{"type":"string"},"COUNTYNS":{"type":"string"},"AFFGEOID":{"type":"string"},"GEOID":{"type":"string"},"NAME":{"type":"string"},"LSAD":{"type":"string"},"ALAND":{"type":"number","format":"double"},"AWATER":{"type":"number","format":"double"}}},"geometry":{"type":"object","properties":{"type":{"enum":["Polygon","MultiPolygon"],"type":"string","example":"Polygon"},"coordinates":{"oneOf":[{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"number","format":"double"}}},"description":"Polygon: array of linear rings; each ring is array of [lon, lat] pairs"},{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"number","format":"double"}}}},"description":"MultiPolygon: array of polygons; each polygon is array of linear rings"}],"description":"Coordinate array defining the geometry ([lon, lat] order)."}},"additionalProperties":false,"description":"GeoJSON geometry object."}},"additionalProperties":false,"description":"GeoJSON geometry defining the fence boundary."},"areaSquare":{"type":"number","description":"Area enclosed by the geofence, in square metres.","format":"double","example":105.581392924474},"createdBy":{"type":"string","description":"User principal or system that created the record.","format":"email","example":"bhanu@inauro.io"},"createdDate":{"type":"string","description":"UTC timestamp when the record was created.","format":"date-time","example":"2025-10-02T12:02:52.0000000+00:00"},"updatedBy":{"type":"string","description":"User principal or system that last modified the record.","format":"email","example":"bhanu@inauro.io"},"updatedDate":{"type":"string","description":"UTC timestamp when the record was last modified.","format":"date-time","example":"2025-10-02T12:02:52.0000000+00:00"},"type":{"type":"string","example":"ZoneLibrary"},"correlationId":{"type":"string","description":"Client-supplied correlation id, echoed back for end-to-end request tracing.","example":"api-20251002-120250-808-41d4e"},"_ts":{"type":"integer","format":"int64","example":1759406646}},"additionalProperties":false},"ZoneGeofenceListResponse":{"type":"array","items":{"$ref":"#/components/schemas/ZoneGeofenceLibrary"}}},"securitySchemes":{"oauth2":{"type":"oauth2","description":"Client credentials from your Perspio API application. See Get Access Token.","flows":{"clientCredentials":{"tokenUrl":"/auth/v3/token","scopes":{}}}},"subscriptionKey":{"type":"apiKey","name":"Ocp-Apim-Subscription-Key","in":"header","description":"Your tenant's subscription key, from your API application."},"tenantId":{"type":"apiKey","name":"tid","in":"header","description":"Your tenant ID (tid), from your API application."}}},"security":[{"oauth2":[],"subscriptionKey":[],"tenantId":[]}],"tags":[{"name":"Toll","description":"Toll-road geofences (global master data)."},{"name":"Events","description":"Geofence entry/exit events."},{"name":"Regions","description":"Region geofences."},{"name":"Weather Alerts","description":"Weather-alert geofences."},{"name":"Zones","description":"Zone-library geofences."},{"name":"Geofences","description":"Tenant geofence CRUD and the assets/groups within a geofence."}],"x-readme":{"oauth-options":{"useInsecureClientAuthentication":true}}}