{"openapi":"3.0.0","paths":{"/":{"get":{"operationId":"HealthController_check","parameters":[],"responses":{"200":{"description":"The Health Check is successful","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","example":"ok"},"info":{"type":"object","example":{"database":{"status":"up"}},"additionalProperties":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}},"additionalProperties":true},"nullable":true},"error":{"type":"object","example":{},"additionalProperties":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}},"additionalProperties":true},"nullable":true},"details":{"type":"object","example":{"database":{"status":"up"}},"additionalProperties":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}},"additionalProperties":true}}}}}}},"503":{"description":"The Health Check is not successful","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","example":"error"},"info":{"type":"object","example":{"database":{"status":"up"}},"additionalProperties":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}},"additionalProperties":true},"nullable":true},"error":{"type":"object","example":{"redis":{"status":"down","message":"Could not connect"}},"additionalProperties":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}},"additionalProperties":true},"nullable":true},"details":{"type":"object","example":{"database":{"status":"up"},"redis":{"status":"down","message":"Could not connect"}},"additionalProperties":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}},"additionalProperties":true}}}}}}}},"tags":["Health"]}},"/v2/organisations/{organisation_id}/me":{"get":{"operationId":"GatewayGrpcController_getCurrentUserId_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}}],"responses":{"200":{"description":"Current user database id"}},"security":[{"access-token":[]}],"summary":"Get current user database id","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/tickets":{"post":{"operationId":"GatewayGrpcController_createTicket_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"category":{"type":"integer"},"subject":{"type":"string"},"initial_message":{"type":"string"},"priority":{"type":"integer"},"files":{"type":"array","items":{"type":"string","format":"binary"}},"vehicle_id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Ticket created successfully"}},"security":[{"access-token":[]}],"summary":"Create Ticket","tags":["Gateway GRPC"]},"get":{"operationId":"GatewayGrpcController_listTickets_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}},{"name":"limit","required":false,"in":"query","description":"Number of items per page","schema":{"minimum":1,"maximum":1000,"default":10,"example":10,"type":"number"}},{"name":"page","required":false,"in":"query","description":"Page number","schema":{"minimum":1,"example":1,"type":"number"}},{"name":"category","required":false,"in":"query","schema":{"type":"number","enum":[0,1,2,3,4,5,6]}},{"name":"status","required":false,"in":"query","schema":{"type":"number","enum":[0,1,2,3,4,5]}},{"name":"assignee_id","required":false,"in":"query","description":"Assignee ID","schema":{"type":"string"}},{"name":"priority","required":false,"in":"query","schema":{"type":"number","enum":[0,1,2,3]}},{"name":"query","required":false,"in":"query","description":"Generic search term for ticket list. Matches vehicle id or plate number.","schema":{"maxLength":64,"type":"string"}},{"name":"organisations","required":false,"in":"query","description":"Restrict tickets to specific organisations (format: id:is_directly_assigned)","schema":{"example":"019ba16d-d19b-7486-9b8c-fad000196564:1,019c9910-c573-777c-a8ab-cd49769de4a0:0","type":"array","items":{"type":"string"}}},{"name":"scope","required":false,"in":"query","schema":{"type":"number","enum":[0,1]}}],"responses":{"200":{"description":"Tickets listed successfully"}},"security":[{"access-token":[]}],"summary":"List Tickets","tags":["Gateway GRPC"]},"delete":{"operationId":"GatewayGrpcController_deleteTickets_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteTicketsDto"}}}},"responses":{"200":{"description":"Tickets deleted successfully"}},"security":[{"access-token":[]}],"summary":"Delete Tickets","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/tickets/report":{"get":{"operationId":"GatewayGrpcController_generateTicketReport_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}}],"responses":{"200":{"description":"Ticket report generated successfully"}},"security":[{"access-token":[]}],"summary":"Generate Ticket Report","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/tickets/{ticket_id}":{"get":{"operationId":"GatewayGrpcController_getTicket_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}},{"name":"ticket_id","required":true,"in":"path","description":"Ticket ID","schema":{"type":"string"}},{"name":"scope","required":false,"in":"query","schema":{"type":"number","enum":[0,1]}}],"responses":{"200":{"description":"Ticket details retrieved successfully"}},"security":[{"access-token":[]}],"summary":"Get Ticket","tags":["Gateway GRPC"]},"patch":{"operationId":"GatewayGrpcController_updateTicket_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}},{"name":"ticket_id","required":true,"in":"path","description":"Ticket ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTicketDto"}}}},"responses":{"200":{"description":"Ticket updated successfully"}},"security":[{"access-token":[]}],"summary":"Update Ticket","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/tickets/{ticket_id}/messages":{"get":{"operationId":"GatewayGrpcController_getTicketMessages_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}},{"name":"ticket_id","required":true,"in":"path","description":"Ticket ID","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","description":"Number of items per page","schema":{"minimum":1,"maximum":1000,"default":10,"example":10,"type":"number"}},{"name":"page","required":false,"in":"query","description":"Page number","schema":{"minimum":1,"example":1,"type":"number"}},{"name":"scope","required":false,"in":"query","schema":{"type":"number","enum":[0,1]}}],"responses":{"200":{"description":"Ticket messages retrieved successfully"}},"security":[{"access-token":[]}],"summary":"Get Ticket Messages","tags":["Gateway GRPC"]},"post":{"operationId":"GatewayGrpcController_addTicketMessage_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}},{"name":"ticket_id","required":true,"in":"path","description":"Ticket ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"content":{"type":"string"},"scope":{"type":"number","enum":[0,1],"description":"Ticket scope: 0 = CUSTOMER, 1 = INTERNAL"},"files":{"type":"array","items":{"type":"string","format":"binary"}}}}}}},"responses":{"200":{"description":"Ticket message added successfully"}},"security":[{"access-token":[]}],"summary":"Add Ticket Message","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/tickets/assignable-users":{"get":{"operationId":"GatewayGrpcController_getAssignableUsers_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}},{"name":"limit","required":false,"in":"query","description":"Number of items per page","schema":{"minimum":1,"maximum":1000,"default":10,"example":10,"type":"number"}},{"name":"page","required":false,"in":"query","description":"Page number","schema":{"minimum":1,"example":1,"type":"number"}},{"name":"search","required":false,"in":"query","description":"Search query","schema":{"type":"string"}}],"responses":{"200":{"description":"Assignable users retrieved successfully"}},"security":[{"access-token":[]}],"summary":"Get Assignable Users","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/widgets":{"get":{"operationId":"GatewayGrpcController_getAllWidgets_v2","parameters":[{"name":"scope","required":false,"in":"query","description":"Widget scope: 0 = fleet, 1 = driver","schema":{"type":"number","enum":[0,1]}}],"responses":{"200":{"description":"List of all widget definitions"}},"security":[{"access-token":[]}],"summary":"Get all widgets","tags":["Gateway GRPC"]}},"/v2/organisations/widget-template/{widget_definition_id}":{"get":{"operationId":"GatewayGrpcController_getWidgetTemplate_v2","parameters":[{"name":"widget_definition_id","required":true,"in":"path","schema":{"type":"string"}},{"name":"configuration","required":false,"in":"query","description":"Configuration for the widget template. Pass as a nested object (e.g. ?configuration[stat_type]=recent_alerts) or JSON string.","schema":{"$ref":"#/components/schemas/Object"}}],"responses":{"200":{"description":"Widget template data"}},"security":[{"access-token":[]}],"summary":"Get widget template","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/dashboards":{"get":{"operationId":"GatewayGrpcController_getAllDashboards_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}}],"responses":{"200":{"description":"List of dashboards"}},"security":[{"access-token":[]}],"summary":"Get all dashboards","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/dashboards/{dashboard_id}":{"get":{"operationId":"GatewayGrpcController_getDashboard_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","schema":{"type":"string"}},{"name":"dashboard_id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Dashboard details"}},"security":[{"access-token":[]}],"summary":"Get dashboard","tags":["Gateway GRPC"]},"patch":{"operationId":"GatewayGrpcController_updateDashboard_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","schema":{"type":"string"}},{"name":"dashboard_id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDashboardBodyDto"}}}},"responses":{"200":{"description":"Dashboard updated"}},"security":[{"access-token":[]}],"summary":"Update dashboard","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/dashboards/{dashboard_id}/widgets":{"post":{"operationId":"GatewayGrpcController_addWidget_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","schema":{"type":"string"}},{"name":"dashboard_id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddWidgetBodyDto"}}}},"responses":{"200":{"description":"Widget added"}},"security":[{"access-token":[]}],"summary":"Add widget to dashboard","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/dashboards/{dashboard_id}/widgets/{widget_id}":{"patch":{"operationId":"GatewayGrpcController_updateWidget_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","schema":{"type":"string"}},{"name":"dashboard_id","required":true,"in":"path","schema":{"type":"string"}},{"name":"widget_id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWidgetBodyDto"}}}},"responses":{"200":{"description":"Widget updated"}},"security":[{"access-token":[]}],"summary":"Update widget in dashboard","tags":["Gateway GRPC"]},"delete":{"operationId":"GatewayGrpcController_removeWidget_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","schema":{"type":"string"}},{"name":"dashboard_id","required":true,"in":"path","schema":{"type":"string"}},{"name":"widget_id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Widget removed"}},"security":[{"access-token":[]}],"summary":"Remove widget from dashboard","tags":["Gateway GRPC"]},"get":{"operationId":"GatewayGrpcController_getWidgetData_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","schema":{"type":"string"}},{"name":"dashboard_id","required":true,"in":"path","schema":{"type":"string"}},{"name":"widget_id","required":true,"in":"path","schema":{"type":"string"}},{"name":"start_time","required":true,"in":"query","description":"Start time (ISO UTC string)","schema":{"type":"string"}},{"name":"end_time","required":true,"in":"query","description":"End time (ISO UTC string)","schema":{"type":"string"}},{"name":"parameters","required":false,"in":"query","description":"Dynamic parameters to override widget configuration. Pass as a nested object (e.g. ?parameters[sort_direction]=asc) or JSON string. Example: {\"sort_direction\": \"asc\"}","schema":{"$ref":"#/components/schemas/Object"}}],"responses":{"200":{"description":"Widget data"}},"security":[{"access-token":[]}],"summary":"Get widget data","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/dashboards/{dashboard_id}/driver-comparison":{"post":{"operationId":"GatewayGrpcController_getDriverComparisonData_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","schema":{"type":"string"}},{"name":"dashboard_id","required":true,"in":"path","schema":{"type":"string"}},{"name":"start_time","required":true,"in":"query","description":"Start time (ISO UTC string)","schema":{"type":"string"}},{"name":"end_time","required":true,"in":"query","description":"End time (ISO UTC string)","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetDriverComparisonDataBodyDto"}}}},"responses":{"200":{"description":"Driver comparison data"}},"security":[{"access-token":[]}],"summary":"Get driver comparison data","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/dashboards/{dashboard_id}/drivers/{driver_id}/details":{"get":{"operationId":"GatewayGrpcController_getDriverDetailData_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","schema":{"type":"string"}},{"name":"dashboard_id","required":true,"in":"path","schema":{"type":"string"}},{"name":"driver_id","required":true,"in":"path","schema":{"type":"string"}},{"name":"start_time","required":true,"in":"query","description":"Start time (ISO UTC string)","schema":{"type":"string"}},{"name":"end_time","required":true,"in":"query","description":"End time (ISO UTC string)","schema":{"type":"string"}},{"name":"section","required":false,"in":"query","description":"Driver detail section: 0 = overview, 1 = trips, 2 = alerts, 3 = vehicles","schema":{"type":"number","enum":[0,1,2,3]}},{"name":"page","required":false,"in":"query","schema":{"default":1,"type":"number"}},{"name":"limit","required":false,"in":"query","schema":{"maximum":100,"default":20,"type":"number"}}],"responses":{"200":{"description":"Driver detail section data"}},"security":[{"access-token":[]}],"summary":"Get driver detail section data","tags":["Gateway GRPC"]}},"/v2/organisations":{"get":{"description":"| Mode | Parameters | Result |\n|------|------------|--------|\n| Root organisations (default) | Omit both `parent_id` and `include_descendants` | Returns only root organisations visible to the current user |\n| All accessible organisations | `include_descendants=true` and no `parent_id` | Returns all organisations the user can access under their roots |\n| Direct children of a parent | Provide `parent_id`; omit `include_descendants` or set it to `false` | Returns only the direct children of the specified parent |\n| All descendants of a parent | Provide `parent_id` and set `include_descendants=true` | Returns all descendants of the specified parent |\n\n**Additional filters**\n\n| Parameter | Description |\n|-----------|-------------|\n| `query` | Performs a case-insensitive substring search on organisation `display_name` |\n| `ids` | May be provided alone (without any other query parameters) to fetch an explicit list of organisations by ID |","operationId":"GatewayGrpcController_getOrganisations_v2","parameters":[{"name":"limit","required":false,"in":"query","description":"Number of items per page","schema":{"minimum":1,"maximum":1000,"default":10,"example":10,"type":"number"}},{"name":"page","required":false,"in":"query","description":"Page number","schema":{"minimum":1,"example":1,"type":"number"}},{"name":"query","required":false,"in":"query","description":"Search query","schema":{"maxLength":64,"type":"string"}},{"name":"parent_id","required":false,"in":"query","description":"Parent organisation id. If omitted, returns effective roots.","schema":{"example":"a9a7e4e8-3e4b-4b1a-8e4a-4a2a4a2a4a2a","type":"string"}},{"name":"include_descendants","required":false,"in":"query","description":"**Include descendants**\n\n- `false` (default)\n  - No `parent_id`: return root organisations only.\n  - With `parent_id`: return direct children only.\n\n- `true`\n  - No `parent_id`: return all organisations accessible under the user's root organisations.\n  - With `parent_id`: return all descendants of the specified parent organisation.","schema":{"example":false,"type":"boolean"}},{"name":"include_ancestors","required":false,"in":"query","description":"Populate visible ancestor chain for each returned organisation","schema":{"example":false,"type":"boolean"}},{"name":"ids","required":false,"in":"query","description":"List of organisation IDs to fetch. If present, parent_id is ignored.","schema":{"example":["a9a7e4e8-3e4b-4b1a-8e4a-4a2a4a2a4a2a"],"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"List of organisations","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetOrganisationListingResponseDto"}}}}},"security":[{"access-token":[]}],"summary":"List organisations","tags":["Gateway GRPC"]},"post":{"operationId":"GatewayGrpcController_createOrganisation_v2","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrganisationDto"}}}},"responses":{"200":{"description":"The created organisation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrganisationResponseDto"}}}}},"security":[{"access-token":[]}],"summary":"Create a new organisation","tags":["Gateway GRPC"]}},"/v2/organisations/search":{"get":{"description":"Deprecated: use GET /v2/organisations with `include_descendants=true` and the `query` parameter instead.\nThis endpoint is kept for backward compatibility and internally delegates to the unified list endpoint.","operationId":"GatewayGrpcController_searchOrganisations_v2","parameters":[{"name":"limit","required":false,"in":"query","description":"Number of items per page","schema":{"minimum":1,"maximum":1000,"default":10,"example":10,"type":"number"}},{"name":"page","required":false,"in":"query","description":"Page number","schema":{"minimum":1,"example":1,"type":"number"}},{"name":"query","required":true,"in":"query","description":"Search query","schema":{"example":"Sector 8","type":"string"}}],"responses":{"200":{"description":"Search results","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchOrganisationsResponseDto"}}}}},"security":[{"access-token":[]}],"summary":"Search organisations (deprecated)","tags":["Gateway GRPC"]}},"/v2/organisations/hierarchy":{"get":{"operationId":"GatewayGrpcController_getOrganisationsInHierarchy_v2","parameters":[],"responses":{"200":{"description":""}},"security":[{"access-token":[]}],"summary":"Get organisation hierarchy","tags":["Gateway GRPC"]}},"/v2/organisations/{entity_id}/path/{organisation_id}":{"get":{"operationId":"GatewayGrpcController_resolveOrganisationPath_v2","parameters":[{"name":"entity_id","required":true,"in":"path","description":"Context entity id from where path is resolved","schema":{"example":"a9a7e4e8-3e4b-4b1a-8e4a-4a2a4a2a4a2a","type":"string"}},{"name":"organisation_id","required":true,"in":"path","description":"Target organisation id whose path needs to be resolved","schema":{"example":"a9a7e4e8-3e4b-4b1a-8e4a-4a2a4a2a4a2a","type":"string"}}],"responses":{"200":{"description":"Path to organisation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveOrganisationPathResponseDto"}}}}},"security":[{"access-token":[]}],"summary":"Resolve organisation path","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/device-models":{"get":{"description":"Get a paginated list of device models for the organisation","operationId":"GatewayGrpcController_listDeviceModels_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}},{"name":"limit","required":false,"in":"query","description":"Number of items per page","schema":{"minimum":1,"maximum":1000,"default":10,"example":10,"type":"number"}},{"name":"page","required":false,"in":"query","description":"Page number","schema":{"minimum":1,"example":1,"type":"number"}},{"name":"query","required":false,"in":"query","description":"Search query","schema":{"maxLength":64,"type":"string"}},{"name":"type","required":false,"in":"query","description":"Filter by device type","schema":{"type":"number","enum":[0,1]}}],"responses":{"200":{"description":""}},"security":[{"access-token":[]}],"summary":"List device models","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/device-models/{device_model_id}":{"get":{"description":"Get a specific device model by ID","operationId":"GatewayGrpcController_getDeviceModel_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}},{"name":"device_model_id","required":true,"in":"path","description":"Device model ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}}],"responses":{"200":{"description":""}},"security":[{"access-token":[]}],"summary":"Get device model","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/devices":{"post":{"description":"Create new devices","operationId":"GatewayGrpcController_createDevices_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDevicesRequestDto"}}}},"responses":{"200":{"description":"Response data when a single device is created, including its ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDevicesResponseDto"}}}}},"security":[{"access-token":[]}],"summary":"Create devices","tags":["Gateway GRPC"]},"get":{"description":"Get a paginated list of devices for the organisation","operationId":"GatewayGrpcController_getDevices_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}},{"name":"limit","required":false,"in":"query","description":"Number of items per page","schema":{"minimum":1,"maximum":1000,"default":10,"example":10,"type":"number"}},{"name":"page","required":false,"in":"query","description":"Page number","schema":{"minimum":1,"example":1,"type":"number"}},{"name":"query","required":false,"in":"query","description":"Search query","schema":{"maxLength":64,"type":"string"}},{"name":"organisations","required":false,"in":"query","description":"List of Organisations to filter by (format: id:is_directly_assigned)","schema":{"example":"019ba16d-d19b-7486-9b8c-fad000196564:1,019c9910-c573-777c-a8ab-cd49769de4a0:0","type":"array","items":{"type":"string"}}},{"name":"is_linked","required":false,"in":"query","description":"Filter by link status","schema":{"type":"boolean"}},{"name":"sort_field","required":false,"in":"query","description":"Sort field","schema":{"type":"number","enum":[0,1,2,3,4]}},{"name":"sort_direction","required":false,"in":"query","description":"Sort direction","schema":{"type":"number","enum":[0,1]}}],"responses":{"200":{"description":"Devices without details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetDevicesResponseDto"}}}}},"security":[{"access-token":[]}],"summary":"Get devices","tags":["Gateway GRPC"]},"delete":{"operationId":"GatewayGrpcController_deleteDevices_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}},{"name":"ids","required":true,"in":"query","description":"List of Device IDs to delete","schema":{"example":["019aa01c-a1a9-7fae-961b-23845147892e"],"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Device(s) deleted successfully"}},"security":[{"access-token":[]}],"summary":"Delete device(s)","tags":["Gateway GRPC"]},"patch":{"description":"Update multiple devices at once","operationId":"GatewayGrpcController_updateDevices_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDevicesRequestDto"}}}},"responses":{"200":{"description":""}},"security":[{"access-token":[]}],"summary":"Bulk update devices","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/devices/{device_id}":{"get":{"description":"Get a specific device by ID","operationId":"GatewayGrpcController_getDevice_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}},{"name":"device_id","required":true,"in":"path","description":"Device ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}}],"responses":{"200":{"description":"Device without details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetDeviceResponseDto"}}}}},"security":[{"access-token":[]}],"summary":"Get device","tags":["Gateway GRPC"]},"patch":{"description":"Update a device","operationId":"GatewayGrpcController_updateDevice_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}},{"name":"device_id","required":true,"in":"path","description":"Device ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDeviceRequestDto"}}}},"responses":{"200":{"description":""}},"security":[{"access-token":[]}],"summary":"Update device","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/devices/{device_id}/sensors/calibrate":{"patch":{"operationId":"GatewayGrpcController_calibrateSensor_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}},{"name":"device_id","required":true,"in":"path","description":"Device ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalibrateSensorRequestDto"}}}},"responses":{"200":{"description":""}},"security":[{"access-token":[]}],"summary":"Calibrate a device sensor","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/devices/{device_id}/initiate-stream/{channel_id}":{"get":{"description":"Initiate stream for a device channel","operationId":"GatewayGrpcController_initiateStream_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}},{"name":"device_id","required":true,"in":"path","description":"Device ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}},{"name":"channel_id","required":true,"in":"path","description":"Channel ID","schema":{"example":1,"type":"number"}},{"name":"protocol","required":true,"in":"query","description":"Video protocol","schema":{"example":"ws","type":"string","enum":["ws","wss"]}},{"name":"video_type","required":true,"in":"query","description":"Video Type","schema":{"example":0,"type":"number","enum":[0,1,2]}},{"name":"start_time","required":false,"in":"query","description":"Start time for history video streaming (timestamp in milliseconds)","schema":{"example":"1767676738000","type":"string"}},{"name":"end_time","required":false,"in":"query","description":"End time for history video streaming (timestamp in milliseconds)","schema":{"example":"1767676918000","type":"string"}}],"responses":{"200":{"description":"Stream details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InitiateStreamResponseDto"}}}}},"security":[{"access-token":[]}],"summary":"Initiate stream","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/devices/{device_id}/get-stream-url/{channel_id}":{"get":{"description":"Get a live or history stream URL for a device channel","operationId":"GatewayGrpcController_getStreamURL_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}},{"name":"device_id","required":true,"in":"path","description":"Device ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}},{"name":"channel_id","required":true,"in":"path","description":"Channel ID","schema":{"example":1,"type":"number"}},{"name":"protocol","required":true,"in":"query","description":"Video protocol","schema":{"example":"ws","type":"string","enum":["ws","wss"]}},{"name":"video_type","required":true,"in":"query","description":"Video Type","schema":{"example":0,"type":"number","enum":[0,1]}},{"name":"start_time","required":false,"in":"query","description":"Start time for history video streaming (timestamp in milliseconds)","schema":{"example":"1767676738000","type":"string"}},{"name":"end_time","required":false,"in":"query","description":"End time for history video streaming (timestamp in milliseconds)","schema":{"example":"1767676918000","type":"string"}}],"responses":{"200":{"description":"Stream details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InitiateStreamResponseDto"}}}}},"security":[{"access-token":[]}],"summary":"Get stream URL","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/alerts":{"get":{"description":"Get a list of alerts for the organisation","operationId":"GatewayGrpcController_getAllAlerts_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}},{"name":"limit","required":false,"in":"query","description":"Number of items per page","schema":{"minimum":1,"maximum":1000,"default":10,"example":10,"type":"number"}},{"name":"page","required":false,"in":"query","description":"Page number","schema":{"minimum":1,"example":1,"type":"number"}},{"name":"organisations","required":false,"in":"query","description":"List of Organisations to filter by (format: id:is_directly_assigned)","schema":{"example":"019ba16d-d19b-7486-9b8c-fad000196564:1,019c9910-c573-777c-a8ab-cd49769de4a0:0","type":"array","items":{"type":"string"}}},{"name":"alert_types","required":false,"in":"query","description":"Alert types","schema":{"type":"array","items":{"type":"number","enum":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,999]}}},{"name":"category","required":false,"in":"query","description":"Alert category","schema":{"type":"number","enum":[0,1,2,3,4]}},{"name":"vehicle_ids","required":false,"in":"query","description":"Vehicle ID","schema":{"example":["b9a7e4e8-3e4b-4b1a-8e4a-4a2a4a2a4a2a","c9a7e4e8-3e4b-4b1a-8e4a-4a2a4a2a4a2b"],"type":"array","items":{"type":"string"}}},{"name":"has_media","required":false,"in":"query","description":"Whether to return only alerts with media (images or videos)","schema":{"example":true,"type":"boolean"}},{"name":"last_n_hours","required":false,"in":"query","description":"Return only alerts from the last N hours (1-24)","schema":{"minimum":1,"maximum":24,"type":"number"}},{"name":"acknowledgement_filter","required":false,"in":"query","description":"Filter by acknowledgement status","schema":{"example":3,"type":"number","enum":[1,2,3]}},{"name":"alert_validity","required":false,"in":"query","description":"Filter by validation status: true for valid alerts, false for false alerts","schema":{"example":true,"type":"boolean"}}],"responses":{"200":{"description":"List of alerts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetAllAlertsResponseDto"}}}}},"security":[{"access-token":[]}],"summary":"Get all alerts","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/alerts/acknowledge":{"post":{"description":"Acknowledge one or more alerts. Repeated calls are safe.","operationId":"GatewayGrpcController_acknowledgeAlert_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcknowledgeAlertsRequestDto"}}}},"responses":{"200":{"description":"Alerts acknowledged successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcknowledgeAlertResponseDto"}}}}},"security":[{"access-token":[]}],"summary":"Acknowledge alerts","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/alerts/invalidate":{"post":{"description":"Invalidate one or more alerts. Repeated calls are safe.","operationId":"GatewayGrpcController_invalidateAlert_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidateAlertsRequestDto"}}}},"responses":{"200":{"description":"Alerts invalidated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidateAlertResponseDto"}}}}},"security":[{"access-token":[]}],"summary":"Invalidate alerts","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/alerts/settings":{"get":{"description":"Get alert notification settings for the organisation","operationId":"GatewayGrpcController_getAlertNotificationSettings_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}}],"responses":{"200":{"description":"Alert notification settings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetAlertNotificationSettingsResponseDto"}}}}},"security":[{"access-token":[]}],"summary":"Get alert notification settings","tags":["Gateway GRPC"]},"patch":{"description":"Partially update alert notification setting overrides for the organisation","operationId":"GatewayGrpcController_saveAlertNotificationSettings_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveAlertNotificationSettingsRequestDto"}}}},"responses":{"200":{"description":"Alert notification settings saved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveAlertNotificationSettingsResponseDto"}}}}},"security":[{"access-token":[]}],"summary":"Update alert notification settings","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/alerts/settings/detail":{"get":{"description":"Get full alert setting details for the selected node, or its configurable descendants when the node is a category or group","operationId":"GatewayGrpcController_getAlertNotificationSettingDetail_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}},{"name":"node_key","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Alert notification setting details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetAlertNotificationSettingDetailResponseDto"}}}}},"security":[{"access-token":[]}],"summary":"Get alert setting detail","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/alerts/{alert_id}":{"get":{"description":"Get a specific alert by ID","operationId":"GatewayGrpcController_getAlertById_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","schema":{"type":"string"}},{"name":"alert_id","required":true,"in":"path","schema":{"type":"string"}},{"name":"start_time","required":false,"in":"query","description":"Grouped alert start time as a Unix timestamp in milliseconds","schema":{"example":"1780252200000","type":"string"}},{"name":"end_time","required":false,"in":"query","description":"Grouped alert end time as a Unix timestamp in milliseconds","schema":{"example":"1780252560000","type":"string"}}],"responses":{"200":{"description":"Alert details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetAlertByIdResponseDto"}}}}},"security":[{"access-token":[]}],"summary":"Get alert by ID","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/devices/link-to-vehicle":{"post":{"operationId":"GatewayGrpcController_linkDevicesToVehicle_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkDevicesToVehicleRequestDto"}}}},"responses":{"200":{"description":"Device link result, including row errors for partial failures","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkDevicesToVehicleResponseDto"}}}}},"security":[{"access-token":[]}],"summary":"Link devices to a vehicle","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/devices/unlink-from-vehicle":{"post":{"operationId":"GatewayGrpcController_unlinkDevicesFromVehicle_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnlinkDevicesFromVehicleRequestDto"}}}},"responses":{"200":{"description":"Devices unlinked from vehicle successfully"}},"security":[{"access-token":[]}],"summary":"Unlink devices from a vehicle","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/devices/update-organisation":{"post":{"operationId":"GatewayGrpcController_updateDevicesOrganisation_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDevicesOrganisationRequestDto"}}}},"responses":{"200":{"description":"Devices organisation updated successfully"}},"security":[{"access-token":[]}],"summary":"Update devices organisation","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/device-vehicle-links":{"get":{"operationId":"GatewayGrpcController_getDeviceVehicleLinks_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}}],"responses":{"200":{"description":"List of device-vehicle links","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetDeviceVehicleLinksResponseDto"}}}}},"security":[{"access-token":[]}],"summary":"Get all device vehicle links for an organisation","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/vehicles/import":{"post":{"operationId":"GatewayGrpcController_importVehicles_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportVehiclesDTO"}}}},"responses":{"200":{"description":"Import completed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportVehiclesResponseDto"}}}}},"security":[{"access-token":[]}],"summary":"Import Vehicles and Devices","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/vehicles":{"post":{"operationId":"GatewayGrpcController_createVehicles_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateVehicleDTO"}}}},"responses":{"200":{"description":"Vehicle(s) created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateVehicleResponseDTO"}}}}},"security":[{"access-token":[]}],"summary":"Create Vehicle(s)","tags":["Gateway GRPC"]},"get":{"operationId":"GatewayGrpcController_listVehicles_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}},{"name":"limit","required":false,"in":"query","description":"Number of items per page","schema":{"minimum":1,"maximum":1000,"default":10,"example":10,"type":"number"}},{"name":"page","required":false,"in":"query","description":"Page number","schema":{"minimum":1,"example":1,"type":"number"}},{"name":"query","required":false,"in":"query","description":"Search query","schema":{"maxLength":64,"type":"string"}},{"name":"organisations","required":false,"in":"query","description":"List of Organisations to filter by (format: id:is_directly_assigned)","schema":{"example":"019ba16d-d19b-7486-9b8c-fad000196564:1,019c9910-c573-777c-a8ab-cd49769de4a0:0","type":"array","items":{"type":"string"}}},{"name":"entity_type","required":true,"in":"query","description":"Entity Type","schema":{"type":"number","enum":[0,1]}},{"name":"sort_field","required":false,"in":"query","description":"Sort field","schema":{"type":"number","enum":[0,1,2,3]}},{"name":"sort_direction","required":false,"in":"query","description":"Sort direction","schema":{"type":"number","enum":[0,1]}},{"name":"states","required":false,"in":"query","description":"Vehicle states to filter by","schema":{"type":"number","enum":[0,1,2,3,4]}},{"name":"vehicle_ids","required":false,"in":"query","description":"List of Vehicle IDs to filter by","schema":{"example":["019aa01c-a1a9-7fae-961b-23845147892e","019aa01c-a1a9-7fae-961b-23845147892f"],"type":"array","items":{"type":"string"}}},{"name":"is_linked","required":false,"in":"query","description":"Filter vehicles by link status","schema":{"type":"boolean"}}],"responses":{"200":{"description":"List of vehicles retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListVehicleResponseDTO"}}}}},"security":[{"access-token":[]}],"summary":"List Vehicles","tags":["Gateway GRPC"]},"delete":{"operationId":"GatewayGrpcController_deleteVehicles_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}},{"name":"ids","required":true,"in":"query","description":"List of Vehicle IDs to delete","schema":{"example":["019aa01c-a1a9-7fae-961b-23845147892e","019aa01c-a1a9-7fae-961b-23845147892f"],"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Vehicle(s) deleted successfully"}},"security":[{"access-token":[]}],"summary":"Delete vehicle(s)","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/vehicles/in-bounds":{"post":{"operationId":"GatewayGrpcController_getVehiclesInBounds_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}},{"name":"entity_type","required":true,"in":"query","schema":{"type":"number","enum":[0,1]}},{"name":"state","required":false,"in":"query","schema":{"type":"number","enum":[0,1,2,3,4]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetVehiclesForMapBodyDto"}}}},"responses":{"200":{"description":"Map markers retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetVehiclesForMapResponseDto"}}}}},"security":[{"access-token":[]}],"summary":"Get clustered vehicle markers for map viewport","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/vehicles/{vehicle_id}/history":{"get":{"operationId":"GatewayGrpcController_getMovementHistory_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}},{"name":"vehicle_id","required":true,"in":"path","description":"Vehicle ID","schema":{"type":"string"}},{"name":"start_time","required":true,"in":"query","description":"Start time (unix timestamp)","schema":{"type":"string"}},{"name":"end_time","required":true,"in":"query","description":"End time (unix timestamp)","schema":{"type":"string"}}],"responses":{"200":{"description":"Fetched movement history successfully"}},"security":[{"access-token":[]}],"summary":"Vehicle movement history","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/vehicles/{vehicle_id}/daily-distance":{"get":{"operationId":"GatewayGrpcController_getVehicleDailyDistance_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}},{"name":"vehicle_id","required":true,"in":"path","description":"Vehicle ID","schema":{"type":"string"}},{"name":"start_time","required":true,"in":"query","description":"Start time (ISO string with timezone offset)","schema":{"example":"2026-07-01T00:00:00+05:30","type":"string"}},{"name":"end_time","required":true,"in":"query","description":"End time (ISO string with timezone offset)","schema":{"example":"2026-07-07T23:59:59+05:30","type":"string"}}],"responses":{"200":{"description":"Fetched vehicle daily distance successfully"}},"security":[{"access-token":[]}],"summary":"Vehicle daily distance travelled","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/vehicles/{vehicle_id}/history/video":{"get":{"operationId":"GatewayGrpcController_getHistoryVideoList_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}},{"name":"vehicle_id","required":true,"in":"path","description":"Vehicle ID","schema":{"type":"string"}},{"name":"start_time","required":true,"in":"query","description":"Start time (unix timestamp)","schema":{"type":"string"}},{"name":"end_time","required":true,"in":"query","description":"End time (unix timestamp)","schema":{"type":"string"}},{"name":"channel_number","required":false,"in":"query","description":"Channel number","schema":{"default":0,"type":"number"}}],"responses":{"200":{"description":"Listed history videos successfully"}},"security":[{"access-token":[]}],"summary":"List history videos","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/vehicles/search":{"get":{"operationId":"GatewayGrpcController_searchVehicles_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}},{"name":"limit","required":false,"in":"query","description":"Number of items per page","schema":{"minimum":1,"maximum":1000,"default":10,"example":10,"type":"number"}},{"name":"page","required":false,"in":"query","description":"Page number","schema":{"minimum":1,"example":1,"type":"number"}},{"name":"entity_type","required":true,"in":"query","description":"Entity Type","schema":{"type":"number","enum":[0,1]}},{"name":"query","required":true,"in":"query","description":"Search query to match against vehicle plate number or alias","schema":{"minLength":1,"maxLength":64,"example":"ABC","type":"string"}}],"responses":{"200":{"description":"Vehicle search results retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchVehiclesResponseDTO"}}}}},"security":[{"access-token":[]}],"summary":"Search Vehicles by plate number or alias","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/vehicles-by-ids":{"get":{"operationId":"GatewayGrpcController_getVehicles_v2","parameters":[{"name":"ids","required":true,"in":"query","description":"List of vehicle ids","schema":{"type":"array","items":{"type":"string"}}},{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}}],"responses":{"200":{"description":"Vehicle details retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetVehiclesResponse"}}}}},"security":[{"access-token":[]}],"summary":"Get Vehicle","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/vehicles/{vehicle_id}":{"get":{"operationId":"GatewayGrpcController_getVehicle_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}},{"name":"vehicle_id","required":true,"in":"path","description":"Vehicle ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Vehicle details retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetVehicleResponseDTO"}}}}},"security":[{"access-token":[]}],"summary":"Get Vehicle","tags":["Gateway GRPC"]},"patch":{"operationId":"GatewayGrpcController_updateVehicle_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}},{"name":"vehicle_id","required":true,"in":"path","description":"Vehicle ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateVehicleRequestDto"}}}},"responses":{"200":{"description":"Vehicle updated successfully"}},"security":[{"access-token":[]}],"summary":"Update a vehicle","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/device-health/{device_number}":{"get":{"operationId":"GatewayGrpcController_getDeviceHealth_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}},{"name":"device_number","required":true,"in":"path","description":"Device number","schema":{"minLength":1,"maxLength":32,"example":"device-1","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetDeviceHealthResponseDto"}}}}},"security":[{"access-token":[]}],"summary":"Get device health","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/device-health":{"get":{"operationId":"GatewayGrpcController_listDeviceHealth_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}},{"name":"page","required":false,"in":"query","description":"Page number","schema":{"minimum":1,"example":1,"type":"number"}},{"name":"query","required":false,"in":"query","description":"Search query","schema":{"maxLength":64,"type":"string"}},{"name":"organisations","required":false,"in":"query","description":"List of Organisations to filter by (format: id:is_directly_assigned)","schema":{"example":"019ba16d-d19b-7486-9b8c-fad000196564:1,019c9910-c573-777c-a8ab-cd49769de4a0:0","type":"array","items":{"type":"string"}}},{"name":"limit","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"default":10,"type":"number"}},{"name":"capability","required":false,"in":"query","schema":{"type":"number","enum":[0,1,2,3,4]}},{"name":"status","required":false,"in":"query","schema":{"type":"number","enum":[0,1,2,3,4,1,2,3,4]}},{"name":"is_hung","required":false,"in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListDeviceHealthResponseDto"}}}}},"security":[{"access-token":[]}],"summary":"List device health","tags":["Gateway GRPC"]}},"/v2/organisations/bootstrap":{"post":{"description":"Internal-only endpoint for system superadmins to create root organisations. Not intended for normal UI use.","operationId":"GatewayGrpcController_bootstrapOrganisation_v2","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BootstrapOrganisationDto"}}}},"responses":{"200":{"description":"The bootstrapped organisation(s)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrganisationResponseDto"}}}}},"security":[{"access-token":[]}],"summary":"Bootstrap root organisation(s)","tags":["Gateway GRPC"]}},"/v2/organisations/{id}":{"patch":{"operationId":"GatewayGrpcController_updateOrganisation_v2","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrganisationDto"}}}},"responses":{"200":{"description":"The updated organisation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganisationDto"}}}}},"security":[{"access-token":[]}],"summary":"Update an organisation","tags":["Gateway GRPC"]},"delete":{"operationId":"GatewayGrpcController_deleteOrganisation_v2","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"delete_vehicles","required":true,"in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Organisation deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteOrganisationResponseDto"}}}}},"security":[{"access-token":[]}],"summary":"Delete an organisation","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/preferences":{"get":{"operationId":"GatewayGrpcController_getOrganisationPreferences_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganisationPreferencesResponseDto"}}}}},"security":[{"access-token":[]}],"summary":"Get organisation preferences","tags":["Gateway GRPC"]},"patch":{"operationId":"GatewayGrpcController_updateOrganisationPreferences_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrganisationPreferencesDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganisationPreferencesResponseDto"}}}}},"security":[{"access-token":[]}],"summary":"Update organisation preferences","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/users":{"post":{"operationId":"GatewayGrpcController_inviteUser_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteUserDto"}}}},"responses":{"200":{"description":"Invited user details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponseDto"}}}}},"security":[{"access-token":[]}],"summary":"Invite a user to an organisation","tags":["Gateway GRPC"]},"get":{"operationId":"GatewayGrpcController_getUsers_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}},{"name":"organisations","required":false,"in":"query","description":"List of Organisations to filter by (format: id:is_directly_assigned)","schema":{"example":"019ba16d-d19b-7486-9b8c-fad000196564:1,019c9910-c573-777c-a8ab-cd49769de4a0:0","type":"array","items":{"type":"string"}}},{"name":"search","required":false,"in":"query","description":"Search string","schema":{"example":"John Doe","type":"string"}},{"name":"limit","required":false,"in":"query","description":"Number of items to return","schema":{"default":10,"example":10,"type":"number"}},{"name":"offset","required":false,"in":"query","description":"Offset of items to return","schema":{"example":0,"type":"number"}},{"name":"page","required":false,"in":"query","description":"Page number","schema":{"example":1,"type":"number"}}],"responses":{"200":{"description":"List of users","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetUsersResponseDto"}}}}},"security":[{"access-token":[]}],"summary":"Get all users in an organisation","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/users/{user_id}":{"patch":{"operationId":"GatewayGrpcController_updateUser_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}},{"name":"user_id","required":true,"in":"path","description":"User ID","schema":{"example":"123e4567-e89b-12d3-a456-426614174000","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserDto"}}}},"responses":{"200":{"description":"Updated user details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponseDto"}}}}},"security":[{"access-token":[]}],"summary":"Update a user","tags":["Gateway GRPC"]},"delete":{"operationId":"GatewayGrpcController_deleteUser_v2","parameters":[{"name":"user_id","required":true,"in":"path","description":"ID of the user to delete","schema":{"example":"c9a7e4e8-3e4b-4b1a-8e4a-4a2a4a2a4a2c","type":"string"}},{"name":"organisation_id","required":true,"in":"path","description":"ID of the organisation","schema":{"example":"b9a7e4e8-3e4b-4b1a-8e4a-4a2a4a2a4a2b","type":"string"}}],"responses":{"200":{"description":""}},"security":[{"access-token":[]}],"summary":"Delete a user","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/users/me":{"get":{"operationId":"GatewayGrpcController_getUser_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}}],"responses":{"200":{"description":"User details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponseDto"}}}}},"security":[{"access-token":[]}],"summary":"Get current user","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/users/{user_id}/preferences":{"get":{"operationId":"GatewayGrpcController_getUserPreferences_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}},{"name":"user_id","required":true,"in":"path","description":"User ID","schema":{"example":"123e4567-e89b-12d3-a456-426614174000","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserPreferencesResponseDto"}}}}},"security":[{"access-token":[]}],"summary":"Get user preferences","tags":["Gateway GRPC"]},"patch":{"operationId":"GatewayGrpcController_updateUserPreferences_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}},{"name":"user_id","required":true,"in":"path","description":"User ID","schema":{"example":"123e4567-e89b-12d3-a456-426614174000","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserPreferencesDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserPreferencesResponseDto"}}}}},"security":[{"access-token":[]}],"summary":"Update user preferences","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/users/auto-assign":{"get":{"operationId":"GatewayGrpcController_getAutoAssignUsers_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}},{"name":"limit","required":false,"in":"query","description":"Number of items per page","schema":{"minimum":1,"maximum":1000,"default":10,"example":10,"type":"number"}},{"name":"page","required":false,"in":"query","description":"Page number","schema":{"minimum":1,"example":1,"type":"number"}},{"name":"parent_id","required":true,"in":"query","description":"Parent organisation ID to fetch users from","schema":{"example":"b9a7e4e8-3e4b-4b1a-8e4a-4a2a4a2a4a2b","type":"string"}}],"responses":{"200":{"description":"List of auto-assign users"}},"security":[{"access-token":[]}],"summary":"List users with auto-assign enabled for an organisation","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/users/{user_id}/status":{"get":{"operationId":"GatewayGrpcController_getUserStatus_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}},{"name":"user_id","required":true,"in":"path","description":"User ID","schema":{"example":"123e4567-e89b-12d3-a456-426614174000","type":"string"}}],"responses":{"200":{"description":"User status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetUserStatusResponseDto"}}}}},"security":[{"access-token":[]}],"summary":"Get user status","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/users/reset-password":{"post":{"operationId":"GatewayGrpcController_resetPassword_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPasswordDto"}}}},"responses":{"200":{"description":"Password reset initiated"}},"security":[{"access-token":[]}],"summary":"Reset user password","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/roles":{"post":{"operationId":"GatewayGrpcController_createRole_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRoleDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRoleResponseDto"}}}}},"security":[{"access-token":[]}],"summary":"Create a new role","tags":["Gateway GRPC"]},"get":{"operationId":"GatewayGrpcController_getOrganisationRoles_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}},{"name":"search","required":false,"in":"query","description":"Search term","schema":{"type":"string"}},{"name":"page","required":false,"in":"query","description":"Page number","schema":{"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Items per page","schema":{"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetOrganisationRolesResponseDto"}}}}},"security":[{"access-token":[]}],"summary":"Get all roles in an organisation","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/roles/{role_id}":{"patch":{"operationId":"GatewayGrpcController_updateRole_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","schema":{"type":"string"}},{"name":"role_id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRoleDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRoleResponseDto"}}}}},"security":[{"access-token":[]}],"summary":"Update a role","tags":["Gateway GRPC"]},"delete":{"operationId":"GatewayGrpcController_deleteRole_v2","parameters":[{"name":"role_id","required":true,"in":"path","description":"Role id","schema":{"example":"a9a7e4e8-3e4b-4b1a-8e4a-4a2a4a2a4a2a","type":"string"}},{"name":"organisation_id","required":true,"in":"path","description":"Organisation id","schema":{"example":"a9a7e4e8-3e4b-4b1a-8e4a-4a2a4a2a4a2a","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteRoleResponseDto"}}}}},"security":[{"access-token":[]}],"summary":"Delete a role","tags":["Gateway GRPC"]},"get":{"operationId":"GatewayGrpcController_getRolePermissions_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation id","schema":{"example":"a9a7e4e8-3e4b-4b1a-8e4a-4a2a4a2a4a2a","type":"string"}},{"name":"role_id","required":true,"in":"path","description":"Role id","schema":{"example":"a9a7e4e8-3e4b-4b1a-8e4a-4a2a4a2a4a2a","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetRolePermissionsResponseDto"}}}}},"security":[{"access-token":[]}],"summary":"Get permissions for a role","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/roles/{role_id}/users/{user_id}":{"delete":{"operationId":"GatewayGrpcController_unassignRole_v2","parameters":[{"name":"user_id","required":true,"in":"path","description":"User id","schema":{"example":"a9a7e4e8-3e4b-4b1a-8e4a-4a2a4a2a4a2a","type":"string"}},{"name":"role_id","required":true,"in":"path","description":"Role id","schema":{"example":"a9a7e4e8-3e4b-4b1a-8e4a-4a2a4a2a4a2a","type":"string"}},{"name":"organisation_id","required":false,"in":"path","description":"Organisation id","schema":{"example":"a9a7e4e8-3e4b-4b1a-8e4a-4a2a4a2a4a2a","type":"string"}}],"responses":{"200":{"description":""}},"security":[{"access-token":[]}],"summary":"Remove a role from a user","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/users/{user_id}/roles":{"post":{"operationId":"GatewayGrpcController_assignRole_v2","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignRoleDto"}}}},"responses":{"201":{"description":""}},"security":[{"access-token":[]}],"summary":"Assign roles to a user","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/permissions":{"get":{"operationId":"GatewayGrpcController_getAllPermissions_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetAllPermissionsResponseDto"}}}}},"security":[{"access-token":[]}],"summary":"Get all permissions","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/children":{"get":{"operationId":"GatewayGrpcController_getChildOrganisations_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Parent organisation id","schema":{"example":"a9a7e4e8-3e4b-4b1a-8e4a-4a2a4a2a4a2a","type":"string"}},{"name":"limit","required":false,"in":"query","description":"Number of items per page","schema":{"minimum":1,"maximum":1000,"default":10,"example":10,"type":"number"}},{"name":"page","required":false,"in":"query","description":"Page number","schema":{"minimum":1,"example":1,"type":"number"}},{"name":"query","required":false,"in":"query","description":"Search query","schema":{"maxLength":64,"type":"string"}},{"name":"depth","required":false,"in":"query","description":"Depth of the organisation","schema":{"example":1,"type":"number"}}],"responses":{"200":{"description":""}},"security":[{"access-token":[]}],"summary":"Get all child organisations of an organisation","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/users/roles":{"get":{"operationId":"GatewayGrpcController_getUserRolesPermissions_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetUserRolesPermissionsResponseDto"}}}}},"security":[{"access-token":[]}],"summary":"Get all roles and permissions for a user","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/reports":{"get":{"operationId":"GatewayGrpcController_listReports_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListReportsResponseDto"}}}}},"security":[{"access-token":[]}],"summary":"List Reports","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/reports/alerts/details":{"get":{"operationId":"GatewayGrpcController_getAlertBreakupDetails_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}},{"name":"plate_number","required":true,"in":"query","description":"Vehicle Plate Number","schema":{"type":"string"}},{"name":"alert_type","required":true,"in":"query","description":"Type of the alert","schema":{"type":"string"}},{"name":"start_time","required":true,"in":"query","description":"Start time (Local time string as formatted in reports, e.g. YYYY-MM-DD HH:mm:ss)","schema":{"example":"2026-03-23 10:00:00","type":"string"}},{"name":"end_time","required":true,"in":"query","description":"End time (Local time string as formatted in reports, e.g. YYYY-MM-DD HH:mm:ss)","schema":{"example":"2026-03-23 11:00:00","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetAlertBreakupDetailsResponseDto"}}}}},"security":[{"access-token":[]}],"summary":"Get details for an AI alert breakup","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/reports/{report_id}/definition":{"get":{"operationId":"GatewayGrpcController_getReportDefinition_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}},{"name":"report_id","required":true,"in":"path","description":"Report ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetReportDefinitionResponseDto"}}}}},"security":[{"access-token":[]}],"summary":"Get Report Filter Definition","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/reports/{report_id}":{"get":{"operationId":"GatewayGrpcController_getReport_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}},{"name":"report_id","required":true,"in":"path","description":"Report ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}},{"name":"start_time","required":true,"in":"query","description":"Start time (ISO UTC string)","schema":{"type":"string"}},{"name":"end_time","required":true,"in":"query","description":"End time (ISO UTC string)","schema":{"type":"string"}},{"name":"vehicle_ids","required":false,"in":"query","description":"Vehicle IDs to include in the report","schema":{"type":"array","items":{"type":"string"}}},{"name":"owner_ids","required":false,"in":"query","description":"Organisation IDs to include in the report","schema":{"type":"array","items":{"type":"string"}}},{"name":"alert_type","required":false,"in":"query","description":"Alert type filter (alert reports only)","schema":{"type":"string","enum":["ForwardCollisionWarning","LaneDepartureWarning","TooCloseDistanceAlarm","PedestrianCollisionAlarm","FatigueDrivingAlarm","PhoneCallAlarm","SmokingAlarm","DistractedDrivingAlarm","SeatBeltAbsent","DriverAbnormalAlarm","AutomaticCaptureEvent","Overspeeding","RefuellingDetected","FuelTheftSuspected","UnusualFuelLoss","FuelSensorAnomaly","SOS","LeftBusStop","DeliveryDone","ArrivedAtSite","VehicleOutOfUnauthorizedArea","PickupDone","ArrivedAtInstitution","LeftInstitution","LeftHub","ArrivedAtHub","TestDriveCompleted","LeftPickupDropLocation","OutForTestDrive","VehicleInUnauthorizedArea","TripStarted","ArrivedAtBusStop","ArrivedAtPickupDropLocation","LeftSite","TripEnd","TripDeviation","Arrived","PossibleFuelRefuelingDetected","PossibleFuelTheftDetected"]}},{"name":"has_alert_media","required":false,"in":"query","description":"Whether alert rows must have an image or video","schema":{"type":"boolean"}},{"name":"limit","required":false,"in":"query","description":"Maximum number of report rows to return","schema":{"minimum":1,"maximum":100,"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetReportResponseDto"}}}}},"security":[{"access-token":[]}],"summary":"Get Report","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/reports/{report_id}/download":{"get":{"operationId":"GatewayGrpcController_downloadReport_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}},{"name":"report_id","required":true,"in":"path","description":"Report ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}},{"name":"start_time","required":true,"in":"query","description":"Start time (ISO UTC string)","schema":{"type":"string"}},{"name":"end_time","required":true,"in":"query","description":"End time (ISO UTC string)","schema":{"type":"string"}},{"name":"vehicle_ids","required":false,"in":"query","description":"Vehicle IDs to include in the report","schema":{"type":"array","items":{"type":"string"}}},{"name":"owner_ids","required":false,"in":"query","description":"Organisation IDs to include in the report","schema":{"type":"array","items":{"type":"string"}}},{"name":"alert_type","required":false,"in":"query","description":"Alert type filter (alert reports only)","schema":{"type":"string","enum":["ForwardCollisionWarning","LaneDepartureWarning","TooCloseDistanceAlarm","PedestrianCollisionAlarm","FatigueDrivingAlarm","PhoneCallAlarm","SmokingAlarm","DistractedDrivingAlarm","SeatBeltAbsent","DriverAbnormalAlarm","AutomaticCaptureEvent","Overspeeding","RefuellingDetected","FuelTheftSuspected","UnusualFuelLoss","FuelSensorAnomaly","SOS","LeftBusStop","DeliveryDone","ArrivedAtSite","VehicleOutOfUnauthorizedArea","PickupDone","ArrivedAtInstitution","LeftInstitution","LeftHub","ArrivedAtHub","TestDriveCompleted","LeftPickupDropLocation","OutForTestDrive","VehicleInUnauthorizedArea","TripStarted","ArrivedAtBusStop","ArrivedAtPickupDropLocation","LeftSite","TripEnd","TripDeviation","Arrived","PossibleFuelRefuelingDetected","PossibleFuelTheftDetected"]}},{"name":"has_alert_media","required":false,"in":"query","description":"Whether alert rows must have an image or video","schema":{"type":"boolean"}},{"name":"format","required":true,"in":"query","description":"Format of the report","examples":["0","1"],"schema":{"type":"number","enum":[0,1]}},{"name":"is_detailed","required":false,"in":"query","description":"Whether to include detailed data","schema":{"default":false,"type":"boolean"}}],"responses":{"200":{"description":""}},"security":[{"access-token":[]}],"summary":"Download Report","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/geofence/subscription/create":{"post":{"operationId":"GatewayGrpcController_createGeofenceSubscription_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGeofenceSubscriptionDto"}}}},"responses":{"200":{"description":"Geofence Subscription created successfully"}},"security":[{"access-token":[]}],"summary":"Create Geofence Subscription","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/geofence/subscriptions":{"get":{"operationId":"GatewayGrpcController_listGeofenceSubscriptions_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}},{"name":"limit","required":false,"in":"query","description":"Number of items per page","schema":{"minimum":1,"maximum":1000,"default":10,"example":10,"type":"number"}},{"name":"page","required":false,"in":"query","description":"Page number","schema":{"minimum":1,"example":1,"type":"number"}},{"name":"subscription_id","required":false,"in":"query","description":"Filter by subscription ID","schema":{"example":"019c233d-09df-762c-8db1-9f9015814a9e","type":"string"}},{"name":"geofence_boundary_type","required":false,"in":"query","description":"Filter by geofence boundary type","schema":{"example":1,"type":"number","enum":[0,1,2,3,4]}},{"name":"geofence_category","required":false,"in":"query","description":"Filter by geofence category","schema":{"example":"School Transport","type":"string"}}],"responses":{"200":{"description":"List of Geofence Subscriptions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListGeofenceSubscriptionsResponseDto"}}}}},"security":[{"access-token":[]}],"summary":"List Geofence Subscriptions","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/address-lookup":{"get":{"operationId":"GatewayGrpcController_addressLookup_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}},{"name":"address","required":true,"in":"query","description":"Address string to lookup","schema":{"example":"HDFC Bank, HSR Layout","type":"string"}},{"name":"country","required":true,"in":"query","description":"Country enum value","schema":{"example":100,"type":"number","enum":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246]}}],"responses":{"200":{"description":"Address Lookup Result"}},"security":[{"access-token":[]}],"summary":"Address Lookup","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/reverse-geocode":{"get":{"operationId":"GatewayGrpcController_reverseGeocode_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}},{"name":"latitude","required":true,"in":"query","description":"Latitude of the location to reverse geocode","schema":{"example":12.9716,"type":"string"}},{"name":"longitude","required":true,"in":"query","description":"Longitude of the location to reverse geocode","schema":{"example":77.5946,"type":"string"}},{"name":"country","required":true,"in":"query","description":"Country enum value","schema":{"example":100,"type":"number","enum":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246]}}],"responses":{"200":{"description":"Reverse Geocode Result"}},"security":[{"access-token":[]}],"summary":"Reverse Geocode","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/geofence/subscription/{subscription_id}":{"patch":{"operationId":"GatewayGrpcController_updateGeofenceSubscription_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}},{"name":"subscription_id","required":true,"in":"path","description":"Subscription ID","schema":{"example":"019c233d-09df-762c-8db1-9f9015814a9e","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateGeofenceSubscriptionDto"}}}},"responses":{"200":{"description":"Geofence Subscription updated successfully"}},"security":[{"access-token":[]}],"summary":"Update Geofence Subscription","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/geofence/subscription":{"delete":{"operationId":"GatewayGrpcController_deleteGeofenceSubscription_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}},{"name":"subscription_id","required":true,"in":"query","description":"Subscription ID","schema":{"example":"019c233d-09df-762c-8db1-9f9015814a9e","type":"string"}}],"responses":{"200":{"description":"Geofence Subscription deleted successfully"}},"security":[{"access-token":[]}],"summary":"Delete Geofence Subscription","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/geofence/validate-boundary":{"post":{"operationId":"GatewayGrpcController_validateGeofenceBoundary_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyBoundaryRequestDto"}}}},"responses":{"200":{"description":"Geofence Boundary validation result"}},"security":[{"access-token":[]}],"summary":"Validate Geofence Boundary","tags":["Gateway GRPC"]}},"/v2/organisations/organisations/geofences/administrative-boundaries":{"get":{"operationId":"GatewayGrpcController_listAdministrativeBoundaries_v2","parameters":[{"name":"organisation_id","required":true,"in":"query","description":"Organisation UUID","schema":{"example":"019c229e-343b-7c79-bfcc-a4b58de5fee4","type":"string"}},{"name":"country","required":true,"in":"query","description":"Country enum value","schema":{"example":100,"type":"number","enum":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246]}}],"responses":{"200":{"description":"List of Administrative Boundaries"}},"security":[{"access-token":[]}],"summary":"List Administrative Boundaries","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/geofence/boundaries/{boundary_id}/geojson":{"get":{"operationId":"GatewayGrpcController_getBoundaryGeoJson_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation UUID","schema":{"example":"019c229e-343b-7c79-bfcc-a4b58de5fee4","type":"string"}},{"name":"boundary_id","required":true,"in":"path","description":"Boundary UUID","schema":{"example":"019c31ba-1c1f-763f-8f03-c6aa4bc04cb2","type":"string"}}],"responses":{"200":{"description":"Boundary GeoJSON fetched successfully"}},"security":[{"access-token":[]}],"summary":"Get Boundary GeoJSON","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/api-clients":{"post":{"operationId":"GatewayGrpcController_createApiClient_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiClientBodyDto"}}}},"responses":{"200":{"description":"The created API client credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiClientResponseDto"}}}}},"security":[{"access-token":[]}],"summary":"Create an API client for an organisation","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/drivers":{"post":{"operationId":"GatewayGrpcController_createDriver_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDriversDto"}},"multipart/form-data":{"schema":{"type":"object","properties":{"drivers":{"type":"string","description":"JSON array matching CreateDriversDto.drivers. Use driver_images and driver_image_indexes for optional images.","example":"[{\"name\":\"Ravi Kumar\",\"mobile_number\":\"9876543210\",\"license_info\":{\"driving_license_number\":\"DL0420110149646\",\"date_of_expiry\":1893456000000},\"assignment\":{\"vehicle_id\":\"019c6e27-5dfa-76e2-a30d-a5adc278e53b\",\"shift_start_time\":\"09:00\",\"shift_end_time\":\"18:00\",\"effective_from\":\"2026-08-24T00:00:00.000Z\"}},{\"name\":\"Priya Sharma\"},{\"name\":\"Arjun Singh\"}]"},"driver_images":{"type":"array","description":"Optional driver images ordered to match the required driver_image_indexes field","items":{"type":"string","format":"binary"}},"driver_image_indexes":{"type":"array","description":"Required with driver_images. Maps each uploaded image to its driver array index","items":{"type":"integer","minimum":0},"example":[0,2]}},"required":["drivers"]},"encoding":{"driver_image_indexes":{"style":"form","explode":false}}}}},"responses":{"200":{"description":"Drivers created successfully"}},"security":[{"access-token":[]}],"summary":"Create drivers","tags":["Gateway GRPC"]},"get":{"operationId":"GatewayGrpcController_listDrivers_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}},{"name":"limit","required":false,"in":"query","description":"Number of items per page","schema":{"minimum":1,"maximum":1000,"default":10,"example":10,"type":"number"}},{"name":"page","required":false,"in":"query","description":"Page number","schema":{"minimum":1,"example":1,"type":"number"}},{"name":"driver_id","required":false,"in":"query","description":"Driver ID. When provided, the response contains at most one driver.","schema":{"example":"019fadb6-dae3-7332-a8e4-25538ba84e52","type":"string"}},{"name":"vehicle_ids","required":false,"in":"query","description":"Vehicle IDs filter. Accepts repeated query params or a comma-separated list.","schema":{"type":"array","items":{"type":"string"}}},{"name":"driver_ids","required":false,"in":"query","description":"Driver IDs to fetch. Supports repeated query params or comma-separated values.","schema":{"example":["019bb7e2-3ca7-792c-8d29-01fbb317f9dc","019bb7e2-3ca7-792c-8d29-01fbb317f9dd"],"type":"array","items":{"type":"array"}}},{"name":"user_id","required":false,"in":"query","description":"User ID filter","schema":{"example":"019bb7e2-3ca7-792c-8d29-01fbb317f9dc","type":"string"}},{"name":"query","required":false,"in":"query","description":"Case-insensitive driver name search","schema":{"example":"Ravi","type":"string"}},{"name":"is_linked","required":false,"in":"query","description":"Filter by current active vehicle assignment status","schema":{"example":true,"type":"boolean"}}],"responses":{"200":{"description":"Drivers retrieved successfully"}},"security":[{"access-token":[]}],"summary":"List drivers","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/drivers/vehicle-assignments":{"post":{"operationId":"GatewayGrpcController_createDriverVehicleAssignments_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDriverVehicleAssignmentsDto"}}}},"responses":{"200":{"description":"Driver vehicle assignments created successfully"}},"security":[{"access-token":[]}],"summary":"Create driver vehicle assignments","tags":["Gateway GRPC"]},"get":{"operationId":"GatewayGrpcController_listDriverVehicleAssignments_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}},{"name":"start_time","required":true,"in":"query","description":"Range start time as ISO string","schema":{"example":"2026-08-24T00:00:00.000Z","type":"string"}},{"name":"end_time","required":true,"in":"query","description":"Range end time as ISO string","schema":{"example":"2026-08-25T00:00:00.000Z","type":"string"}},{"name":"driver_ids","required":false,"in":"query","description":"Driver IDs filter. Supports repeated query params or comma-separated values.","schema":{"type":"array","items":{"type":"string"}}},{"name":"vehicle_ids","required":false,"in":"query","description":"Vehicle IDs filter. Supports repeated query params or comma-separated values.","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Driver vehicle assignments retrieved successfully"}},"security":[{"access-token":[]}],"summary":"List driver vehicle assignments in a time range","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/drivers/{driver_id}/vehicle-assignment":{"patch":{"operationId":"GatewayGrpcController_reassignDriverVehicle_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}},{"name":"driver_id","required":true,"in":"path","description":"Driver ID","schema":{"example":"019fadb6-dae3-7332-a8e4-25538ba84e52","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReassignDriverVehicleDto"}}}},"responses":{"200":{"description":"Driver vehicle reassigned successfully"}},"security":[{"access-token":[]}],"summary":"Reassign a driver's vehicle","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/drivers/vehicle-drivers":{"get":{"operationId":"GatewayGrpcController_getVehicleDrivers_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}},{"name":"vehicle_ids","required":true,"in":"query","description":"Vehicle IDs to resolve to their active drivers. Supports repeated query params or comma-separated values.","schema":{"example":["019c6e27-5dfa-76e2-a30d-a5adc278e53b","019c6e27-5dfa-76e2-a30d-a5adc278e53c"],"type":"array","items":{"type":"string"}}},{"name":"at_time","required":false,"in":"query","description":"Optional ISO timestamp to resolve historical driver links. Defaults to current active assignment.","schema":{"example":"2026-08-24T10:00:00.000Z","type":"string"}}],"responses":{"200":{"description":"Vehicle drivers retrieved successfully"}},"security":[{"access-token":[]}],"summary":"Get active drivers for vehicles","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/drivers/active/count":{"get":{"operationId":"GatewayGrpcController_countActiveDrivers_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}}],"responses":{"200":{"description":"Active driver count retrieved successfully"}},"security":[{"access-token":[]}],"summary":"Count active linked drivers","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/drivers/{driver_id}":{"patch":{"operationId":"GatewayGrpcController_updateDriver_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}},{"name":"driver_id","required":true,"in":"path","description":"Driver ID","schema":{"example":"019fadb6-dae3-7332-a8e4-25538ba84e52","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDriverDto"}},"multipart/form-data":{"schema":{"type":"object","properties":{"driver":{"type":"string","example":"{}","description":"Optional JSON object containing driver fields to update. Omit it or send {} for image-only updates."},"driver_image":{"type":"string","format":"binary","description":"Optional new driver image"}}}}}},"responses":{"200":{"description":"Driver updated successfully"}},"security":[{"access-token":[]}],"summary":"Update a driver","tags":["Gateway GRPC"]},"delete":{"operationId":"GatewayGrpcController_deleteDriver_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}},{"name":"driver_id","required":true,"in":"path","description":"Driver ID","schema":{"example":"019fadb6-dae3-7332-a8e4-25538ba84e52","type":"string"}}],"responses":{"200":{"description":"Driver deleted successfully"}},"security":[{"access-token":[]}],"summary":"Delete a driver","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/routes/suggested":{"post":{"operationId":"GatewayGrpcController_getSuggestedRoute_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetSuggestedRouteRequestDto"}}}},"responses":{"200":{"description":"Suggested route fetched successfully"}},"security":[{"access-token":[]}],"summary":"Get Suggested Route","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/routes":{"post":{"operationId":"GatewayGrpcController_createRoute_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRouteRequestDto"}}}},"responses":{"200":{"description":"Route created successfully"}},"security":[{"access-token":[]}],"summary":"Create a new route","tags":["Gateway GRPC"]},"get":{"operationId":"GatewayGrpcController_getRoute_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}},{"name":"limit","required":false,"in":"query","description":"Number of items per page","schema":{"minimum":1,"maximum":1000,"default":10,"example":10,"type":"number"}},{"name":"page","required":false,"in":"query","description":"Page number","schema":{"minimum":1,"example":1,"type":"number"}},{"name":"route_id","required":false,"in":"query","description":"Route ID","schema":{"example":"019d4ddf-3358-74c2-a694-341147d77d00","type":"string"}}],"responses":{"200":{"description":"Route details retrieved successfully"}},"security":[{"access-token":[]}],"summary":"Get Routes","tags":["Gateway GRPC"]}},"/v2/organisations/routes/import":{"post":{"operationId":"GatewayGrpcController_importRoutes_v2","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ImportRouteRequestDto"}}}}},"responses":{"200":{"description":"Per-route import results","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportRoutesResponseDto"}}}}},"security":[{"access-token":[]}],"summary":"Import routes","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/routes/{route_id}/preview":{"get":{"operationId":"GatewayGrpcController_getRoutePreview_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}},{"name":"route_id","required":true,"in":"path","description":"Route ID","schema":{"example":"019d4ddf-3358-74c2-a694-341147d77d00","type":"string"}}],"responses":{"200":{"description":"Route preview retrieved successfully"}},"security":[{"access-token":[]}],"summary":"Get Route Preview","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/routes/{route_id}":{"delete":{"operationId":"GatewayGrpcController_deleteRoute_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}},{"name":"route_id","required":true,"in":"path","description":"Route ID","schema":{"example":"019d4ddf-3358-74c2-a694-341147d77d00","type":"string"}}],"responses":{"200":{"description":"Route deleted successfully"}},"security":[{"access-token":[]}],"summary":"Delete a route","tags":["Gateway GRPC"]},"put":{"operationId":"GatewayGrpcController_updateRoute_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}},{"name":"route_id","required":true,"in":"path","description":"Route ID","schema":{"example":"019d4ddf-3358-74c2-a694-341147d77d00","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRouteRequestDto"}}}},"responses":{"200":{"description":"Route updated successfully"}},"security":[{"access-token":[]}],"summary":"Update a route","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/vehicles/{vehicle_id}/tracking-link":{"post":{"operationId":"GatewayGrpcController_generateTrackingLink_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}},{"name":"vehicle_id","required":true,"in":"path","description":"Vehicle ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateTrackingLinkBodyDto"}}}},"responses":{"200":{"description":"Tracking link generated successfully"}},"security":[{"access-token":[]}],"summary":"Generate tracking link","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/trips":{"post":{"operationId":"GatewayGrpcController_createTrip_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTripRequestDto"}}}},"responses":{"200":{"description":"Trip created successfully"}},"security":[{"access-token":[]}],"summary":"Create a new trip","tags":["Gateway GRPC"]},"get":{"operationId":"GatewayGrpcController_getTrips_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}},{"name":"limit","required":false,"in":"query","description":"Number of items per page","schema":{"minimum":1,"maximum":1000,"default":10,"example":10,"type":"number"}},{"name":"page","required":false,"in":"query","description":"Page number","schema":{"minimum":1,"example":1,"type":"number"}},{"name":"trip_id","required":false,"in":"query","description":"Trip ID","schema":{"example":"019e0197-4c63-71a9-a1e5-5a28583237fb","type":"string"}},{"name":"route_id","required":false,"in":"query","description":"Route ID","schema":{"example":"019e0190-5842-7da0-8efe-e58e20acf2a5","type":"string"}}],"responses":{"200":{"description":"Trip details retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListTripsResponseDto"}}}}},"security":[{"access-token":[]}],"summary":"Get Trips","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/trips/import":{"post":{"operationId":"GatewayGrpcController_importTrips_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CreateTripRequestDto"}}}}},"responses":{"200":{"description":"Per-trip import results","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkCreateTripsResponseDto"}}}}},"security":[{"access-token":[]}],"summary":"Import trips","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/trips/{trip_id}":{"put":{"operationId":"GatewayGrpcController_editTrip_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}},{"name":"trip_id","required":true,"in":"path","description":"Trip ID","schema":{"example":"019e0197-4c63-71a9-a1e5-5a28583237fb","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditTripRequestDto"}}}},"responses":{"200":{"description":"Trip edited successfully"}},"security":[{"access-token":[]}],"summary":"Edit a trip","tags":["Gateway GRPC"]},"delete":{"operationId":"GatewayGrpcController_deleteTrip_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}},{"name":"trip_id","required":true,"in":"path","description":"Trip ID","schema":{"example":"019e0197-4c63-71a9-a1e5-5a28583237fb","type":"string"}}],"responses":{"200":{"description":"Trip deleted successfully"}},"security":[{"access-token":[]}],"summary":"Delete a trip","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/vehicles/{vehicle_id}/trips/history":{"get":{"operationId":"GatewayGrpcController_getVehicleTripsHistory_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}},{"name":"vehicle_id","required":true,"in":"path","description":"Vehicle ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}},{"name":"start_time","required":true,"in":"query","description":"Start time as Unix timestamp in milliseconds","schema":{"example":"1780252200000","type":"string"}},{"name":"end_time","required":true,"in":"query","description":"End time as Unix timestamp in milliseconds","schema":{"example":"1782757800000","type":"string"}}],"responses":{"200":{"description":"Vehicle trip history retrieved successfully"}},"security":[{"access-token":[]}],"summary":"Get vehicle trip history","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/vehicles/{vehicle_id}/trips/{trip_id}/details":{"get":{"operationId":"GatewayGrpcController_getVehicleTripDetails_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}},{"name":"vehicle_id","required":true,"in":"path","description":"Vehicle ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}},{"name":"trip_id","required":true,"in":"path","description":"Trip ID","schema":{"example":"019e0197-4c63-71a9-a1e5-5a28583237fb","type":"string"}},{"name":"start_time","required":true,"in":"query","description":"Start time as Unix timestamp in milliseconds","schema":{"example":"1780252200000","type":"string"}},{"name":"end_time","required":true,"in":"query","description":"End time as Unix timestamp in milliseconds","schema":{"example":"1782757800000","type":"string"}}],"responses":{"200":{"description":"Vehicle trip details retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetVehicleTripDetailsResponseDto"}}}}},"security":[{"access-token":[]}],"summary":"Get vehicle trip details","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/timelapse":{"get":{"operationId":"GatewayGrpcController_getTimelapse_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}},{"name":"channel_id","required":true,"in":"query","description":"ID of the device channel for which timelapse is to be generated","schema":{"example":"1","type":"string"}},{"name":"plate_number","required":true,"in":"query","description":"Vehicle plate number associated with the device channel","schema":{"example":"KA01AB1234","type":"string"}},{"name":"end_time","required":true,"in":"query","description":"End time for the timelapse as Unix timestamp in milliseconds","schema":{"example":"1775793522385","type":"string"}},{"name":"start_time","required":true,"in":"query","description":"Start time for the timelapse as Unix timestamp in milliseconds","schema":{"example":"1775733222000","type":"string"}}],"responses":{"200":{"description":"Timelapse video URL fetched successfully"}},"security":[{"access-token":[]}],"summary":"Get timelapse video for a vehicle","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/share/live-tracking":{"post":{"operationId":"GatewayGrpcController_shareLiveTrackingLink_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareLiveTrackingDto"}}}},"responses":{"200":{"description":"Share link generated successfully"}},"security":[{"access-token":[]}],"summary":"Share vehicle live tracking link","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/share/history":{"post":{"operationId":"GatewayGrpcController_shareHistoryLink_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareHistoryDto"}}}},"responses":{"200":{"description":"Share link generated successfully"}},"security":[{"access-token":[]}],"summary":"Share vehicle history link","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/share/alert":{"post":{"operationId":"GatewayGrpcController_shareAlertLink_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareAlertDto"}}}},"responses":{"200":{"description":"Share link generated successfully"}},"security":[{"access-token":[]}],"summary":"Share alert link","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/devices/{device_id}/restart":{"post":{"operationId":"GatewayGrpcController_restartDevice_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}},{"name":"device_id","required":true,"in":"path","description":"Device ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}}],"responses":{"200":{"description":"Device restarted successfully"}},"security":[{"access-token":[]}],"summary":"Restart device","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/devices/{device_id}/text-to-speech":{"post":{"operationId":"GatewayGrpcController_textToSpeech_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}},{"name":"device_id","required":true,"in":"path","description":"Device ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TTSRequestDto"}}}},"responses":{"200":{"description":"Text-to-speech converted successfully"}},"security":[{"access-token":[]}],"summary":"Convert text to speech","tags":["Gateway GRPC"]}},"/v2/organisations/{organisation_id}/devices/{device_id}/snapshot":{"post":{"operationId":"GatewayGrpcController_getDeviceSnapshot_v2","parameters":[{"name":"organisation_id","required":true,"in":"path","description":"Organisation ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}},{"name":"device_id","required":true,"in":"path","description":"Device ID","schema":{"example":"019aa01c-a1a9-7fae-961b-23845147892e","type":"string"}},{"name":"channel_id","required":true,"in":"query","description":"Camera channel ID","schema":{"minimum":1,"maximum":10,"example":1,"type":"number"}},{"name":"num_shots","required":false,"in":"query","description":"Number of snapshots to capture","schema":{"minimum":1,"default":1,"example":1,"type":"number"}},{"name":"interval","required":false,"in":"query","description":"Capture interval or duration","schema":{"minimum":1,"default":1,"example":1,"type":"number"}},{"name":"resolution","required":false,"in":"query","description":"Image resolution","schema":{"default":2,"example":2,"type":"number","enum":[0,1,2,3,4,5,6,7,8]}},{"name":"quality","required":false,"in":"query","description":"Image quality","schema":{"minimum":1,"maximum":10,"default":1,"example":1,"type":"number"}},{"name":"brightness","required":false,"in":"query","description":"Brightness level","schema":{"minimum":0,"maximum":255,"default":127,"example":127,"type":"number"}},{"name":"contrast","required":false,"in":"query","description":"Contrast level","schema":{"minimum":0,"maximum":127,"default":64,"example":64,"type":"number"}},{"name":"saturation","required":false,"in":"query","description":"Saturation level","schema":{"minimum":0,"maximum":127,"default":64,"example":64,"type":"number"}},{"name":"chroma","required":false,"in":"query","description":"Chroma level","schema":{"minimum":0,"maximum":127,"default":64,"example":64,"type":"number"}},{"name":"purpose","required":false,"in":"query","description":"Request purpose/source","schema":{"default":"snapshot","example":"snapshot","type":"string"}}],"responses":{"200":{"description":"Device snapshot fetched successfully"}},"security":[{"access-token":[]}],"summary":"Get device snapshot","tags":["Gateway GRPC"]}},"/v2/consent/accept":{"post":{"operationId":"ConsentController_acceptConsent_v2","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteConsentOnboardingDto"}}}},"responses":{"200":{"description":"Consent recorded; retry the blocked request"}},"security":[{"access-token":[]}],"summary":"Save required and optional consent choices","tags":["Consent"]}},"/v2/consent/preferences/{consentType}":{"patch":{"operationId":"ConsentController_updateConsentPreference_v2","parameters":[{"name":"consentType","required":true,"in":"path","description":"2 = ANALYTICS; 3 = MARKETING","schema":{"enum":[2,3],"type":"number"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateConsentPreferenceDto"}}}},"responses":{"200":{"description":""}},"security":[{"access-token":[]}],"summary":"Grant or withdraw an optional consent preference","tags":["Consent"]}},"/v2/consent":{"get":{"operationId":"ConsentController_getAuthorisedConsentHistory_v2","parameters":[{"name":"limit","required":false,"in":"query","description":"Number of items per page","schema":{"minimum":1,"maximum":1000,"default":10,"example":10,"type":"number"}},{"name":"page","required":false,"in":"query","description":"Page number","schema":{"minimum":1,"example":1,"type":"number"}},{"name":"versions","required":false,"in":"query","description":"Filter by consent document versions","schema":{"type":"array","items":{"type":"string"}}},{"name":"actions","required":false,"in":"query","description":"Filter by consent action","schema":{"type":"array","items":{"type":"string","enum":["ACCEPTED","WITHDRAWN","INVALIDATED"]}}}],"responses":{"200":{"description":"Current consent state and paginated consent history"}},"security":[{"access-token":[]}],"summary":"Get the authenticated user's consent status and history","tags":["Consent"]}},"/v2/consent/withdraw":{"post":{"operationId":"ConsentController_withdrawConsent_v2","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsentSourceDto"}}}},"responses":{"200":{"description":"Consent withdrawal recorded"}},"security":[{"access-token":[]}],"summary":"Withdraw consent for the active document","tags":["Consent"]}},"/v2/consent/document":{"get":{"operationId":"PublicConsentDocumentController_getActiveDocumentUrls_v2","parameters":[],"responses":{"200":{"description":"Public Markdown and PDF document URLs"}},"summary":"Get public URLs for the active consent document","tags":["Consent"]}}},"info":{"title":"Cautio API","description":"The API description","version":"1.0","contact":{}},"tags":[],"servers":[],"components":{"securitySchemes":{"access-token":{"scheme":"bearer","bearerFormat":"JWT","type":"http","name":"JWT","description":"Use the authentication panel above the API operations","in":"header"}},"schemas":{"UpdateTicketDto":{"type":"object","properties":{"status":{"type":"number","enum":[0,1,2,3,4,5]},"assignee_id":{"type":"string","description":"Assignee ID"},"priority":{"type":"number","enum":[0,1,2,3]},"scope":{"type":"number","enum":[0,1]},"vehicle_location":{"type":"string","description":"Internal vehicle location"},"vehicle_available_from":{"type":"string","description":"Vehicle available window start"},"vehicle_available_to":{"type":"string","description":"Vehicle available window end"}}},"DeleteTicketsDto":{"type":"object","properties":{"ticket_ids":{"description":"Ticket IDs to delete","type":"array","items":{"type":"string"}}},"required":["ticket_ids"]},"Object":{"type":"object","properties":{}},"TimeFilterDto":{"type":"object","properties":{"preset":{"type":"number","enum":[0,1,2,3,4]},"start_time":{"type":"string"},"end_time":{"type":"string"}},"required":["preset"]},"DashboardConfigurationDto":{"type":"object","properties":{"time_filter":{"$ref":"#/components/schemas/TimeFilterDto"},"driver_score_configuration":{"type":"object"}}},"UpdateDashboardBodyDto":{"type":"object","properties":{"title":{"type":"string"},"configuration":{"$ref":"#/components/schemas/DashboardConfigurationDto"}}},"WidgetSizeDto":{"type":"object","properties":{"width":{"type":"number"},"height":{"type":"number"}},"required":["width","height"]},"WidgetPositionDto":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"]},"AddWidgetInstanceDto":{"type":"object","properties":{"size":{"$ref":"#/components/schemas/WidgetSizeDto"},"position":{"$ref":"#/components/schemas/WidgetPositionDto"},"configuration":{"type":"object","description":"Widget configuration as a key-value map. Values should be strings (e.g. limit: '10').","example":{"sort_by":"distance","limit":"10"}},"widget_definition_id":{"type":"string"}},"required":["size","position","widget_definition_id"]},"AddWidgetBodyDto":{"type":"object","properties":{"widget":{"$ref":"#/components/schemas/AddWidgetInstanceDto"}},"required":["widget"]},"WidgetInstanceDto":{"type":"object","properties":{"size":{"$ref":"#/components/schemas/WidgetSizeDto"},"position":{"$ref":"#/components/schemas/WidgetPositionDto"},"configuration":{"type":"object","description":"Widget configuration as a key-value map. Values should be strings (e.g. limit: '10').","example":{"sort_by":"distance","limit":"10"}}},"required":["size","position"]},"UpdateWidgetBodyDto":{"type":"object","properties":{"widget":{"$ref":"#/components/schemas/WidgetInstanceDto"}},"required":["widget"]},"GetDriverComparisonDataBodyDto":{"type":"object","properties":{"driver_ids":{"minItems":2,"maxItems":5,"description":"Driver IDs selected for comparison","type":"array","items":{"type":"string"}}},"required":["driver_ids"]},"OrganisationDto":{"type":"object","properties":{"id":{"type":"string","description":"Organisation id","example":"a9a7e4e8-3e4b-4b1a-8e4a-4a2a4a2a4a2a"},"display_name":{"type":"string","description":"Display name of the organisation","example":"Cautio"},"parent_id":{"type":"string","description":"Effective parent organisation id when accessible to the user; omitted when the physical parent exists but is inaccessible","example":"a9a7e4e8-3e4b-4b1a-8e4a-4a2a4a2a4a2a"},"children_count":{"type":"number","description":"Number of direct child organisations visible to the user"},"vehicle_count":{"type":"number","description":"Total number of vehicles in this organisation and its accessible sub-organisations"},"is_setup":{"type":"boolean","description":"Whether first-time setup is complete for this organisation","default":false},"path":{"description":"Visible ancestor chain from top-level visible ancestor to this organisation","type":"array","items":{"$ref":"#/components/schemas/OrganisationDto"}}},"required":["id","display_name","is_setup"]},"OrganisationItemDto":{"type":"object","properties":{"id":{"type":"string","description":"Organisation id","example":"a9a7e4e8-3e4b-4b1a-8e4a-4a2a4a2a4a2a"},"display_name":{"type":"string","description":"Display name of the organisation","example":"Cautio"},"parent_id":{"type":"string","description":"Effective parent organisation id when accessible to the user; omitted when the physical parent exists but is inaccessible","example":"a9a7e4e8-3e4b-4b1a-8e4a-4a2a4a2a4a2a"},"children_count":{"type":"number","description":"Number of direct child organisations visible to the user"},"vehicle_count":{"type":"number","description":"Total number of vehicles in this organisation and its accessible sub-organisations"},"is_setup":{"type":"boolean","description":"Whether first-time setup is complete for this organisation","default":false},"path":{"description":"Visible ancestor chain from top-level visible ancestor to this organisation","type":"array","items":{"$ref":"#/components/schemas/OrganisationDto"}},"children":{"type":"object","description":"List of child organisations"}},"required":["id","display_name","is_setup"]},"PaginationResponseDto":{"type":"object","properties":{"page":{"type":"number","description":"Current page number","minimum":1,"example":1},"limit":{"type":"number","description":"Number of items per page","minimum":1,"example":10},"total":{"type":"number","description":"Total number of items","minimum":0,"example":100},"has_next":{"type":"boolean","description":"Whether there is a next page","example":true},"has_prev":{"type":"boolean","description":"Whether there is a previous page","example":false}},"required":["page","limit","total","has_next","has_prev"]},"GetOrganisationListingResponseDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/OrganisationItemDto"}},"pagination":{"$ref":"#/components/schemas/PaginationResponseDto"}},"required":["items","pagination"]},"SearchOrganisationsResponseDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/OrganisationItemDto"}},"pagination":{"$ref":"#/components/schemas/PaginationResponseDto"}},"required":["items","pagination"]},"ResolveOrganisationPathResponseDto":{"type":"object","properties":{"items":{"description":"Path of organisations","type":"array","items":{"$ref":"#/components/schemas/OrganisationItemDto"}}},"required":["items"]},"ChannelDto":{"type":"object","properties":{"alias_name":{"type":"string","description":"Channel alias name","minLength":1,"maxLength":64,"example":"Front Camera"},"enabled":{"type":"boolean","description":"Whether the channel is enabled","example":true},"index":{"type":"number","description":"Channel index","minimum":1,"example":1}},"required":["alias_name","enabled","index"]},"DashcamDataDto":{"type":"object","properties":{"channels":{"description":"Dashcam channels","minItems":1,"maxItems":3,"type":"array","items":{"$ref":"#/components/schemas/ChannelDto"}}},"required":["channels"]},"FuelCalibrationRuleDto":{"type":"object","properties":{"fuel_tank_level":{"type":"number","description":"Fuel tank level in millimetres"},"fuel_capacity":{"type":"number","description":"Fuel capacity"}},"required":["fuel_tank_level","fuel_capacity"]},"FuelSensorConfigDto":{"type":"object","properties":{"tank_capacity":{"type":"number","description":"Fuel tank capacity"},"calibration_rules":{"description":"Fuel calibration rules","minItems":2,"type":"array","items":{"$ref":"#/components/schemas/FuelCalibrationRuleDto"}}},"required":["tank_capacity","calibration_rules"]},"SensorDto":{"type":"object","properties":{"type":{"type":"number","enum":[0,1,2,3,4,5]},"fuel":{"$ref":"#/components/schemas/FuelSensorConfigDto"}},"required":["type"]},"SensorSetDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/SensorDto"}}},"required":["items"]},"CreateDeviceRequestDto":{"type":"object","properties":{"entity_type":{"type":"number","description":"Entity type","enum":[0,1]},"entity_id":{"type":"string","description":"Entity ID","example":"019aa01c-a1a9-7fae-961b-23845147892e"},"device_number":{"type":"string","description":"Device number","minLength":1,"maxLength":32,"example":"DEV001"},"model_name":{"type":"string","description":"Device model name","example":"DASHCAM-C001","maxLength":64},"alias_name":{"type":"string","description":"Device alias name","maxLength":64,"example":"Main Entrance Camera"},"sim_card_number":{"type":"string","description":"SIM card number","maxLength":64,"example":"8901234567890123456"},"firmware_version":{"type":"string","description":"Firmware version","maxLength":64,"example":"1.2.3"},"dashcam":{"description":"Dashcam-specific data","allOf":[{"$ref":"#/components/schemas/DashcamDataDto"}]},"sensors":{"description":"Desired sensors","allOf":[{"$ref":"#/components/schemas/SensorSetDto"}]}},"required":["entity_type","entity_id","device_number","model_name"]},"CreateDevicesRequestDto":{"type":"object","properties":{"items":{"description":"List of devices to create","minItems":1,"maxItems":10000,"type":"array","items":{"$ref":"#/components/schemas/CreateDeviceRequestDto"}}},"required":["items"]},"DeviceErrorDetailDto":{"type":"object","properties":{"code":{"type":"number","description":"Error code"},"message":{"type":"string","description":"Error message"},"field":{"type":"string","description":"Field with the error"},"index":{"type":"number","description":"Request item index"}},"required":["code","message"]},"CreatedDeviceDto":{"type":"object","properties":{"index":{"type":"number","description":"Request item index"},"device_id":{"type":"string","description":"Created device ID"}},"required":["index","device_id"]},"CreateDevicesResponseDataDto":{"type":"object","properties":{"total":{"type":"number","description":"Total number of devices processed","minimum":0,"maximum":10000,"example":5},"success":{"type":"number","description":"Number of devices successfully created","minimum":0,"maximum":10000,"example":4},"device_ids":{"description":"List of created device IDs when exactly one device is created","example":["019aa01c-a1a9-7fae-961b-23845147892e"],"type":"array","items":{"type":"string"}},"errors":{"description":"Per-row errors for partial failures","type":"array","items":{"$ref":"#/components/schemas/DeviceErrorDetailDto"}},"created_devices":{"description":"Created device IDs keyed by request item index","type":"array","items":{"$ref":"#/components/schemas/CreatedDeviceDto"}}},"required":["total","success"]},"CreateDevicesResponseDto":{"type":"object","properties":{"data":{"description":"Response data","allOf":[{"$ref":"#/components/schemas/CreateDevicesResponseDataDto"}]}},"required":["data"]},"DeviceModelDto":{"type":"object","properties":{"id":{"type":"string","description":"Device model ID","example":"019aa01c-a1a9-7fae-961b-23845147892e"},"model":{"type":"string","description":"Device model name","example":"Dashcam Pro"},"type":{"type":"number","description":"Device type","enum":[0,1]}},"required":["id","model","type"]},"DeviceStateDto":{"type":"object","properties":{"state":{"type":"number","description":"Device state","enum":[0,1],"example":1}},"required":["state"]},"DeviceVehicleDetailsDto":{"type":"object","properties":{"id":{"type":"string","description":"Vehicle ID","example":"019aa01c-a1a9-7fae-961b-23845147892e"},"plate_number":{"type":"string","description":"Vehicle plate number","example":"ABC-123"}},"required":["id","plate_number"]},"DeviceDetailsDto":{"type":"object","properties":{"dashcam":{"description":"Dashcam-specific device details","allOf":[{"$ref":"#/components/schemas/DashcamDataDto"}]}}},"CapabilityDto":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether the capability is enabled","example":true}},"required":["enabled"]},"InputCapabilityDto":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether the capability is enabled","example":true}},"required":["enabled"]},"GeoPointDto":{"type":"object","properties":{"longitude":{"type":"number","description":"Longitude","example":-122.4194},"latitude":{"type":"number","description":"Latitude","example":37.7749}},"required":["longitude","latitude"]},"GpsCapabilityDto":{"type":"object","properties":{"location":{"description":"GPS location","allOf":[{"$ref":"#/components/schemas/GeoPointDto"}]}}},"FuelDataDto":{"type":"object","properties":{"current_fuel_quantity":{"type":"number","description":"Current calculated fuel quantity"},"current_fuel_tank_level":{"type":"number","description":"Current fuel tank level in millimetres"},"maximum_fuel_tank_capacity":{"type":"number","description":"Configured total fuel capacity"},"maximum_fuel_tank_level":{"type":"number","description":"Maximum fuel tank level in millimetres"},"last_updated_at":{"type":"string","description":"Last fuel reading timestamp in milliseconds"}},"required":["current_fuel_quantity","current_fuel_tank_level","maximum_fuel_tank_capacity","maximum_fuel_tank_level","last_updated_at"]},"DeviceCapabilitiesDto":{"type":"object","properties":{"audio":{"description":"Audio capability","allOf":[{"$ref":"#/components/schemas/CapabilityDto"}]},"video":{"description":"Video capability","allOf":[{"$ref":"#/components/schemas/CapabilityDto"}]},"input":{"description":"Input capability","allOf":[{"$ref":"#/components/schemas/InputCapabilityDto"}]},"gps":{"description":"GPS capability","allOf":[{"$ref":"#/components/schemas/GpsCapabilityDto"}]},"fuel":{"description":"Fuel capability","allOf":[{"$ref":"#/components/schemas/FuelDataDto"}]}}},"DeviceSensorDto":{"type":"object","properties":{"type":{"type":"number","enum":[0,1,2,3,4,5]},"fuel":{"$ref":"#/components/schemas/FuelSensorConfigDto"},"is_calibrated":{"type":"boolean","description":"Whether the sensor has a non-empty calibration config"}},"required":["type","is_calibrated"]},"DeviceSensorSetDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/DeviceSensorDto"}}},"required":["items"]},"DeviceDto":{"type":"object","properties":{"id":{"type":"string","description":"Device ID","example":"019aa01c-a1a9-7fae-961b-23845147892e"},"device_number":{"type":"string","description":"Device number","example":"DEV001"},"alias_name":{"type":"string","description":"Device alias name","example":"Main Entrance Camera"},"sim_card_number":{"type":"string","description":"SIM card number","example":"8901234567890123456"},"model":{"description":"Device model","allOf":[{"$ref":"#/components/schemas/DeviceModelDto"}]},"state":{"description":"Device state","allOf":[{"$ref":"#/components/schemas/DeviceStateDto"}]},"vehicle":{"description":"Vehicle details","allOf":[{"$ref":"#/components/schemas/DeviceVehicleDetailsDto"}]},"details":{"description":"Device-specific details","allOf":[{"$ref":"#/components/schemas/DeviceDetailsDto"}]},"capabilities":{"description":"Device capabilities","allOf":[{"$ref":"#/components/schemas/DeviceCapabilitiesDto"}]},"organisation":{"description":"Organisation details","allOf":[{"$ref":"#/components/schemas/OrganisationDto"}]},"updated_at":{"type":"string","description":"Update timestamp","example":"2026-03-12T17:35:00Z"},"sensors":{"description":"Sensor summary in list responses and full calibration config in single-device responses","allOf":[{"$ref":"#/components/schemas/DeviceSensorSetDto"}]}},"required":["id","device_number","alias_name","sim_card_number","model","state"]},"GetDevicesResponseDataDto":{"type":"object","properties":{"items":{"description":"List of devices","type":"array","items":{"$ref":"#/components/schemas/DeviceDto"}},"pagination":{"description":"Pagination metadata","allOf":[{"$ref":"#/components/schemas/PaginationResponseDto"}]}},"required":["items","pagination"]},"GetDevicesResponseDto":{"type":"object","properties":{"data":{"description":"Response data","allOf":[{"$ref":"#/components/schemas/GetDevicesResponseDataDto"}]}},"required":["data"]},"GetDeviceResponseDto":{"type":"object","properties":{"data":{"description":"Device data","allOf":[{"$ref":"#/components/schemas/DeviceDto"}]}},"required":["data"]},"UpdateDeviceRequestDto":{"type":"object","properties":{"model_id":{"type":"string","description":"Device model ID","example":"019aa01c-a1a9-7fae-961b-23845147892e"},"alias_name":{"type":"string","description":"Device alias name","maxLength":64,"example":"Updated Camera Name"},"sim_card_number":{"type":"string","description":"SIM card number","maxLength":64,"example":"8901234567890123456"},"firmware_version":{"type":"string","description":"Firmware version","maxLength":64,"example":"1.2.4"},"device_organisation_id":{"type":"string","description":"Device Organisation ID","example":"019aa01c-a1a9-7fae-961b-23845147892e"},"dashcam":{"description":"Dashcam-specific data","allOf":[{"$ref":"#/components/schemas/DashcamDataDto"}]},"sensors":{"$ref":"#/components/schemas/SensorSetDto"}}},"CalibrateSensorRequestDto":{"type":"object","properties":{"sensor":{"$ref":"#/components/schemas/SensorDto"}},"required":["sensor"]},"UpdateDevicePayloadDto":{"type":"object","properties":{"device_number":{"type":"string"},"model_id":{"type":"string"},"alias_name":{"type":"string"},"sim_card_number":{"type":"string"},"firmware_version":{"type":"string"},"dashcam":{"$ref":"#/components/schemas/DashcamDataDto"},"sensors":{"$ref":"#/components/schemas/SensorSetDto"}},"required":["device_number"]},"UpdateDevicesRequestDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/UpdateDevicePayloadDto"}}},"required":["items"]},"InitiateStreamResponseDataDto":{"type":"object","properties":{"timeout":{"type":"number","description":"Stream timeout in milliseconds","minimum":0,"example":60000},"stream_url":{"type":"string","description":"Stream URL","format":"uri","example":"wss://stream.example.com/live/channel1"}},"required":["timeout","stream_url"]},"InitiateStreamResponseDto":{"type":"object","properties":{"data":{"description":"Response data","allOf":[{"$ref":"#/components/schemas/InitiateStreamResponseDataDto"}]}},"required":["data"]},"AlertMetadataDto":{"type":"object","properties":{"speed":{"type":"number","description":"Alert speed","example":72.5},"trip_id":{"type":"string","description":"Trip associated with the alert","format":"uuid"},"geofence_id":{"type":"string","description":"Geofence subscription associated with the alert","format":"uuid"}},"required":["speed"]},"AcknowledgementDto":{"type":"object","properties":{"at":{"type":"string","description":"Acknowledgement timestamp in milliseconds"},"by":{"type":"string","description":"User ID that acknowledged alert"}},"required":["at","by"]},"AlertDto":{"type":"object","properties":{"id":{"type":"string","description":"Alert ID"},"type":{"type":"number","description":"Alert type","enum":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,999]},"vehicle_number":{"type":"string","description":"Vehicle number"},"location":{"type":"string","description":"Location"},"timestamp":{"type":"string","description":"Alert timestamp in milliseconds. For grouped alerts, this is end_time."},"start_time":{"type":"string","description":"Start of the alert interval in milliseconds"},"end_time":{"type":"string","description":"End of the alert interval in milliseconds"},"severity":{"type":"string","enum":["low","medium","high","critical"]},"organisation":{"description":"Organisation details","allOf":[{"$ref":"#/components/schemas/OrganisationDto"}]},"metadata":{"description":"Alert-specific metadata","allOf":[{"$ref":"#/components/schemas/AlertMetadataDto"}]},"acknowledgement":{"description":"Alert acknowledgement details","allOf":[{"$ref":"#/components/schemas/AcknowledgementDto"}]}},"required":["id","type","vehicle_number","location","timestamp","severity","organisation","metadata"]},"GetAllAlertsResponseDataDto":{"type":"object","properties":{"items":{"description":"List of alerts","type":"array","items":{"$ref":"#/components/schemas/AlertDto"}},"pagination":{"description":"Pagination metadata","allOf":[{"$ref":"#/components/schemas/PaginationResponseDto"}]}},"required":["items","pagination"]},"GetAllAlertsResponseDto":{"type":"object","properties":{"data":{"description":"Response data","allOf":[{"$ref":"#/components/schemas/GetAllAlertsResponseDataDto"}]}},"required":["data"]},"AcknowledgeAlertsRequestDto":{"type":"object","properties":{"alert_ids":{"description":"Alert IDs","maxItems":100,"type":"array","items":{"type":"string"}}},"required":["alert_ids"]},"AcknowledgeAlertResponseDataDto":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether acknowledgement succeeded"}},"required":["success"]},"AcknowledgeAlertResponseDto":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/AcknowledgeAlertResponseDataDto"}},"required":["data"]},"InvalidateAlertsRequestDto":{"type":"object","properties":{"alert_ids":{"description":"Alert IDs","maxItems":100,"type":"array","items":{"type":"string"}}},"required":["alert_ids"]},"InvalidateAlertResponseDataDto":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether invalidation succeeded"}},"required":["success"]},"InvalidateAlertResponseDto":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/InvalidateAlertResponseDataDto"}},"required":["data"]},"AlertNotificationNodeDto":{"type":"object","properties":{"key":{"type":"string"},"parent_key":{"type":"string"},"node_type":{"type":"string","enum":["category","group","alert_type"]},"alert_type":{"type":"string"},"is_configurable":{"type":"boolean"},"enabled":{"type":"boolean"}},"required":["key","node_type","is_configurable"]},"GetAlertNotificationSettingsResponseDto":{"type":"object","properties":{"nodes":{"type":"array","items":{"$ref":"#/components/schemas/AlertNotificationNodeDto"}}},"required":["nodes"]},"AlertNotificationSettingValuesDto":{"type":"object","properties":{"enabled":{"type":"boolean"},"severity":{"type":"string","enum":["low","medium","high","critical"]},"trigger_type":{"type":"string","enum":["event","threshold"]},"min_threshold_value":{"type":"number","minimum":0},"max_threshold_value":{"type":"number","minimum":0},"threshold_unit":{"type":"string"},"sustain_duration_seconds":{"type":"number","minimum":0},"cooldown_seconds":{"type":"number","minimum":0},"grouping_enabled":{"type":"boolean"},"quiet_hours_start":{"type":"string","example":"19:00"},"quiet_hours_end":{"type":"string","example":"23:30"},"quiet_hours_timezone":{"type":"string","example":"Asia/Kolkata"},"override_global_quiet_hours":{"type":"boolean"},"manual_notifications_only":{"type":"boolean"},"auto_escalate_enabled":{"type":"boolean"}}},"AlertNotificationSettingDetailNodeDto":{"type":"object","properties":{"key":{"type":"string"},"parent_key":{"type":"string"},"node_type":{"type":"string","enum":["category","group","alert_type"]},"alert_type":{"type":"string"},"effective_settings":{"$ref":"#/components/schemas/AlertNotificationSettingValuesDto"},"organisation_settings":{"$ref":"#/components/schemas/AlertNotificationSettingValuesDto"}},"required":["key","node_type"]},"GetAlertNotificationSettingDetailResponseDto":{"type":"object","properties":{"nodes":{"type":"array","items":{"$ref":"#/components/schemas/AlertNotificationSettingDetailNodeDto"}}},"required":["nodes"]},"SaveAlertNotificationSettingValuesDto":{"type":"object","properties":{"enabled":{"type":"boolean"},"severity":{"type":"string","enum":["low","medium","high","critical"]},"min_threshold_value":{"type":"number","minimum":0},"max_threshold_value":{"type":"number","minimum":0},"sustain_duration_seconds":{"type":"number","minimum":0},"cooldown_seconds":{"type":"number","minimum":0},"grouping_enabled":{"type":"boolean"},"quiet_hours_start":{"type":"string","example":"19:00"},"quiet_hours_end":{"type":"string","example":"23:30"},"quiet_hours_timezone":{"type":"string","example":"Asia/Kolkata"},"override_global_quiet_hours":{"type":"boolean"},"manual_notifications_only":{"type":"boolean"},"auto_escalate_enabled":{"type":"boolean"}}},"SaveAlertNotificationSettingDto":{"type":"object","properties":{"alert_node_key":{"type":"string","description":"Alert node key"},"settings":{"$ref":"#/components/schemas/SaveAlertNotificationSettingValuesDto"}},"required":["alert_node_key"]},"SaveAlertNotificationSettingsRequestDto":{"type":"object","properties":{"settings":{"type":"array","items":{"$ref":"#/components/schemas/SaveAlertNotificationSettingDto"}}},"required":["settings"]},"SaveAlertNotificationSettingsResponseDto":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]},"GetAlertByIdResponseDataDto":{"type":"object","properties":{"vehicle_number":{"type":"string","description":"Vehicle number"},"alert_type":{"type":"number","description":"Alert type","enum":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,999]},"incident_location":{"type":"string","description":"Incident location"},"incident_time":{"type":"string","description":"Incident time"},"severity":{"type":"string","enum":["low","medium","high","critical"]},"image_urls":{"description":"Image URLs","type":"array","items":{"type":"string"}},"video_urls":{"description":"Video URLs","type":"array","items":{"type":"string"}},"organisation":{"description":"Organisation details","allOf":[{"$ref":"#/components/schemas/OrganisationDto"}]},"metadata":{"description":"Alert-specific metadata","allOf":[{"$ref":"#/components/schemas/AlertMetadataDto"}]},"acknowledgement":{"description":"Alert acknowledgement details","allOf":[{"$ref":"#/components/schemas/AcknowledgementDto"}]}},"required":["vehicle_number","alert_type","incident_location","incident_time","severity","image_urls","video_urls","organisation","metadata"]},"GetAlertByIdResponseDto":{"type":"object","properties":{"data":{"description":"Response data","allOf":[{"$ref":"#/components/schemas/GetAlertByIdResponseDataDto"}]}},"required":["data"]},"DeviceVehicleLinkDto":{"type":"object","properties":{"device_number":{"type":"string","description":"Device Number","example":"DEV001"},"plate_number":{"type":"string","description":"Vehicle Plate Number","example":"KA01AB1234"}},"required":["device_number","plate_number"]},"LinkDevicesToVehicleRequestDto":{"type":"object","properties":{"items":{"description":"List of device-vehicle links","minItems":1,"maxItems":1000,"type":"array","items":{"$ref":"#/components/schemas/DeviceVehicleLinkDto"}}},"required":["items"]},"LinkDevicesToVehicleResponseDataDto":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether all requested links succeeded"},"errors":{"description":"Per-row errors for partial failures","type":"array","items":{"$ref":"#/components/schemas/DeviceErrorDetailDto"}}},"required":["success"]},"LinkDevicesToVehicleResponseDto":{"type":"object","properties":{"data":{"description":"Response data","allOf":[{"$ref":"#/components/schemas/LinkDevicesToVehicleResponseDataDto"}]}},"required":["data"]},"UnlinkDevicesFromVehicleRequestDto":{"type":"object","properties":{"device_numbers":{"description":"List of device numbers","example":["DEV001","DEV002"],"minItems":1,"maxItems":1000,"type":"array","items":{"type":"string"}}},"required":["device_numbers"]},"UpdateDevicesOrganisationRequestDto":{"type":"object","properties":{"target_organisation_id":{"type":"string","description":"Target Organisation ID","example":"019aa01c-a1a9-7fae-961b-23845147892e"},"device_numbers":{"description":"List of device numbers","example":["DEV001","DEV002"],"minItems":1,"maxItems":1000,"type":"array","items":{"type":"string"}}},"required":["target_organisation_id","device_numbers"]},"GetDeviceVehicleLinksResponseDto":{"type":"object","properties":{"links":{"description":"List of device-vehicle links","type":"array","items":{"$ref":"#/components/schemas/DeviceVehicleLinkDto"}}},"required":["links"]},"LicenseInfo":{"type":"object","properties":{"plate_number":{"type":"string","description":"Plate number of the vehicle","minLength":1,"maxLength":32,"example":"ABC-123"},"alias_name":{"type":"string","description":"Alias name of the vehicle","maxLength":64,"example":"Company Truck"},"country":{"type":"number","description":"Country code of the vehicle","enum":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246],"default":100},"category":{"type":"number","description":"Plate type of the vehicle","enum":[0,1,2,3,4,5,6,7,8]}},"required":["plate_number","country","category"]},"CreateVehicleBody":{"type":"object","properties":{"index":{"type":"number","description":"Index of the vehicle in the request","minimum":0,"example":0},"license":{"description":"License details of the vehicle","allOf":[{"$ref":"#/components/schemas/LicenseInfo"}]},"type":{"type":"number","description":"Vehicle type","enum":[0,1,2,3,4,5,6,7,8,9]},"engine_type":{"type":"number","description":"Engine type","enum":[0,1]},"entity_type":{"type":"number","description":"Entity type","enum":[0,1]},"entity_id":{"type":"string","description":"Entity ID associated with the vehicle","example":"019aa01c-a1a9-7fae-961b-23845147892e"}},"required":["index","license","type","engine_type","entity_type","entity_id"]},"ImportVehicleDeviceDTO":{"type":"object","properties":{"device_number":{"type":"string","description":"Device number","minLength":1,"maxLength":32,"example":"DEV001"},"model_name":{"type":"string","description":"Device model name","example":"DASHCAM-C001","maxLength":64},"alias_name":{"type":"string","description":"Device alias name","maxLength":64,"example":"Main Entrance Camera"},"sim_card_number":{"type":"string","description":"SIM card number","maxLength":64,"example":"8901234567890123456"},"firmware_version":{"type":"string","description":"Firmware version","maxLength":64,"example":"1.2.3"},"dashcam":{"description":"Dashcam-specific data","allOf":[{"$ref":"#/components/schemas/DashcamDataDto"}]}},"required":["device_number","model_name"]},"ImportVehicleItemDTO":{"type":"object","properties":{"vehicle":{"description":"Vehicle data","allOf":[{"$ref":"#/components/schemas/CreateVehicleBody"}]},"device":{"description":"Device data to link to the vehicle","allOf":[{"$ref":"#/components/schemas/ImportVehicleDeviceDTO"}]}},"required":["vehicle"]},"ImportVehiclesDTO":{"type":"object","properties":{"items":{"description":"List of vehicles and optionally their devices to be imported","minItems":1,"maxItems":10000,"type":"array","items":{"$ref":"#/components/schemas/ImportVehicleItemDTO"}}},"required":["items"]},"ImportVehicleErrorDto":{"type":"object","properties":{"row":{"type":"number","description":"Request item index"},"code":{"type":"number","description":"Error status code"},"field":{"type":"string","description":"Invalid field"},"error":{"type":"string","description":"Error message"}},"required":["row","error"]},"ImportedVehicleDto":{"type":"object","properties":{"row":{"type":"number","description":"Request item index"},"vehicle_id":{"type":"string","description":"Created vehicle ID"}},"required":["row","vehicle_id"]},"ImportedDeviceDto":{"type":"object","properties":{"row":{"type":"number","description":"Request item index"},"device_id":{"type":"string","description":"Created device ID"}},"required":["row","device_id"]},"ImportVehiclesResponseDto":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether every row succeeded"},"message":{"type":"string","description":"Import result message"},"total":{"type":"number","description":"Total rows processed"},"success_count":{"type":"number","description":"Successfully processed rows"},"failed_count":{"type":"number","description":"Failed rows"},"errors":{"type":"array","items":{"$ref":"#/components/schemas/ImportVehicleErrorDto"}},"created_vehicles":{"type":"array","items":{"$ref":"#/components/schemas/ImportedVehicleDto"}},"created_devices":{"type":"array","items":{"$ref":"#/components/schemas/ImportedDeviceDto"}}},"required":["success","message","total","success_count","failed_count","errors","created_vehicles","created_devices"]},"CreateVehicleDTO":{"type":"object","properties":{"vehicles":{"description":"List of vehicles to be created","minItems":1,"maxItems":10000,"type":"array","items":{"$ref":"#/components/schemas/CreateVehicleBody"}}},"required":["vehicles"]},"CreateVehicleResponseData":{"type":"object","properties":{"total":{"type":"number","description":"Total number of vehicles processed","minimum":0,"maximum":10000},"success":{"type":"number","description":"Number of vehicles successfully created","minimum":0,"maximum":10000},"vehicle_ids":{"description":"Created vehicle IDs","type":"array","items":{"type":"string"}},"errors":{"description":"Per-row errors for partial failures","type":"array","items":{"type":"object"}},"created_vehicles":{"description":"Created vehicle IDs keyed by request item index","type":"array","items":{"type":"object"}}},"required":["total","success"]},"CreateVehicleResponseDTO":{"type":"object","properties":{"data":{"description":"Response data","allOf":[{"$ref":"#/components/schemas/CreateVehicleResponseData"}]}},"required":["data"]},"VehicleDevice":{"type":"object","properties":{"id":{"type":"string","description":"Device ID"},"device_number":{"type":"string","description":"Device number","minLength":1,"maxLength":32},"alias_name":{"type":"string","description":"Device alias name","maxLength":64},"sim_card_number":{"type":"string","description":"SIM card number","maxLength":64},"model":{"description":"Device model","allOf":[{"$ref":"#/components/schemas/DeviceModelDto"}]},"state":{"type":"number","description":"Device state","enum":[0,1]},"details":{"description":"Device details","allOf":[{"$ref":"#/components/schemas/DeviceDetailsDto"}]},"capabilities":{"description":"Device capabilities","allOf":[{"$ref":"#/components/schemas/DeviceCapabilitiesDto"}]}}},"FrequencyDto":{"type":"object","properties":{"day":{"type":"array","description":"Days of week for the trip","example":[0,1,4],"items":{"type":"number","enum":[0,1,2,3,4,5,6]}},"start_time":{"type":"string","description":"Trip start time","example":"10:00:00"},"end_time":{"type":"string","description":"Trip end time","example":"12:00:00"},"end_day_offset":{"type":"number","description":"Number of calendar days after the start day when the trip ends","minimum":0,"maximum":6,"default":0,"example":1}},"required":["day","start_time","end_time"]},"VehicleTripStatusDto":{"type":"object","properties":{"trip_id":{"type":"string","description":"Trip ID"},"route_id":{"type":"string","description":"Route ID"},"trip_name":{"type":"string","description":"Trip name"},"trip_driver":{"type":"string","description":"Trip driver"},"trip_duration":{"type":"string","description":"Trip duration in minutes"},"trip_distance":{"type":"string","description":"Trip distance in kilometers"},"trip_start_time":{"type":"string","description":"Trip start time in milliseconds"},"trip_end_time":{"type":"string","description":"Trip end time in milliseconds"},"trip_frequency":{"description":"Trip frequency","allOf":[{"$ref":"#/components/schemas/FrequencyDto"}]}},"required":["trip_id","route_id","trip_name","trip_driver","trip_duration","trip_distance","trip_start_time","trip_end_time","trip_frequency"]},"Vehicle":{"type":"object","properties":{"id":{"type":"string","description":"Vehicle ID"},"license":{"description":"License details of the vehicle","allOf":[{"$ref":"#/components/schemas/LicenseInfo"}]},"type":{"type":"number","description":"Vehicle type","enum":[0,1,2,3,4,5,6,7,8,9]},"engine_type":{"type":"number","description":"Engine type","enum":[0,1]},"devices":{"description":"Linked devices","type":"array","items":{"$ref":"#/components/schemas/VehicleDevice"}},"entity_type":{"type":"number","description":"Entity type","enum":[0,1]},"entity_id":{"type":"string","description":"Entity ID"},"created_at":{"type":"string","description":"Created timestamp"},"updated_at":{"type":"string","description":"Updated timestamp"},"organisation":{"description":"Organisation details","allOf":[{"$ref":"#/components/schemas/OrganisationDto"}]},"trip_status_data":{"description":"Current trip status data","type":"array","items":{"$ref":"#/components/schemas/VehicleTripStatusDto"}}},"required":["id","license","type","engine_type","devices","entity_type","entity_id","created_at","updated_at","trip_status_data"]},"ListVehicleResponseData":{"type":"object","properties":{"items":{"description":"List of vehicles","type":"array","items":{"$ref":"#/components/schemas/Vehicle"}},"pagination":{"description":"Pagination metadata","allOf":[{"$ref":"#/components/schemas/PaginationResponseDto"}]}},"required":["items","pagination"]},"ListVehicleResponseDTO":{"type":"object","properties":{"data":{"description":"Response data","allOf":[{"$ref":"#/components/schemas/ListVehicleResponseData"}]}},"required":["data"]},"GeofencePolygonalBoundaryDto":{"type":"object","properties":{"vertices":{"description":"Array of coordinates defining the polygonal boundary","example":[{"latitude":12.915103971345061,"longitude":77.54220495842674},{"latitude":12.914346819728294,"longitude":77.54323957801279},{"latitude":12.915280204582459,"longitude":77.54349404755573},{"latitude":12.915639197828312,"longitude":77.54304537757258},{"latitude":12.915103971345061,"longitude":77.54220495842674}],"type":"array","items":{"type":"string"}}},"required":["vertices"]},"OrganisationFilterDto":{"type":"object","properties":{}},"GetVehiclesForMapBodyDto":{"type":"object","properties":{"viewport":{"description":"Map viewport polygon (vertices in lat/lng)","allOf":[{"$ref":"#/components/schemas/GeofencePolygonalBoundaryDto"}]},"zoom":{"type":"number","minimum":0,"maximum":22},"vehicle_ids":{"description":"Vehicle IDs to filter by","example":["019aa01c-a1a9-7fae-961b-23845147892e","019aa01c-a1a9-7fae-961b-23845147892f"],"type":"array","items":{"type":"string"}},"organisations":{"description":"Organisations to filter by","example":[{"id":"019ba16d-d19b-7486-9b8c-fad000196564","is_directly_assigned":true},{"id":"019c9910-c573-777c-a8ab-cd49769de4a0","is_directly_assigned":false}],"type":"array","items":{"$ref":"#/components/schemas/OrganisationFilterDto"}}},"required":["viewport","zoom"]},"ClusterStatsDto":{"type":"object","properties":{"moving":{"type":"number"},"idle":{"type":"number"},"stopped":{"type":"number"},"offline":{"type":"number"}},"required":["moving","idle","stopped","offline"]},"ClusterMarkerDto":{"type":"object","properties":{"size":{"type":"number"},"stats":{"$ref":"#/components/schemas/ClusterStatsDto"}},"required":["size"]},"VehicleStatusDto":{"type":"object","properties":{"state":{"type":"number","enum":[0,1,2,3,4]},"since":{"type":"string"}},"required":["state","since"]},"MovementDto":{"type":"object","properties":{"speed":{"type":"number"},"heading":{"type":"number"},"altitude":{"type":"number"}},"required":["speed","heading"]},"VehicleMarkerDto":{"type":"object","properties":{"vehicle_id":{"type":"string"},"plate_number":{"type":"string"},"vehicle_type":{"type":"number","enum":[0,1,2,3,4,5,6,7,8,9]},"device_number":{"type":"string"},"status":{"$ref":"#/components/schemas/VehicleStatusDto"},"location_recorded_at":{"type":"string"},"movement":{"$ref":"#/components/schemas/MovementDto"}},"required":["vehicle_id","plate_number","device_number","status","location_recorded_at"]},"MapMarkerDto":{"type":"object","properties":{"type":{"type":"string","enum":["cluster","vehicle"]},"position":{"$ref":"#/components/schemas/GeoPointDto"},"cluster":{"$ref":"#/components/schemas/ClusterMarkerDto"},"vehicle":{"$ref":"#/components/schemas/VehicleMarkerDto"}},"required":["type","position"]},"GetVehiclesForMapResponseData":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/MapMarkerDto"}},"total":{"type":"number"}},"required":["items","total"]},"GetVehiclesForMapResponseDto":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/GetVehiclesForMapResponseData"}},"required":["data"]},"VehicleSearchResultDto":{"type":"object","properties":{"vehicle_id":{"type":"string","description":"Vehicle ID"},"plate_number":{"type":"string","description":"Plate number","minLength":1,"maxLength":32},"alias_name":{"type":"string","description":"Alias name","maxLength":64}},"required":["vehicle_id","plate_number"]},"SearchVehiclesResponseData":{"type":"object","properties":{"items":{"description":"List of vehicle search results","type":"array","items":{"$ref":"#/components/schemas/VehicleSearchResultDto"}},"pagination":{"description":"Pagination metadata","allOf":[{"$ref":"#/components/schemas/PaginationResponseDto"}]}},"required":["items","pagination"]},"SearchVehiclesResponseDTO":{"type":"object","properties":{"data":{"description":"Response data","allOf":[{"$ref":"#/components/schemas/SearchVehiclesResponseData"}]}},"required":["data"]},"GetVehiclesResponseData":{"type":"object","properties":{"items":{"description":"List of vehicles","type":"array","items":{"$ref":"#/components/schemas/Vehicle"}}},"required":["items"]},"GetVehiclesResponse":{"type":"object","properties":{"data":{"description":"Response data","allOf":[{"$ref":"#/components/schemas/GetVehiclesResponseData"}]}},"required":["data"]},"GetVehicleResponseDataDto":{"type":"object","properties":{"vehicle":{"description":"Vehicle details","allOf":[{"$ref":"#/components/schemas/Vehicle"}]}},"required":["vehicle"]},"GetVehicleResponseDTO":{"type":"object","properties":{"data":{"description":"Response data","allOf":[{"$ref":"#/components/schemas/GetVehicleResponseDataDto"}]}},"required":["data"]},"SpeedDto":{"type":"object","properties":{"value":{"type":"number","nullable":true},"unit":{"type":"string","example":"km/h"}},"required":["value","unit"]},"LastKnownTelemetryDto":{"type":"object","properties":{"recorded_at":{"type":"string","nullable":true},"latitude":{"type":"number","nullable":true},"longitude":{"type":"number","nullable":true},"speed":{"$ref":"#/components/schemas/SpeedDto"}},"required":["recorded_at","latitude","longitude","speed"]},"CapabilityHealthDto":{"type":"object","properties":{"status":{"type":"string","enum":["healthy","faulty","potential_fault","NA"]},"occurred_at":{"type":"string","nullable":true},"code":{"type":"string","nullable":true},"description":{"type":"string","nullable":true}},"required":["status","occurred_at","code","description"]},"DeviceCapabilitiesHealthDto":{"type":"object","properties":{"sd_card":{"$ref":"#/components/schemas/CapabilityHealthDto"},"gps":{"$ref":"#/components/schemas/CapabilityHealthDto"},"camera":{"$ref":"#/components/schemas/CapabilityHealthDto"},"device":{"$ref":"#/components/schemas/CapabilityHealthDto"}},"required":["sd_card","gps","camera","device"]},"LinkedVehicleDto":{"type":"object","properties":{"vehicle_id":{"type":"string"},"plate_number":{"type":"string"}},"required":["vehicle_id","plate_number"]},"DeviceHealthDetailDto":{"type":"object","properties":{"device_id":{"type":"string"},"device_number":{"type":"string"},"alias_name":{"type":"string","nullable":true},"organisation_id":{"type":"string"},"is_hung":{"type":"boolean"},"last_communication_at":{"type":"string","nullable":true},"last_known_telemetry":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/LastKnownTelemetryDto"}]},"capabilities":{"$ref":"#/components/schemas/DeviceCapabilitiesHealthDto"},"data_consumption_gb":{"type":"number"},"linked_to":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/LinkedVehicleDto"}]}},"required":["device_id","device_number","alias_name","organisation_id","is_hung","last_communication_at","last_known_telemetry","capabilities","data_consumption_gb","linked_to"]},"GetDeviceHealthResponseDto":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/DeviceHealthDetailDto"}},"required":["data"]},"CapabilityFaultCountsDto":{"type":"object","properties":{"confirmed":{"type":"number"},"potential":{"type":"number"}},"required":["confirmed","potential"]},"DeviceHealthMetadataDto":{"type":"object","properties":{"total_devices":{"type":"number"},"online_devices":{"type":"number"},"offline_devices":{"type":"number"},"gps_faulty":{"$ref":"#/components/schemas/CapabilityFaultCountsDto"},"sd_card_faulty":{"$ref":"#/components/schemas/CapabilityFaultCountsDto"},"camera_faulty":{"$ref":"#/components/schemas/CapabilityFaultCountsDto"},"devices_hung":{"type":"number"},"data_utilised_gb":{"type":"number"}},"required":["total_devices","online_devices","offline_devices","gps_faulty","sd_card_faulty","camera_faulty","devices_hung","data_utilised_gb"]},"ListDeviceHealthDataDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/DeviceHealthDetailDto"}},"pagination":{"$ref":"#/components/schemas/PaginationResponseDto"},"metadata":{"$ref":"#/components/schemas/DeviceHealthMetadataDto"}},"required":["items","pagination","metadata"]},"ListDeviceHealthResponseDto":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ListDeviceHealthDataDto"}},"required":["data"]},"UpdateLicenseInfo":{"type":"object","properties":{"plate_number":{"type":"string","description":"Plate number of the vehicle","minLength":1,"maxLength":32,"example":"ABC-123"},"alias_name":{"type":"string","description":"Alias name of the vehicle","maxLength":64,"example":"Company Truck"},"country":{"type":"number","description":"Country code of the vehicle","enum":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246],"default":100},"category":{"type":"number","description":"Plate type of the vehicle","enum":[0,1,2,3,4,5,6,7,8]}},"required":["plate_number","country","category"]},"UpdateVehicleRequestDto":{"type":"object","properties":{"license":{"description":"License details of the vehicle","allOf":[{"$ref":"#/components/schemas/UpdateLicenseInfo"}]},"type":{"type":"number","description":"Vehicle type","enum":[0,1,2,3,4,5,6,7,8,9]},"engine_type":{"type":"number","description":"Engine type","enum":[0,1]},"entity_id":{"type":"string","description":"New entity ID associated with the vehicle","example":"019aa01c-a1a9-7fae-961b-23845147892e"},"entity_type":{"type":"number","description":"New entity type","enum":[0,1]}},"required":["license","type","engine_type"]},"CreateOrganisationPayloadDto":{"type":"object","properties":{"display_name":{"type":"string","description":"Display name of the organisation","example":"Cautio"},"parent_id":{"type":"string","description":"Parent organisation id","example":"a9a7e4e8-3e4b-4b1a-8e4a-4a2a4a2a4a2a"},"vehicle_ids":{"description":"Vehicle IDs to move to the new organisation","type":"array","items":{"type":"string"}},"excluded_user_ids":{"description":"List of user IDs to exclude from auto-assignment","type":"array","items":{"type":"string"}}},"required":["display_name","parent_id"]},"CreateOrganisationDto":{"type":"object","properties":{"organisations":{"description":"List of organisations to create","type":"array","items":{"$ref":"#/components/schemas/CreateOrganisationPayloadDto"}}},"required":["organisations"]},"CreateOrganisationResponseDto":{"type":"object","properties":{"total":{"type":"number","description":"Total organisations requested"},"success":{"type":"number","description":"Total organisations successfully created"},"organisation_ids":{"description":"List of created organisation IDs","type":"array","items":{"type":"string"}}},"required":["total","success","organisation_ids"]},"BootstrapOrganisationPayloadDto":{"type":"object","properties":{"display_name":{"type":"string","description":"Display name of the organisation","example":"Cautio"}},"required":["display_name"]},"BootstrapOrganisationDto":{"type":"object","properties":{"organisations":{"description":"List of organisations to bootstrap","type":"array","items":{"$ref":"#/components/schemas/BootstrapOrganisationPayloadDto"}}},"required":["organisations"]},"UpdateOrganisationDto":{"type":"object","properties":{"display_name":{"type":"string","description":"Display name of the organisation","example":"Cautio"},"parent_id":{"type":"string","description":"Parent organisation id","example":"a9a7e4e8-3e4b-4b1a-8e4a-4a2a4a2a4a2a"},"vehicle_ids":{"description":"Vehicle IDs to move to the organisation","type":"array","items":{"type":"string"}},"excluded_user_ids":{"description":"List of user IDs to exclude from auto-assignment","type":"array","items":{"type":"string"}},"is_setup":{"type":"boolean","description":"Whether first-time setup is complete for this organisation"}}},"OrganisationPreferencesResponseDto":{"type":"object","properties":{"organisation_id":{"type":"string","description":"Organisation ID"},"require_2fa":{"type":"boolean","description":"Whether users in this organisation must configure 2FA"}},"required":["organisation_id","require_2fa"]},"UpdateOrganisationPreferencesDto":{"type":"object","properties":{"require_2fa":{"type":"boolean","description":"Require users in this organisation to configure 2FA","example":true}}},"DeleteOrganisationResponseDto":{"type":"object","properties":{"success":{"type":"boolean","description":"Success status"}},"required":["success"]},"AssignmentContextDto":{"type":"object","properties":{"organisation_id":{"type":"string","description":"Organisation id","example":"a9a7e4e8-3e4b-4b1a-8e4a-4a2a4a2a4a2a"},"resource_type":{"type":"string","description":"Resource Type","enum":["VEHICLE"],"example":"VEHICLE"},"resource_ids":{"description":"Resource IDs","example":["a9a7e4e8-3e4b-4b1a-8e4a-4a2a4a2a4a2a"],"type":"array","items":{"type":"string"}},"applies_to_descendants":{"type":"boolean"},"organisation_name":{"type":"string"},"exclude_children":{"type":"boolean","description":"Exclude children from assignment expansion","example":true}},"required":["organisation_id"]},"RoleAssignmentDto":{"type":"object","properties":{"role_id":{"type":"string","description":"Role id","example":"a9a7e4e8-3e4b-4b1a-8e4a-4a2a4a2a4a2a"},"contexts":{"description":"Contexts for the role assignment","type":"array","items":{"$ref":"#/components/schemas/AssignmentContextDto"}}},"required":["role_id","contexts"]},"InviteUserDto":{"type":"object","properties":{"email":{"type":"string","description":"User's email address to invite","example":"jane.doe@example.com"},"username":{"type":"string","description":"User's username","example":"jane.doe"},"password":{"type":"string","description":"User's password","example":"password123"},"first_name":{"type":"string","description":"User's first name","example":"Jane"},"last_name":{"type":"string","description":"User's last name","example":"Doe"},"assignments":{"description":"List of role assignments","type":"array","items":{"$ref":"#/components/schemas/RoleAssignmentDto"}},"auto_assign":{"type":"boolean","description":"Enable auto-assign for roles","example":true}},"required":["first_name","last_name","assignments"]},"RoleDto":{"type":"object","properties":{"id":{"type":"string","description":"Role ID","example":"123e4567-e89b-12d3-a456-426614174000"},"name":{"type":"string","description":"Role Name","example":"Admin"}},"required":["id","name"]},"UserResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"User ID"},"email":{"type":"string","description":"User Email"},"first_name":{"type":"string","description":"User First Name"},"last_name":{"type":"string","description":"User Last Name"},"username":{"type":"string","description":"User Username"},"organisation_id":{"type":"string","description":"Organisation ID"},"roles":{"description":"User Roles","type":"array","items":{"$ref":"#/components/schemas/RoleDto"}}},"required":["id","email","first_name","last_name","username","organisation_id","roles"]},"UpdateUserDto":{"type":"object","properties":{"first_name":{"type":"string","description":"User's first name","example":"John"},"last_name":{"type":"string","description":"User's last name","example":"Doe"},"assignments":{"description":"List of role assignments","type":"array","items":{"$ref":"#/components/schemas/RoleAssignmentDto"}},"auto_assign":{"type":"boolean","description":"Enable auto-assign for roles","example":true}}},"UserPreferencesResponseDto":{"type":"object","properties":{"user_id":{"type":"string","description":"User ID"},"theme":{"type":"string","description":"User theme","enum":["light","dark","system"]},"language":{"type":"string","description":"User language","enum":["en","hi","bn","kn","fil","mr","te"]}},"required":["user_id"]},"UpdateUserPreferencesDto":{"type":"object","properties":{"theme":{"type":"string","description":"User theme","enum":["light","dark","system"],"example":"dark"},"language":{"type":"string","description":"User language","enum":["en","hi","bn","kn","fil","mr","te"],"example":"en"}}},"GetUsersResponseDto":{"type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/components/schemas/UserResponseDto"}},"pagination":{"$ref":"#/components/schemas/PaginationResponseDto"}},"required":["users","pagination"]},"GetUserStatusResponseDto":{"type":"object","properties":{"status":{"type":"number","description":"User Status","enum":[0,1,2,3,4]},"last_activity":{"type":"number","description":"Last Activity Timestamp (Epoch)","example":1678886400000}},"required":["status","last_activity"]},"ResetPasswordDto":{"type":"object","properties":{"user_id":{"type":"string","description":"User ID","example":"019ca8f7-2777-7946-88f2-4974f4daa7b0"},"password":{"type":"string","description":"New password","example":"newPassword123!"},"temporary":{"type":"boolean","description":"Is password temporary","example":true}},"required":["user_id"]},"CreateRoleDto":{"type":"object","properties":{"name":{"type":"string","description":"Name of the role","example":"Admin"},"description":{"type":"string","description":"Description of the role","example":"Admin role"},"permission_ids":{"description":"List of permission ids","example":["a9a7e4e8-3e4b-4b1a-8e4a-4a2a4a2a4a2a"],"type":"array","items":{"type":"string"}},"level":{"type":"number","description":"Visibility level of the role","enum":[0,1],"example":1}},"required":["name","description","permission_ids"]},"CreateRoleResponseDto":{"type":"object","properties":{"success":{"type":"boolean","description":"Success status"},"message":{"type":"string","description":"Response Message"},"role_id":{"type":"string","description":"Newly created Role ID"}},"required":["success","message"]},"UpdateRoleDto":{"type":"object","properties":{"name":{"type":"string","description":"Name of the role","example":"Admin"},"description":{"type":"string","description":"Description of the role","example":"Admin role"},"permission_ids":{"description":"List of permission ids","example":["a9a7e4e8-3e4b-4b1a-8e4a-4a2a4a2a4a2a"],"type":"array","items":{"type":"string"}},"level":{"type":"number","description":"Visibility level of the role","enum":[0,1],"example":1}},"required":["name","description","permission_ids"]},"UpdateRoleResponseDto":{"type":"object","properties":{"success":{"type":"boolean","description":"Success status"},"message":{"type":"string","description":"Response Message"}},"required":["success","message"]},"AssignRoleDto":{"type":"object","properties":{"user_id":{"type":"string","description":"User id","example":"a9a7e4e8-3e4b-4b1a-8e4a-4a2a4a2a4a2a"},"assignments":{"description":"List of role assignments","type":"array","items":{"$ref":"#/components/schemas/RoleAssignmentDto"}}},"required":["user_id","assignments"]},"PermissionDto":{"type":"object","properties":{"id":{"type":"string","description":"Permission ID UUID"},"description":{"type":"string","description":"Optional description"},"action":{"type":"string","description":"Action definition"}},"required":["id","action"]},"SubModuleDto":{"type":"object","properties":{"name":{"type":"string","description":"SubModule Name"},"permissions":{"description":"Permissions under this SubModule","type":"array","items":{"$ref":"#/components/schemas/PermissionDto"}}},"required":["name","permissions"]},"ModuleDto":{"type":"object","properties":{"name":{"type":"string","description":"Module Name"},"submodules":{"description":"SubModules under this Module","type":"array","items":{"$ref":"#/components/schemas/SubModuleDto"}}},"required":["name","submodules"]},"GetAllPermissionsResponseDataDto":{"type":"object","properties":{"items":{"description":"List of module permissions","type":"array","items":{"$ref":"#/components/schemas/ModuleDto"}}},"required":["items"]},"GetAllPermissionsResponseDto":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/GetAllPermissionsResponseDataDto"}},"required":["data"]},"RoleDetailsDto":{"type":"object","properties":{"id":{"type":"string","description":"Role ID"},"name":{"type":"string","description":"Role Name"},"role_type":{"type":"string","description":"Role Type"},"description":{"type":"string","description":"Role Description"},"user_count":{"type":"number","description":"Number of Users with this role"},"edit_policy":{"type":"string","description":"Role edit policy","enum":["STANDARD","SYSTEM_ONLY"],"example":"STANDARD"}},"required":["id","name","role_type","description","user_count","edit_policy"]},"GetOrganisationRolesResponseDataDto":{"type":"object","properties":{"organisation_id":{"type":"string","description":"Organisation ID"},"items":{"description":"List of role details","type":"array","items":{"$ref":"#/components/schemas/RoleDetailsDto"}},"pagination":{"description":"Pagination data","allOf":[{"$ref":"#/components/schemas/PaginationResponseDto"}]}},"required":["organisation_id","items","pagination"]},"GetOrganisationRolesResponseDto":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/GetOrganisationRolesResponseDataDto"}},"required":["data"]},"RolePermissionsDto":{"type":"object","properties":{"role_id":{"type":"string","description":"Role ID"},"role_name":{"type":"string","description":"Role Name"},"modules":{"description":"Module access definition","type":"array","items":{"$ref":"#/components/schemas/ModuleDto"}}},"required":["role_id","role_name","modules"]},"GetUserRolesPermissionsResponseDataDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/RolePermissionsDto"}}},"required":["items"]},"GetUserRolesPermissionsResponseDto":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/GetUserRolesPermissionsResponseDataDto"}},"required":["data"]},"DeleteRoleResponseDto":{"type":"object","properties":{"success":{"type":"boolean","description":"Success status"},"message":{"type":"string","description":"Message"}},"required":["success","message"]},"GetRolePermissionsResponseDataDto":{"type":"object","properties":{"organisation_id":{"type":"string","description":"Organisation ID"},"role_id":{"type":"string","description":"Role ID"},"items":{"description":"Modules specific to role","type":"array","items":{"$ref":"#/components/schemas/ModuleDto"}}},"required":["organisation_id","role_id","items"]},"GetRolePermissionsResponseDto":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/GetRolePermissionsResponseDataDto"}},"required":["data"]},"ReportItemDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"report_type":{"type":"string"}},"required":["id","name","report_type"]},"ListReportsResponseDto":{"type":"object","properties":{"reports":{"type":"array","items":{"$ref":"#/components/schemas/ReportItemDto"}}},"required":["reports"]},"ReportColumnDto":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"type":{"type":"string"}},"required":["key","label","type"]},"ReportRowDto":{"type":"object","properties":{"values":{"type":"object","description":"Row data as a map of strings","additionalProperties":{"type":"string"}}},"required":["values"]},"GetAlertBreakupDetailsResponseDto":{"type":"object","properties":{"columns":{"type":"array","items":{"$ref":"#/components/schemas/ReportColumnDto"}},"rows":{"type":"array","items":{"$ref":"#/components/schemas/ReportRowDto"}}},"required":["columns","rows"]},"ReportFilterDefinitionDto":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"value_type":{"type":"string","enum":["REPORT_FILTER_VALUE_TYPE_UNSPECIFIED","DATETIME","UUID_LIST","TEXT","BOOL","NUMBER"]}},"required":["key","label","value_type"]},"GetReportDefinitionResponseDto":{"type":"object","properties":{"report_id":{"type":"string"},"name":{"type":"string"},"filters":{"type":"array","items":{"$ref":"#/components/schemas/ReportFilterDefinitionDto"}}},"required":["report_id","name","filters"]},"GetReportResponseDto":{"type":"object","properties":{"columns":{"type":"array","items":{"$ref":"#/components/schemas/ReportColumnDto"}},"rows":{"type":"array","items":{"$ref":"#/components/schemas/ReportRowDto"}}},"required":["columns","rows"]},"GeofenceEntityIdsDto":{"type":"object","properties":{"sub_organisation_ids":{"description":"Sub-organisation IDs","example":["019c233d-09df-762c-8db1-9f9015814a9e"],"type":"array","items":{"type":"string"}},"vehicle_tags":{"description":"Vehicle tag IDs","example":["019c233d-09df-74ce-b815-dc608e835585"],"type":"array","items":{"type":"string"}},"vehicle_ids":{"description":"Vehicle IDs","example":["019c233d-09df-74ce-b815-dc608e835585"],"type":"array","items":{"type":"string"}}}},"GeofenceCenterDto":{"type":"object","properties":{"latitude":{"type":"number","example":12.9716,"description":"Latitude of geofence center"},"longitude":{"type":"number","example":77.5946,"description":"Longitude of geofence center"}},"required":["latitude","longitude"]},"GeofenceRadialBoundaryDto":{"type":"object","properties":{"center":{"description":"Center point of the radial boundary","allOf":[{"$ref":"#/components/schemas/GeofenceCenterDto"}]},"radius_meters":{"type":"number","example":1000,"description":"Radius in meters"}},"required":["center","radius_meters"]},"GeofenceRouteBoundaryDto":{"type":"object","properties":{"route_points":{"description":"Array of coordinates defining the route points","example":[{"latitude":12.915103971345061,"longitude":77.54220495842674},{"latitude":12.914346819728294,"longitude":77.54323957801279},{"latitude":12.915280204582459,"longitude":77.54349404755573}],"type":"array","items":{"type":"string"}},"buffer_meters":{"type":"number","example":50,"description":"Buffer radius in meters around the route"}},"required":["route_points","buffer_meters"]},"GeofenceBoundaryDetailsDto":{"type":"object","properties":{"boundary_type":{"type":"number","enum":[0,1,2,3,4],"example":1},"radial_boundary":{"description":"Radial boundary details","allOf":[{"$ref":"#/components/schemas/GeofenceRadialBoundaryDto"}]},"administrative_boundary_id":{"type":"string","description":"Administrative boundary ID"},"polygonal_boundary":{"description":"Polygonal boundary details","allOf":[{"$ref":"#/components/schemas/GeofencePolygonalBoundaryDto"}]},"route_boundary":{"description":"Route boundary details","allOf":[{"$ref":"#/components/schemas/GeofenceRouteBoundaryDto"}]}},"required":["boundary_type"]},"GeofenceFrequencyDto":{"type":"object","properties":{"day":{"type":"array","description":"Days of week when the geofence subscription is active","example":[0,1,2,3,4,5,6],"items":{"type":"number","enum":[0,1,2,3,4,5,6]}},"start_time":{"type":"string","description":"Geofence active start time","example":"00:00:00"},"end_time":{"type":"string","description":"Geofence active end time","example":"23:59:59"},"end_day_offset":{"type":"number","description":"Number of calendar days after the start day when activity ends","minimum":0,"maximum":6,"default":0}},"required":["day","start_time","end_time"]},"CreateGeofenceSubscriptionDto":{"type":"object","properties":{"geofence_name":{"type":"string","description":"Geofence name","example":"Warehouse Perimeter"},"entity_ids":{"description":"Entity identifiers for geofence subscription","allOf":[{"$ref":"#/components/schemas/GeofenceEntityIdsDto"}]},"usage":{"type":"string","description":"Usage context of geofence","example":"Tracking"},"category":{"type":"string","description":"Geofence category","example":"Logistics"},"events":{"description":"Events to subscribe for","example":["ENTER","EXIT","CLOSE_PROXIMITY"],"type":"array","items":{"type":"string"}},"boundary_details":{"description":"Geofence boundary definition","example":{"boundary_type":1,"radial_boundary":{"center":{"latitude":13.19889,"longitude":77.70556},"radius_meters":5000}},"allOf":[{"$ref":"#/components/schemas/GeofenceBoundaryDetailsDto"}]},"status":{"type":"number","description":"Status of the geofence subscription","example":1},"frequency":{"description":"Active hours for the geofence subscription. Defaults to all days, 00:00:00-23:59:59 when omitted.","allOf":[{"$ref":"#/components/schemas/GeofenceFrequencyDto"}]}},"required":["geofence_name","entity_ids","usage","category","events","boundary_details","status"]},"GeofenceBoundaryResponseDto":{"type":"object","properties":{"boundary_type":{"type":"string","description":"Boundary type","example":"RADIAL"},"boundary_details":{"type":"object","description":"Boundary details","example":{"radius_meters":"5000"}},"geojson":{"type":"string","description":"Boundary GeoJSON"}},"required":["boundary_type","boundary_details"]},"GeofenceSubscriptionResponseDto":{"type":"object","properties":{"subscription_id":{"type":"string","description":"Subscription ID","example":"019c233d-09df-762c-8db1-9f9015814a9e"},"geofence_name":{"type":"string","description":"Geofence name","example":"Warehouse Perimeter"},"organisation_id":{"type":"string","description":"Organisation ID","example":"019c229e-343b-7c79-bfcc-a4b58de5fee4"},"entity_ids":{"description":"Entity identifiers for geofence subscription","allOf":[{"$ref":"#/components/schemas/GeofenceEntityIdsDto"}]},"usage":{"type":"string","description":"Usage context of geofence","example":"Tracking"},"category":{"type":"string","description":"Geofence category","example":"Logistics"},"events":{"description":"Subscribed events","example":["ENTER","EXIT"],"type":"array","items":{"type":"string"}},"status":{"type":"string","description":"Subscription status","example":"ENABLED"},"boundary_id":{"type":"string","description":"Boundary ID","example":"019c233d-09df-762c-8db1-9f9015814a9e"},"frequency":{"description":"Active hours for the geofence subscription","allOf":[{"$ref":"#/components/schemas/GeofenceFrequencyDto"}]},"boundary_details":{"description":"Boundary details","allOf":[{"$ref":"#/components/schemas/GeofenceBoundaryResponseDto"}]}},"required":["subscription_id","geofence_name","organisation_id","entity_ids","usage","category","events","status","boundary_id","frequency","boundary_details"]},"ListGeofenceSubscriptionsResponseDto":{"type":"object","properties":{"subscriptions":{"description":"Geofence subscriptions","type":"array","items":{"$ref":"#/components/schemas/GeofenceSubscriptionResponseDto"}},"pagination":{"description":"Pagination metadata","allOf":[{"$ref":"#/components/schemas/PaginationResponseDto"}]}},"required":["subscriptions"]},"UpdateGeofenceBoundaryDetailsDto":{"type":"object","properties":{"boundary_type":{"type":"number","enum":[0,1,2,3,4],"example":1,"description":"Boundary type (ADMINISTRATIVE not allowed for updates)"},"radial_boundary":{"description":"Radial boundary details","allOf":[{"$ref":"#/components/schemas/GeofenceRadialBoundaryDto"}]},"polygonal_boundary":{"description":"Polygonal boundary details","allOf":[{"$ref":"#/components/schemas/GeofencePolygonalBoundaryDto"}]},"route_boundary":{"description":"Route boundary details","allOf":[{"$ref":"#/components/schemas/GeofenceRouteBoundaryDto"}]}},"required":["boundary_type"]},"UpdateGeofenceSubscriptionDto":{"type":"object","properties":{"geofence_name":{"type":"string","description":"Updated geofence name","example":"Warehouse Perimeter - Updated"},"entity_ids":{"description":"Updated entity identifiers for geofence subscription","allOf":[{"$ref":"#/components/schemas/GeofenceEntityIdsDto"}]},"usage":{"type":"string","description":"Updated usage context of geofence","example":"Monitoring"},"category":{"type":"string","description":"Updated geofence category","example":"Operations"},"events":{"description":"Updated events to subscribe for","example":["ENTER","EXIT","DEVIATION"],"type":"array","items":{"type":"string"}},"status":{"type":"number","description":"Updated status of the geofence subscription","example":1},"boundary_details":{"description":"Updated geofence boundary definition (cannot update administrative boundaries)","example":{"boundary_type":1,"radial_boundary":{"center":{"latitude":13.19889,"longitude":77.70556},"radius_meters":7500}},"allOf":[{"$ref":"#/components/schemas/UpdateGeofenceBoundaryDetailsDto"}]}}},"VerifyBoundaryRequestDto":{"type":"object","properties":{"boundary_details":{"description":"Details of the boundary to verify","allOf":[{"$ref":"#/components/schemas/GeofenceBoundaryDetailsDto"}]}},"required":["boundary_details"]},"CreateApiClientBodyDto":{"type":"object","properties":{"name":{"type":"string","description":"Name of the API client","example":"My App"}},"required":["name"]},"CreateApiClientResponseDto":{"type":"object","properties":{"client_id":{"type":"string","description":"Client ID"},"client_secret":{"type":"string","description":"Client Secret"}},"required":["client_id","client_secret"]},"DriverLicenseInfoDto":{"type":"object","properties":{"driving_license_number":{"type":"string","description":"Driving license number printed on the driver's license","example":"DL0420110149646","maxLength":64},"date_of_expiry":{"type":"number","description":"License expiry date as epoch milliseconds","example":1893456000000}},"required":["driving_license_number","date_of_expiry"]},"DriverVehicleAssignmentDetailsDto":{"type":"object","properties":{"vehicle_id":{"type":"string","description":"Vehicle ID to link with this driver","example":"019c6e27-5dfa-76e2-a30d-a5adc278e53b"},"shift_start_time":{"type":"string","description":"Shift start time in HH:mm format","example":"09:00"},"shift_end_time":{"type":"string","description":"Shift end time in HH:mm format","example":"18:00"},"effective_from":{"type":"string","description":"Assignment effective start time as ISO string","example":"2026-08-24T00:00:00.000Z"},"effective_to":{"type":"string","description":"Assignment effective end time as ISO string","example":"2026-09-01T00:00:00.000Z"}},"required":["vehicle_id","shift_start_time","shift_end_time","effective_from"]},"CreateDriverDto":{"type":"object","properties":{"name":{"type":"string","description":"Driver's full name","example":"Ravi Kumar","maxLength":256},"mobile_number":{"type":"string","description":"Driver's mobile number","example":"9876543210","maxLength":16},"user_id":{"type":"string","description":"User ID to link with this driver","example":"019bb7e2-3ca7-792c-8d29-01fbb317f9dc"},"license_info":{"description":"Optional driver license details","allOf":[{"$ref":"#/components/schemas/DriverLicenseInfoDto"}]},"assignment":{"description":"Optional driver-vehicle assignment with shift timing","allOf":[{"$ref":"#/components/schemas/DriverVehicleAssignmentDetailsDto"}]}},"required":["name"]},"CreateDriversDto":{"type":"object","properties":{"drivers":{"description":"Drivers to create","type":"array","items":{"$ref":"#/components/schemas/CreateDriverDto"}}},"required":["drivers"]},"CreateDriverVehicleAssignmentDto":{"type":"object","properties":{"driver_id":{"type":"string","description":"Driver ID to assign to a vehicle","example":"019fadb6-dae3-7332-a8e4-25538ba84e52"},"assignment":{"description":"Driver-vehicle assignment with shift timing","allOf":[{"$ref":"#/components/schemas/DriverVehicleAssignmentDetailsDto"}]}},"required":["driver_id","assignment"]},"CreateDriverVehicleAssignmentsDto":{"type":"object","properties":{"assignments":{"description":"Driver-vehicle assignments to create","type":"array","items":{"$ref":"#/components/schemas/CreateDriverVehicleAssignmentDto"}}},"required":["assignments"]},"ReassignDriverVehicleDto":{"type":"object","properties":{"assignment":{"description":"New driver-vehicle assignment with shift timing","allOf":[{"$ref":"#/components/schemas/DriverVehicleAssignmentDetailsDto"}]}},"required":["assignment"]},"UpdateDriverDto":{"type":"object","properties":{"name":{"type":"string","description":"Driver's full name","example":"Ravi Kumar","maxLength":256},"mobile_number":{"type":"string","description":"Driver's mobile number","example":"9876543210","maxLength":16},"user_id":{"type":"string","description":"User ID to link with this driver","example":"019bb7e2-3ca7-792c-8d29-01fbb317f9dc"},"license_info":{"description":"Optional driver license details","allOf":[{"$ref":"#/components/schemas/DriverLicenseInfoDto"}]}}},"LocationDto":{"type":"object","properties":{"latitude":{"type":"number","example":25.5941},"longitude":{"type":"number","example":85.1376},"type":{"type":"number","enum":[0,1,2],"example":1}},"required":["latitude","longitude","type"]},"GetSuggestedRouteRequestDto":{"type":"object","properties":{"locations":{"description":"List of locations for the route","example":[{"latitude":25.5941,"longitude":85.1376,"type":1},{"latitude":22.5744,"longitude":88.3629,"type":2},{"latitude":12.9629,"longitude":77.5775,"type":1}],"type":"array","items":{"$ref":"#/components/schemas/LocationDto"}},"costing":{"type":"string","description":"Costing method for the route","example":"auto"},"units":{"type":"string","description":"Units for the route","example":"kilometers"}},"required":["locations","costing","units"]},"CreateRouteLocationDto":{"type":"object","properties":{"latitude":{"type":"number","example":17.385},"longitude":{"type":"number","example":78.4867},"type":{"type":"number","enum":[0,1,2],"example":1},"address":{"type":"string","example":"Hyderabad A"}},"required":["latitude","longitude","type"]},"VehicleMovementHistoryDto":{"type":"object","properties":{"vehicle_id":{"type":"string","example":"019aa01c-a1a9-7fae-961b-23845147892e"},"start_time":{"type":"string","example":"1"},"end_time":{"type":"string","example":"1"},"start_index":{"type":"string","example":"2"},"end_index":{"type":"string","example":"2"}},"required":["vehicle_id","start_time","end_time","start_index","end_index"]},"CreateRouteRequestDto":{"type":"object","properties":{"locations":{"description":"List of locations for the route","example":[{"latitude":17.385,"longitude":78.4867,"type":1,"address":"Hyderabad A"},{"latitude":17.6868,"longitude":83.2185,"type":2,"address":"Vizag B"},{"latitude":16.5062,"longitude":80.648,"type":2,"address":"Vijayawada C"},{"latitude":15.8281,"longitude":78.0373,"type":1,"address":"Kurnool D"}],"type":"array","items":{"$ref":"#/components/schemas/CreateRouteLocationDto"}},"route_name":{"type":"string","description":"Name of the route","example":"GRPC Test Route 6"},"movement_history_data":{"description":"Movement history data","example":{"vehicle_id":"019aa01c-a1a9-7fae-961b-23845147892e","start_time":1,"end_time":1,"start_index":2,"end_index":2},"allOf":[{"$ref":"#/components/schemas/VehicleMovementHistoryDto"}]}},"required":["locations","route_name"]},"ImportRouteRequestDto":{"type":"object","properties":{"index":{"type":"number","description":"Client-supplied route index","minimum":0},"route_name":{"type":"string","description":"Name of the route","maxLength":255},"organisation_id":{"type":"string","description":"Organisation ID","format":"uuid"},"locations":{"minItems":2,"type":"array","items":{"$ref":"#/components/schemas/CreateRouteLocationDto"}}},"required":["index","route_name","organisation_id","locations"]},"ImportRouteResultDto":{"type":"object","properties":{"index":{"type":"number","description":"Client-supplied route index"},"success":{"type":"boolean","description":"Whether this route was created"},"route_id":{"type":"string","format":"uuid"},"message":{"type":"string"}},"required":["index","success"]},"ImportRoutesResponseDto":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/ImportRouteResultDto"}}},"required":["results"]},"GenerateTrackingLinkBodyDto":{"type":"object","properties":{"validity_hours":{"type":"number","description":"How many hours the link is valid for","example":24,"minimum":24,"maximum":8766},"active_from":{"type":"string","description":"Start of active window, HH:MM (e.g. '09:00')","example":"09:00"},"active_to":{"type":"string","description":"End of active window, HH:MM (e.g. '17:00')","example":"17:00"},"timezone":{"type":"string","description":"IANA timezone name for the active window (e.g. 'Asia/Kolkata', 'America/New_York')","example":"Asia/Kolkata"},"allow_live_video":{"type":"boolean","description":"Allow live video"},"allowed_channel_indices":{"description":"Allowed channel indices","example":[1,2,3],"type":"array","items":{"type":"string"}}},"required":["validity_hours","timezone","allow_live_video","allowed_channel_indices"]},"VehicleDetailsDto":{"type":"object","properties":{"vehicle_id":{"type":"string","description":"Vehicle ID","example":"019aa01c-a1a9-7fae-961b-23845147892e"},"frequency":{"description":"Vehicle trip frequency","allOf":[{"$ref":"#/components/schemas/FrequencyDto"}]},"frequencies":{"description":"Vehicle trip frequencies","type":"array","items":{"$ref":"#/components/schemas/FrequencyDto"}}},"required":["vehicle_id"]},"CreateTripRequestDto":{"type":"object","properties":{"route_id":{"type":"string","description":"Route ID","example":"019e0190-5842-7da0-8efe-e58e20acf2a5"},"trip_name":{"type":"string","description":"Trip name","example":"Morning Shuttle"},"vehicles":{"description":"Vehicles with their individual schedules","type":"array","items":{"$ref":"#/components/schemas/VehicleDetailsDto"}}},"required":["route_id","trip_name","vehicles"]},"BulkCreateTripResultDto":{"type":"object","properties":{"index":{"type":"number","description":"Zero-based request index","minimum":0},"success":{"type":"boolean","description":"Whether this trip was created"},"trip_id":{"type":"string","format":"uuid"},"message":{"type":"string"}},"required":["index","success"]},"BulkCreateTripsResponseDto":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/BulkCreateTripResultDto"}}},"required":["results"]},"EditTripRequestDto":{"type":"object","properties":{"route_id":{"type":"string","description":"Route ID","example":"019e0190-5842-7da0-8efe-e58e20acf2a5"},"trip_name":{"type":"string","description":"Trip name","example":"Morning Shuttle"},"vehicles":{"description":"Vehicles with their individual schedules","type":"array","items":{"$ref":"#/components/schemas/VehicleDetailsDto"}}},"required":["route_id","trip_name","vehicles"]},"VehicleTripDetailsResponseDto":{"type":"object","properties":{"vehicle_id":{"type":"string"},"frequency":{"$ref":"#/components/schemas/FrequencyDto"},"frequencies":{"type":"array","items":{"$ref":"#/components/schemas/FrequencyDto"}},"status":{"type":"string"},"upcoming_trip":{"type":"string"}},"required":["vehicle_id","frequency","frequencies","status","upcoming_trip"]},"TripDetailsResponseDto":{"type":"object","properties":{"trip_id":{"type":"string"},"organisation_id":{"type":"string"},"trip_name":{"type":"string"},"route_id":{"type":"string"},"vehicles":{"type":"array","items":{"$ref":"#/components/schemas/VehicleTripDetailsResponseDto"}}},"required":["trip_id","organisation_id","trip_name","route_id","vehicles"]},"ListTripsResponseDto":{"type":"object","properties":{"success":{"type":"boolean"},"trips":{"type":"array","items":{"$ref":"#/components/schemas/TripDetailsResponseDto"}},"pagination":{"$ref":"#/components/schemas/PaginationResponseDto"}},"required":["success","trips"]},"GetVehicleTripDetailsResponseDto":{"type":"object","properties":{"success":{"type":"boolean"},"route_id":{"type":"string"},"trip_status":{"type":"string"},"distance_travelled":{"type":"string"},"trip_duration":{"type":"string"},"route_deviation":{"type":"string"},"trip_route":{"type":"object"},"trip_frequency":{"$ref":"#/components/schemas/FrequencyDto"}},"required":["success","route_id","trip_status","distance_travelled","trip_duration","route_deviation","trip_frequency"]},"ShareLiveTrackingDto":{"type":"object","properties":{"vehicle_id":{"type":"string","description":"Vehicle ID"},"allow_live_video":{"type":"boolean","description":"Allow live video"},"allowed_channel_indices":{"description":"Allowed channel indices","type":"array","items":{"type":"number"}},"timezone":{"type":"string","description":"Timezone","default":"Asia/Kolkata"},"active_from":{"type":"string","description":"Active from (HH:mm format)","example":"09:00"},"active_to":{"type":"string","description":"Active to (HH:mm format)","example":"18:00"}},"required":["vehicle_id"]},"ShareHistoryDto":{"type":"object","properties":{"vehicle_id":{"type":"string","description":"Vehicle ID"},"start_time":{"type":"number","description":"Start time (Unix timestamp in milliseconds)","example":1735689600000},"end_time":{"type":"number","description":"End time (Unix timestamp in milliseconds)","example":1735776000000},"allow_history_video":{"type":"boolean","description":"Allow history video"},"allowed_channel_indices":{"description":"Allowed channel indices for history video","type":"array","items":{"type":"number"}}},"required":["vehicle_id","start_time","end_time"]},"ShareAlertDto":{"type":"object","properties":{"alert_ids":{"description":"Alert IDs","type":"array","items":{"type":"string"}}},"required":["alert_ids"]},"TTSRequestDto":{"type":"object","properties":{"text":{"type":"string","description":"Text to be converted to speech","example":"Hello, this is a text-to-speech test.","maxLength":960}},"required":["text"]},"CompleteConsentOnboardingDto":{"type":"object","properties":{"source":{"type":"string","description":"Client surface where consent action was performed","enum":["WEB","APP"],"example":"WEB"},"analytics":{"type":"boolean","example":true},"marketing":{"type":"boolean","example":false}},"required":["source"]},"UpdateConsentPreferenceDto":{"type":"object","properties":{"source":{"type":"string","description":"Client surface where consent action was performed","enum":["WEB","APP"],"example":"WEB"},"granted":{"type":"boolean","example":true}},"required":["source","granted"]},"ConsentSourceDto":{"type":"object","properties":{"source":{"type":"string","description":"Client surface where consent action was performed","enum":["WEB","APP"],"example":"WEB"}},"required":["source"]}}}}