openapi: 3.0.0
info:
  title: Viziosense Integrator Platform API
  description: Documentation for Viziosense Integrator
  contact:
    email: support@viziosense.com
  license:
    name: UNLICENSED
    url: http://www.viziosense.com
  version: 1.0.0
servers:
  - url: https://api.viziosense.com/api/v1
    description: Integrator API Server
tags:
  - name: VS Integrator
    description: API Endpoint health
  - name: Authentication
    description: API Endpoints for authentication
  - name: Groups
    description: API Endpoints for groups
  - name: Devices
    description: API Endpoints for devices
  - name: Users
    description: API Endpoints for users
  - name: Markers
    description: API Endpoints for markers
  - name: Invitations
    description: API Endpoints for invitations
  - name: Organizations
    description: API Endpoints for organization
  - name: Webhooks
    description: API Endpoints for webhooks
  - name: Battery
    description: Battery
paths:
  /login:
    post:
      tags:
        - Authentication
      summary: Logs user into the system
      description: ''
      operationId: login
      requestBody:
        description: Created user object
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LoginRequest'
      responses:
        '200':
          description: successful operation
          headers:
            X-Rate-Limit:
              description: calls per hour allowed by the user
              schema:
                type: integer
                format: int32
            X-Expires-After:
              description: date in UTC when token expires
              schema:
                type: string
                format: date-time
        '400':
          description: Invalid username/password supplied
  /login/refresh:
    post:
      tags:
        - Authentication
      summary: Refresh JWT Token
      description: Returns a new JWT token
      operationId: refreshToken
      requestBody:
        required: true
        content:
          application/json:
            schema:
              properties:
                refresh_token:
                  type: string
                  example: your-refresh-token
              type: object
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                properties:
                  token:
                    type: string
                type: object
        '400':
          description: Invalid request
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
  /battery/{device_uuid}/stats:
    get:
      tags:
        - Battery
      summary: Retrieve KPIs and time-series charts for a battery
      operationId: 2e908ca2b7b6a35d22cfb148e27a182b
      parameters:
        - name: device_uuid
          in: path
          description: Unique identifier of the hardware device
          required: true
          schema:
            type: string
            format: uuid
        - name: range
          in: query
          description: Time range for charts (e.g., 24h, 7d, 30d, 1y). Default 7d
          schema:
            type: string
      responses:
        '200':
          description: Request successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatteryStatsResponse'
        '404':
          description: Device UUID not found in the system record
  /battery/{device_uuid}/paired:
    get:
      tags:
        - Battery
      summary: Check if a battery is paired (lightweight)
      operationId: 88b9e54dbf08abe3e9e02c270a2afa43
      parameters:
        - name: device_uuid
          in: path
          description: Unique identifier of the hardware device
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Pairing check successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatteryPairedResponse'
        '404':
          description: Device UUID not found in the system record
  /password/email:
    post:
      tags:
        - Authentication
      summary: Send password reset link
      description: Sends a password reset link to the user's email
      operationId: 3de795438994e05621d782a182df5f86
      requestBody:
        required: true
        content:
          application/json:
            schema:
              properties:
                email:
                  type: string
                  format: email
                  example: john.doe@example.com
              type: object
      responses:
        '200':
          description: Password reset link sent
          content:
            application/json:
              schema:
                properties:
                  message:
                    type: string
                    example: >-
                      Password reset sent! You'll receive an email if you are
                      registered on our system.
                type: object
  /fleets/{uuid}/get:
    get:
      tags:
        - Groups
      summary: Get detailed group information
      description: Returns detailed group data with devices
      operationId: getFleetDetailsByUuid
      parameters:
        - name: uuid
          in: path
          description: Group UUID
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FleetResource'
        '400':
          description: Bad Request
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
  /health:
    get:
      tags:
        - VS Integrator
      summary: Get health of API
      description: Returns OK if API responding
      operationId: 70fdfa14af661667dcf7e34f0eb1390c
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: string
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
  /:
    get:
      tags:
        - VS Integrator
      summary: API index
      description: Returns OK if API responding
      operationId: 363a4ca428dc17d9cbaf283ac53cb627
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: string
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
  /invitations:
    get:
      tags:
        - Invitations
      summary: Get all pending invitations
      description: Returns all invitations
      operationId: 9c991780e1ecf61c393167d33dac139a
      responses:
        '200':
          description: Successful operation
  /invitations/cancel/{id}:
    delete:
      tags:
        - Invitations
      summary: Cancel invitation
      description: Cancel invitation
      operationId: 72fefdc85fd8a1b734da54dbafcf99fc
      parameters:
        - name: id
          in: path
          description: Invitation ID
      responses:
        '200':
          description: Successful operation
  /invitations/resend/{id}:
    post:
      tags:
        - Invitations
      summary: Resend invitation
      description: Resend invitation
      operationId: 1b130ad97c9518447207c99ed6c11242
      parameters:
        - name: id
          in: path
          description: Invitation ID
      responses:
        '200':
          description: Successful operation
        '404':
          description: Invitation not found
  /markers:
    get:
      tags:
        - Markers
      summary: Get list of markers
      description: Returns list of markers with filtering and pagination support
      operationId: getMarkersList
      parameters:
        - name: device_uuid
          in: query
          description: Filter markers by device UUID
          required: false
          schema:
            type: string
            format: uuid
        - name: group_uuid
          in: query
          description: Filter markers by group UUID
          required: false
          schema:
            type: string
            format: uuid
        - name: keyword
          in: query
          description: Filter markers by name keyword (minimum 2 characters)
          required: false
          schema:
            type: string
            maxLength: 255
            minLength: 2
        - name: sort
          in: query
          description: Field to sort by
          required: false
          schema:
            type: string
            enum:
              - name
              - device_id
              - is_enabled
        - name: is_enabled
          in: query
          description: Filter markers by enabled status
          required: false
          schema:
            type: string
            enum:
              - '1'
              - '0'
        - name: type
          in: query
          description: Filter markers by type
          required: false
          schema:
            type: string
            enum:
              - spot
              - line
              - polygon
        - name: direction
          in: query
          description: Sorting direction
          required: false
          schema:
            type: string
            enum:
              - asc
              - desc
        - name: per_page
          in: query
          description: Number of items per page (minimum 1)
          required: false
          schema:
            type: integer
            format: int32
            minimum: 1
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MarkerCollection'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
        '422':
          description: Validation Error
  /markers/bulk-update:
    put:
      tags:
        - Markers
      summary: Bulk update device markers
      description: >-
        Updates multiple markers for a specific device and logs configuration
        changes to Sentry
      operationId: bulkUpdateMarkers
      requestBody:
        description: Bulk update markers data
        required: true
        content:
          application/json:
            schema:
              required:
                - device_uuid
              properties:
                device_uuid:
                  description: UUID of the device to update markers for
                  type: string
                  format: uuid
                markers:
                  description: Array of markers to update
                  type: array
                  items:
                    required:
                      - name
                      - type
                    properties:
                      uuid:
                        description: UUID of existing marker (optional for new markers)
                        type: string
                        maxLength: 36
                        minLength: 36
                      name:
                        description: Name of the marker
                        type: string
                        maxLength: 100
                        pattern: ^[a-zA-Z0-9_+-]+$
                      type:
                        description: Type of marker
                        type: string
                        enum:
                          - spot
                          - line
                          - polygon
                      color:
                        description: Color of the marker (required for line type)
                        type: string
                      is_enabled:
                        description: Whether the marker is enabled (required for spot type)
                        type: boolean
                        nullable: true
                      geometry:
                        description: Geometric properties of the marker
                        properties:
                          center:
                            description: Center point for spot markers
                            properties:
                              x:
                                type: number
                              'y':
                                type: number
                            type: object
                          p1:
                            description: Start point for line markers
                            properties:
                              x:
                                type: number
                              'y':
                                type: number
                            type: object
                          p2:
                            description: End point for line markers
                            properties:
                              x:
                                type: number
                              'y':
                                type: number
                            type: object
                          points:
                            description: Array of points for polygon markers
                            type: array
                            items:
                              properties:
                                x:
                                  type: number
                                'y':
                                  type: number
                              type: object
                        type: object
                      properties:
                        description: Additional properties for the marker
                        type: object
                        nullable: true
                    type: object
              type: object
      responses:
        '204':
          description: Markers updated successfully
        '400':
          description: Sensor not found
          content:
            application/json:
              schema:
                properties:
                  error:
                    type: string
                    example: Sensor not found
                type: object
        '401':
          description: Unauthenticated
        '422':
          description: Validation Error
  /organizations/secret:
    get:
      tags:
        - Organizations
      summary: Get webhook secret
      description: Return organization webhook secret
      operationId: getOrganizationSecretWebhook
      responses:
        '200':
          description: Successful operation
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
  /organizations/rotate_webhook:
    get:
      tags:
        - Organizations
      summary: Rotate webhook secret
      description: Return new organization webhook secret
      operationId: rotateOrganizationWebhookSecret
      responses:
        '200':
          description: Successful operation
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
  /organizations/supported-classes:
    get:
      tags:
        - Organizations
      summary: Get organization supported classes
      description: Return all supported classes from devices in the organization
      operationId: getOrganizationSupportedClasses
      responses:
        '200':
          description: Successful operation
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
  /password/reset:
    post:
      tags:
        - Authentication
      summary: Reset password
      description: Resets the user's password
      operationId: 3d682eaface9fd1fe16b2bc65b5e3d0b
      requestBody:
        required: true
        content:
          application/json:
            schema:
              properties:
                email:
                  type: string
                  format: email
                  example: john.doe@example.com
                token:
                  type: string
                  example: reset-token
                password:
                  type: string
                  format: password
                  example: newpassword
                password_confirmation:
                  type: string
                  format: password
                  example: newpassword
              type: object
      responses:
        '200':
          description: Password reset successfully
          content:
            application/json:
              schema:
                properties:
                  message:
                    type: string
                    example: Password reset successfully
                type: object
        '400':
          description: Invalid token or email
        '422':
          description: Validation error
  /devices:
    get:
      tags:
        - Devices
      summary: Get list of devices
      description: Returns list of devices
      operationId: getDevicesList
      parameters:
        - name: fleet_id
          in: query
          description: Filter devices by fleet UUID
          required: false
          schema:
            type: string
        - name: localization
          in: query
          description: Filter devices by geo localization (city)
          required: false
          schema:
            type: string
        - name: is_online
          in: query
          description: >-
            Filter devices by online status. Possible values: 'Online',
            'Offline'
          required: false
          schema:
            type: string
            enum:
              - Online
              - Offline
        - name: keyword
          in: query
          description: Filter devices by name or keyword
          required: false
          schema:
            type: string
        - name: sort
          in: query
          description: >-
            Field to sort by. Allowed values: uuid, name, status, refreshed,
            version, fleet.name, geo_city, lastSeen
          required: false
          schema:
            type: string
            enum:
              - uuid
              - name
              - status
              - refreshed
              - version
              - fleet.name
              - geo_city
              - lastSeen
        - name: direction
          in: query
          description: Sorting direction (asc or desc)
          required: false
          schema:
            type: string
            enum:
              - asc
              - desc
        - name: refresh_statuses
          in: query
          description: If set, refreshes the statuses of devices
          required: false
          schema:
            type: boolean
        - name: is_configured
          in: query
          description: Filter by configuration state based on presence of markers.
          required: false
          schema:
            type: string
            enum:
              - Configured
              - Not configured
        - name: per_page
          in: query
          description: Number of items per page
          required: false
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeviceResource'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
  /devices/{uuid}:
    get:
      tags:
        - Devices
      summary: Get device information
      description: Returns device data
      operationId: getDeviceByUuid
      parameters:
        - name: uuid
          in: path
          description: Sensor uuid
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Sensor'
        '400':
          description: Bad Request
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
  /devices/{deviceUuid}:
    put:
      tags:
        - Devices
      summary: Update device
      description: Updates device data
      operationId: updateDevice
      parameters:
        - name: uuid
          in: path
          description: Sensor uuid
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeviceStoreRequest'
      responses:
        '201':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Sensor'
        '400':
          description: Bad Request
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
  /devices/{deviceId}/webhooks:
    get:
      tags:
        - Devices
      summary: Get list of device webhooks
      description: Returns list of webhooks
      operationId: GetDeviceWebhooksList
      parameters:
        - name: deviceId
          in: path
          description: Sensor id
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookResource'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
  /devices/{deviceUuid}/latestImage:
    get:
      tags:
        - Devices
      summary: Get a fresh image from the device
      description: >-
        Query an image from the device the lastest saved image will be return in
        case device is offline
      operationId: GetLatestImage
      parameters:
        - name: uuid
          in: path
          description: Sensor uuid
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful operation
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
  /devices/{deviceUuid}/latestArchive:
    get:
      tags:
        - Devices
      summary: Get a latest archived image from the device
      description: Query the latest archived image from the device
      operationId: getLastestArchive
      parameters:
        - name: uuid
          in: path
          description: Sensor uuid
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful operation
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
  /devices/{deviceUuid}/config/markers:
    get:
      tags:
        - Devices
      summary: Get a fresh markers config from the device
      description: Query a markers configuration from the device
      operationId: GetDeviceMarkersConfig
      parameters:
        - name: uuid
          in: path
          description: Sensor uuid
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful operation
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
  /devices/{uuid}/alerts:
    get:
      tags:
        - Devices
      summary: Get device alerts
      description: Returns alerts for a device
      operationId: getAlerts
      parameters:
        - name: uuid
          in: path
          description: Sensor uuid
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful operation
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
        '404':
          description: Device not found
  /devices/filterParams:
    get:
      tags:
        - Devices
      summary: Get filter information
      description: Returns filter information
      operationId: getFilterInfo
      responses:
        '200':
          description: Successful operation
  /users:
    get:
      tags:
        - Users
      summary: Get list of users
      description: Returns a list of users in the organization
      operationId: getUsersList
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsersCollection'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
    post:
      tags:
        - Users
      summary: Remove a user
      description: Removes a user from the organization
      operationId: removeUser
      parameters:
        - name: id
          in: path
          description: User ID
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: User deleted successfully
          content:
            application/json:
              schema:
                properties:
                  status:
                    type: string
                    example: success
                  message:
                    type: string
                    example: User deleted successfully
                type: object
        '401':
          description: Unauthorized
        '404':
          description: Not found
  /users/invite:
    post:
      tags:
        - Users
      summary: Invite a new user
      description: Invites a new user to the organization
      operationId: inviteUser
      requestBody:
        required: true
        content:
          application/json:
            schema:
              properties:
                email:
                  type: string
                  example: john.doe@example.com
              type: object
      responses:
        '200':
          description: Invitation sent
          content:
            application/json:
              schema:
                properties:
                  status:
                    type: string
                    example: success
                  message:
                    type: string
                    example: Invitation sent to the user
                type: object
        '401':
          description: Unauthenticated
        '422':
          description: User already invited
  /me:
    get:
      tags:
        - Users
      summary: Get current user details
      description: Returns the details of the currently authenticated user
      operationId: getCurrentUser
      responses:
        '200':
          description: Successful operation
        '401':
          description: Unauthenticated
  /webhooks/{uuid}:
    get:
      tags:
        - Webhooks
      summary: Webhook list for devices
      description: Returns list of webhooks for a specific sensor with the uuid
      operationId: getDevicesWebhook
      parameters:
        - name: uuid
          in: path
          description: Sensor uuid
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhooksCollection'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
  /webhooks/{uuid}/store:
    post:
      tags:
        - Webhooks
      summary: Store new webhook
      description: Create a new webhook for a device
      operationId: storeWebhooks
      parameters:
        - name: uuid
          in: path
          description: Sensor uuid
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookStoreRequest'
      responses:
        '201':
          description: Webhook created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookResource'
        '400':
          description: Bad Request
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
  /webhooks/{uuid}/{id}:
    get:
      tags:
        - Webhooks
      summary: Get webhoook information
      description: Returns webhook data
      operationId: getWebhooksById
      parameters:
        - name: uuid
          in: path
          description: Sensor uuid
          required: true
          schema:
            type: string
        - name: id
          in: path
          description: Webhook id
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: Webhook retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookResource'
        '400':
          description: Bad Request
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
  /webhooks/{uuid}/{id}/update:
    put:
      tags:
        - Webhooks
      summary: Update a webhook
      description: Update data of an existing webhook
      operationId: updateWebhooks
      parameters:
        - name: uuid
          in: path
          description: Sensor uuid
          required: true
          schema:
            type: string
        - name: id
          in: path
          description: webhook_id
          required: true
          schema:
            type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookStoreRequest'
      responses:
        '200':
          description: Webhook updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookResource'
        '400':
          description: Bad Request
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
  /webhooks/{id}:
    delete:
      tags:
        - Webhooks
      summary: Delete webhook
      description: Deletes webhook data
      operationId: deleteWebhook
      parameters:
        - name: id
          in: path
          description: Webhook id
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: Webhook deleted successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookResource'
        '400':
          description: Bad Request
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
components:
  schemas:
    UserResource:
      title: UserResource
      description: User resource
      properties:
        id:
          type: integer
        name:
          type: string
        email:
          type: string
        groups:
          type: array
          items:
            properties:
              id:
                type: integer
              name:
                type: string
            type: object
        roles:
          type: array
          items:
            properties:
              name:
                type: string
            type: object
        status:
          type: string
      type: object
    UsersCollection:
      type: array
      items:
        $ref: '#/components/schemas/UserResource'
    WebhooksCollection:
      type: array
      items:
        $ref: '#/components/schemas/WebhookResource'
    BatteryCharts:
      description: Battery historical series
      properties:
        voltage_series:
          type: array
          items:
            $ref: '#/components/schemas/BatteryDataPoint'
        current_series:
          type: array
          items:
            $ref: '#/components/schemas/BatteryDataPoint'
        capacity_series:
          type: array
          items:
            $ref: '#/components/schemas/BatteryDataPoint'
        temp_series:
          type: array
          items:
            $ref: '#/components/schemas/BatteryDataPoint'
      type: object
    BatteryData:
      description: KPIs and historical series. Null if no data is available for the period.
      properties:
        protection_events: []
        cycles: []
        charts:
          $ref: '#/components/schemas/BatteryCharts'
      type: object
    BatteryDataPoint:
      description: Time series datapoint
      properties:
        t:
          description: ISO 8601 timestamp
          type: string
          format: date-time
          example: '2025-12-22T10:15:30Z'
        v:
          description: Measured value at this timestamp
          type: number
          format: float
          example: 52.4
      type: object
    BatteryPairedResponse:
      description: Battery pairing lightweight response
      properties:
        is_paired:
          description: Indicates if a battery is currently linked to this device.
          type: boolean
          example: true
          nullable: true
      type: object
    BatteryStatsResponse:
      description: Response containing pairing status and battery stats
      properties:
        is_paired:
          description: Indicates if a battery is currently linked to this device.
          type: boolean
          example: true
          nullable: true
        stats:
          oneOf:
            - $ref: '#/components/schemas/BatteryData'
          nullable: true
      type: object
    GeometryLine:
      title: GeometryLine
      description: Line geometry with two coordinate points
      properties:
        p1:
          title: p1
          description: First coordinate point of the line
          properties:
            x:
              description: X coordinate of first point
              type: integer
              example: 1308
            'y':
              description: Y coordinate of first point
              type: integer
              example: 612
          type: object
        p2:
          title: p2
          description: Second coordinate point of the line
          properties:
            x:
              description: X coordinate of second point
              type: integer
              example: 792
            'y':
              description: Y coordinate of second point
              type: integer
              example: 612
          type: object
      type: object
      xml:
        name: GeometryLine
    GeometryPolygon:
      title: GeometryPolygon
      description: Polygon geometry with multiple coordinate points
      properties:
        points:
          title: points
          description: Array of coordinate points defining the polygon
          type: array
          items:
            properties:
              x:
                description: X coordinate
                type: integer
                example: 477
              'y':
                description: Y coordinate
                type: integer
                example: 1076
            type: object
          example:
            - x: 477
              'y': 1076
            - x: 1706
              'y': 1071
            - x: 1019
              'y': 346
            - x: 942
              'y': 356
            - x: 818
              'y': 444
      type: object
      xml:
        name: GeometryPolygon
    GeometrySpot:
      title: GeometrySpot
      description: Spot geometry with a single coordinate point
      properties:
        x:
          title: x
          description: X coordinate of the spot
          type: integer
          example: 640
        'y':
          title: 'y'
          description: Y coordinate of the spot
          type: integer
          example: 480
      type: object
      xml:
        name: GeometrySpot
    Group:
      properties:
        uuid:
          title: UUID
          description: Group Unique ID
          format: UUID
          example: 68b99dce-dfff-453e-960d-abdde4df56d4
        name:
          type: string
        organization:
          title: Organization
          description: Owner organization name
          type: string
          format: string
          example: RMS
        app_name:
          type: string
        application_type:
          title: Application Type
          description: Application Type
          type: string
          format: string
          example: Parking management
        slug:
          type: string
        is_archived:
          type: boolean
      type: object
      xml:
        name: Group
    Marker:
      properties:
        id:
          title: id
          description: Marker unique ID
          type: integer
          example: 568
        device_id:
          title: device_id
          description: Associated device ID
          type: integer
          example: 89
        device_uuid:
          title: device_uuid
          description: Associated device UUID
          type: string
          format: uuid
          example: 407e3b9a-4e1d-4a2f-a032-e904192aabd0
        device_name:
          title: device_name
          description: Associated device name
          type: string
          example: NCA-COMPTAGE-AVANT
        device_group_id:
          title: device_group_id
          description: Associated device group ID
          type: integer
          example: 42
        name:
          title: name
          description: Marker name
          type: string
          example: zone_avant
        is_enabled:
          title: is_enabled
          description: Marker enabled status (1=enabled, 0=disabled)
          type: integer
          enum:
            - 0
            - 1
          example: 1
        uuid:
          title: uuid
          description: Marker UUID
          type: string
          format: uuid
          example: 45d0fc31-ab17-465f-9a5c-272d61cdd87d
        type:
          title: type
          description: Marker geometry type
          type: string
          enum:
            - spot
            - line
            - polygon
          example: polygon
        geometry:
          title: geometry
          description: Marker geometry coordinates. Structure varies by type
          type: object
          oneOf:
            - $ref: '#/components/schemas/GeometryPolygon'
            - $ref: '#/components/schemas/GeometryLine'
            - $ref: '#/components/schemas/GeometrySpot'
        properties:
          title: properties
          description: Additional marker properties (e.g., color for lines)
          type: object
          example:
            color: rgba(0,255,0,1)
          nullable: true
        created_at:
          title: created_at
          description: Marker creation timestamp
          type: string
          format: date-time
          example: '2025-08-27T09:58:02.000000Z'
      type: object
      xml:
        name: Marker
    Sensor:
      properties:
        id:
          title: id
          description: Sensor Unique ID
          type: integer
          format: integer
          example: '1'
        uuid:
          title: uuid
          description: Sensor UUID
          type: string
          format: uuid
          example: 123e4567-e89b-12d3-a456-426614174000
        name:
          title: name
          description: Sensor name
          type: string
          format: string
          example: Calipso
        app_group_id:
          title: app_group_id
          description: Application Group ID
          type: integer
          format: integer
          nullable: true
        hostname:
          title: hostname
          description: Hostname of the device
          type: string
          format: string
          example: device-01
          nullable: true
        total_memory:
          title: total_memory
          description: Total memory of the device in MB
          type: integer
          format: integer
          example: 8192
          nullable: true
        free_memory:
          title: free_memory
          description: Free memory of the device in MB
          type: integer
          format: integer
          example: 4096
          nullable: true
        supervisor_version:
          title: supervisor_version
          description: Version of the supervisor software
          type: string
          format: string
          example: 1.2.3
          nullable: true
        mac_addresses:
          title: mac_addresses
          description: List of MAC addresses associated with the device
          type: array
          format: array
          items:
            type: string
          example:
            - 00:1A:2B:3C:4D:5E
            - 00:1A:2B:3C:4D:5F
          nullable: true
        os_fullname:
          title: os_fullname
          description: Full name of the operating system
          type: string
          format: string
          example: Ubuntu 20.04 LTS
          nullable: true
        os_family:
          title: os_family
          description: Operating system family
          type: string
          format: string
          example: Linux
          nullable: true
        os_version:
          title: os_version
          description: Operating system version
          type: string
          format: string
          example: '20.04'
          nullable: true
        os_kernel:
          title: os_kernel
          description: Kernel version of the operating system
          type: string
          format: string
          example: 5.4.0-42-generic
          nullable: true
        geo_timezone:
          title: geo_timezone
          description: Geographical timezone of the device
          type: string
          format: string
          example: America/New_York
          nullable: true
        geo_city:
          title: geo_city
          description: Geographical city of the device
          type: string
          format: string
          example: New York
          nullable: true
        geo_country:
          title: geo_country
          description: Geographical country of the device
          type: string
          format: string
          example: USA
          nullable: true
        longitude:
          title: longitude
          description: Longitude of the device's location
          type: number
          format: float
          example: -74.006
          nullable: true
        latitude:
          title: latitude
          description: Latitude of the device's location
          type: number
          format: float
          example: 40.7128
          nullable: true
        is_online:
          title: is_online
          description: Indicates if the device is online
          type: integer
          format: integer
          default: 0
          example: 1
        refreshed_at:
          title: refreshed_at
          description: Last time the device data was refreshed
          type: string
          format: date-time
          example: '2023-08-12T14:15:22Z'
          nullable: true
        serial_number:
          title: serial_number
          description: Serial number of the device
          type: string
          format: string
          example: SN123456789
          nullable: true
        config_meta:
          title: config_meta
          description: Configuration metadata
          type: object
          format: object
          example:
            key: value
          nullable: true
        iot_manager:
          title: iot_manager
          description: IoT manager details
          type: string
          format: string
          default: AWS
          example: AWS
          nullable: true
        iot_id:
          title: iot_id
          description: IoT identifier
          type: string
          format: string
          example: iot_123456
          nullable: true
        network:
          title: network
          description: Network configuration of the device
          type: object
          format: object
          example:
            interface: eth0
            ip: 192.168.1.100
          nullable: true
        wifi_config:
          title: wifi_config
          description: WiFi configuration settings
          type: object
          format: object
          example:
            ssid: MyWiFi
            password: securepassword
          nullable: true
        notes:
          title: notes
          description: Additional notes or comments
          type: string
          format: string
          example: This device is located in the server room.
          nullable: true
        data:
          title: data
          description: Additional data related to the device
          type: object
          format: object
          example:
            key1: value1
            key2: value2
          nullable: true
        deleted_at:
          title: deleted_at
          description: Timestamp of when the device was soft deleted
          type: string
          format: date-time
          example: '2023-08-12T14:15:22Z'
          nullable: true
      type: object
      xml:
        name: Sensor
    Webhook:
      properties:
        id:
          title: id
          description: Webhook Unique ID
          type: integer
          format: integer
          example: '1'
        url:
          title: url
          description: Endpoint URL for the webhook
          type: string
          format: string
          example: https://example.com/webhook
        type:
          title: type
          description: Type of the request (e.g., POST, GET)
          type: string
          format: string
          nullable: true
        last_7_days:
          title: last_7_days
          description: Number of requests in the last 7 days
          type: integer
          format: integer
          example: 100
          nullable: true
        error_rate:
          title: error_rate
          description: Error rate percentage over the last 7 days
          type: integer
          format: integer
          example: 5
          nullable: true
        actions:
          title: actions
          description: Actions that trigger the webhook
          type: string
          format: string
          example: payload
          nullable: true
        data:
          title: data
          description: Additional data for the webhook, including headers and parameters
          properties:
            headers:
              title: Headers
              description: Headers to be included in the webhook request
              type: object
            params:
              title: Params
              description: Parameters to be included in the webhook request
              type: object
          type: object
          nullable: true
      type: object
      xml:
        name: Webhook
    DeviceStoreRequest:
      title: Store Sensor request
      description: Store Sensor request body data
      required:
        - name
      properties:
        name:
          title: name
          description: Sensor name
          type: string
          format: name
          example: Sensor 1
        uuid:
          title: uuid
          description: Sensor uuid
          type: string
          format: uuid
        fleet_id:
          title: fleet_id
          description: Sensor fleet id
          type: string
        application_id:
          title: application_id
          description: Sensor Application id
          type: string
        is_ethernet:
          title: is_ethernet
          description: Sensor network mode
          type: integer
        password_rport:
          title: password_rport
          description: Sensor Rport password
          type: string
      type: object
    LoginRequest:
      title: Login request
      description: Login request body data
      required:
        - email
      properties:
        email:
          title: email
          description: User email
          type: string
          example: jhon.doe@viziosense.ai
      type: object
    WebhookStoreRequest:
      title: Webhook store request
      description: Webhook request body data
      required:
        - url
      properties:
        url:
          title: url
          description: Webhook URL
          type: string
          example: https://your-company.dev/webhooks
        type:
          title: type
          description: Webhook request TYPE
          type: string
          example: POST, GET, PUT, DELETE
        actions:
          title: actions
          description: Webhook trigger actions
          type: string
          example: pushData
        headers:
          title: headers
          description: Webhook headers parameters
          type: string
          example: '[]'
        params:
          title: params
          description: Webhook GET or POST parms
          type: string
          example: '[]'
      type: object
    DeviceResource:
      title: DeviceResource
      description: Sensor resource
      properties:
        data:
          title: Data
          description: Data wrapper
          type: array
          items:
            $ref: '#/components/schemas/Sensor'
      type: object
      xml:
        name: DeviceResource
    FleetResource:
      title: FleetResource
      description: Group resource
      properties:
        data:
          title: Data
          description: Data wrapper
          type: array
          items:
            $ref: '#/components/schemas/Group'
      type: object
      xml:
        name: FleetResource
    MarkerCollection:
      title: MarkerCollection
      description: Paginated collection of markers
      properties:
        data:
          title: data
          description: Array of markers
          type: array
          items:
            $ref: '#/components/schemas/Marker'
        links:
          title: links
          description: Pagination links
          properties:
            first:
              type: string
              format: uri
              example: https://api.viziosense.com/api/v1/markers?page=1
              nullable: true
            last:
              type: string
              format: uri
              example: https://api.viziosense.com/api/v1/markers?page=9
              nullable: true
            prev:
              type: string
              format: uri
              example: https://api.viziosense.com/api/v1/markers?page=1
              nullable: true
            next:
              type: string
              format: uri
              example: https://api.viziosense.com/api/v1/markers?page=2
              nullable: true
          type: object
        meta:
          title: meta
          description: Pagination metadata
          properties:
            current_page:
              type: integer
              example: 1
            from:
              type: integer
              example: 1
            last_page:
              type: integer
              example: 9
            links:
              type: array
              items:
                properties:
                  url:
                    type: string
                    format: uri
                    nullable: true
                  label:
                    type: string
                  active:
                    type: boolean
                type: object
            path:
              type: string
              format: uri
              example: https://api.viziosense.com/api/v1/markers
            per_page:
              type: integer
              example: 20
            to:
              type: integer
              example: 20
            total:
              type: integer
              example: 178
          type: object
      type: object
      xml:
        name: MarkerCollection
    WebhookResource:
      title: WebhookResource
      description: Webhook resource
      properties:
        data:
          title: Data
          description: Data wrapper
          type: array
          items:
            $ref: '#/components/schemas/Webhook'
      type: object
      xml:
        name: WebhookResource
