openapi: 3.1.0
info:
  title: Fleet API
  description: |
    The Cartrack Fleet API provides fleet information directly into your systems, allowing you to manage your fleet straight from your own applications. This API is designed to be simple to use and easy to integrate with your existing systems. It provides access to a wide range of fleet information, including vehicle details, driver information, and trip data. The API is secured using basic authentication, and all requests must be made over HTTPS. Please ensure you are using this API with the right base URL.
  version: 1.26.0112.2
  contact:
    name: Developer Support
    url: https://developer.cartrack.com
    email: fleet-api@cartrack.com
servers:
  - url: https://fleetapi-au.cartrack.com/rest
    description: Australia
  - url: https://fleetapi-bw.cartrack.com/rest
    description: Botswana
  - url: https://fleetapi-es.cartrack.com/rest
    description: Spain
  - url: https://fleetapi-fr.cartrack.com/rest
    description: France
  - url: https://fleetapi-hk.cartrack.com/rest
    description: Hong Kong
  - url: https://fleetapi-id.cartrack.com/rest
    description: Indonesia
  - url: https://fleetapi-ke.cartrack.com/rest
    description: Kenya
  - url: https://fleetapi-kh.cartrack.com/rest
    description: Cambodia
  - url: https://fleetapi-me.cartrack.com/rest
    description: Middle East
  - url: https://fleetapi-mw.cartrack.com/rest
    description: Malawi
  - url: https://fleetapi-my.cartrack.com/rest
    description: Malaysia
  - url: https://fleetapi-mz.cartrack.com/rest
    description: Mozambique
  - url: https://fleetapi-na.cartrack.com/rest
    description: Namibia
  - url: https://fleetapi-ng.cartrack.com/rest
    description: Nigeria
  - url: https://fleetapi-nz.cartrack.com/rest
    description: New Zealand
  - url: https://fleetapi-ph.cartrack.com/rest
    description: Philippines
  - url: https://fleetapi-pl.cartrack.com/rest
    description: Poland
  - url: https://fleetapi-pt.cartrack.com/rest
    description: Portugal
  - url: https://fleetapi-rw.cartrack.com/rest
    description: Rwanda
  - url: https://fleetapi-sg.cartrack.com/rest
    description: Singapore
  - url: https://fleetapi-sw.cartrack.com/rest
    description: Swaziland
  - url: https://fleetapi-th.cartrack.com/rest
    description: Thailand
  - url: https://fleetapi-tz.cartrack.com/rest
    description: Tanzania
  - url: https://fleetapi-us.cartrack.com/rest
    description: USA
  - url: https://fleetapi-vn.cartrack.com/rest
    description: Vietnam
  - url: https://fleetapi-za.cartrack.com/rest
    description: South Africa
  - url: https://fleetapi-zm.cartrack.com/rest
    description: Zambia
  - url: https://fleetapi-zw.cartrack.com/rest
    description: Zimbabwe
security:
  - BasicAuth: []
tags:
  - name: AEMP ISO15143-3
    description: |
      AEMP ISO 15143-3 endpoints. AEMP (Association of Equipment Management Providers) ISO 15143-3 defines a standardized telematics data model for vehicle and equipment information. These services support integrations that require vehicle/equipment data exchanged according to the AEMP ISO 15143-3 specification.
  - name: Alerts
    description: Alerts related endpoints
  - name: Car Manufacturers
    description: Car Manufacturer related endpoints
  - name: CarWatch
    description: Carwatch related endpoints
  - name: Coaching
    description: Coaching related endpoints
  - name: Delivery Countries
    description: Delivery Countries related endpoints
  - name: Delivery Customers
    description: Delivery Customers related endpoints
  - name: Delivery Drivers
    description: Delivery Drivers related endpoints
  - name: Delivery Jobs
    description: Delivery Jobs related endpoints
  - name: Delivery Plans
    description: Delivery Plans related endpoints
  - name: Delivery Reports
    description: Delivery Reports related endpoints
  - name: Delivery Special Equipment
    description: Delivery Special Equipment related endpoints
  - name: Drivers
    description: Drivers related endpoints
  - name: Fitments
    description: Fitments related endpoints
  - name: Fuel
    description: |
      Fuel related endpoints. Cartrack reads fuel either from the vehicle CAN bus (if supported) or from a fitted fuel sensor. The Fuel API works only for vehicles that provide fuel data via one of these methods. If your vehicle is not reporting fuel, contact your Cartrack customer success manager to discuss available options.
  - name: Geofence Groups
    description: Geofence Groups related endpoints
  - name: Geofences
    description: Geofences related endpoints
  - name: Helpdesk
    description: Helpdesk related endpoints
  - name: Know the driver
    description: Know the driver related endpoints
  - name: Leads
    description: Leads related endpoints
  - name: Maintenance
    description: Maintenance related endpoints
  - name: MiFleet
    description: MiFleet financial transaction management related endpoints
  - name: Mikey
    description: |
      Mikey related endpoints. These APIs are intended to be used alongside the Mikey SDK. For integration details, usage patterns and examples, see the Mikey SDK documentation: https://developer.cartrack.com/docs/mobile-sdks/intro
  - name: Notifications
    description: Notifications related endpoints
  - name: Points of interest
    description: Points of interest related endpoints
  - name: Reminders
    description: Reminders related endpoints
  - name: Road User Charge (RUC)
    description: Road User Charge (RUC) related endpoints. Available only in the New Zealand instance (https://fleetapi-nz.cartrack.com/rest)
  - name: Subusers
    description: Subusers related endpoints
  - name: System
    description: System related endpoints
  - name: Tachograph
    description: Tachograph related endpoints
  - name: Terminal Commands
    description: Terminal Commands related endpoints
  - name: Topics
    description: Topics related endpoints
  - name: Trips
    description: Trips related endpoints
  - name: Vehicle Driver Linkage
    description: Vehicle Driver Linkage related endpoints
  - name: Vehicle Groups
    description: Vehicle Groups related endpoints
  - name: Vehicles
    description: Vehicles related endpoints
  - name: Vehicles (Electric)
    description: Electric vehicles related endpoints
  - name: Vehicles Commands
    description: Vehicle command operations related endpoints
  - name: Vision
    description: |
      Vision video management related endpoints. This service is available exclusively for accounts with Cartrack Vision API enabled. If you receive HTTP 403, contact your Cartrack customer success manager to enable access.
paths:
  /aemp/iso15143-3/beta/equipment/{id}:
    get:
      tags:
        - AEMP ISO15143-3
      summary: Equipment Snapshot
      description: |
        This API follows the ISO 15143-3 standard (AEMP Telematics Standard), which defines a common data format for sharing telematics data across mixed equipment fleets, enabling interoperability between different manufacturers and systems. It is Cartrack's first version and currently in beta testing. Gets the snapshot of the specific equipment (vehicle) data.
      parameters:
        - name: Accept
          in: header
          description: The Accept header specifying the response format - Use 'application/iso15143-snapshot+json' for ISO 15143-3 format
          required: true
          schema:
            type: string
            example: application/iso15143-snapshot+json
        - name: id
          in: path
          description: The vehicle's registration or equipment identifier
          required: true
          schema:
            type: string
            example: TESTRUCEESG
      responses:
        '200':
          $ref: '#/components/responses/equipment-snapshot'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /aemp/iso15143-3/beta/fleet:
    get:
      tags:
        - AEMP ISO15143-3
      summary: Fleet Snapshot
      description: |
        This API follows the ISO 15143-3 standard (AEMP Telematics Standard), which defines a common data format for sharing telematics data across mixed equipment fleets, enabling interoperability between different manufacturers and systems. Gets the fleet snapshot of the latest available equipments (vehicles) data. Response is limited to a maximum of 100 records per page.
      parameters:
        - name: Accept
          in: header
          description: The Accept header specifying the response format - Use 'application/iso15143-snapshot+json' for ISO 15143-3 format
          required: true
          schema:
            type: string
            example: application/iso15143-snapshot+json
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          $ref: '#/components/responses/fleet-snapshot'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /alerts:
    get:
      tags:
        - Alerts
      summary: Get Alerts
      description: This endpoint fetches all alerts associated with the account.
      parameters:
        - $ref: '#/components/parameters/id-uuid'
          description: Optional filter to retrieve alerts by identification number
        - $ref: '#/components/parameters/name'
          description: Optional filter to retrieve alerts by name.
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        alert_id:
                          $ref: '#/components/schemas/uuid'
                          description: Alerts's uuid
                        name:
                          $ref: '#/components/schemas/alert-name'
                        any_vehicle:
                          type: boolean
                          description: Alerts for selected or all vehicles
                          example: true
                        vehicles:
                          type: array
                          items:
                            type: object
                            properties:
                              vehicle_id:
                                allOf:
                                  - $ref: '#/components/schemas/id'
                                description: The vehicle identification number
                                example: 789123
                              registration:
                                type: string
                                description: The vehicle registration number
                                example: ABCE8901
                              chassis_number:
                                allOf:
                                  - $ref: '#/components/schemas/chassis-number'
                                  - example: TEST-123456
                                description: The vehicle chassis Number
                        ignition_trigger_id:
                          oneOf:
                            - type: integer
                            - type: 'null'
                          description: |-
                            Ignition trigger identification number
                            - 1 represents Ignition ON
                            - 2 represents Ignition OFF
                            - 3 for both Ignition ON and OFF
                          example: 1
                        geofence_trigger_id:
                          oneOf:
                            - type: integer
                            - type: 'null'
                          description: |-
                            Geofence trigger identification number
                            - 1 represents geofence entries
                            - 2 represents geofence exits
                            - 3 represents both geofence entries and exists
                          example: 3
                        geofence_ids:
                          type: array
                          description: Geofence array IDs
                          items:
                            $ref: '#/components/schemas/uuid'
                        geofence_group_ids:
                          type: array
                          description: Geofence Group array IDs
                          items:
                            $ref: '#/components/schemas/id'
                        inside_geofence:
                          oneOf:
                            - type: boolean
                            - type: 'null'
                          description: This determines the location condition for reporting the ignition event alert. If set to true, the alert will be triggered only when the ignition event occurs inside the specified geofence(s). If set to false, the alert will be triggered only when the ignition event occurs outside the specified geofence(s). Required only if geofence_id or geofence_group_id is given.
                          example: true
                        create_ts:
                          description: The timestamp when the alert was created
                          $ref: '#/components/schemas/date'
                        subuser_id:
                          oneOf:
                            - type: 'null'
                            - type: string
                          format: uuid
                          description: The subuser_id associated with this alert
                          example: 544ecaf4-fc35-11ec-9059-506b8db42dc2
                        contact_type:
                          type: object
                          properties:
                            contact_type_id:
                              type: integer
                              description: Contact type identification number
                              example: 1
                            values:
                              type: array
                              description: Values of the contact type. Either an email or a phone number
                              items:
                                type: string
                                example: abccorp@company.com
                            priority_id:
                              description: The priority identification number of alert
                              $ref: '#/components/schemas/id'
                  meta:
                    $ref: '#/components/schemas/pagination'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /alerts/{id}:
    delete:
      tags:
        - Alerts
      summary: Delete an Alert
      description: This endpoint deletes an existing alert identified by its unique UUID.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the alert to be deleted.
          schema:
            $ref: '#/components/schemas/uuid'
            example: 7489ff44-xxxx-11eb-xxxx-005056a801ca
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    description: An empty object
                    example: null
                  meta:
                    type: object
                    description: This metadata will contain a message
                    properties:
                      message:
                        type: string
                        example: Successfully deleted the Alert.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /alerts/geofences:
    post:
      tags:
        - Alerts
      summary: Create Alert for Geofences
      description: This endpoint creates an alert for vehicles entry or exit or both into a geofence or a group of geofences.<br/> Please note that you can create up to 50 alerts. If you need to create more, you must first remove some of the existing alerts.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - name
                - contact_type
              properties:
                name:
                  type: string
                  description: The name of the geofence alert.
                  example: Geofence alert for vehicle ABC-1234 and ABC-5678
                registrations:
                  type: array
                  description: An array of vehicle registration numbers. This field is mutually exclusive with the vehicles field.
                  example:
                    - ABCE8901
                    - XYZ1234
                  items:
                    type: string
                    example: ABCE8901
                geofence_trigger_id:
                  type: integer
                  description: |-
                    The trigger is currently limited to ids 1, 2 and 3.
                    - 1 to trigger on geofence entries
                    - 2 to trigger on geofence exits
                    - 3 to trigger on both geofence entries and exists
                  example: 1
                  enum:
                    - 1
                    - 2
                    - 3
                geofence_ids:
                  type: array
                  description: The array list of unique identifier (UUID) of the geofences. <strong>Required only if geofence_group_ids is not given.</strong> It can be combined with geofence_ids and geofence_group_ids, meaning you can create an alert for multiple geofence_ids and multiple geofence_group_ids.
                  example:
                    - 02870802-xxxx-42ed-xxxx-c999df353f42
                    - 34589541-xxxx-73bc-xxxx-e821ed156f71
                  items:
                    type: string
                    format: uuid
                    example: 02870802-xxxx-42ed-xxxx-c999df353f
                geofence_group_ids:
                  type: array
                  description: The array list of unique identifier of the geofence group. <strong>Required if geofence_ids is not given</strong>. It can be combined with geofence_ids and geofence_group_ids, meaning you can create an alert for multiple geofence_ids and multiple geofence_group_ids.
                  example:
                    - 12345
                    - 67891
                  items:
                    type: integer
                    example: 12345
                contact_type:
                  type: object
                  description: This object must contain the contact type information such us, contact_type_id, values, and priority_id</strong>.
                  required:
                    - contact_type_id
                  properties:
                    contact_type_id:
                      type: integer
                      description: '-| The contact type ID determines the type of alert notification. - 1 represents E-Mail Message - 2 represents Short Message Service - 3 represents RSS Feeds - 4 represents Alert Center'
                      example: 1
                      enum:
                        - 1
                        - 2
                        - 3
                        - 4
                    values:
                      type: array
                      description: The contact type value corresponds to the contact type ID
                      example:
                        - user@example.com
                        - admin@example.com
                      items:
                        $ref: '#/components/schemas/email'
                    priority_id:
                      type: integer
                      description: '-| The priority_id is the type of alert you want to prioritize over other alerts. - 1 represents High - 2 represents Medium - 3 represents Low'
                      example: 1
                      enum:
                        - 1
                        - 2
                        - 3
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    description: An empty object
                    properties:
                      alert_id:
                        description: Notification Identifier
                        $ref: '#/components/schemas/uuid'
                  meta:
                    type: object
                    description: This metadata will contain a message
                    properties:
                      message:
                        type: string
                        example: Alert created successfully.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /alerts/ignition:
    post:
      tags:
        - Alerts
      summary: Alert Ignition
      description: "This endpoint creates an alert for vehicles ignition ON or OFF events.<br/> \r\n    Please note that you can create up to 50 alerts. If you need to create more, you must first remove some of the existing alerts."
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - name
              properties:
                name:
                  allOf:
                    - $ref: '#/components/schemas/alert-name'
                  description: The name of the ignition alert.
                  example: Ignition alert for vehicle ABC1234 and ABC5678
                registrations:
                  oneOf:
                    - type: 'null'
                    - $ref: '#/components/schemas/registrations'
                  example:
                    - ABC1234
                    - ABC5678
                ignition_trigger_id:
                  $ref: '#/components/schemas/ignition-trigger-id'
                geofence_id:
                  $ref: '#/components/schemas/geofence-id'
                geofence_group_id:
                  type: integer
                  example: 12345
                  description: The unique identifier of the geofence group.
                inside_geofence:
                  type: boolean
                  default: true
                  example: true
                  description: This parameter determines the location condition for reporting the ignition event alert. If set to true, the alert will be triggered only when the ignition event occurs inside the specified geofence(s). If set to false, the alert will be triggered only when the ignition event occurs outside the specified geofence(s). <strong>Required only if geofence_id or geofence_group_id is given.</strong>
                contact_type:
                  type: object
                  description: This object must contain the contact type information such us, contact_type_id, values, and priority_id</strong>.
                  required:
                    - contact_type_id
                  properties:
                    contact_type_id:
                      type: integer
                      example: 1
                      description: "The contact type ID determines the type of alert notification.<br/>\r\n                            1 represents E-Mail Message<br/>\r\n                            2 represents Short Message Service<br/>\r\n                            3 represents RSS Feeds<br/>\r\n                            4 represents Alert Center"
                      enum:
                        - 1
                        - 2
                        - 3
                        - 4
                    values:
                      type: array
                      example:
                        - john.doe@company.com
                        - johnny.doe@company.com
                      description: The contact type value corresponds to the contact type ID
                      maxItems: 10
                    priority_id:
                      $ref: '#/components/schemas/priority-id'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    description: An empty object
                    properties:
                      alert_id:
                        description: Notification Identifier
                        $ref: '#/components/schemas/uuid'
                  meta:
                    type: object
                    description: This metadata will contain a message
                    properties:
                      message:
                        type: string
                        example: Alert created successfully.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /alerts/notifications:
    get:
      summary: Get Alerts Notifications
      tags:
        - Alerts
      deprecated: false
      description: Fetch notifications of your account between provided date range.
      parameters:
        - $ref: '#/components/parameters/date_from'
          description: This will return notifications from this date and time. (limited to <strong>31 days</strong>)
          required: true
        - $ref: '#/components/parameters/date_to'
          description: This will return notifications to this date and time. (limited to <strong>31 days</strong>)
          required: true
        - $ref: '#/components/parameters/registration'
          description: Filter by vehicle registration
        - $ref: '#/components/parameters/contact_type'
        - $ref: '#/components/parameters/alert_type'
        - $ref: '#/components/parameters/status'
        - $ref: '#/components/parameters/notification_contact'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: This array returns the list of notifications
                    items:
                      type: object
                      required:
                        - registration
                      properties:
                        vehicle_id:
                          $ref: '#/components/schemas/vehicle-id'
                        registration:
                          $ref: '#/components/schemas/registration'
                        trigger_description:
                          type: string
                          example: IGNITION_ON_OFF
                          description: The notification alert type
                        notification_contact:
                          type: string
                          example: mark.steven@example.com
                          description: The contact information
                          x-nullable: true
                        name:
                          type: string
                          example: Vehicles geofence entries alert.
                          description: The notification alert name
                          x-nullable: true
                        contact_description:
                          type: string
                          example: E-Mail Message
                          description: The notification contact method
                          x-nullable: true
                        notification_msg:
                          type: string
                          example: ABC1234X igition turned off at x timestamp
                          description: The notification message
                          x-nullable: true
                        status:
                          type: string
                          example: Sent
                          description: The notification status
                          x-nullable: true
                        event_ts:
                          type: string
                          format: date-time
                          example: '2022-12-01 14:14:10+02'
                          description: The timestamp when the notification was triggered
                        geofence_id:
                          type: string
                          format: uuid
                          example: 75a2c190-6a14-11ee-8977-005056a8f0a1
                          description: If the notification is associated with a geofence, then the geofence_id will be provided
                          x-nullable: true
                        latitude:
                          type: string
                          example: '-25.00225'
                          description: The latitude of the vehicle when the notification was triggered
                          x-nullable: true
                        longitude:
                          type: string
                          example: '30.114089'
                          description: The longitude of the vehicle when the notification was triggered
                          x-nullable: true
                        odometer:
                          type: integer
                          example: 73213
                          description: The odometer of the vehicle when the notification was triggered
                          x-nullable: true
                        speed:
                          type: integer
                          example: 22
                          description: The speed of the vehicle when the notification was triggered
                          x-nullable: true
                  meta:
                    $ref: '#/components/schemas/pagination'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /alerts/notifications/types:
    get:
      summary: Get Alerts Notification Types
      tags:
        - Alerts
      deprecated: false
      description: Fetch notification alert types.
      parameters: []
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: This array returns the list of notifications trigger types
                    items:
                      type: string
                    example:
                      - AFTER_HOURS_MOVEMENT
                      - ARM_ALERT
                      - COOLANT_TEMPERATURE
                      - DRIVER_ID
                      - DRIVER_LICENSE_EXPIRED
                      - DYNAMIC_BIT_EVENT
                      - ENGINE_DIAGNOSTIC
                      - ENGINE_TEMPERATURE
                      - ETOLL_GANTRY
                      - EXCESSIVE_DRIVING
                      - FUEL_GAIN
                      - FUEL_GAIN_LOSS
                      - GEOFENCE_ALERTS_ASSET_TRACKER
                      - GEOFENCE_ALERTS_GEOFENCE_DURATION
                      - GEOFENCE_ALERTS_TEMP1_HIGH_WITH_IGNITION_ON
                      - GEOFENCE_ALERTS_TEMP1_LOW_WITH_IGNITION_ON
                      - GEOFENCE_ALERTS_TEMP2_HIGH_WITH_IGNITION_ON
                      - GEOFENCE_ALERTS_TEMP2_LOW_WITH_IGNITION_ON
                      - GEOFENCE_ALERTS_TEMP3_HIGH_WITH_IGNITION_ON
                      - GEOFENCE_ALERTS_TEMP3_LOW_WITH_IGNITION_ON
                      - GEOFENCE_ALERTS_TEMP4_HIGH_WITH_IGNITION_ON
                      - GEOFENCE_ALERTS_TEMP4_LOW_WITH_IGNITION_ON
                      - GEOFENCE_ENTERING_LEAVING
                      - HARSH_EVENTS
                      - HIGH_RPM
                      - IDLE
                      - IGNITION_ON_OFF
                      - MAX_SPEED_EXCEEDED
                      - MOTION
                      - OVERREV
                      - POWER_ON_OFF
                      - RECOVERY
                      - REMINDERS
                      - ROAD_SPEED
                      - ROUTE_DEVIATION
                      - ROUTE_DEVIATION_CANCELLED
                      - ROUTE_DEVIATION_RETURNED
                      - ROUTE_NOT_ENDED_ON_TIME
                      - ROUTE_NOT_STARED_WITHIN_TIME
                      - ROUTE_SLOW_PROGRESS
                      - ROUTE_START_END
                      - SENSORS
                      - SPEEDING
                      - STATIC_BIT_EVENT
                      - STATIONARY
                      - TEMPERATURE_DIAGNOSTIC
                      - TRIP_SUMMARY
                      - UNKOWN_TRIGGER
                      - VEHICLE_LICENSE_EXPIRED
                      - VISION_FACILITIES_ABSENCE_LOITERING
                      - VISION_FACILITIES_ACTION_DETECTION
                      - VISION_FACILITIES_CAMERA_STATUS
                      - VISION_FACILITIES_CUSTOM
                      - VISION_FACILITIES_CUSTOM_OBJECT_DETECTION
                      - VISION_FACILITIES_FACEMASK
                      - VISION_FACILITIES_FACE_RECOGNITON
                      - VISION_FACILITIES_HIGH_PRIORITY_LINE_CROSS
                      - VISION_FACILITIES_LICENSE_PLATE_RECOGNITION
                      - VISION_FACILITIES_LINE_CROSS_OBJECT
                      - VISION_FACILITIES_MULTI_OBJECT
                      - VISION_FACILITIES_SAFETY_HELMET_DETECTION
                      - VISION_FACILITIES_SOCIAL_DISTANCING
                      - VISION_FACILITIES_SUSPICIOUS_BEHAVIOUR
                      - VISION_VEHICLES_BUTTON
                      - VISION_VEHICLES_CAMERA_COVERED
                      - VISION_VEHICLES_DISTRACTION
                      - VISION_VEHICLES_EYES_CLOSED
                      - VISION_VEHICLES_EYE_DELTA
                      - VISION_VEHICLES_FATIGUE
                      - VISION_VEHICLES_FORWARD_COLLISION
                      - VISION_VEHICLES_HEADWAY_MONITORING
                      - VISION_VEHICLES_LANE_DEPARTURE
                      - VISION_VEHICLES_NO_SEATBEALT
                      - VISION_VEHICLES_PASSENGER
                      - VISION_VEHICLES_PEDESTRIAN_COLLISION
                      - VISION_VEHICLES_PHONE
                      - VISION_VEHICLES_SMOKE
                      - VISION_VEHICLES_URB_FORWARD_COLLISION
                      - VISION_VEHICLES_YAWN
                      - ZONE_ARRIVE_DEPART
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /manufacturer/customers:
    get:
      tags:
        - Car Manufacturers
      summary: Get All Customers' Details
      description: Retrieves customer information for authorised vehicle manufacturers.
      parameters:
        - $ref: '#/components/parameters/vehicle_id'
        - $ref: '#/components/parameters/registration'
        - $ref: '#/components/parameters/company_name'
        - $ref: '#/components/parameters/chassis_number'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          $ref: '#/components/responses/customers'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /carwatch/status:
    get:
      summary: Retrieve CarWatch Status
      description: This endpoint retrieves the list of vehicles with their CarWatch status, indicating whether CarWatch on the respective vehicle is active or inactive.
      tags:
        - CarWatch
      parameters:
        - $ref: '#/components/parameters/is_active'
          description: Filter by CarWatch status. True for active, false for inactive.
        - $ref: '#/components/parameters/registration'
        - $ref: '#/components/parameters/vehicle_id'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: List of carwatch status.
                    items:
                      $ref: '#/components/schemas/carwatch-status'
                  meta:
                    $ref: '#/components/schemas/pagination'
            application/xml:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: List of carwatch status.
                    items:
                      $ref: '#/components/schemas/carwatch-status'
                  meta:
                    $ref: '#/components/schemas/pagination'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /carwatch:
    post:
      summary: Activate/Deactivate CarWatch
      description: This endpoint allows you to activate (on) or deactivate (off) CarWatch for a single vehicle.
      tags:
        - CarWatch
      requestBody:
        description: A JSON payload containing the data required to update carwatch status.
        required: true
        content:
          application/json:
            schema:
              title: carwatch object
              type: object
              required:
                - activate
              properties:
                vehicle_id:
                  oneOf:
                    - $ref: '#/components/schemas/vehicle-id'
                    - type: 'null'
                  description: The id of the vehicle. Required if registration is null.
                registration:
                  oneOf:
                    - $ref: '#/components/schemas/registration'
                    - type: 'null'
                  description: The registration of the vehicle. Required if vehicle_id is null.
                  example: ABC1234X
                activate:
                  type: boolean
                  description: Send true to activate carwatch. Send false to deactivate carwatch.
                  example: true
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: Response message.
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                          description: Successfully activated/deactivated CarWatch on vehicle.
            application/xml:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: Response message.
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                          description: Successfully activated/deactivated CarWatch on vehicle.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /coaching/events:
    get:
      summary: '[BETA] Get coaching events'
      description: This endpoint retrieves coaching events for your account within a specified date range. Please note that this API is in beta, and its behavior may change. Exercise caution when using it.
      tags:
        - Coaching
      parameters:
        - $ref: '#/components/parameters/start_timestamp'
        - $ref: '#/components/parameters/end_timestamp'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: List of coaching events.
                    items:
                      title: coaching object
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 145
                          description: The unique identifier for the coaching event.
                        status:
                          oneOf:
                            - type: string
                              enum:
                                - completed
                                - in_review
                                - to_coach
                                - cancelled
                                - ignored
                            - type: 'null'
                          example: ignored
                          description: The status of the coaching event.
                        start_time:
                          oneOf:
                            - $ref: '#/components/schemas/date'
                              description: The start and time of the coaching event.
                            - type: 'null'
                          example: '2022-01-01 12:00:01'
                          description: The start and time of the coaching event.
                        end_time:
                          oneOf:
                            - $ref: '#/components/schemas/date'
                              description: The end date and time of the coaching event.
                            - type: 'null'
                          example: '2022-01-01 12:00:01'
                          description: The end date and time of the coaching event.
                        vehicle:
                          type: object
                          description: Information about the vehicle associated with the coaching event.
                          properties:
                            vehicle_id:
                              $ref: '#/components/schemas/vehicle-id'
                            registration:
                              $ref: '#/components/schemas/registration'
                        driver:
                          type: object
                          description: Information about the driver associated with the coaching event.
                          properties:
                            driver_id:
                              oneOf:
                                - $ref: '#/components/schemas/uuid'
                                  description: The unique identifier for the driver.
                                - type: 'null'
                              description: The unique identifier for the driver.
                            driver_name:
                              oneOf:
                                - type: string
                                - type: 'null'
                              example: Professor Smith
                              description: The name of the driver.
                        event:
                          type: object
                          description: Information about the vehicle event tied to this coaching event.
                          properties:
                            event_id:
                              oneOf:
                                - type: integer
                                - type: 'null'
                              example: 1234
                              description: The unique identifier for the vehicle event resulting in this coaching event.
                            event_ts:
                              oneOf:
                                - $ref: '#/components/schemas/date'
                                  description: The date and time of the vehicle event resulting in this coaching event.
                                - type: 'null'
                              example: '2022-01-01 12:00:01'
                              description: The date and time of the vehicle event resulting in this coaching event.
                            event_description:
                              type: string
                              example: new
                              description: The description of the event.
                        notes:
                          type: object
                          description: Additional notes related to the coaching event.
                          properties:
                            status_id:
                              oneOf:
                                - type: integer
                                - type: 'null'
                              description: The unique identifier for the notes status.
                              example: 1
                            notes:
                              oneOf:
                                - type: string
                                - type: 'null'
                              example: ''
                              description: Notes associated with the coaching event.
                  meta:
                    $ref: '#/components/schemas/pagination'
            application/xml:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: List of coaching events.
                    items:
                      title: coaching object
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 145
                          description: The unique identifier for the coaching event.
                        status:
                          oneOf:
                            - type: string
                              enum:
                                - completed
                                - in_review
                                - to_coach
                                - cancelled
                                - ignored
                            - type: 'null'
                          example: ignored
                          description: The status of the coaching event.
                        start_time:
                          oneOf:
                            - type: string
                              format: date-time
                            - type: 'null'
                          example: '2022-01-01 12:00:01'
                          description: The start and time of the coaching event.
                        end_time:
                          oneOf:
                            - type: string
                              format: date-time
                            - type: 'null'
                          example: '2022-01-01 12:00:01'
                          description: The end date and time of the coaching event.
                        vehicle:
                          type: object
                          description: Information about the vehicle associated with the coaching event.
                          properties:
                            vehicle_id:
                              type: integer
                              example: 1234
                              description: The unique identifier for the vehicle.
                            registration:
                              type: string
                              description: The registration number of the vehicle.
                              example: ABX123
                        driver:
                          type: object
                          description: Information about the driver associated with the coaching event.
                          properties:
                            driver_id:
                              oneOf:
                                - type: string
                                  format: uuid
                                - type: 'null'
                              example: f3a42187-xxxx-11ec-xxxx-a4bf016cd6b2
                              description: The unique identifier for the driver.
                            driver_name:
                              oneOf:
                                - type: string
                                - type: 'null'
                              example: Professor Smith
                              description: The name of the driver.
                        event:
                          type: object
                          description: Information about the vehicle event tied to this coaching event.
                          properties:
                            event_id:
                              oneOf:
                                - type: integer
                                - type: 'null'
                              example: 1234
                              description: The unique identifier for the vehicle event resulting in this coaching event.
                            event_ts:
                              oneOf:
                                - type: string
                                  format: date-time
                                - type: 'null'
                              example: '2022-01-01 12:00:01'
                              description: The date and time of the vehicle event resulting in this coaching event.
                            event_description:
                              type: string
                              example: new
                              description: The description of the event.
                        notes:
                          type: object
                          description: Additional notes related to the coaching event.
                          properties:
                            status_id:
                              oneOf:
                                - type: integer
                                - type: 'null'
                              description: The unique identifier for the notes status.
                              example: 1
                            notes:
                              oneOf:
                                - type: string
                                - type: 'null'
                              example: ''
                              description: Notes associated with the coaching event.
                  meta:
                    $ref: '#/components/schemas/pagination'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /delivery/countries:
    get:
      summary: Retrieve Delivery Countries
      description: Fetches a list of countries available for delivery.
      tags:
        - Delivery Countries
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        country_id:
                          type: integer
                          format: int64
                          example: 193
                        name:
                          type: string
                          example: Singapore
                        country_code:
                          type: string
                          example: SG
                        country_phone_code:
                          type: string
                          example: '65'
            application/xml:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        country_id:
                          type: integer
                          format: int64
                          example: 193
                        name:
                          type: string
                          example: Singapore
                        country_code:
                          type: string
                          example: SG
                        country_phone_code:
                          type: string
                          example: '65'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /delivery/customers:
    get:
      summary: Get All Delivery Customers' Details
      description: Retrieves a list of all delivery customers with optional filtering.
      tags:
        - Delivery Customers
      parameters:
        - name: filter[customer_id]
          in: query
          description: Optional filter to retrieve customers by their unique ID.
          required: false
          schema:
            $ref: '#/components/schemas/customer-id'
            example: 7489ff44-xxxx-11eb-xxxx-005056a801ca
        - name: filter[country_id]
          in: query
          description: Optional filter to retrieve customers based on their country ID.
          required: false
          schema:
            $ref: '#/components/schemas/country-id'
            example: 1
        - $ref: '#/components/parameters/date_from'
          description: Optional filter to retrieve customers created after a specified date.
          required: false
        - $ref: '#/components/parameters/date_to'
          description: Optional filter to retrieve customers created before a specified date.
          required: false
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      $ref: '#/components/schemas/customer-base'
                  meta:
                    $ref: '#/components/schemas/pagination'
            application/xml:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      $ref: '#/components/schemas/customer-base'
                  meta:
                    $ref: '#/components/schemas/pagination'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    post:
      summary: Create a Delivery Customer
      description: Creates a new delivery customer.
      tags:
        - Delivery Customers
      requestBody:
        description: JSON payload containing the data required for creating a new customer. The location information, except for country, is not required (for instance, address_line_1, address_line_2, postal_code, latitude, longitude). However, if the customer's address_line_2 is provided, address_line_1 must be included. Similarly, if the customer's latitude is provided, the longitude must also be provided, and vice versa.
        required: true
        content:
          application/json:
            schema:
              type: object
              $ref: '#/components/schemas/customer-base'
              required:
                - customer_name
                - country_id
                - contact_code
                - contact_number
              properties:
                customer_name:
                  type: string
                country_id:
                  type: integer
                contact_code:
                  type: string
                contact_number:
                  type: string
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    allOf:
                      - $ref: '#/components/schemas/customer-base'
                      - type: object
                        properties:
                          user_id:
                            $ref: '#/components/schemas/id'
            application/xml:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    allOf:
                      - $ref: '#/components/schemas/customer-base'
                      - type: object
                        properties:
                          user_id:
                            $ref: '#/components/schemas/id'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /delivery/customers/{customer_id}:
    get:
      summary: Retrieve Delivery Customer Details
      description: Fetches details of a specific delivery customer.
      tags:
        - Delivery Customers
      parameters:
        - name: customer_id
          in: path
          description: Unique identifier of the customer whose details are being retrieved.
          required: true
          schema:
            $ref: '#/components/schemas/id'
            example: 42
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    allOf:
                      - type: object
                        properties:
                          user_id:
                            $ref: '#/components/schemas/id'
                      - $ref: '#/components/schemas/customer-base'
            application/xml:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    allOf:
                      - type: object
                        properties:
                          user_id:
                            $ref: '#/components/schemas/id'
                      - $ref: '#/components/schemas/customer-base'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    put:
      summary: Update a Delivery Customer
      description: Updates the details of an existing delivery customer.
      tags:
        - Delivery Customers
      parameters:
        - name: customer_id
          in: path
          description: Unique identifier (UUID) of the customer to be updated.
          required: true
          schema:
            $ref: '#/components/schemas/customer-id'
            example: 7489ff44-xxxx-11eb-xxxx-005056a801ca
      requestBody:
        description: JSON payload containing the customer details to be updated.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/customer-base'
              required:
                - customer_name
                - country_id
                - contact_code
                - contact_number
              properties:
                customer_name:
                  type: string
                country_id:
                  type: string
                contact_code:
                  type: string
                contact_number:
                  type: string
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    allOf:
                      - type: object
                        properties:
                          user_id:
                            $ref: '#/components/schemas/id'
                      - $ref: '#/components/schemas/customer-base'
                        required:
                          - customer_id
                          - contact_code
                          - contact_number
            application/xml:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    allOf:
                      - type: object
                        properties:
                          user_id:
                            $ref: '#/components/schemas/id'
                      - $ref: '#/components/schemas/customer-base'
                        required:
                          - customer_id
                          - contact_code
                          - contact_number
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    delete:
      summary: Delete a Delivery Customer
      description: Deletes a specific delivery customer identified by their customer ID.
      tags:
        - Delivery Customers
      parameters:
        - name: customer_id
          in: path
          description: Unique identifier (UUID) of the customer to be deleted.
          required: true
          schema:
            $ref: '#/components/schemas/customer-id'
            example: 7489ff44-xxxx-11eb-xxxx-005056a801ca
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    x-nullable: true
                    example: null
                  meta:
                    type: object
                    properties:
                      message:
                        type: string
                        example: Successfully deleted customer.
                        description: Delete customer data
            application/xml:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    x-nullable: true
                    example: null
                  meta:
                    type: object
                    properties:
                      message:
                        type: string
                        example: Successfully deleted customer.
                        description: Delete customer data
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /delivery/drivers:
    get:
      tags:
        - Delivery Drivers
      summary: Retrieve All Delivery Drivers' Details
      description: Fetches details of all delivery drivers with optional filtering.
      parameters:
        - name: filter[delivery_driver_id]
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/delivery-driver-id'
            example: f3a42187-0c6e-11ec-aa41-a4bf016cd6b2
          description: Optional filter to retrieve drivers by their unique ID.
        - name: filter[driver_status_id]
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/driver-status-id'
            example: 2
          description: Optional filter to retrieve drivers based on their status (1 = Online, 2 = On Route, 3 = Not Active, 4 = Offline, 5 = On Break).
        - $ref: '#/components/parameters/date_from'
          description: Optional filter to retrieve drivers created after a specified date.
        - $ref: '#/components/parameters/date_to'
          description: Optional filter to retrieve drivers created before a specified date.
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      allOf:
                        - $ref: '#/components/schemas/delivery-driver'
                        - type: object
                          properties:
                            is_online:
                              type: boolean
                              example: false
                              description: (REMOVED) Use driver_status_id (check for NOT in Offline status) instead
                            max_weight:
                              type: number
                              example: 1000
                              description: Maximum weight the driver can carry
                              x-nullable: true
                            max_volume:
                              type: number
                              example: 1000
                              description: Maximum volume the driver can carry
                              x-nullable: true
                            special_equipment:
                              type:
                                - array
                                - 'null'
                              items:
                                type: object
                                properties:
                                  equipment_id:
                                    type: integer
                                    example: 1
                                    description: Special equipment ID which can be handled by the driver
                                  equipment_name:
                                    type: string
                                    example: Forklift
                                    description: Name of the special equipment
                              description: List of special equipment the driver can handle
                  meta:
                    $ref: '#/components/schemas/pagination'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '500':
          $ref: '#/components/responses/server-error'
    post:
      tags:
        - Delivery Drivers
      summary: Create Delivery Drivers
      description: Creates a new delivery driver with specified details.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - first_name
                - phone_code
                - phone_number
                - login_username
                - password
              properties:
                first_name:
                  type: string
                  example: Steven
                  description: Driver first name
                last_name:
                  type: string
                  example: Mark
                  description: Driver last name
                  x-nullable: true
                phone_code:
                  $ref: '#/components/schemas/phone-code'
                phone_number:
                  type: integer
                  example: 9449912
                  description: Mobile device number
                email:
                  $ref: '#/components/schemas/email'
                gender:
                  type: integer
                  example: 1
                  description: Gender 1 for male, 2 for female
                login_username:
                  $ref: '#/components/schemas/login-username'
                  description: The unique username.
                password:
                  $ref: '#/components/schemas/password'
                  description: The password to verify access.
                registration:
                  $ref: '#/components/schemas/registration'
                is_active:
                  type: boolean
                  example: true
                  description: Activate/Deactivates account
                subuser_id:
                  oneOf:
                    - $ref: '#/components/schemas/uuid'
                    - type: 'null'
                  description: Subuser ID
                shift_time_start:
                  oneOf:
                    - $ref: '#/components/schemas/hour-with-timezone'
                    - type: 'null'
                  description: The start time of the driver's shift in HH:MM:SS+TZ format (e.g. 06:30:00+08:00)
                shift_time_end:
                  oneOf:
                    - $ref: '#/components/schemas/hour-with-timezone'
                    - type: 'null'
                  description: The end time of the driver's shift in HH:MM:SS+TZ format (e.g. 22:30:00+08:00)
                start_location_customer_id:
                  oneOf:
                    - $ref: '#/components/schemas/customer-id'
                    - type: 'null'
                  description: Start location customer ID
                end_location_customer_id:
                  oneOf:
                    - $ref: '#/components/schemas/customer-id'
                    - type: 'null'
                  description: End location customer ID
                max_weight:
                  type: number
                  example: 1000
                  description: Maximum weight the driver can carry
                  x-nullable: true
                max_volume:
                  type: number
                  example: 1000
                  description: Maximum volume the driver can carry
                  x-nullable: true
                special_equipment:
                  type: array
                  items:
                    type: integer
                    example: 1
                  description: List of special equipment the driver can handle
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/delivery-driver'
                  - type: object
                    properties:
                      is_online:
                        type: boolean
                        example: false
                        description: (REMOVED) Use driver_status_id (check for NOT in Offline status) instead
                      max_weight:
                        type: number
                        example: 1000
                        description: Maximum weight the driver can carry
                        x-nullable: true
                      max_volume:
                        type: number
                        example: 1000
                        description: Maximum volume the driver can carry
                        x-nullable: true
                      special_equipment:
                        type:
                          - array
                          - 'null'
                        items:
                          type: object
                          properties:
                            equipment_id:
                              type: integer
                              example: 1
                              description: Special equipment ID which can be handled by the driver
                            equipment_name:
                              type: string
                              example: Forklift
                              description: Name of the special equipment
                        description: List of special equipment the driver can handle
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /delivery/drivers/{driver_id}:
    get:
      tags:
        - Delivery Drivers
      summary: Retrieve Delivery Driver Details
      description: Fetches the details of a specific delivery driver.
      parameters:
        - name: driver_id
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/delivery-driver-id'
            example: f3a42187-0c6e-11ec-aa41-a4bf016cd6b2
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/delivery-driver'
                  - type: object
                    properties:
                      token:
                        type:
                          - string
                          - 'null'
                        example: eyJ0eXAiOi
                        description: Authentication token for the driver
                      device_os:
                        type:
                          - string
                          - 'null'
                        example: iOS
                        description: Device operating system
                      device_description:
                        type:
                          - string
                          - 'null'
                        example: null
                        description: Device description
                      is_online:
                        type: boolean
                        example: false
                        description: (REMOVED) Use driver_status_id (check for NOT in Offline status) instead
                      max_weight:
                        type: number
                        example: 1000
                        description: Maximum weight the driver can carry
                        x-nullable: true
                      max_volume:
                        type: number
                        example: 1000
                        description: Maximum volume the driver can carry
                        x-nullable: true
                      special_equipment:
                        type:
                          - array
                          - 'null'
                        items:
                          type: object
                          properties:
                            equipment_id:
                              type: integer
                              example: 1
                              description: Special equipment ID which can be handled by the driver
                            equipment_name:
                              type: string
                              example: Forklift
                              description: Name of the special equipment
                        description: List of special equipment the driver can handle
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '500':
          $ref: '#/components/responses/server-error'
    put:
      tags:
        - Delivery Drivers
      summary: Update delivery driver
      description: Update an existing delivery driver
      parameters:
        - name: driver_id
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/delivery-driver-id'
            example: f3a42187-0c6e-11ec-aa41-a4bf016cd6b2
          description: Unique UUID identifying the driver whose details are to be updated
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                first_name:
                  type:
                    - string
                    - 'null'
                  example: Steven
                  description: The driver's first name <br/> If null is provided, the value will be ignored during update. This field does not support null update.
                last_name:
                  type:
                    - string
                    - 'null'
                  example: Mark
                  description: The driver's last name
                phone_code:
                  $ref: '#/components/schemas/phone-code'
                  description: The country contact code. This field is required when phone number is provided. <br/> If null is provided, the value will be ignored during update. This field does not support null update.
                phone_number:
                  type: integer
                  example: 9449912
                  description: The mobile device number. This field is required when phone code is provided. <br/> If null is provided, the value will be ignored during update. This field does not support null update.
                email:
                  $ref: '#/components/schemas/email'
                  description: The email address of the driver <br/> If null is provided, the value will be ignored during update. This field does not support null update.
                gender:
                  type: integer
                  example: 1
                  description: Gender 1 for male, 2 for female
                login_username:
                  $ref: '#/components/schemas/login-username'
                  description: The unique username <br/> If null is provided, the value will be ignored during update. This field does not support null update.
                password:
                  $ref: '#/components/schemas/password'
                  description: The password to verify access <br/> When empty, password will not be updated
                registration:
                  $ref: '#/components/schemas/registration'
                is_active:
                  type: boolean
                  example: true
                  description: Activate/Deactivates account
                subuser_id:
                  oneOf:
                    - $ref: '#/components/schemas/uuid'
                    - type: 'null'
                  description: Subuser ID
                shift_time_start:
                  oneOf:
                    - $ref: '#/components/schemas/hour-with-timezone'
                    - type: 'null'
                  description: Start time of driver's shift in HH:MM:SS+TZ format
                shift_time_end:
                  oneOf:
                    - $ref: '#/components/schemas/hour-with-timezone'
                    - type: 'null'
                  description: End time of driver's shift in HH:MM:SS+TZ format
                start_location_customer_id:
                  oneOf:
                    - $ref: '#/components/schemas/customer-id'
                    - type: 'null'
                  description: Start location customer ID
                end_location_customer_id:
                  oneOf:
                    - $ref: '#/components/schemas/customer-id'
                    - type: 'null'
                  description: End location customer ID
                max_weight:
                  type: number
                  example: 1000
                  description: Maximum weight the driver can carry
                  x-nullable: true
                max_volume:
                  type: number
                  example: 1000
                  description: Maximum volume the driver can carry
                  x-nullable: true
                special_equipment:
                  type: array
                  items:
                    type: integer
                    example: 1
                    description: Special equipment ID which can be handled by the driver
                  description: List of special equipment the driver can handle
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/delivery-driver'
                  - type: object
                    properties:
                      is_online:
                        type: boolean
                        example: false
                        description: (REMOVED) Use driver_status_id (check for NOT in Offline status) instead
                      max_weight:
                        type: number
                        example: 1000
                        description: Maximum weight the driver can carry
                        x-nullable: true
                      max_volume:
                        type: number
                        example: 1000
                        description: Maximum volume the driver can carry
                        x-nullable: true
                      special_equipment:
                        type:
                          - array
                          - 'null'
                        items:
                          type: object
                          properties:
                            equipment_id:
                              type: integer
                              example: 1
                              description: Special equipment ID which can be handled by the driver
                            equipment_name:
                              type: string
                              example: Forklift
                              description: Name of the special equipment
                        description: List of special equipment the driver can handle
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    delete:
      tags:
        - Delivery Drivers
      summary: Delete delivery driver
      description: Delete a delivery driver by ID
      parameters:
        - name: driver_id
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/delivery-driver-id'
            example: f3a42187-0c6e-11ec-aa41-a4bf016cd6b2
          description: Unique identifier of the driver to be deleted.
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: 'null'
                  meta:
                    type: object
                    properties:
                      message:
                        type: string
                        example: Successfully deleted driver.
                        description: Confirmation message indicating successful deletion.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '500':
          $ref: '#/components/responses/server-error'
  /delivery/drivers/{driver_id}/jobs:
    get:
      tags:
        - Delivery Drivers
      summary: Retrieve All Jobs for a Delivery Driver
      description: Fetches a list of all jobs assigned to a specific delivery driver, with optional filtering.
      parameters:
        - name: driver_id
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/delivery-driver-id'
            example: f3a42187-0c6e-11ec-aa41-a4bf016cd6b2
        - $ref: '#/components/parameters/job_id'
        - $ref: '#/components/parameters/order_id'
        - $ref: '#/components/parameters/schedule_type_id'
        - $ref: '#/components/parameters/job_status_id'
        - name: filter[create_ts_from]
          in: query
          required: false
          description: Optional filter to retrieve jobs created after a specified date and time, based on the create_ts attribute of the parent job object.
          schema:
            $ref: '#/components/schemas/date'
            example: '2023-01-01 12:00:00'
        - name: filter[create_ts_to]
          in: query
          required: false
          description: Optional filter to retrieve jobs created before a specified date and time, based on the create_ts attribute of the parent job object.
          schema:
            $ref: '#/components/schemas/date'
            example: '2023-01-01 12:00:00'
        - name: filter[delivery_ts_from]
          in: query
          required: false
          description: Optional filter to retrieve jobs with a delivery time starting from a specified date and time, based on the scheduled_delivery_ts attribute of the parent job object.
          schema:
            $ref: '#/components/schemas/date'
            example: '2023-01-01 12:00:00'
        - name: filter[delivery_ts_to]
          in: query
          required: false
          description: Optional filter to retrieve jobs with a delivery time up until a specified date and time, based on the scheduled_delivery_ts attribute of the parent job object.
          schema:
            $ref: '#/components/schemas/date'
            example: '2023-01-01 12:00:00'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/limit'
        - name: sort
          in: query
          required: false
          description: Determines the sorting order of the job data; use "+" for ascending and "-" for descending order.
          schema:
            type: string
            example: +create_ts,-registration,driver_status_id
      responses:
        '200':
          description: List of driver jobs retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        job_id:
                          $ref: '#/components/schemas/job-id'
                          description: Unique identifier of the delivery job to be completed
                        create_ts:
                          $ref: '#/components/schemas/timestamp'
                        update_ts:
                          allOf:
                            - $ref: '#/components/schemas/timestamp'
                            - type: 'null'
                        order_id:
                          $ref: '#/components/schemas/order-id'
                        reference_number:
                          type:
                            - string
                            - 'null'
                          description: Your custom reference number.
                          example: REF123456
                        scheduled_delivery_ts:
                          allOf:
                            - $ref: '#/components/schemas/timestamp'
                            - type: 'null'
                          description: Delivery scheduled timestamp
                        delivery_driver_id:
                          $ref: '#/components/schemas/delivery-driver-id'
                        assigned_ts:
                          allOf:
                            - $ref: '#/components/schemas/timestamp'
                            - type: 'null'
                          description: Assigned timestamp
                        schedule_type_id:
                          type: integer
                          description: Type of schedule for the delivery job (1 = ASAP, 2 = Scheduled, 3 = Unscheduled)<br/> Delivery schedule types<br/> <table> <tr><td>1</td><td>As Soon As Possible</td></tr> <tr><td>2</td><td>Scheduled</td></tr> <tr><td>3</td><td>Unscheduled</td></tr> </table>
                          enum:
                            - 1
                            - 2
                            - 3
                          example: 2
                        job_status_id:
                          type: integer
                          enum:
                            - 2
                            - 3
                            - 4
                            - 5
                          description: Status of the delivery job<br/> Job statuses<br/> <table> <tr><td>2</td><td>Assign Later</td></tr> <tr><td>3</td><td>Rejected/Failed</td></tr> <tr><td>4</td><td>Assigned</td></tr> <tr><td>5</td><td>Completed</td></tr> </table>
                          example: 4
                        user_id:
                          allOf:
                            - $ref: '#/components/schemas/id'
                            - type: 'null'
                          description: User identification number.
                        is_visible:
                          type: boolean
                          description: The flag to determine if job is visible in mobile.
                          example: true
                        is_deleted:
                          type: boolean
                          description: The flag to determine if job is deleted.
                          example: false
                        job_type_id:
                          type: integer
                          enum:
                            - 1
                            - 3
                          description: Type of job<br/> Job types<br/> <table> <tr><td>1</td><td>Pickup+Dropoff job</td></tr> <tr><td>3</td><td>Single stop job</td></tr> </table>
                          example: 1
                        is_planning:
                          type: boolean
                          description: The flag to determine if the job is plan.
                          example: false
                        allow_add_item:
                          type: boolean
                          description: The flag to determine if allow user item.
                          example: true
                        notes:
                          type:
                            - string
                            - 'null'
                          description: Notes.
                          example: Leave at front door if no answer.
                        subuser_id:
                          allOf:
                            - $ref: '#/components/schemas/id'
                            - type: 'null'
                          description: Subuser id identification number.
                        allowed_to_start_at:
                          allOf:
                            - $ref: '#/components/schemas/timestamp'
                            - type: 'null'
                          description: Allowed to start timestamp.
                        send_to_driver_at:
                          allOf:
                            - $ref: '#/components/schemas/timestamp'
                            - type: 'null'
                          description: Send to driver timestamp.
                        driver:
                          $ref: '#/components/schemas/delivery-driver'
                        stops:
                          type: array
                          description: List of stops for the job
                        items:
                          type: array
                          description: List of items for the job
                        labels:
                          type: array
                          description: Labels for the job
                          items:
                            type: string
                        legs:
                          type: array
                          description: Legs for the job
                        plans:
                          type: array
                          description: Plans for the job
                        special_equipment:
                          type: array
                          description: Special equipment required for the job
                          items:
                            type: object
                            properties:
                              equipment_id:
                                type: integer
                                example: 1
                              equipment_name:
                                type: string
                                example: Forklift
                  meta:
                    $ref: '#/components/schemas/pagination'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '500':
          $ref: '#/components/responses/server-error'
  /delivery/jobs/bulk-upload:
    post:
      tags:
        - Delivery Jobs
      summary: Bulk Upload Delivery Jobs
      description: This endpoint allows you to bulk create delivery jobs (up to 1000 jobs per request) from an Excel/CSV file. Parameters in the file are exactly the same as POST /delivery/jobs endpoint, you may refer to it for more details.
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - file
              properties:
                file:
                  description: |-
                    Excel/CSV file containing delivery jobs to be uploaded.<br/> Only .xlsx or .csv format is accepted with a maximum accepted file size of 10 MB.<br />The file format will follow versioning, the current version is v1. <br/><br/> The following columns for version v1 are required: <ul> <li>reference_number</li> <li>job_type_id</li> <li>delivery_driver_id</li> <li>delivery_driver_name</li> <li>schedule_type_id</li> <li>scheduled_delivery_ts</li> <li>labels</li> <li>subuser_id</li> <li>allowed_to_start_at</li> <li>send_to_driver_at</li> <li>stops</li> <li>items</li> </ul> <br /> <strong>reference_number</strong> is recommended for webhook integration. You'll receive notification with this field as a reference for jobs creation status.<br /><br /> <strong>stops</strong> and <strong>items</strong> accepts json. Please refer to the example file linked in the introduction section for more details.<br/><br/>
                    Example file formats for version v1: <ul> <li>CSV file: <a href='/files/delivery_api_import_file.csv' download="import.csv">Click to download</a> </li> <li>JSON file: <a href='/files/delivery_api_import_file.json' download="import.json">Click to download</a> </li> <li>Excel file: <a href='/files/delivery_api_import_file.xlsx' download="import.xlsx">Click to download</a> </li> </ul> 
                webhook_url:
                  description: 'The webhook URL to receive the delivery jobs bulk upload status.<br/><br/> A x-webhook-signature header will be sent with the webhook for you to verify the request.  Please refer to webhook documentation in the introduction section for more details.<br/><br/> Sample webhook payload:<br/><pre> [ { ''reference_number'': ''CART202502260001'', ''job_id'': 119582 }, { ''reference_number'': ''CART202502260002'', ''errors'': { ''job_type_id'': [ ''The selected job_type_id is invalid.'' ] } } ] </pre>'
                  type: string
                  example: https://your-webhook-url.com/delivery-jobs-bulk-upload
                template_version:
                  description: The version of the template used for the job bulk upload. This is used to ensure compatibility with the expected file format.<br /><br/> If not provided, the default version will be used.
                  type: string
                  example: v1
                  default: v1
                  enum:
                    - v1
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      webhook_url:
                        type: string
                        description: The webhook URL to receive the delivery jobs bulk upload status
                        example: https://your-webhook-url.com/delivery-jobs-bulk-upload
                      message:
                        type: string
                        example: Bulk upload request received. Please check the status via webhook.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /delivery/jobs/{job_id}/complete:
    put:
      tags:
        - Delivery Jobs
      summary: Complete a delivery job
      description: Completes an assigned job. Remaining completion timestamps will be set to the time of the API call
      parameters:
        - name: job_id
          in: path
          required: true
          schema:
            type: integer
            example: 123
          description: Unique identifier of the delivery job to be completed
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    example: null
                  meta:
                    type: object
                    properties:
                      message:
                        type: string
                        example: Successfully completed the job
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /delivery/jobs:
    get:
      tags:
        - Delivery Jobs
      summary: Retrieve Delivery Jobs
      description: Fetches a list of all delivery jobs, with optional filtering based on various criteria.
      parameters:
        - name: filter[job_id]
          in: query
          description: Optional filter to retrieve jobs by their unique ID.
          required: false
          schema:
            $ref: '#/components/schemas/id'
            example: 1
        - name: filter[order_id]
          in: query
          description: Optional filter to retrieve jobs by associated order ID.
          required: false
          schema:
            $ref: '#/components/schemas/order-id'
            example: '20210908000002'
        - name: filter[schedule_type_id]
          in: query
          description: Optional filter to retrieve jobs based on schedule type (1 = ASAP, 2 = Scheduled, 3 = Unscheduled).
          required: false
          schema:
            $ref: '#/components/schemas/schedule-type-id'
            example: 1
        - name: filter[job_status_id]
          in: query
          description: Optional filter to retrieve jobs by their status (2 = Assign Later, 3 = Rejected/Failed, 4 = Assigned, 5 = Completed).
          required: false
          schema:
            $ref: '#/components/schemas/job-status-id'
            example: 2
        - name: filter[create_ts_from]
          in: query
          description: Optional filter to retrieve jobs created on or after a specific date and time.
          required: false
          schema:
            $ref: '#/components/schemas/date'
          example: '2021-10-01 00:00:00'
        - name: filter[create_ts_to]
          in: query
          description: Optional filter to retrieve jobs created on or before a specific date and time.
          required: false
          schema:
            $ref: '#/components/schemas/date'
            example: 2021-10-31 or 2021-10-31 23:59:59
        - name: filter[scheduled_delivery_ts_from]
          in: query
          description: Optional filter to retrieve jobs with a scheduled delivery time starting from a specific date and time.
          required: false
          schema:
            $ref: '#/components/schemas/date'
          example: '2021-10-01 00:00:00'
        - name: filter[scheduled_delivery_ts_to]
          in: query
          description: Optional filter to retrieve jobs with a scheduled delivery time up until a specific date and time.
          required: false
          schema:
            $ref: '#/components/schemas/date'
          example: '2021-10-31 23:59:59'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/limit'
        - name: filter[item_tracking_number]
          in: query
          description: Optional filter to retrieve jobs by their tracking number.
          required: false
          schema:
            $ref: '#/components/schemas/item-tracking-number'
            example: TRACK-123456-SIN2
        - name: filter[driver_id]
          in: query
          description: Optional filter to retrieve jobs assigned to a specific driver, identified by UUID.
          required: false
          schema:
            $ref: '#/components/schemas/uuid'
            example: 39d22470-1ad7-11ee-bfe8-f241fc6d518a
        - name: filter[reference_number]
          in: query
          description: Optional filter to retrieve jobs by their reference number.
          required: false
          schema:
            $ref: '#/components/schemas/reference-number'
            example: ABC123
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      allOf:
                        - $ref: '#/components/schemas/delivery-job-base'
                        - type: object
                          properties:
                            driver:
                              anyOf:
                                - $ref: '#/components/schemas/delivery-driver'
                                - type: 'null'
                              description: Driver details
                            stops:
                              type: array
                              description: Stops of this job
                              items:
                                allOf:
                                  - $ref: '#/components/schemas/delivery-stops'
                                  - type: object
                                    properties:
                                      activity_started_coordinates:
                                        allOf:
                                          - type: object
                                            properties:
                                              latitude:
                                                type: number
                                                format: float
                                                description: Stop started activity latitude
                                              longitude:
                                                type: number
                                                format: float
                                                description: Stop started activity longitude
                                          - type: 'null'
                                        description: The Stop started activity coordinates
                                      activity_arrived_coordinates:
                                        allOf:
                                          - type: object
                                            properties:
                                              latitude:
                                                type: number
                                                format: float
                                                description: Stop arrived activity latitude
                                              longitude:
                                                type: number
                                                format: float
                                                description: Stop arrived activity longitude
                                          - type: 'null'
                                        description: The Stop arrived activity coordinates
                                      activity_completed_coordinates:
                                        allOf:
                                          - type: object
                                            properties:
                                              latitude:
                                                type: number
                                                format: float
                                                description: Stop completed activity latitude
                                              longitude:
                                                type: number
                                                format: float
                                                description: Stop completed activity longitude
                                          - type: 'null'
                                        description: The Stop completed activity coordinates
                                      activity_rejected_coordinates:
                                        allOf:
                                          - type: object
                                            properties:
                                              latitude:
                                                type: number
                                                format: float
                                                description: Stop rejected activity latitude
                                              longitude:
                                                type: number
                                                format: float
                                                description: Stop rejected activity longitude
                                          - type: 'null'
                                        description: The Stop rejected activity coordinates
                                      has_custom_priority:
                                        type: boolean
                                        description: The flag to determine custom priority
                            items:
                              type: array
                              description: Items of this job
                              items:
                                $ref: '#/components/schemas/delivery-job-item'
                            labels:
                              type: array
                              description: Labels for the job
                              items:
                                type: string
                            legs:
                              description: The leg records of the job from one stop_id(start_stop_id) to another(end_stop_id).<br/> The routes plotted by the projected_polyline and driver_travel_polyline attribute value can be viewed using this portal<br/> <em><a target="_blank"  href="https://valhalla.github.io/demos/polyline/?unescape=false&polyline6=true">Valhalla Polyline Demo</a></em>
                              type: array
                              items:
                                type: object
                                properties:
                                  start_stop_id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 1319116
                                    x-nullable: true
                                    description: The start stop id of the leg record
                                  end_stop_id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 1319129
                                    x-nullable: true
                                    description: The end stop id of the leg record
                                  create_ts:
                                    $ref: '#/components/schemas/timestamp-with-offset'
                                    description: The created timestamp of the leg record
                                  projected_polyline:
                                    type:
                                      - string
                                      - 'null'
                                    example: u_aoAoukbeE????????????nmAhG????????????????????????????????
                                    description: The projected polyline of the leg record used to plot route lines on a map
                                  projected_distance:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 10
                                    description: The projected distance of the leg record in meters
                                  last_estimated_travel_time:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 360
                                    description: The estimated travel time of the leg record in seconds
                                  driver_travel_polyline:
                                    type:
                                      - string
                                      - 'null'
                                    example: u_aoAoukbeE????????????nmAhG????????????????????????????????
                                    description: The actual travel polyline of the leg record used to plot route lines on a map
                                  driver_travel_distance:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 500
                                    description: The actual travel distance in meters
                                  driver_travel_time:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 360
                                    description: The actual travel time of the leg record in seconds
                            plans:
                              description: The Plan where the job belongs to or where the plan was added to
                              type: array
                              items:
                                type: object
                                properties:
                                  plan_id:
                                    type: integer
                                    description: The Id of the Plan record
                                    example: 12345
                                  name:
                                    type: string
                                    description: The name of the Plan
                                    example: Morning Deliveries
                                  plan_state_id:
                                    type: integer
                                    enum:
                                      - 1
                                      - 2
                                      - 3
                                    description: The state Id of the Plan <br/> <table> <thead> <tr> <th>plan_state_id</th> <th>name</th> </tr> </thead> <tbody> <tr> <td>1</td> <td>New</td> </tr> <tr> <td>2</td> <td>Deleted</td> </tr> <tr> <td>3</td> <td>Confirmed</td> </tr> </tbody>
                                    example: 2
                                  create_ts:
                                    $ref: '#/components/schemas/timestamp-with-offset'
                                    description: The created timestamp of the Plan
                                  update_ts:
                                    $ref: '#/components/schemas/timestamp-with-offset'
                                    description: The updated timestamp of the Plan
                            special_equipment:
                              $ref: '#/components/schemas/special-equipment'
                              description: Special equipment required for the job
                  meta:
                    $ref: '#/components/schemas/pagination'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    post:
      tags:
        - Delivery Jobs
      summary: Create a Delivery Job
      description: 'This endpoint initiates a new delivery job and supports two job types: One-Stop job (job_type_id = 3) and Collection and Dropoff job (job_type_id = 1). For a One-Stop Delivery, it is required to specify only one destination. In contrast, the Collection and Dropoff job type necessitates exactly two designated points - one for collection and one for the final dropoff.'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              description: A JSON payload containing the data required to create a new delivery job. The structure of the payload varies based on the job type. For job_type_id 3, only one stop can be specified in the stops array. For job_type_id 1, the stops array must contain exactly two stops, one for each stop type (pickup and dropoff).
              required:
                - job_type_id
                - stops
              properties:
                job_type_id:
                  $ref: '#/components/schemas/job-type-id'
                plan_id:
                  anyOf:
                    - type: integer
                    - type: 'null'
                  example: 12345
                  description: Provide the plan_id to assign the job to a plan. <br/><br/>When this is provided, the following fields must be omitted:<br/>`delivery_driver_id` `delivery_driver_name` `schedule_type_id` `scheduled_delivery_ts`.
                delivery_driver_id:
                  anyOf:
                    - $ref: '#/components/schemas/delivery-driver-id'
                    - type: 'null'
                  description: This field is only applicable to job creation without a plan_id. <br/><br/>Provide this or delivery_driver_name, not both. If both are null, job status is set to 2 (Assign Later) or assigned to a subuser.
                delivery_driver_name:
                  anyOf:
                    - type: string
                    - type: 'null'
                  example: Steven Mark
                  description: This field is only applicable to job creation without a plan_id. <br/><br/>Provide this or delivery_driver_id, not both. If both are null, job status is set to 2 (Assign Later) or assigned to a subuser. <br/><br/>Case-insensitive exact match on "first_name last_name". Must be unique in your driver pool, assignment fails if duplicates exist.
                schedule_type_id:
                  $ref: '#/components/schemas/schedule-type-id'
                scheduled_delivery_ts:
                  $ref: '#/components/schemas/date'
                  example: '2021-09-11 11:40:36'
                  description: This field is only applicable to job creation without a plan_id. <br/><br/>The delivery scheduled timestamp is required for `schedule_type_id` 2, but not applicable for 1 or 3. Type 1 automatically sets it to the next available schedule, while type 3 sets it to null.
                reference_number:
                  $ref: '#/components/schemas/reference-number'
                  example: ABC123
                items:
                  type: array
                  description: Items of this job
                  items:
                    type: object
                    required:
                      - description
                      - weight
                      - item_type_id
                      - quantity
                      - tracking_number
                      - todos
                    properties:
                      description:
                        type: string
                        description: Description of the item
                        example: Electronics
                      weight:
                        type: number
                        description: Weight of the item
                        example: 2.5
                      weight_measure_id:
                        type: integer
                        description: 1 = KG
                      item_type_id:
                        $ref: '#/components/schemas/job-item-type-id'
                      quantity:
                        type: integer
                        description: number of items
                      tracking_number:
                        type: string
                        description: A unique ID or number assigned to a package/parcel
                      todos:
                        type: array
                        description: You can add todos to each item of the delivery job
                        items:
                          type: object
                          required:
                            - todo_type_id
                            - stop_type_id
                            - is_required
                          properties:
                            todo_type_id:
                              $ref: '#/components/schemas/item-todo-type-id'
                            stop_type_id:
                              $ref: '#/components/schemas/stop-type-id'
                            is_required:
                              type: boolean
                              example: true
                              description: Indicates if the todo is mandatory
                            description:
                              type: string
                              description: Custom title for the TODO
                stops:
                  type: array
                  description: Add one stop or two stops to the delivery job. For job_type_id 3, this array must have exactly one stop. For job_type_id 1, it must have exactly two elements.
                  items:
                    type: object
                    required:
                      - stop_type_id
                      - country_id
                    description: Stop information for delivery
                    properties:
                      customer_id:
                        anyOf:
                          - $ref: '#/components/schemas/customer-id'
                          - type: 'null'
                        description: Existing customer ID for the stop. Can be omitted for new customers.
                      stop_type_id:
                        $ref: '#/components/schemas/stop-type-id'
                      customer_name:
                        type: string
                        description: Name of the customer. Required for new customers.
                        example: John Doe
                      address_line_1:
                        type: string
                        description: Primary address line. Required if the latitude and longitude are not provided.
                        example: 123 Main St
                      address_line_2:
                        type:
                          - string
                          - 'null'
                        description: Secondary address line.
                        example: Apt 4B
                      postal_code:
                        type:
                          - string
                          - 'null'
                        description: Postal code of the customer. Required for new customers.
                      country_id:
                        type: integer
                        description: Country ID of the customer. Required for new customers.
                        example: 1
                      email:
                        type: string
                        format: email
                        description: Email address of the customer.
                        example: johndoe@example.com
                      contact_code:
                        type:
                          - string
                          - 'null'
                        description: Country code of the customer's phone number.<br/> This is only required when saving contact to address book(save_to_address_book = true)
                        example: '+1'
                      contact_number:
                        type:
                          - string
                          - 'null'
                        description: Contact phone number of the customer.<br/> This is only required when saving contact to address book(save_to_address_book = true)
                        example: +1 234 567 8901
                      note:
                        type:
                          - string
                          - 'null'
                        description: Additional note for the driver regarding this stop.
                        example: Leave at front door
                      save_to_address_book:
                        type: boolean
                        description: If true, saves new customer details to the address book.
                        example: true
                      latitude:
                        type:
                          - number
                          - 'null'
                        format: float
                        description: Latitude of the customer location. Required if address is not provided for new customers.
                        example: 37.7749
                      longitude:
                        type:
                          - number
                          - 'null'
                        format: float
                        description: Longitude of the customer location. Required if address is not provided for new customers.
                        example: -122.4194
                      todos:
                        description: You can add todos to each stop. These are separate from the items.todos and can be used in conjunction or separately.
                        type: array
                        items:
                          type: object
                          required:
                            - todo_type_id
                          properties:
                            todo_type_id:
                              $ref: '#/components/schemas/stop-todo-type-id'
                            description:
                              type: string
                              description: Provides a custom title or additional instructions for the todo task.<<br/> This can include specific details on how the task should be carried out, such as the angle of the photo or particular details to capture in the signature.
                      delivery_window:
                        type: array
                        description: Delivery time windows for the stop. Pass an empty array if there are no specific windows.
                        items:
                          type: object
                          required:
                            - time_from
                            - time_to
                          properties:
                            time_from:
                              type: string
                              example: 10:00:00+08:00
                              description: Time with timezone. Must be before time_to
                            time_to:
                              type: string
                              example: 12:00:00+08:00
                              description: Time with timezone. Must be after time_from
                      duration:
                        type:
                          - integer
                          - 'null'
                        minimum: 1
                        default: 5
                        description: Duration of the stop in minutes. it is nullable and default will be 5 minutes.
                        example: 15
                special_equipment:
                  type: array
                  description: Add equipment IDs to the delivery job.
                  items:
                    type: integer
                labels:
                  type: array
                  description: Add custom labels to your job
                  items:
                    type: string
                subuser_id:
                  anyOf:
                    - $ref: '#/components/schemas/uuid'
                    - type: 'null'
                  description: Indicate the subuser_id to assign the job to a subuser.<br/><br/>This field may be overwritten if a plan containing subuser target driver is provided.
                  example: ba1d07d2-31aa-11ee-9a58-506b8dbc8dfb
                allowed_to_start_at:
                  anyOf:
                    - $ref: '#/components/schemas/date'
                    - type: 'null'
                  example: '2021-09-18 12:30:00'
                  description: Allowed to start timestamp
                send_to_driver_at:
                  anyOf:
                    - $ref: '#/components/schemas/date'
                    - type: 'null'
                  example: '2021-09-18 12:30:00'
                  description: Send to driver timestamp
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    allOf:
                      - $ref: '#/components/schemas/delivery-job-base'
                      - type: object
                        properties:
                          labels:
                            type: array
                            description: Labels for the job
                            items:
                              type: string
                          stops:
                            type: array
                            description: Stops of this job
                            items:
                              $ref: '#/components/schemas/delivery-stops'
                          items:
                            type: array
                            description: Items of this job
                            items:
                              $ref: '#/components/schemas/delivery-job-item'
                          special_equipment:
                            $ref: '#/components/schemas/special-equipment'
                            description: Special equipment required for the job
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /delivery/jobs/{job_id}:
    get:
      tags:
        - Delivery Jobs
      summary: Retrieve Delivery Job Details
      description: Fetches the details of a specific delivery job.
      parameters:
        - name: job_id
          in: path
          required: true
          schema:
            type: integer
            example: 123
          description: Unique identifier of the delivery job whose details are being retrieved
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    allOf:
                      - $ref: '#/components/schemas/delivery-job-base'
                      - type: object
                        properties:
                          driver:
                            anyOf:
                              - $ref: '#/components/schemas/delivery-driver'
                              - type: 'null'
                            description: Driver details
                          stops:
                            type: array
                            description: Stops of this job
                            items:
                              allOf:
                                - $ref: '#/components/schemas/delivery-stops'
                                - type: object
                                  properties:
                                    activity_started_coordinates:
                                      allOf:
                                        - type: object
                                          properties:
                                            latitude:
                                              type: number
                                              format: float
                                              description: Stop started activity latitude
                                            longitude:
                                              type: number
                                              format: float
                                              description: Stop started activity longitude
                                        - type: 'null'
                                      description: The Stop started activity coordinates
                                    activity_arrived_coordinates:
                                      allOf:
                                        - type: object
                                          properties:
                                            latitude:
                                              type: number
                                              format: float
                                              description: Stop arrived activity latitude
                                            longitude:
                                              type: number
                                              format: float
                                              description: Stop arrived activity longitude
                                        - type: 'null'
                                      description: The Stop arrived activity coordinates
                                    activity_completed_coordinates:
                                      allOf:
                                        - type: object
                                          properties:
                                            latitude:
                                              type: number
                                              format: float
                                              description: Stop completed activity latitude
                                            longitude:
                                              type: number
                                              format: float
                                              description: Stop completed activity longitude
                                        - type: 'null'
                                      description: The Stop completed activity coordinates
                                    activity_rejected_coordinates:
                                      allOf:
                                        - type: object
                                          properties:
                                            latitude:
                                              type: number
                                              format: float
                                              description: Stop rejected activity latitude
                                            longitude:
                                              type: number
                                              format: float
                                              description: Stop rejected activity longitude
                                        - type: 'null'
                                      description: The Stop rejected activity coordinates
                                    has_custom_priority:
                                      type: boolean
                                      description: The flag to determine custom priority
                          items:
                            type: array
                            description: Items of this job
                            items:
                              $ref: '#/components/schemas/delivery-job-item'
                          labels:
                            type: array
                            description: Labels for the job
                            items:
                              type: string
                          special_equipment:
                            $ref: '#/components/schemas/special-equipment'
                            description: Special equipment required for the job
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    put:
      tags:
        - Delivery Jobs
      summary: Update a Delivery Job
      description: Updates the details of an existing delivery job.
      parameters:
        - name: job_id
          in: path
          required: true
          schema:
            type: integer
            example: 123
          description: Unique identifier of the delivery job to be updated
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              description: JSON payload containing the updated data for the delivery job
              properties:
                delivery_driver_id:
                  anyOf:
                    - $ref: '#/components/schemas/delivery-driver-id'
                    - type: 'null'
                  description: Provide this or delivery_driver_name, not both. If both are null, job status is set to 2 (Assign Later) or assigned to a subuser.
                delivery_driver_name:
                  anyOf:
                    - type: string
                    - type: 'null'
                  example: Steven Mark
                  description: Provide this or delivery_driver_id, not both. If both are null, job status is set to 2 (Assign Later) or assigned to a subuser.<br/> <br/>Case-insensitive exact match on "first_name last_name". Must be unique in your driver pool, assignment fails if duplicates exist.
                schedule_type_id:
                  $ref: '#/components/schemas/schedule-type-id'
                scheduled_delivery_ts:
                  anyOf:
                    - $ref: '#/components/schemas/date'
                    - type: 'null'
                  description: The delivery scheduled timestamp is required for schedule_type_id 2, but not applicable for 1 or 3.<br/> Type 1 automatically sets it to the next available schedule, while type 3 sets it to null.
                reference_number:
                  anyOf:
                    - $ref: '#/components/schemas/reference-number'
                    - type: 'null'
                  description: Your custom reference number
                items:
                  type: array
                  description: 'IMPORTANT: When item object is removed, it''ll be deleted in the database'
                  items:
                    type: object
                    required:
                      - job_item_id
                      - description
                      - weight
                    properties:
                      job_item_id:
                        type:
                          - integer
                          - 'null'
                        description: When ID is null, item will be created.
                      description:
                        type: string
                        description: Description of the item
                        example: Electronics
                      weight:
                        type: number
                        description: Weight of the item
                        example: 2.5
                      weight_measure_id:
                        type: integer
                        description: 1 = KG
                      item_type_id:
                        $ref: '#/components/schemas/job-item-type-id'
                      quantity:
                        type: integer
                        description: number of items
                      tracking_number:
                        type: string
                        description: A unique ID or number assigned to a package/parcel
                      todos:
                        type: array
                        description: 'IMPORTANT: When todo object is removed, it''ll be deleted in the database'
                        items:
                          type: object
                          required:
                            - job_item_todo_id
                            - todo_type_id
                            - stop_type_id
                            - is_required
                          properties:
                            job_item_todo_id:
                              type:
                                - integer
                                - 'null'
                              description: When ID is null, todo will be created.
                            todo_type_id:
                              $ref: '#/components/schemas/item-todo-type-id'
                            stop_type_id:
                              $ref: '#/components/schemas/stop-type-id'
                              example: 1
                            latitude:
                              type:
                                - number
                                - 'null'
                              format: float
                              description: The latitude of the todo location
                              example: 1.3521
                            longitude:
                              type:
                                - number
                                - 'null'
                              format: float
                              description: The longitude of the todo location
                              example: 103.8198
                            is_required:
                              type: boolean
                              example: true
                              description: Indicates if the todo is mandatory
                stops:
                  type: array
                  description: 'IMPORTANT: When stop object is removed, it''ll be deleted in the database'
                  items:
                    type: object
                    required:
                      - stop_id
                      - stop_type_id
                      - country_id
                    description: Stop information for delivery
                    properties:
                      stop_id:
                        anyOf:
                          - $ref: '#/components/schemas/id'
                          - type: 'null'
                        description: When ID is null, item will be created.
                      customer_id:
                        anyOf:
                          - $ref: '#/components/schemas/customer-id'
                          - type: 'null'
                        description: Existing customer ID for the stop. Can be omitted for new customers.
                      stop_type_id:
                        $ref: '#/components/schemas/stop-type-id'
                      customer_name:
                        type: string
                        description: Name of the customer. Required for new customers.
                        example: John Doe
                      address_line_1:
                        type: string
                        description: Primary address line. Required if the latitude and longitude are not provided.
                        example: 123 Main St
                      address_line_2:
                        type:
                          - string
                          - 'null'
                        description: Secondary address line.
                        example: Apt 4B
                      postal_code:
                        type:
                          - string
                          - 'null'
                        description: Postal code of the customer. Required for new customers.
                      country_id:
                        type: integer
                        description: Country ID of the customer. Required for new customers.
                        example: 1
                      email:
                        type: string
                        format: email
                        description: Email address of the customer.
                        example: johndoe@example.com
                      contact_code:
                        type:
                          - string
                          - 'null'
                        description: Country code of the customer's phone number.<br/> This is only required when saving contact to address book(save_to_address_book = true)
                        example: '+1'
                      contact_number:
                        type:
                          - string
                          - 'null'
                        description: Contact phone number of the customer.<br/> This is only required when saving contact to address book(save_to_address_book = true)
                        example: +1 234 567 8901
                      note:
                        type:
                          - string
                          - 'null'
                        description: Additional note for the driver regarding this stop.
                        example: Leave at front door
                      save_to_address_book:
                        type: boolean
                        description: If true, saves new customer details to the address book.
                        example: true
                      todos:
                        description: You can add todos to each stop. These are separate from the items.todos and can be used in conjunction or separately.
                        type: array
                        items:
                          type: object
                          required:
                            - todo_type_id
                          properties:
                            todo_type_id:
                              $ref: '#/components/schemas/stop-todo-type-id'
                            description:
                              type: string
                              description: Provides a custom title or additional instructions for the todo task.<br/> This can include specific details on how the task should be carried out, such as the angle of the photo or particular details to capture in the signature.
                      delivery_window:
                        type: array
                        description: Delivery time windows for the stop. Pass an empty array if there are no specific windows.
                        items:
                          type: object
                          required:
                            - time_from
                            - time_to
                          properties:
                            time_from:
                              type: string
                              example: 10:00:00+08:00
                              description: Time with timezone. Must be before time_to
                            time_to:
                              type: string
                              example: 12:00:00+08:00
                              description: Time with timezone. Must be after time_from
                      duration:
                        type:
                          - integer
                          - 'null'
                        minimum: 1
                        default: 5
                        description: Duration of the stop in minutes. it is nullable and default will be 5 minutes.
                        example: 15
                subuser_id:
                  anyOf:
                    - $ref: '#/components/schemas/uuid'
                    - type: 'null'
                  description: Subuser ID
                  example: 72856440-1047-11ec-a6d3-a4bf016cd6b2
                labels:
                  type: array
                  description: Labels for the job
                  items:
                    type: string
                allowed_to_start_at:
                  anyOf:
                    - $ref: '#/components/schemas/date'
                    - type: 'null'
                  example: '2021-09-18 12:30:00'
                  description: Allowed to start timestamp
                send_to_driver_at:
                  anyOf:
                    - $ref: '#/components/schemas/date'
                    - type: 'null'
                  example: '2021-09-18 12:30:00'
                  description: Send to driver timestamp
                special_equipment:
                  type: array
                  items:
                    type: integer
                  description: Add equipment IDs to the delivery job.
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    allOf:
                      - $ref: '#/components/schemas/delivery-job-base'
                      - type: object
                        properties:
                          driver:
                            anyOf:
                              - $ref: '#/components/schemas/delivery-driver'
                              - type: 'null'
                            description: Driver details
                          stops:
                            type: array
                            description: Stops of this job
                            items:
                              allOf:
                                - $ref: '#/components/schemas/delivery-stops'
                                - type: object
                                  properties:
                                    activity_started_coordinates:
                                      allOf:
                                        - type: object
                                          properties:
                                            latitude:
                                              type: number
                                              format: float
                                              description: Stop started activity latitude
                                            longitude:
                                              type: number
                                              format: float
                                              description: Stop started activity longitude
                                        - type: 'null'
                                      description: The Stop started activity coordinates
                                    activity_arrived_coordinates:
                                      allOf:
                                        - type: object
                                          properties:
                                            latitude:
                                              type: number
                                              format: float
                                              description: Stop arrived activity latitude
                                            longitude:
                                              type: number
                                              format: float
                                              description: Stop arrived activity longitude
                                        - type: 'null'
                                      description: The Stop arrived activity coordinates
                                    activity_completed_coordinates:
                                      allOf:
                                        - type: object
                                          properties:
                                            latitude:
                                              type: number
                                              format: float
                                              description: Stop completed activity latitude
                                            longitude:
                                              type: number
                                              format: float
                                              description: Stop completed activity longitude
                                        - type: 'null'
                                      description: The Stop completed activity coordinates
                                    activity_rejected_coordinates:
                                      allOf:
                                        - type: object
                                          properties:
                                            latitude:
                                              type: number
                                              format: float
                                              description: Stop rejected activity latitude
                                            longitude:
                                              type: number
                                              format: float
                                              description: Stop rejected activity longitude
                                        - type: 'null'
                                      description: The Stop rejected activity coordinates
                                    has_custom_priority:
                                      type: boolean
                                      description: The flag to determine custom priority
                          items:
                            type: array
                            description: Items of this job
                            items:
                              $ref: '#/components/schemas/delivery-job-item'
                          labels:
                            type: array
                            description: Labels for the job
                            items:
                              type: string
                          special_equipment:
                            $ref: '#/components/schemas/special-equipment'
                            description: Special equipment required for the job
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    delete:
      tags:
        - Delivery Jobs
      summary: Delete a Delivery Job
      description: Deletes a specified delivery job.
      parameters:
        - name: job_id
          in: path
          required: true
          schema:
            type: integer
            example: 123
          description: Unique identifier of the job to be deleted
        - name: force
          in: query
          required: false
          schema:
            type: boolean
            example: true
          description: The force flag enables the forced deletion of a job. <br/> <b>Warning</b>- This action will delete the job and remove it from the driver's app, even if the job has already been assigned to a driver.
        - name: title
          in: query
          required: false
          schema:
            type: string
            maxLength: 40
            default: Job force deleted
          description: The custom title for the job deletion. If not provided, a default title will be used.
        - name: body
          in: query
          required: false
          schema:
            type: string
            maxLength: 240
            default: 1 job has been force deleted
          description: The custom body for the job deletion. If not provided, a default body will be used.
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    example: {}
                  meta:
                    type: object
                    properties:
                      message:
                        type: string
                        example: Successfully deleted job.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /delivery/optimize/routes:
    post:
      tags:
        - Delivery Jobs
      summary: Delivery Jobs Optimization
      description: This endpoint assigns delivery jobs to available drivers based on selected optimization constraints. <br/> The system intelligently matches jobs to drivers to improve delivery efficiency while considering rules such as time windows and equipment needs.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              description: A JSON payload containing the data required to optimize delivery jobs
              required:
                - job_ids
                - driver_ids
              properties:
                job_ids:
                  type: array
                  items:
                    type: integer
                    example: 123
                  description: Array of job IDs to be optimized
                driver_ids:
                  type: array
                  items:
                    $ref: '#/components/schemas/delivery-driver-id'
                  description: Array of driver IDs available for assignment
                enable_capacity_constraints:
                  type:
                    - boolean
                    - 'null'
                  description: Whether to enable capacity constraints.
                  default: true
                enable_time_window_constraints:
                  type:
                    - boolean
                    - 'null'
                  description: Whether to enable time window constraints.
                  default: true
                enable_equipment_constraints:
                  type:
                    - boolean
                    - 'null'
                  description: Whether to enable equipment constraints.
                  default: true
                version:
                  type:
                    - string
                    - 'null'
                  description: The version of the optimization algorithm model to use. Default is v1 if not specified.
                  example: v1
                  default: v1
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        driver_assignments:
                          type: array
                          items:
                            type: object
                            properties:
                              driver_id:
                                $ref: '#/components/schemas/delivery-driver-id'
                                description: The ID of the driver assigned to the job.
                              job_ids:
                                type: array
                                items:
                                  type: integer
                                description: The IDs of the jobs the driver is assigned to.
                        excluded_job_ids:
                          type:
                            - array
                            - 'null'
                          items:
                            type: integer
                          description: The IDs of the jobs excluded from the optimization.
                        reference:
                          type: string
                          description: A reference ID for the optimization request.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /delivery/jobs/assign/{driver_id}:
    put:
      tags:
        - Delivery Jobs
      summary: Reassign Jobs to a Delivery Driver
      description: Reassigns specified jobs to a different delivery driver.
      parameters:
        - name: driver_id
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/uuid'
            example: f3a42187-0c6e-11ec-aa41-a4bf016cd6b2
          description: Provide either <strong>delivery_driver_id</strong> (a unique UUID) or <strong>delivery_driver_name</strong> (case-insensitive exact match on "first_name last_name").<br/> <br/>driver_name must be unique in your driver pool, assignment fails if duplicates exist.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                job_ids:
                  type: array
                  description: Array of job IDs to be reassigned
                  items:
                    type: integer
                    example: 61
                  example:
                    - 61
                    - 22
                    - 358
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    example: {}
                  meta:
                    type: object
                    properties:
                      message:
                        type: string
                        example: Successfully assigned jobs to the driver.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /delivery/plans:
    post:
      tags:
        - Delivery Plans
      summary: Create Delivery Plan
      description: This endpoint creates a new delivery plan.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - name
              properties:
                name:
                  type: string
                  example: 'Delivery Plan #0701'
                  description: The name of the delivery plan.
                  maxLength: 200
                delivery_driver_id:
                  allOf:
                    - $ref: '#/components/schemas/delivery-driver-id'
                    - x-nullable: true
                    - description: The ID of the delivery driver to assign to the plan.
                    - example: 7489ff44-xxxx-11eb-xxxx-005056a801ca
                scheduled_delivery_ts:
                  allOf:
                    - $ref: '#/components/schemas/date'
                    - type: 'null'
                  description: The date and time of the scheduled delivery.
                  example: '2025-07-01 12:00:00'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                required:
                  - plan_id
                  - name
                properties:
                  plan_id:
                    allOf:
                      - $ref: '#/components/schemas/plan-id'
                      - description: The ID of the delivery plan.
                      - example: 12345
                  name:
                    type: string
                    description: The name of the delivery plan.
                    example: 'Delivery Plan #0701'
                  delivery_driver_id:
                    allOf:
                      - $ref: '#/components/schemas/delivery-driver-id'
                      - x-nullable: true
                      - description: The ID of the delivery driver to assign to the plan.
                      - example: 7489ff44-xxxx-11eb-xxxx-005056a801ca
                  scheduled_delivery_ts:
                    allOf:
                      - $ref: '#/components/schemas/date'
                      - type: 'null'
                    description: The date and time of the scheduled delivery.
                    example: '2025-07-01 12:00:00'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /delivery/plans/{plan_id}:
    delete:
      tags:
        - Delivery Plans
      summary: Delete Delivery Plan
      description: This endpoint deletes a delivery plan.
      parameters:
        - name: plan_id
          in: path
          description: The ID of the delivery plan to delete.
          required: true
          schema:
            $ref: '#/components/schemas/plan-id'
            example: 12345
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      message:
                        type: string
                        example: Successfully deleted delivery plan.
                        description: Success message
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /delivery/reports/drivers:
    get:
      tags:
        - Delivery Reports
      summary: Generate Delivery Drivers Report
      description: This endpoint retrieves reporting data related to delivery drivers.
      parameters:
        - name: filter[date_from_ts]
          in: query
          description: Filter starting timestamp range of the driver report date.
          required: true
          schema:
            $ref: '#/components/schemas/date'
            example: '2024-12-01 00:00:00'
        - name: filter[date_to_ts]
          in: query
          description: Filter end timestamp range of the driver report date.
          required: true
          schema:
            $ref: '#/components/schemas/date'
            example: '2024-12-31 23:59:59'
        - name: filter[driver_id]
          in: query
          description: Optional filter to retrieve drivers by their ID.
          required: false
          schema:
            allOf:
              - $ref: '#/components/schemas/uuid'
              - example: 06333436-6fe9-11ef-98f4-f241fc6d518a
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      description: Driver report data
                      properties:
                        driver:
                          type: object
                          description: The driver related information
                          properties:
                            delivery_driver_id:
                              $ref: '#/components/schemas/delivery-driver-id'
                            first_name:
                              type:
                                - string
                                - 'null'
                              example: John
                              description: The driver's first name
                            last_name:
                              type:
                                - string
                                - 'null'
                              example: Doe
                              description: The driver's last name
                            phone:
                              allOf:
                                - $ref: '#/components/schemas/phone-number'
                                - type: 'null'
                              example: '6523423423'
                              description: The driver's phone number
                            email:
                              allOf:
                                - $ref: '#/components/schemas/email'
                                - type: 'null'
                              description: The driver's email address
                              example: john.doe@gmail.com
                            registration:
                              allOf:
                                - $ref: '#/components/schemas/registration'
                                - type: 'null'
                              description: The vehicle name added by the dispatcher during driver creation in the delivery web interface.
                              example: Honda Civic
                            device_name:
                              type:
                                - string
                                - 'null'
                              example: Iphone 16 Pro Max
                              description: The device name used by the driver
                        travel_time_minutes:
                          type: object
                          description: The travel time related information
                          properties:
                            actual:
                              type:
                                - number
                                - 'null'
                              example: 120
                              description: The driver's actual travel time in minutes
                            planned:
                              type:
                                - number
                                - 'null'
                              example: 60
                              description: The driver's planned travel time in minutes
                        travel_distance_meters:
                          type: object
                          description: The travel distance related information
                          properties:
                            actual:
                              type:
                                - number
                                - 'null'
                              example: 120
                              description: The driver's actual travel distance in meters
                            planned:
                              type:
                                - number
                                - 'null'
                              example: 120
                              description: The driver's planned travel distance in meters
                        duration_time_minutes:
                          type:
                            - number
                            - 'null'
                          example: 60
                          description: The total time taken for the stops to be completed, accounting for the duration of each stop from start time to end time over the given period.
                        total_jobs_completed:
                          type:
                            - number
                            - 'null'
                          example: 10
                          description: The total number of jobs completed by the driver
                        total_stops_completed:
                          type:
                            - number
                            - 'null'
                          example: 20
                          description: The total number of stops completed along with the jobs by the driver
                        total_stops:
                          type:
                            - number
                            - 'null'
                          example: 10
                          description: The total number of stops assigned to the driver
                        start_route_ts:
                          allOf:
                            - $ref: '#/components/schemas/timestamp-with-offset'
                            - type: 'null'
                          description: The timestamp with timezone when the driver's route was started
                          example: '2024-12-09 10:08:12+07:00'
                        end_route_ts:
                          allOf:
                            - $ref: '#/components/schemas/timestamp-with-offset'
                            - type: 'null'
                          description: The timestamp with timezone when the driver's route was completed
                          example: '2024-12-09 11:28:11+07:00'
                  meta:
                    $ref: '#/components/schemas/pagination'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /delivery/equipment:
    get:
      summary: Get delivery special equipment
      tags:
        - Delivery Special Equipment
      parameters:
        - name: filter[equipment_id]
          in: query
          description: Filter by equipment ID
          required: false
          schema:
            $ref: '#/components/schemas/equipment-id'
            example: 10
        - name: filter[equipment_name]
          in: query
          description: Filter by equipment name
          required: false
          schema:
            $ref: '#/components/schemas/equipment-name'
            example: Pallet Jack
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          description: Special equipment list retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        equipment_id:
                          anyOf:
                            - $ref: '#/components/schemas/equipment-id'
                            - type: 'null'
                        equipment_name:
                          anyOf:
                            - $ref: '#/components/schemas/equipment-name'
                            - type: 'null'
                  meta:
                    $ref: '#/components/schemas/pagination'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /drivers:
    get:
      summary: Get All Drivers
      description: This endpoint gets all/filtered list of the drivers
      tags:
        - Drivers
      parameters:
        - $ref: '#/components/parameters/driver_id'
        - $ref: '#/components/parameters/first_name'
        - $ref: '#/components/parameters/last_name'
        - $ref: '#/components/parameters/email'
        - $ref: '#/components/parameters/id_number'
        - $ref: '#/components/parameters/phone_number'
        - $ref: '#/components/parameters/gender'
        - $ref: '#/components/parameters/license_number'
        - $ref: '#/components/parameters/license_issued_country'
        - $ref: '#/components/parameters/license_driver_restrictions'
        - $ref: '#/components/parameters/license_points'
        - $ref: '#/components/parameters/license_first_issue_date'
        - $ref: '#/components/parameters/license_valid_start'
        - $ref: '#/components/parameters/license_valid_end'
        - $ref: '#/components/parameters/driver_status'
        - $ref: '#/components/parameters/employee_number'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/driver'
                  meta:
                    $ref: '#/components/schemas/pagination'
            application/xml:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/driver'
                  meta:
                    $ref: '#/components/schemas/pagination'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    post:
      summary: Add Driver
      description: This endpoint creates a driver with status Active
      tags:
        - Drivers
      requestBody:
        description: The json data that needs to be processed
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/driver-create-request'
      responses:
        '200':
          description: Driver created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/driver'
            application/xml:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/driver'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /drivers/{driver_id}:
    get:
      summary: Get Driver
      description: This endpoint gets the driver details
      tags:
        - Drivers
      parameters:
        - name: driver_id
          in: path
          description: The driver_id you want to get
          required: true
          schema:
            $ref: '#/components/schemas/uuid'
            example: 06333436-6fe9-11ef-98f4-f241fc6d518a
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/driver'
            application/xml:
              schema:
                $ref: '#/components/schemas/driver'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    put:
      summary: Update Driver
      description: This endpoint updates the driver's details
      tags:
        - Drivers
      parameters:
        - name: driver_id
          in: path
          description: The driver_id you want to update
          required: true
          schema:
            $ref: '#/components/schemas/uuid'
            example: 06333436-6fe9-11ef-98f4-f241fc6d518a
      requestBody:
        description: The json data that needs to be processed
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/driver-update-request'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/driver'
            application/xml:
              schema:
                $ref: '#/components/schemas/driver'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /drivers/status/history:
    get:
      summary: Get Driver Status History
      description: Returns a list of driver status periods. Each record includes driver_id, active_from, and active_to. If the driver is currently active, active_to will be null.
      tags:
        - Drivers
      parameters:
        - $ref: '#/components/parameters/driver_id'
        - $ref: '#/components/parameters/active_from'
          description: Filter by driver active start date. Must be in the format of YYYY-MM-DD HH:MM:SS
        - $ref: '#/components/parameters/active_to'
          description: Filter by driver active end date. Must be in the format of YYYY-MM-DD HH:MM:SS
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      required:
                        - driver_id
                        - active_from
                      properties:
                        driver_id:
                          $ref: '#/components/schemas/uuid'
                          description: The driver's unique identifier
                        active_from:
                          $ref: '#/components/schemas/timestamp'
                          description: The timestamp indicating when the driver became active.
                        active_to:
                          $ref: '#/components/schemas/timestamp'
                          description: The timestamp indicating when the driver's active period ended.
                  meta:
                    $ref: '#/components/schemas/pagination'
            application/xml:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      required:
                        - driver_id
                        - active_from
                      properties:
                        driver_id:
                          $ref: '#/components/schemas/uuid'
                          description: The driver's unique identifier
                        active_from:
                          $ref: '#/components/schemas/timestamp'
                          description: The timestamp indicating when the driver became active.
                        active_to:
                          $ref: '#/components/schemas/timestamp'
                          description: The timestamp indicating when the driver's active period ended.
                  meta:
                    $ref: '#/components/schemas/pagination'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /drivers/tags/events:
    get:
      summary: Get Driver Tags Events
      description: This endpoint retrieves driver tagging events with timestamp filtering and audit capabilities
      tags:
        - Drivers
      parameters:
        - $ref: '#/components/parameters/start_timestamp'
          description: This will return trips from this date and time
          required: true
        - $ref: '#/components/parameters/end_timestamp'
          description: This will return trips to this date and time<br/> <br/> The lookup period is of <strong>maximum 31 days</strong> between the start_timestamp and the end_timestamp
          required: true
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        event_ts:
                          $ref: '#/components/schemas/date'
                          description: The date and time of the event
                        identification_tag_id:
                          type: string
                          example: ABDE234235FGRE
                          description: The identification tag id
                        driver_id:
                          oneOf:
                            - $ref: '#/components/schemas/uuid'
                              description: The driver's unique identifier
                            - type: 'null'
                          description: The driver's unique identifier
                        driver_tag_description:
                          type:
                            - string
                            - 'null'
                          example: ABDE234235FGRE
                          description: The description of the driver tag
                        vehicle_id:
                          $ref: '#/components/schemas/vehicle-id'
                        registration:
                          $ref: '#/components/schemas/registration'
                        terminal_id:
                          $ref: '#/components/schemas/terminal-id'
                        terminal_serial:
                          $ref: '#/components/schemas/terminal-serial'
                  meta:
                    $ref: '#/components/schemas/pagination'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /fitments:
    get:
      summary: Get all fitments
      description: This endpoints returns the latest fitments or repairs of a Cartrack tracker/digital video recorder, using this endpoint.
      tags:
        - Fitments
      parameters:
        - name: start_date
          in: query
          description: This will return fitments that happened after this date and time
          required: true
          schema:
            $ref: '#/components/schemas/date'
            example: '2023-01-01 12:00:00'
        - name: end_date
          in: query
          description: This will return fitments that happened before this date and time
          required: true
          schema:
            $ref: '#/components/schemas/date'
            example: '2023-01-01 12:00:00'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: This array returns the list of fitments or repairs
                    items:
                      type: object
                      properties:
                        vehicle_id:
                          $ref: '#/components/schemas/vehicle-id'
                        registration:
                          $ref: '#/components/schemas/registration'
                        chassis_number:
                          $ref: '#/components/schemas/chassis-number'
                        terminal_id:
                          $ref: '#/components/schemas/terminal-id'
                        terminal_serial:
                          $ref: '#/components/schemas/terminal-serial'
                        fitment_date:
                          $ref: '#/components/schemas/date'
                          description: The date and time of the fitment or repair
                  meta:
                    $ref: '#/components/schemas/pagination'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /fuel/consumed/{registration}:
    get:
      summary: Get a vehicle's fuel consumed sensor data
      tags:
        - Fuel
      parameters:
        - name: registration
          in: path
          description: The vehicle's license plate
          required: true
          schema:
            $ref: '#/components/schemas/registration'
            example: ABC1234
        - name: start_timestamp
          in: query
          description: This will return the fuel consumption between the start and end timestamp
          required: true
          schema:
            $ref: '#/components/schemas/date'
            example: '2024-06-01 00:00:00'
            description: Start timestamp for the fuel data query
        - name: end_timestamp
          in: query
          description: This will return the fuel consumption between the start and end timestamp.<br/><br/> The lookup period is of <strong>maximum 31 days</strong> between the start_timestamp and the end_timestamp
          required: true
          schema:
            $ref: '#/components/schemas/date'
            example: '2024-06-30 23:59:59'
            description: End timestamp for the fuel data query
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      vehicle_id:
                        $ref: '#/components/schemas/vehicle-id'
                      registration:
                        $ref: '#/components/schemas/registration'
                      fuel_consumed_start:
                        type: integer
                        description: The fuel consumed as reported at the start of the period
                        example: 15859
                      fuel_consumed_end:
                        type: integer
                        description: The fuel consumed as reported at the end of the period
                        example: 15903
                      fuel_consumed:
                        type: integer
                        description: Total consumption of the vehicle, in liters
                        example: 44
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /fuel/consumed:
    post:
      summary: Retrieve fuel consumed sensor data for multiple vehicles
      tags:
        - Fuel
      description: 'This endpoint allows you to retrieve vehicle fuel consumption for a give period. The vehicles must have the fuel consumed sensor (sensor type id 20) and Cartrack telematic device must be connected to the CAN bus. It returns the value in litres (coefficient applied). Reported events for up to 100 vehicles per request within your fleet, at the start and at the end of a given period with a maximum time range of 31 days.<br/><br/> <strong>Note</strong>: This endpoint is subject to a rate limit, allowing a maximum of 10 request per minute.'
      requestBody:
        description: The json data that needs to be processed
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - registrations
                - start_timestamp
                - end_timestamp
              properties:
                registrations:
                  type: array
                  items:
                    $ref: '#/components/schemas/registrations'
                  example:
                    - ABC1234X
                    - DEF5678X
                  description: Array of vehicle registrations
                  maxItems: 100
                start_timestamp:
                  $ref: '#/components/schemas/date'
                  description: This will return the remaining range between the start and end timestamp
                end_timestamp:
                  $ref: '#/components/schemas/date'
                  description: This will return the remaining range between the start and end timestamp.<br/><br/> The lookup period is of <strong>maximum 24 hours</strong> between the start_timestamp and the end_timestamp
                page:
                  $ref: '#/components/schemas/page'
                limit:
                  $ref: '#/components/schemas/limit'
                  maximum: 100
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        vehicle_id:
                          $ref: '#/components/schemas/vehicle-id'
                        registration:
                          $ref: '#/components/schemas/registration'
                        fuel_consumed_start:
                          type: integer
                          description: The fuel consumed as reported at the start of the period
                          example: 15859
                        fuel_consumed_end:
                          type: integer
                          description: The fuel consumed as reported at the end of the period
                          example: 15903
                        fuel_consumed:
                          type: integer
                          description: Total consumption of the vehicle, in liters
                          example: 44
                  meta:
                    $ref: '#/components/schemas/pagination'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /fuel/fills/{registration}:
    get:
      summary: Get fuel fills for a vehicle
      tags:
        - Fuel
      description: This endpoint retrieves a vehicles's fuel fills for a specified period, with a maximum duration of 31 days. The API requires the tracker to be configured to read the fuel sensor data. It returns the fuel fill values in liters (with coefficient applied).
      parameters:
        - name: registration
          in: path
          description: The vehicle's license plate
          required: true
          schema:
            $ref: '#/components/schemas/registration'
            example: ABC1234
        - name: start_timestamp
          in: query
          description: This will return the fuel consumption between the start and end timestamp
          required: true
          schema:
            $ref: '#/components/schemas/date'
            example: '2024-06-01 00:00:00'
        - name: end_timestamp
          in: query
          description: This will return the fuel consumption between the start and end timestamp.<br/><br/> The lookup period is of <strong>maximum 31 days</strong> between the start_timestamp and the end_timestamp
          required: true
          schema:
            $ref: '#/components/schemas/date'
            example: '2024-06-30 23:59:59'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: This array returns the list of fuel fills
                    items:
                      type: object
                      properties:
                        vehicle_id:
                          $ref: '#/components/schemas/vehicle-id'
                        registration:
                          $ref: '#/components/schemas/registration'
                        chassis_number:
                          $ref: '#/components/schemas/chassis-number'
                        vehicle_description:
                          type:
                            - string
                            - 'null'
                          description: Description of the vehicle (if available)
                          example: The Office vehicle
                        fill_amount_litres:
                          type: number
                          description: Total amount of fuel filled, measured in liters
                          example: 15.3
                        fill_timestamp:
                          $ref: '#/components/schemas/date'
                          description: Timestamp indicating when the fuel was filled
                        fill_odometer:
                          type: number
                          description: Odometer reading at the time of fuel fill-up, measured in kilometers
                          example: 44000.3
                        fill_location:
                          type: string
                          description: Location where the fuel was filled, including street, city, and country
                          example: Gas Station ABC, City, Country
                        latitude:
                          type: number
                          description: Latitude coordinates of the fill-up location
                          example: 3.12398
                        longitude:
                          type: number
                          description: Longitude coordinates of the fill-up location
                          example: 44.12378
                        accurate:
                          type: boolean
                          description: Whether the record is accurate or not. Records that are not accurate may be reprocessed as new data comes in and are subject to change.<br/> Typically, the most recent records tend to be marked as inaccurate until we receive more data.<br/> Hence, you'll most likely get inaccurate data when fetching the most recent fuel records of your vehicle.<br/> You may decide whether or not to collect inaccurate records, or wait for them to be marked as accurate.
                          example: true
                  meta:
                    $ref: '#/components/schemas/pagination'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /fuel/fills:
    get:
      summary: Get fuel fills for all vehicles
      tags:
        - Fuel
      description: This endpoint retrieves fuel fills for all vehicles within your fleet, with a maximum time range of 24 hours. The API requires the vehicles to have the fuel sensor data accessible by the tracker. It returns the fuel fill values in liters (with coefficient applied).
      parameters:
        - name: start_timestamp
          in: query
          description: This will return the fuel consumption between the start and end timestamp
          required: true
          schema:
            $ref: '#/components/schemas/date'
            example: '2024-06-01 00:00:00'
        - name: end_timestamp
          in: query
          description: This will return the fuel consumption between the start and end timestamp.<br/><br/> The lookup period is of <strong>maximum 24 hours</strong> between the start_timestamp and the end_timestamp
          required: true
          schema:
            $ref: '#/components/schemas/date'
            example: '2024-06-01 00:00:00'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: This array returns the list of fuel fills
                    items:
                      type: object
                      properties:
                        vehicle_id:
                          $ref: '#/components/schemas/vehicle-id'
                        registration:
                          $ref: '#/components/schemas/registration'
                        chassis_number:
                          $ref: '#/components/schemas/chassis-number'
                        vehicle_description:
                          type:
                            - string
                            - 'null'
                          description: Description of the vehicle (if available)
                          example: The Office vehicle
                        fill_amount_litres:
                          type: number
                          description: Total amount of fuel filled, measured in liters
                          example: 15.3
                        fill_timestamp:
                          $ref: '#/components/schemas/date'
                          description: Timestamp indicating when the fuel was filled
                        fill_odometer:
                          type: number
                          description: Odometer reading at the time of fuel fill-up, measured in kilometers
                          example: 44000.3
                        fill_location:
                          type: string
                          description: Location where the fuel was filled, including street, city, and country
                          example: Gas Station ABC, City, Country
                        latitude:
                          type: number
                          description: Latitude coordinates of the fill-up location
                          example: 3.12398
                        longitude:
                          type: number
                          description: Longitude coordinates of the fill-up location
                          example: 44.12378
                        accurate:
                          type: boolean
                          description: Whether the record is accurate or not. Records that are not accurate may be reprocessed as new data comes in and are subject to change.<br/> Typically, the most recent records tend to be marked as inaccurate until we receive more data.<br/> Hence, you'll most likely get inaccurate data when fetching the most recent fuel records of your vehicle.<br/> You may decide whether or not to collect inaccurate records, or wait for them to be marked as accurate.
                          example: true
                  meta:
                    $ref: '#/components/schemas/pagination'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /fuel/level/{registration}:
    get:
      summary: Get fuel used estimate for a vehicle
      tags:
        - Fuel
      description: This endpoint allows you to retrieve the fuel level for a specific vehicle, at the start and at the end of a given period. To use this API, your vehicle must be configured to read the fuel sensor data. The fuel level data is returned in liters with a coefficient applied. Our algorithm also give you the estimated fuel used over the period.
      parameters:
        - name: registration
          in: path
          description: The vehicle's license plate
          required: true
          schema:
            $ref: '#/components/schemas/registration'
            example: ABC1234
        - name: start_timestamp
          in: query
          description: This will return the fuel level between the start and end timestamp
          required: true
          schema:
            $ref: '#/components/schemas/date'
            example: '2024-06-01 00:00:00'
        - name: end_timestamp
          in: query
          description: This will return the fuel level between the start and end timestamp.<br/><br/> The lookup period is of <strong>maximum 31 days</strong> between the start_timestamp and the end_timestamp
          required: true
          schema:
            $ref: '#/components/schemas/date'
            example: '2024-06-30 23:59:59'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      vehicle_id:
                        $ref: '#/components/schemas/vehicle-id'
                      registration:
                        $ref: '#/components/schemas/registration'
                      start_period:
                        type: object
                        description: Details of the fuel tank level at the start of the period.
                        properties:
                          liters:
                            type:
                              - number
                              - 'null'
                            example: 37.68
                            description: The amount of fuel in the tank at the start of the period, measured in liters.
                          timestamp:
                            oneOf:
                              - $ref: '#/components/schemas/date'
                              - type: 'null'
                          accurate:
                            type:
                              - boolean
                              - 'null'
                            example: false
                            description: Indicates whether the reported fuel level is accurate. Records that are not accurate may be reprocessed as new data comes in and are subject to change. Typically, the most recent records tend to be marked as inaccurate until we receive more data. Hence, you'll most likely get inaccurate data when fetching the most recent fuel records of your vehicle.
                      end_period:
                        type: object
                        description: Details of the fuel tank level at the end of the period.
                        properties:
                          liters:
                            type:
                              - number
                              - 'null'
                            example: 30.18
                            description: The amount of fuel in the tank at the end of the period, measured in liters.
                          timestamp:
                            anyOf:
                              - $ref: '#/components/schemas/date'
                              - type: 'null'
                          accurate:
                            type:
                              - boolean
                              - 'null'
                            example: false
                            description: Indicates whether the reported fuel level is accurate. Records that are not accurate may be reprocessed as new data comes in and are subject to change. Typically, the most recent records tend to be marked as inaccurate until we receive more data. Hence, you'll most likely get inaccurate data when fetching the most recent fuel records of your vehicle.
                      estimated_fuel_used:
                        type:
                          - number
                          - 'null'
                        description: The estimated fuel used is calculated by our algorithm based on the different fuel data points received over the period.
                        example: 7.5
                      calibrated:
                        type: boolean
                        description: Indicates whether the vehicle's fuel sensor is calibrated. Calibration is essential to ensure accurate fuel measurement. Uncalibrated sensors will not provide results.
                        example: true
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /fuel/level:
    post:
      summary: Retrieve fuel used estimate for multiple vehicles
      tags:
        - Fuel
      description: 'This endpoint allows you to retrieve the fuel level for up to 100 vehicles per request within your fleet, at the start and at the end of a given period with a maximum time range of 24 hours. To use this API, your vehicle must be configured to read the fuel sensor data. The fuel level data is returned in liters with a coefficient applied. Our algorithm also give you the estimated fuel used over the period.<br/><br/> <strong>Note</strong>: This endpoint is subject to a rate limit, allowing a maximum of 10 request per minute.'
      requestBody:
        description: The json data that needs to be processed
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - registrations
                - start_timestamp
                - end_timestamp
              properties:
                registrations:
                  type: array
                  items:
                    $ref: '#/components/schemas/registrations'
                  example:
                    - ABC1234X
                    - DEF5678X
                  description: Array of vehicle registrations
                  maxItems: 100
                start_timestamp:
                  $ref: '#/components/schemas/date'
                  description: This will return the fuel level between the start and end timestamp
                end_timestamp:
                  $ref: '#/components/schemas/date'
                  description: This will return the fuel level between the start and end timestamp.<br/><br/> The lookup period is of <strong>maximum 24 hours</strong> between the start_timestamp and the end_timestamp
                page:
                  $ref: '#/components/schemas/page'
                limit:
                  $ref: '#/components/schemas/limit'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        vehicle_id:
                          $ref: '#/components/schemas/vehicle-id'
                        registration:
                          $ref: '#/components/schemas/registration'
                        start_period:
                          type: object
                          description: Details of the fuel tank level at the start of the period.
                          properties:
                            liters:
                              type:
                                - number
                                - 'null'
                              example: 37.68
                              description: The amount of fuel in the tank at the start of the period, measured in liters.
                            timestamp:
                              oneOf:
                                - $ref: '#/components/schemas/date'
                                - type: 'null'
                            accurate:
                              type:
                                - boolean
                                - 'null'
                              example: false
                              description: Indicates whether the reported fuel level is accurate. Records that are not accurate may be reprocessed as new data comes in and are subject to change. Typically, the most recent records tend to be marked as inaccurate until we receive more data. Hence, you'll most likely get inaccurate data when fetching the most recent fuel records of your vehicle.
                        end_period:
                          type: object
                          description: Details of the fuel tank level at the end of the period.
                          properties:
                            liters:
                              type:
                                - number
                                - 'null'
                              example: 30.18
                              description: The amount of fuel in the tank at the end of the period, measured in liters.
                            timestamp:
                              anyOf:
                                - $ref: '#/components/schemas/date'
                                - type: 'null'
                            accurate:
                              type:
                                - boolean
                                - 'null'
                              example: false
                              description: Indicates whether the reported fuel level is accurate. Records that are not accurate may be reprocessed as new data comes in and are subject to change. Typically, the most recent records tend to be marked as inaccurate until we receive more data. Hence, you'll most likely get inaccurate data when fetching the most recent fuel records of your vehicle.
                        estimated_fuel_used:
                          type:
                            - number
                            - 'null'
                          description: The estimated fuel used is calculated by our algorithm based on the different fuel data points received over the period.
                          example: 7.5
                        calibrated:
                          type: boolean
                          description: Indicates whether the vehicle's fuel sensor is calibrated. Calibration is essential to ensure accurate fuel measurement. Uncalibrated sensors will not provide results.
                          example: true
                  meta:
                    $ref: '#/components/schemas/pagination'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /fuel/level/history/{registration}:
    get:
      summary: Get fuel level history for a vehicle
      tags:
        - Fuel
      description: This endpoint allows you to retrieve the fuel level history for a specific vehicle within a specified time frame. To use this API, your vehicle must be configured to real the fuel sensor data. The fuel level data is returned in liters with a coefficient applied. <strong>We strongly discourage you to use this API to estimate the fuel use.</strong>
      parameters:
        - name: registration
          in: path
          description: The vehicle's license plate
          required: true
          schema:
            $ref: '#/components/schemas/registration'
            example: ABC1234
        - name: start_timestamp
          in: query
          description: This will return the fuel level between the start and end timestamp
          required: true
          schema:
            $ref: '#/components/schemas/date'
            example: '2024-06-01 00:00:00'
        - name: end_timestamp
          in: query
          description: This will return the fuel level between the start and end timestamp.<br/><br/> The lookup period is of <strong>maximum 31 days</strong> between the start_timestamp and the end_timestamp
          required: true
          schema:
            $ref: '#/components/schemas/date'
            example: '2024-06-30 23:59:59'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        timestamp:
                          $ref: '#/components/schemas/date'
                          description: The date and time
                        fuel_level:
                          type: number
                          description: The fuel level in liters
                          example: 30.14
                        accurate:
                          type: boolean
                          description: Whether the record is accurate or not. Records that are not accurate may be reprocessed as new data comes in and are subject to change. Typically, the most recent records tend to be marked as inaccurate until we receive more data. Hence, you'll most likely get inaccurate data when fetching the most recent fuel records of your vehicle.
                          example: true
                  meta:
                    allOf:
                      - $ref: '#/components/schemas/pagination'
                      - type: object
                        properties:
                          calibrated:
                            type: boolean
                            example: true
                            description: The vehicle fuel calibrated
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /geofences/groups:
    get:
      summary: Retrieve Geofence Groups
      description: Fetches a list of all geofence groups, providing detailed information for each group.
      tags:
        - Geofence Groups
      parameters:
        - $ref: '#/components/parameters/filter_group_id'
          description: Filter by geofence group ID
        - $ref: '#/components/parameters/filter_geofence_id'
        - $ref: '#/components/parameters/filter_group_name'
        - name: filter[description]
          in: query
          description: Filter by group description, case insensitive, can be partial match
          required: false
          schema:
            type: string
          example: All active geofences
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        group_id:
                          $ref: '#/components/schemas/group-id'
                        name:
                          $ref: '#/components/schemas/group-name'
                        description:
                          $ref: '#/components/schemas/group-description'
                        subuser_id:
                          oneOf:
                            - $ref: '#/components/schemas/uuid'
                            - type: 'null'
                          description: The subuser_id associated to this newly created group
                        geofences:
                          type: array
                          items:
                            type: object
                            properties:
                              geofence_id:
                                $ref: '#/components/schemas/uuid'
                                description: The id of the geofence
                              name:
                                type: string
                                description: The name of the geofence
                  meta:
                    $ref: '#/components/schemas/pagination'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    post:
      summary: Create Geofence Group
      description: Creates a new geofence group, allowing for the grouping of multiple geofences under a single identifier.
      tags:
        - Geofence Groups
      requestBody:
        description: JSON payload containing the data required for creating a geofence group
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - name
              properties:
                name:
                  $ref: '#/components/schemas/group-name'
                  maxLength: 64
                description:
                  $ref: '#/components/schemas/group-description'
                  description: Add a description for this new geofence group
                subuser_id:
                  $ref: '#/components/schemas/uuid'
                  description: Add a subuser_id the group must be assigned to for a specific subuser
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      group_id:
                        $ref: '#/components/schemas/group-id'
                        description: The id of the newly created group
                      name:
                        $ref: '#/components/schemas/group-name'
                        description: The name of the newly created group
                      description:
                        $ref: '#/components/schemas/group-description'
                        description: The description of the newly created group
                      subuser_id:
                        $ref: '#/components/schemas/uuid'
                        description: The subuser_id associated to this newly created group
        '400':
          $ref: '#/components/responses/validation-error'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /geofences/groups/{group_id}:
    put:
      summary: Update Geofence Group
      description: Updates the details of an existing geofence group, identified by the group's unique ID.
      tags:
        - Geofence Groups
      parameters:
        - name: group_id
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/group-id'
            example: 1234
            description: The ID of the geofence group to update
      requestBody:
        required: true
        description: One or more of the parameters to be updated.
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  $ref: '#/components/schemas/group-name'
                  description: The updated name of the group
                  maxLength: 64
                description:
                  $ref: '#/components/schemas/group-description'
                  description: The updated description of the group
                  maxLength: 255
                subuser_id:
                  $ref: '#/components/schemas/uuid'
                  description: The updated subuser_id
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      group_id:
                        $ref: '#/components/schemas/group-id'
                        description: The id of the newly created group
                      name:
                        $ref: '#/components/schemas/group-name'
                        description: The name of the newly created group
                      description:
                        $ref: '#/components/schemas/group-description'
                        description: The description of the newly created group
                      subuser_id:
                        $ref: '#/components/schemas/uuid'
                        description: The subuser_id associated to this newly created group
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    delete:
      summary: Remove Geofence Group
      description: Removes an existing geofence group from the system, identified by the group's unique ID.
      tags:
        - Geofence Groups
      parameters:
        - name: group_id
          in: path
          description: The ID of the geofence group to delete
          required: true
          schema:
            $ref: '#/components/schemas/group-id'
            example: 1234
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    example: {}
                  meta:
                    type: object
                    properties:
                      message:
                        type: string
                        example: Successfully deleted the group.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /geofences/{geofence_id}/groups/{group_id}:
    put:
      summary: Assign Geofence to Group
      description: Associates a specific geofence with a designated geofence group, using the geofence's unique ID and the group's ID.
      tags:
        - Geofence Groups
      parameters:
        - name: geofence_id
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/uuid'
            example: 7489ff44-xxxx-11eb-xxxx-005056a801ca
            description: The geofence's ID
        - name: group_id
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/group-id'
            example: 1234
            description: The geofence group ID
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    example: {}
                  meta:
                    type: object
                    properties:
                      message:
                        type: string
                        example: Successfully added the geofence to the group.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    delete:
      summary: Remove Geofence from Group
      description: Removes a specified geofence from a designated group, identified by the geofence's unique ID and the group's ID.
      tags:
        - Geofence Groups
      parameters:
        - name: geofence_id
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/uuid'
            example: 7489ff44-xxxx-11eb-xxxx-005056a801ca
            description: The geofence's ID
        - name: group_id
          in: path
          description: The ID of the geofence group
          required: true
          schema:
            $ref: '#/components/schemas/group-id'
            example: 1234
            description: The geofence group ID
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    example: {}
                  meta:
                    type: object
                    properties:
                      message:
                        type: string
                        example: Successfully deleted the geofence from the group.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /geofences:
    get:
      summary: Retrieve All Geofences
      tags:
        - Geofences
      description: This endpoint retrieves a list of all geofences or a filtered subset, based on the provided query parameters.
      parameters:
        - name: filter[name]
          in: query
          description: Filter the geofences by name. Supports case-insensitive partial matching.
          required: false
          schema:
            type: string
          example: office
        - name: filter[description]
          in: query
          description: Filter the geofences by description. Supports case-insensitive partial matching.
          required: false
          schema:
            type: string
          example: home
        - $ref: '#/components/parameters/filter_subuser_id'
        - name: filter[position_description]
          in: query
          description: Filter the geofences by position description. Supports case-insensitive partial matching.
          required: false
          schema:
            type: string
          example: Example street
        - name: filter[colour]
          in: query
          description: Filter the geofences by colour. Supports case-insensitive partial matching.
          required: false
          schema:
            type: string
          example: '#ff52'
        - name: filter[hide_subusers]
          in: query
          description: Toggle between displaying only main user geofences or all. Set to true to hide subuser geofences.
          required: false
          schema:
            type: boolean
          example: true
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        geofence_id:
                          $ref: '#/components/schemas/geofence-id'
                        name:
                          type: string
                          description: The name of the geofence
                          example: Office
                        description:
                          type:
                            - string
                            - 'null'
                          description: The description of the geofence
                          example: Office building
                        colour:
                          type:
                            - string
                            - 'null'
                          description: The color of the geofence
                          example: '#ce5239'
                        polygon:
                          type: string
                          description: 'The polygon shape. You can refer to this tool here to generate coordinates in format : <a href="https://www.keene.edu/campus/maps/tool/">Generate Polygon Shape</a>. The Polygon must be of format POLYGON((<long1> <lat1>,<long2> <lat2>,<long1> <lat1>)) - Notice the POLYGON must start and end with the same coordinates to close the shape.'
                          example: POLYGON((28.039298057556 -26.142388292132,28.039877414703 -26.144584206976,28.040134906769, ... ))
                        position_description:
                          type:
                            - string
                            - 'null'
                          description: The position description of the geofence
                          example: Example street
                        subuser_id:
                          oneOf:
                            - $ref: '#/components/schemas/uuid'
                            - type: 'null'
                          description: The subuser id associated with this geofence
                          example: 72856440-1047-11ec-a6d3-a4bf016cd6b2
                        is_global:
                          type: boolean
                          description: Whether the geofence is applied to all vehicles or none.
                          example: false
                        create_ts:
                          $ref: '#/components/schemas/date'
                          description: The create timestamp
                        update_ts:
                          oneOf:
                            - $ref: '#/components/schemas/date'
                            - type: 'null'
                          description: The last update timestamp
                  meta:
                    $ref: '#/components/schemas/pagination'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    post:
      summary: Create a Geofence
      tags:
        - Geofences
      description: This endpoint is used for creating a new geofence by specifying its parameters.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              required:
                - polygon
                - circle
                - name
              type: object
              properties:
                polygon:
                  type: array
                  minItems: 3
                  description: If you do not need a complex geofence, you should use the circle property instead. Note that the POLYGON's first and last coordinates must be the same to form a closed shape. <strong>This property is only required if a circle property is not given.</strong>
                  items:
                    type: object
                    properties:
                      lat:
                        type: number
                        description: The latitude of the coordinate
                        example: 103.68629
                      lng:
                        type: number
                        description: The longitude of the coordinate
                        example: 1.37338
                circle:
                  type: object
                  description: If you need a simpler circular geofence instead of a more complex polygon shape, use this property. The circle will only require a radius (not a diameter), a latitude, and a longitude to create the geofence. <strong>This property is only required if a polygon property is not given.</strong>
                  required:
                    - radius
                    - longitude
                    - latitude
                  properties:
                    radius:
                      type: integer
                      maximum: 100000
                      description: Specifies the radius of your circular geofence. A radius of 500 meters will create a geofence with a diameter of 1 kilometer.
                      example: 5000
                    longitude:
                      type: number
                      description: Pinpoint the center of the circle.
                      example: 103.68629
                    latitude:
                      type: number
                      description: Pinpoint the center of the circle.
                      example: 1.37338
                name:
                  type: string
                  description: The name of the geofence
                  example: Parking
                  maxLength: 200
                description:
                  type:
                    - string
                    - 'null'
                  description: The description of the geofence
                  example: Supermarket parking lot
                  maxLength: 250
                colour:
                  type: string
                  description: The color of the geofence
                  default: '#666666'
                  enum:
                    - '#666666'
                    - '#ce5239'
                    - '#f47735'
                    - '#ffbd4d'
                    - '#b5d55e'
                    - '#5cae60'
                    - '#53b8c6'
                    - '#5390bc'
                    - '#a870bd'
                    - '#d66087'
                  example: '#ce5239'
                subuser_id:
                  $ref: '#/components/schemas/uuid'
                  description: The subuser id to associate with this geofence
                geofence_group_ids:
                  type: array
                  description: Add the geofence to specific geofence groups.
                  items:
                    type: integer
                    example: 1234
                vehicle_ids:
                  type: array
                  description: The vehicle IDs associated to the geofence.
                  items:
                    type: integer
                    example: 2341
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      geofence_id:
                        $ref: '#/components/schemas/geofence-id'
                      name:
                        type: string
                        description: The name of the geofence
                        example: Office
                      description:
                        type:
                          - string
                          - 'null'
                        description: The description of the geofence
                        example: Office building
                      colour:
                        type:
                          - string
                          - 'null'
                        description: The color of the geofence
                        example: '#ce5239'
                      polygon:
                        type: string
                        description: 'The polygon shape. You can refer to this tool here to generate coordinates in format : <a href="https://www.keene.edu/campus/maps/tool/">Generate Polygon Shape</a>. The Polygon must be of format POLYGON((<long1> <lat1>,<long2> <lat2>,<long1> <lat1>)) - Notice the POLYGON must start and end with the same coordinates to close the shape.'
                        example: POLYGON((28.039298057556 -26.142388292132,28.039877414703 -26.144584206976,28.040134906769, ... ))
                      position_description:
                        type:
                          - string
                          - 'null'
                        description: The position description of the geofence
                        example: Example street
                      subuser_id:
                        oneOf:
                          - $ref: '#/components/schemas/uuid'
                          - type: 'null'
                        description: The subuser id associated with this geofence
                        example: 72856440-1047-11ec-a6d3-a4bf016cd6b2
                      create_ts:
                        $ref: '#/components/schemas/date'
                        description: The create timestamp
                      update_ts:
                        oneOf:
                          - $ref: '#/components/schemas/date'
                          - type: 'null'
                        description: The last update timestamp
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /geofences/{geofence_id}:
    get:
      summary: Retrieve a Geofence
      tags:
        - Geofences
      description: This endpoint retrieves the details of a specific geofence using its unique ID.
      parameters:
        - name: geofence_id
          in: path
          required: true
          description: The geofence's ID
          schema:
            $ref: '#/components/schemas/geofence-id'
            example: 7489ff44-xxxx-11eb-xxxx-005056a801ca
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      geofence_id:
                        $ref: '#/components/schemas/geofence-id'
                      name:
                        type: string
                        description: The name of the geofence
                        example: Office
                      description:
                        type:
                          - string
                          - 'null'
                        description: The description of the geofence
                        example: Office building
                      colour:
                        type:
                          - string
                          - 'null'
                        description: The color of the geofence
                        example: '#ce5239'
                      polygon:
                        type: string
                        description: 'The polygon shape. You can refer to this tool here to generate coordinates in format : <a href="https://www.keene.edu/campus/maps/tool/">Generate Polygon Shape</a>. The Polygon must be of format POLYGON((<long1> <lat1>,<long2> <lat2>,<long1> <lat1>)) - Notice the POLYGON must start and end with the same coordinates to close the shape.'
                        example: POLYGON((28.039298057556 -26.142388292132,28.039877414703 -26.144584206976,28.040134906769, ... ))
                      position_description:
                        type:
                          - string
                          - 'null'
                        description: The position description of the geofence
                        example: Example street
                      subuser_id:
                        oneOf:
                          - $ref: '#/components/schemas/uuid'
                          - type: 'null'
                        description: The subuser id associated with this geofence
                        example: 72856440-1047-11ec-a6d3-a4bf016cd6b2
                      is_global:
                        type: boolean
                        description: Whether the geofence is applied to all vehicles or none.
                        example: false
                      create_ts:
                        $ref: '#/components/schemas/date'
                        description: The create timestamp
                      update_ts:
                        oneOf:
                          - $ref: '#/components/schemas/date'
                          - type: 'null'
                        description: The last update timestamp
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    put:
      summary: Update a Geofence
      tags:
        - Geofences
      description: This endpoint updates specific parameters of an existing geofence, identified by its unique ID.
      parameters:
        - name: geofence_id
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/geofence-id'
            example: 7489ff44-xxxx-11eb-xxxx-005056a801ca
          description: The unique identifier (UUID) of the geofence that is being updated.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                polygon:
                  type: array
                  minItems: 3
                  description: If you do not need a complex geofence, you should use the circle property instead. Note that the POLYGON's first and last coordinates must be the same to form a closed shape. <strong>This property is only required if a circle property is not given.</strong>
                  items:
                    type: object
                    properties:
                      lat:
                        type: number
                        description: The latitude of the coordinate
                        example: 103.68629
                      lng:
                        type: number
                        description: The longitude of the coordinate
                        example: 1.37338
                circle:
                  type: object
                  description: If you need a simpler circular geofence instead of a more complex polygon shape, use this property. The circle will only require a radius (not a diameter), a latitude, and a longitude to create the geofence.
                  required:
                    - radius
                    - longitude
                    - latitude
                  properties:
                    radius:
                      type: integer
                      maximum: 100000
                      description: Specifies the radius of your circular geofence. A radius of 500 meters will create a geofence with a diameter of 1 kilometer.
                      example: 5000
                    longitude:
                      type: number
                      description: Pinpoint the center of the circle.
                      example: 103.68629
                    latitude:
                      type: number
                      description: Pinpoint the center of the circle.
                      example: 1.37338
                name:
                  type: string
                  description: The name of the geofence
                  example: Parking
                  maxLength: 200
                description:
                  type:
                    - string
                    - 'null'
                  description: The description of the geofence
                  example: Supermarket parking lot
                  maxLength: 250
                colour:
                  type: string
                  description: The color of the geofence
                  default: '#666666'
                  enum:
                    - '#666666'
                    - '#ce5239'
                    - '#f47735'
                    - '#ffbd4d'
                    - '#b5d55e'
                    - '#5cae60'
                    - '#53b8c6'
                    - '#5390bc'
                    - '#a870bd'
                    - '#d66087'
                  example: '#ce5239'
                subuser_id:
                  $ref: '#/components/schemas/uuid'
                  description: The subuser id to associate with this geofence
                geofence_group_ids:
                  type: array
                  description: Add the geofence to specific geofence groups.
                  items:
                    type: integer
                    example: 1234
                vehicle_ids:
                  type: array
                  description: The vehicle IDs associated to the geofence.
                  items:
                    type: integer
                    example: 2341
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      geofence_id:
                        $ref: '#/components/schemas/geofence-id'
                      name:
                        type: string
                        description: The name of the geofence
                        example: Office
                      description:
                        type:
                          - string
                          - 'null'
                        description: The description of the geofence
                        example: Office building
                      colour:
                        type:
                          - string
                          - 'null'
                        description: The color of the geofence
                        example: '#ce5239'
                      polygon:
                        type: string
                        description: 'The polygon shape. You can refer to this tool here to generate coordinates in format : <a href="https://www.keene.edu/campus/maps/tool/">Generate Polygon Shape</a>. The Polygon must be of format POLYGON((<long1> <lat1>,<long2> <lat2>,<long1> <lat1>)) - Notice the POLYGON must start and end with the same coordinates to close the shape.'
                        example: POLYGON((28.039298057556 -26.142388292132,28.039877414703 -26.144584206976,28.040134906769, ... ))
                      position_description:
                        type:
                          - string
                          - 'null'
                        description: The position description of the geofence
                        example: Example street
                      subuser_id:
                        oneOf:
                          - $ref: '#/components/schemas/uuid'
                          - type: 'null'
                        description: The subuser id associated with this geofence
                        example: 72856440-1047-11ec-a6d3-a4bf016cd6b2
                      create_ts:
                        $ref: '#/components/schemas/date'
                        description: The create timestamp
                      update_ts:
                        oneOf:
                          - $ref: '#/components/schemas/date'
                          - type: 'null'
                        description: The last update timestamp
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    delete:
      summary: Delete a Geofence
      tags:
        - Geofences
      description: This endpoint deletes an existing geofence identified by its unique ID.
      parameters:
        - name: geofence_id
          in: path
          required: true
          description: The unique identifier (UUID) of the geofence to be deleted.
          schema:
            $ref: '#/components/schemas/geofence-id'
            example: 7489ff44-xxxx-11eb-xxxx-005056a801ca
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    example: {}
                    description: An empty object
                  meta:
                    type: object
                    description: This metadata will contain a message
                    properties:
                      message:
                        type: string
                        example: Successfully deleted the Geofence.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /geofences/visitors:
    get:
      summary: Retrieve All Geofence Visitors
      tags:
        - Geofences
      description: This endpoint retrieves a list of all visitors for all geofences, with support for pagination.
      parameters:
        - $ref: '#/components/parameters/page'
          description: Specify the page number of visitor results to retrieve.
        - $ref: '#/components/parameters/limit'
          description: Specify the number of visitor results to return per page.
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      required:
                        - geofence_id
                        - geofence_name
                        - vehicle_id
                        - registration
                      properties:
                        geofence_id:
                          $ref: '#/components/schemas/geofence-id'
                        geofence_name:
                          type: string
                          description: The name of the geofence
                          example: The Office
                        vehicle_id:
                          $ref: '#/components/schemas/vehicle-id'
                        registration:
                          oneOf:
                            - type: 'null'
                            - $ref: '#/components/schemas/registration'
                        chassis_number:
                          $ref: '#/components/schemas/chassis-number'
                  meta:
                    $ref: '#/components/schemas/pagination'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /geofences/visits:
    get:
      summary: Retrieve All Geofence Visits
      tags:
        - Geofences
      description: This endpoint retrieves a list of all visits for all geofences, with support for pagination.
      parameters:
        - $ref: '#/components/parameters/vehicle_id'
        - $ref: '#/components/parameters/registration'
        - $ref: '#/components/parameters/filter_geofence_id'
        - name: filter[geofence_name]
          in: query
          description: Filter based on geofence name.
          required: false
          schema:
            type: string
          example: Sample geofence name
        - name: filter[enter_timestamp]
          in: query
          description: Filter based on enter timestamp.<br/><br/> The lookup period is limited to a maximum of <strong>24 hours</strong> between enter_timestamp and exit_timestamp or the past 24 hours from the current time if exit_timestamp is not provided.
          required: true
          schema:
            $ref: '#/components/schemas/date'
          example: '2025-03-08 18:22:23'
        - name: filter[exit_timestamp]
          in: query
          description: Filter based on exit timestamp.<br/><br/> The lookup period is limited to a maximum of <strong>24 hours</strong> between enter_timestamp and exit_timestamp.
          required: false
          schema:
            $ref: '#/components/schemas/date'
          example: '2025-03-08 19:22:23'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      required:
                        - geofence_id
                        - geofence_name
                        - vehicle_id
                        - registration
                        - enter_timestamp
                        - exit_timestamp
                      properties:
                        geofence_id:
                          $ref: '#/components/schemas/geofence-id'
                        geofence_name:
                          type: string
                          description: The name of the geofence
                          example: The Office
                        vehicle_id:
                          $ref: '#/components/schemas/vehicle-id'
                        registration:
                          $ref: '#/components/schemas/registration'
                        enter_timestamp:
                          $ref: '#/components/schemas/date'
                          description: This will return the geofence visits range between the enter and exit timestamp
                        exit_timestamp:
                          $ref: '#/components/schemas/date'
                          description: This will return the geofence visits range between the enter and exit timestamp.<br/><br/> The lookup period is of <strong>maximum 24 hours</strong> between the enter_timestamp and the exit_timestamp
                  meta:
                    $ref: '#/components/schemas/pagination'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /geofences/vehicle/createAlert:
    post:
      summary: Create a Vehicle Geofence Alert
      tags:
        - Geofences
      description: This endpoint is designed for creating a geofence alert associated with a specific vehicle. It enables the monitoring of the vehicle's entry and exit at the defined geofence. Note that setting up a new geofence alert for a vehicle will automatically remove any previous geofence alerts for that vehicle. As such, only one geofence alert can be active for a vehicle at any given time. The entry and exit will be reported inside the GET /notifications API.
      requestBody:
        required: true
        description: A set of parameters necessary for setting up a vehicle geofence alert. This includes geofence details like the geographical coordinates, boundary radius, and the specific vehicle identifier to associate with the alert.
        content:
          application/json:
            schema:
              type: object
              required:
                - registration
                - latitude
                - longitude
              properties:
                registration:
                  $ref: '#/components/schemas/registration'
                  description: The license plate of the vehicle
                latitude:
                  type: number
                  description: The latitude coordinate of the geofence's center point, expressed as a decimal.
                  example: 1.37338
                longitude:
                  type: number
                  description: The longitude coordinate of the geofence's center point, expressed as a decimal.
                  example: 103.68629
                radius:
                  type: integer
                  description: Defines the radius of the geofence in meters, creating a circular boundary around the center point.
                  default: 500
      responses:
        '200':
          description: Alert created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: 'null'
                    example: null
                  meta:
                    type: object
                    properties:
                      message:
                        type: string
                        description: Success message
                        example: Successfully created vehicle geofence alert.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /geofences/{geofence_id}/visitors:
    get:
      summary: Retrieve Geofence Visitors by ID
      tags:
        - Geofences
      description: This endpoint retrieves all visitors for a specified geofence, identified by the geofence ID.
      parameters:
        - name: geofence_id
          in: path
          description: The unique identifier (UUID) of the geofence for which visitors are being retrieved.
          required: true
          schema:
            $ref: '#/components/schemas/geofence-id'
            example: 7489ff44-xxxx-11eb-xxxx-005056a801ca
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      required:
                        - geofence_id
                        - geofence_name
                        - vehicle_id
                        - registration
                      properties:
                        geofence_id:
                          $ref: '#/components/schemas/geofence-id'
                        geofence_name:
                          type: string
                          description: The name of the geofence
                          example: The Office
                        vehicle_id:
                          $ref: '#/components/schemas/vehicle-id'
                        registration:
                          $ref: '#/components/schemas/registration'
                        chassis_number:
                          $ref: '#/components/schemas/chassis-number'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /helpdesk/note:
    post:
      summary: Log a request
      tags:
        - Helpdesk
      description: This endpoint logs a request to the Cartrack helpdesk.
      requestBody:
        description: The json data that needs to be processed
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - note
              properties:
                note:
                  type: string
                  description: Issue description
                  example: SAMPLE TEXT
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    required:
                      - helpdesk_id
                    properties:
                      helpdesk_id:
                        type: integer
                        description: The id of the helpdesk request
                        example: 123457
                  meta:
                    type: object
                    properties:
                      message:
                        type: string
                        description: The response of the helpdesk request
                        example: Your helpdesk note has been received.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /vehicles/{registration}/risk:
    put:
      summary: Update a vehicle's risk
      tags:
        - Know the driver
      description: This endpoint updates the vehicle's risk.
      parameters:
        - name: registration
          in: path
          description: The license plate of the vehicle
          required: true
          schema:
            $ref: '#/components/schemas/registration'
            example: ABC1234X
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - finance_risk
              properties:
                finance_risk:
                  type: integer
                  description: Financial risk from 1 to 4, where 4 is the highest risk.
                  example: 3
                finance_hint:
                  type: string
                  description: Brief description of the update.
                  example: For endorsement
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      registration:
                        $ref: '#/components/schemas/registration'
                  meta:
                    type: object
                    properties:
                      message:
                        type: string
                        example: Successfully updated the risk of the vehicle.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /vehicles/risk:
    put:
      summary: Update multiple vehicle's risk.
      tags:
        - Know the driver
      description: This endpoint updates multiple vehicle's risk.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                type: object
                required:
                  - registration
                  - finance_risk
                properties:
                  registration:
                    $ref: '#/components/schemas/registration'
                  finance_risk:
                    type: integer
                    description: Financial risk from 1 to 4, where 4 is the highest risk.
                    example: 3
                  finance_hint:
                    type: string
                    description: Brief description of the update.
                    example: For endorsement
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      registrations:
                        type: array
                        items:
                          $ref: '#/components/schemas/registration'
                        example:
                          - ABC-12345
                          - ABC-456789
                  meta:
                    type: object
                    properties:
                      message:
                        type: string
                        example: Successfully updated the risk.
                      result:
                        type: object
                        properties:
                          success:
                            type: array
                            items:
                              type: string
                              example: ABC-12345
                          failure:
                            type: array
                            items:
                              type: string
                              example: ABC-456789
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /leads:
    post:
      summary: Create a lead policy
      tags:
        - Leads
      description: 'This endpoint creates a lead''s policy for the given user and vehicles. Please make sure you have user''s consent before posting the information.<br/><br/> Please note that any input will undergo the following transformations: special characters will be removed, spaces will be removed, and letters will be capitalized.'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - original_id
                - title_type_id
                - first_name
                - surname
                - id_number
                - passport
                - cell_number
                - email
                - cartrack_username
                - address
                - bank
                - vehicles
              properties:
                original_id:
                  type: integer
                  description: Required. The original id of the document supporting the lead policy. It must be unique
                  example: 1000123
                title_type_id:
                  type: integer
                  description: 'The title_type_id must be one of the following: <body> <table class="tableTitle"> <tr> <th>title_type_id</th> <th>description</th> </tr> <tr> <td>1</td> <td>Mr</td> </tr> <tr class="odd"> <td>2</td> <td>Mrs</td> </tr> <tr> <td>3</td> <td>Me</td> </tr> <tr class="odd"> <td>4</td> <td>Dr</td> </tr> <tr> <td>5</td> <td>Prof</td> </tr> <tr class="odd"> <td>6</td> <td>Sir</td> </tr> <tr> <td>7</td> <td>Miss</td> </tr> <tr class="odd"> <td>8</td> <td>Ms</td> </tr> <tr> <td>9</td> <td>Minister</td> </tr> <tr class="odd"> <td>10</td> <td>Rev.</td> </tr> <tr> <td>11</td> <td>Mr &amp; Mrs</td> </tr> <tr class="odd"> <td>12</td> <td>Adv</td> </tr> </table> </body>'
                  example: 1
                first_name:
                  type: string
                  description: The first name of the lead
                  example: John
                  maxLength: 50
                surname:
                  type: string
                  description: The last name of the lead
                  example: Smith
                  maxLength: 100
                id_number:
                  type: string
                  description: The ID number of the lead. <strong>Required only if passport is not given.</strong>
                  example: ABC123456
                  maxLength: 20
                passport:
                  type: string
                  description: The passport number of the lead. <strong>Required only if id_number is not given.</strong>
                  example: YZ-101010
                  maxLength: 20
                cell_number:
                  type: string
                  description: The cell number
                  example: '27123456789'
                  maxLength: 20
                home_number:
                  type: string
                  description: The home phone number
                  example: '27123456789'
                  maxLength: 20
                work_number:
                  type: string
                  description: The work phone number
                  example: '27123456789'
                  maxLength: 20
                email:
                  type: string
                  description: The email address
                  example: john.smith@example.com
                  maxLength: 256
                cartrack_username:
                  type: string
                  description: If the lead has a valid Cartrack account, please provide the username in this field. <strong>Required only if "address" or "bank" objects are not given.</strong>
                  example: ABC00001
                  maxLength: 20
                address:
                  type: object
                  description: This object must contain the lead's address details. <strong>Required only if cartrack_username is not given.</strong>
                  properties:
                    line_1:
                      type: string
                      description: Address line 1
                      example: 48 STREET
                      maxLength: 50
                    line_2:
                      type: string
                      description: Address line 2
                      example: SAMPLE
                      maxLength: 50
                    line_3:
                      type: string
                      description: Address line 3
                      example: SAMPLE
                      maxLength: 50
                    suburb:
                      type: string
                      description: Suburb
                      example: EAST WEST
                      maxLength: 50
                    town:
                      type: string
                      description: Town
                      example: ANYTOWN
                      maxLength: 50
                    province:
                      type: string
                      description: Province
                      example: SOUTH NORTH
                      maxLength: 25
                    postal_code:
                      type: string
                      description: Postal code
                      example: '54321'
                      maxLength: 10
                bank:
                  type: object
                  description: This object must contain the lead's bank details. <strong>Required only if cartrack_username is not given.</strong>
                  required:
                    - bank_account_type
                    - bank_debit_day
                    - bank_name
                    - account_holder
                    - branch_code
                  properties:
                    bank_account_type:
                      type: string
                      description: "The bank account type can only be one of the following: \r\n                            <table class=\"tableTitle\">\r\n                            <tr><th>bank_account_type</th></tr>\r\n                            <tr class=\"odd\"><td>Cheque</td></tr>\r\n                            <tr><td>Savings</td></tr>\r\n                            <tr class=\"odd\"><td>Current</td></tr>\r\n                            <tr><td>Transmission</td></tr>\r\n                            </table>"
                      example: Cheque
                    bank_name:
                      type: string
                      description: The name of the lead's bank
                      example: Sample Bank
                    account_holder:
                      type: string
                      description: The name of the lead's account holder
                      example: John Smith
                    account_number:
                      type: string
                      description: The lead's account number
                      example: '12340000123456789123456789'
                    branch_code:
                      type: string
                      description: The lead's bank branch's code
                      example: '123456'
                    bank_debit_day:
                      type: integer
                      description: The day of the month when the bank account must be debited.
                      minimum: 1
                      maximum: 28
                      example: 28
                vehicles:
                  type: array
                  description: This array must contain the list of vehicle objects associated to the lead's policy. It cannot be empty
                  minItems: 1
                  maxItems: 1000
                  items:
                    type: object
                    required:
                      - lead_product_id
                      - registration
                    properties:
                      lead_product_id:
                        type: integer
                        description: Required. The product id applicable for this lead. Please contact our team to obtain a valid id
                        example: 123
                      manufacturer_make_code:
                        type: string
                        description: If manufacturer_make_code is provided, it is not required to pass the vehicle_make and vehicle_model. Otherwise both fields are required.
                        example: '0012'
                        maxLength: 50
                      registration:
                        type: string
                        description: The vehicle registration
                        maxLength: 16
                      vehicle_make:
                        type: string
                        description: The vehicle maker
                        example: Tesla
                        maxLength: 50
                      vehicle_model:
                        type: string
                        description: The vehicle model
                        example: Model S
                        maxLength: 50
                      vehicle_colour:
                        type: string
                        description: The vehicle colour
                        example: Blue
                        maxLength: 50
                      year_model:
                        type: string
                        description: The vehicle year
                        example: '2017'
                        maxLength: 4
                      engine_number:
                        type: string
                        description: The engine number of the vehicle
                        example: 52WVXVC10338
                        maxLength: 50
                      vin_number:
                        type: string
                        description: The Vehicle Identification Number
                        example: JH4KA4630JC008595
                        maxLength: 50
                      vehicle_derivative:
                        type: string
                        description: A derivative name for the vehicle
                        example: Model S P100D
                        maxLength: 50
                      contacts:
                        type: array
                        description: Catalog of automobile contacts, limited to a maximum of 10 entries.
                        minItems: 1
                        maxItems: 10
                        items:
                          type: object
                          required:
                            - contact_priority
                            - description
                            - contact_number_1
                          properties:
                            contact_priority:
                              type: integer
                              description: Indicates the priority level of the contact on a scale, where 1 represents the highest priority. Value must be a positive integer.
                              example: 1
                            description:
                              type: string
                              description: A brief description of the contact's role or importance. This should be a concise string, not exceeding 50 characters.
                              example: Primary driver
                              maxLength: 50
                            contact_number_1:
                              type: string
                              description: 'The primary contact phone number, formatted in E.164 standard. Example: +15551234567, where "+1" is the country code, and the rest is the subscriber number.'
                              example: '27123456789'
                              maxLength: 15
                            contact_number_2:
                              type: string
                              description: Secondary contact phone number in E.164 format. This is optional and used as a backup to the primary contact.
                              example: '27123456780'
                              maxLength: 15
                            contact_number_3:
                              type: string
                              description: Tertiary contact phone number, also in E.164 format. This number is used when primary and secondary contacts are unreachable.
                              example: '27123456781'
                              maxLength: 15
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      policy_id:
                        type: integer
                        description: The policy_id that was created
                        example: 1234567
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /leads/potential:
    post:
      summary: Create a potential lead
      tags:
        - Leads
      description: This endpoint creates a potential lead. Please make sure you have user's consent before posting the information.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - cartrack_username
                - phone_number
                - cell_number
                - email
              properties:
                original_id:
                  type: string
                  description: The original id of the document supporting the lead policy. It must be unique
                  example: '1000123'
                first_name:
                  type: string
                  description: The first name of the lead
                  example: John
                surname:
                  type: string
                  description: The last name of the lead
                  example: Smith
                id_number:
                  type: string
                  description: The ID number of the lead.
                  example: ABC123456
                passport:
                  type: string
                  description: The passport number of the lead.
                  example: YZ-101010
                phone_number:
                  type: string
                  description: The phone number. <strong>Required only if email and cell number are not given.</strong>
                  example: '27123456789'
                cell_number:
                  type: string
                  description: The cell number. <strong>Required only if email and phone number are not given.</strong>
                  example: '27123456789'
                email:
                  type: string
                  description: The email address. <strong>Required only if phone number and cell number are not given.</strong>
                  example: john.smith@example.com
                cartrack_username:
                  type: string
                  description: Required. The Lead has a valid Cartrack account, please provide the username in this field.
                  example: ABC00001
                registration:
                  $ref: '#/components/schemas/registration'
                manufacturer_make_code:
                  type: string
                  description: If manufacturer_make_code is provided, it is not required to pass the vehicle_make and vehicle_model.
                  example: '0012'
                vehicle_model:
                  type: string
                  description: The vehicle model
                  example: Model S
                vin_number:
                  type: string
                  description: The Vehicle Identification Number
                  example: JH4KA4630JC008595
                engine_number:
                  type: string
                  description: The engine number of the vehicle
                  example: 52WVXVC10338
                company_registration_number:
                  type: string
                  description: The company registration number
                  example: ABC4571
                company_name:
                  type: string
                  description: The company name
                  example: Tesla
                lead_product_id:
                  type:
                    - integer
                    - 'null'
                  description: The lead product ID.
                  example: 12215
                lead_product_name:
                  type:
                    - string
                    - 'null'
                  description: The lead product name.
                  maxLength: 200
                  example: Product X
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      potential_id:
                        type: integer
                        description: The potential_id that was created
                        example: 1234567
        '400':
          $ref: '#/components/responses/validation-error'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /leads/{policy_id}:
    post:
      summary: Upload lead policy attachment(s)
      tags:
        - Leads
      description: This endpoint allows you to upload file(s) to support the creation of a policy_id.
      parameters:
        - name: policy_id
          in: path
          description: The policy_id returned from the leads endpoint after the POST request.
          required: true
          schema:
            type: integer
          example: 1234567
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - file
              properties:
                file:
                  type: array
                  items:
                    type: string
                    format: binary
                  description: 'File to be uploaded.<br/> Only CSV, XLSX, XLS, and PDF formats are accepted. <br/> Note: Maximum accepted file size: 10 MB.'
      responses:
        '200':
          description: Successful uploaded
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      policy_id:
                        type: integer
                        description: The policy_id where the files are attached.
                        example: 1234567
                  meta:
                    type: object
                    properties:
                      message:
                        type: string
                        example: 'File has been successfully uploaded. Filename: file1.pdf, file2.csv'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /leads/potential/{potential_id}:
    post:
      summary: Upload potential lead attachment(s)
      tags:
        - Leads
      description: This endpoint allows you to upload file(s) to support the creation of a potential_id.
      parameters:
        - name: potential_id
          in: path
          description: The potential_id returned from the leads/potential endpoint after the POST request.
          required: true
          schema:
            type: integer
          example: 1234567
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - file
              properties:
                file:
                  type: array
                  items:
                    type: string
                    format: binary
                  description: 'File to be uploaded.<br/> Only CSV, XLSX, XLS, and PDF formats are accepted. <br/> Note: Maximum accepted file size: 10 MB.'
      responses:
        '200':
          description: Successful uploaded
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type:
                      - object
                      - 'null'
                    properties:
                      potential_id:
                        type: integer
                        description: The potential_id where files are attached.
                        example: 1234567
                  meta:
                    type: object
                    properties:
                      message:
                        type: string
                        example: 'File has been successfully uploaded. Filename: file1.pdf, file2.csv'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /maintenance/{registration}:
    post:
      summary: Create a maintenance schedule
      tags:
        - Maintenance
      description: This function creates a maintenance schedule for a given vehicle
      parameters:
        - name: registration
          in: path
          description: The registration of the vehicle associated to this maintenance schedule
          required: true
          schema:
            $ref: '#/components/schemas/registration'
            example: ABC1234X
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - type
                - part_name
                - reason
                - start_timestamp
              properties:
                type:
                  type: integer
                  example: 2
                  description: Type of maintenance 1 = Requested, 2 = Scheduled, 3 = Immediate
                  enum:
                    - 1
                    - 2
                    - 3
                part_name:
                  type: string
                  example: Steering wheel
                  maxLength: 150
                  description: The mainenance part name
                reason:
                  type: integer
                  example: 1
                  description: Reason for the maintenance
                description:
                  type:
                    - string
                    - 'null'
                  example: Defective steering wheel, steering rumbles when driving normally
                  description: The maintenance description
                start_timestamp:
                  $ref: '#/components/schemas/date'
                  description: Start date and time of the maintenance
                end_timestamp:
                  oneOf:
                    - $ref: '#/components/schemas/date'
                    - type: 'null'
                  description: End date and time of the maintenance
                custom_fields:
                  type:
                    - object
                    - 'null'
                  description: Custom maintenance fields (up to a max of 8).
                  properties:
                    custom_1:
                      type:
                        - string
                        - 'null'
                      example: You can use this field for your own use cases
                      description: ''
                    custom_2:
                      type:
                        - string
                        - 'null'
                      example: You can use this field for your own use cases
                      description: ''
                    custom_3:
                      type:
                        - string
                        - 'null'
                      example: You can use this field for your own use cases
                      description: ''
                    custom_4:
                      type:
                        - string
                        - 'null'
                      example: You can use this field for your own use cases
                      description: ''
                    custom_5:
                      type:
                        - string
                        - 'null'
                      example: You can use this field for your own use cases
                      description: ''
                    custom_6:
                      type:
                        - string
                        - 'null'
                      example: You can use this field for your own use cases
                      description: ''
                    custom_7:
                      type:
                        - string
                        - 'null'
                      example: You can use this field for your own use cases
                      description: ''
                    custom_8:
                      type:
                        - string
                        - 'null'
                      example: You can use this field for your own use cases
                      description: ''
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      vehicle_id:
                        type: integer
                        description: The id of the vehicle
                        example: 12345
                  meta:
                    type: string
                    description: Confirmation message
                    example: Maintenance successfully created.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /maintenance/reasons:
    get:
      summary: Get all maintenance reasons
      tags:
        - Maintenance
      description: Get all/filtered list of maintenance reasons
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          description: The id of the maintenance reason
                          example: 1234
                        reason:
                          type: string
                          description: The description of maintenance reason
                          example: Oil Replacement
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    post:
      summary: Add a new maintenance reason
      tags:
        - Maintenance
      description: This endpoint creates a maintenance reason
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - reason
              properties:
                reason:
                  type: string
                  description: The details of maintenance reason
                  example: Oil Replacement
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: integer
                        description: The id of the maintenance reason
                        example: 1234
                      reason:
                        type: string
                        description: The description of maintenance reason
                        example: Oil Replacement
                  meta:
                    type: object
                    properties:
                      message:
                        type: string
                        example: Successfully created the maintenance reason
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /maintenance/reasons/{id}:
    delete:
      summary: Delete a maintenance reason
      tags:
        - Maintenance
      description: This endpoint deletes a maintenance reason
      parameters:
        - name: id
          in: path
          description: The maintenance reason ID
          required: true
          schema:
            type: integer
          example: 12345
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    example: {}
                  meta:
                    type: object
                    description: The meta object containing a message
                    properties:
                      message:
                        type: string
                        example: Successfully deleted the maintenance reason
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    put:
      summary: Update a maintenance reason
      tags:
        - Maintenance
      description: This endpoint updates a maintenance reason
      parameters:
        - name: id
          in: path
          description: The maintenance reason ID
          required: true
          schema:
            type: integer
          example: 12345
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                reason:
                  type: string
                  description: The details of maintenance reason
                  example: Oil Replacement
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: integer
                        description: The id of the maintenance reason
                        example: 1234
                      reason:
                        type: string
                        description: The description of maintenance reason
                        example: Oil Replacement
                  meta:
                    type: object
                    properties:
                      message:
                        type: string
                        example: Successfully updated the maintenance reason
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /mifleet/fuel:
    get:
      tags:
        - MiFleet
      summary: Retrieve MiFleet Fuel Validation Entries
      description: Retrieves a detailed list of fuel entries for MiFleet. This endpoint is designed for comprehensive tracking and management of fuel-related expenses and activities.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      parameters:
        - $ref: '#/components/parameters/date_from'
          description: 'Start date for filtering fuel entries on property fuelling_date. The API returns entries recorded from this date onwards. Format: YYYY-MM-DD HH:MM:SS.'
        - $ref: '#/components/parameters/date_to'
          description: 'End date for filtering fuel entries on property fuelling_date. The API returns entries recorded up to this date. Format: YYYY-MM-DD HH:MM:SS.'
        - $ref: '#/components/parameters/registration'
          description: Filter entries by vehicle registration number.
        - $ref: '#/components/parameters/id-int'
          description: Filter entries by a specific integer ID.
        - name: filter[ids]
          in: query
          required: false
          description: Filter by multiple entry IDs, separated by commas. Suitable for batch queries.
          schema:
            type: string
            example: 67890,67891
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: This array returns the list of fuel entries.
                    items:
                      $ref: '#/components/schemas/mifleet-fuel-response'
                  meta:
                    $ref: '#/components/schemas/pagination'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    post:
      summary: Create a New MiFleet Fuel Validation Entry
      tags:
        - MiFleet
      deprecated: false
      description: Creates new fuel validation entries for MiFleet. This endpoint is used for adding detailed fuel transaction records, including purchase amounts, fuel types, and associated vehicle information.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      requestBody:
        description: JSON payload containing the fuel entry data.
        required: true
        content:
          application/json:
            schema:
              type: array
              description: Array of fuel entries to be created. Each entry should conform to the MiFleet fuel structure defined in the schema.
              items:
                allOf:
                  - $ref: '#/components/schemas/mifleet-common'
                    required:
                      - supplier
                      - description
                      - quantity
                      - price
                      - net_value
                      - tax_rate
                      - total_value
                  - $ref: '#/components/schemas/mifleet-fuel'
                    required:
                      - fuelling_station
                      - fuelling_date
                  - type: object
                    required:
                      - registration
                    properties:
                      general_ledger_code:
                        type:
                          - number
                          - 'null'
                        example: 100101
                        description: The general ledger number for the transaction.
                      discount:
                        type:
                          - number
                          - 'null'
                        example: 1.25
                        description: The discount value that applies.
                      registration:
                        $ref: '#/components/schemas/registration'
      responses:
        '200':
          description: Successful operation.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: This array returns the list of fuel entries.
                    items:
                      $ref: '#/components/schemas/mifleet-fuel-response'
                  meta:
                    type: object
                    description: The metadata such as result messages.
                    properties:
                      message:
                        type:
                          - string
                          - 'null'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /mifleet/fuel/{id}:
    put:
      summary: Update MiFleet Fuel Entry
      tags:
        - MiFleet
      deprecated: false
      description: Updates specific MiFleet fuel entries. This API endpoint facilitates modifications to fuel transaction information, including updates to document details, vehicle information, and validation status.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs. It is essential for maintaining accurate and current fuel transaction records.
      parameters:
        - name: id
          in: path
          description: Unique identifier of the fuel entry to be updated.
          required: true
          schema:
            type: integer
            example: 1010
      requestBody:
        description: JSON payload containing the fuel entry data.
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/mifleet-common'
                - $ref: '#/components/schemas/mifleet-fuel'
                - type: object
                  properties:
                    general_ledger_code:
                      type:
                        - number
                        - 'null'
                      example: 100101
                      description: The general ledger number for the transaction.
                    discount:
                      type:
                        - number
                        - 'null'
                      example: 1.25
                      description: The discount value that applies.
                    registration:
                      $ref: '#/components/schemas/registration'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/mifleet-fuel-response'
                  meta:
                    type: object
                    description: The metadata such as result messages.
                    properties:
                      message:
                        type:
                          - string
                          - 'null'
                        description: Response message.
                        example: Entry updated successfully.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    delete:
      summary: Delete MiFleet Fuel Entries
      tags:
        - MiFleet
      deprecated: false
      description: Deletes a specific fuel entry from the MiFleet system.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      parameters:
        - name: id
          in: path
          description: Unique identifier of the fuel entry to be deleted.
          required: true
          schema:
            type: integer
            example: 1010
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    description: The metadata such as result messages.
                    properties:
                      message:
                        type:
                          - string
                          - 'null'
                        description: Response message.
                        example: Entry deleted successfully.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /mifleet/maintenance:
    get:
      tags:
        - MiFleet
      summary: Get MiFleet Maintenance Entries
      description: Retrieves a detailed list of maintenance entries for MiFleet. This endpoint is designed for comprehensive tracking and management of maintenance-related expenses and activities.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      parameters:
        - $ref: '#/components/parameters/date_from'
          description: 'Start date and time for filtering maintenance entries on property maintenance_date. Only entries recorded on or after this date will be included. Format: YYYY-MM-DD HH:MM:SS.'
        - $ref: '#/components/parameters/date_to'
          description: 'End date and time for filtering maintenance entries on property maintenance_date. Only entries recorded on or before this date will be included. Format: YYYY-MM-DD HH:MM:SS.'
        - $ref: '#/components/parameters/registration'
          description: Filter entries by vehicle registration number.
        - $ref: '#/components/parameters/id-int'
          description: Filter entries by maintenance entry ID.
        - name: filter[ids]
          in: query
          required: false
          description: Filter by multiple entry IDs, separated by commas. Suitable for batch queries.
          schema:
            type: string
            example: 67890,67891
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: This array returns the list of maintenance entries.
                    items:
                      $ref: '#/components/schemas/mifleet-maintenance-response'
                  meta:
                    $ref: '#/components/schemas/pagination'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    post:
      summary: Create a New MiFleet Maintenance Entry
      tags:
        - MiFleet
      deprecated: false
      description: Creates new maintenance entries in the MiFleet system. This endpoint is used to add detailed records of maintenance activities, including service types, costs, and associated vehicle information. It supports the submission of multiple entries at once for efficient batch processing.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      requestBody:
        description: JSON payload containing the details of maintenance entries. The structure should follow the schema defined in "create_mifleet_maintenance". Each entry includes comprehensive maintenance data, which is critical for accurate record-keeping and analysis.
        required: true
        content:
          application/json:
            schema:
              type: array
              description: Array of maintenance entries to be created. Each entry should conform to the MiFleet maintenance structure defined in the schema.
              items:
                allOf:
                  - $ref: '#/components/schemas/mifleet-common'
                    required:
                      - supplier
                      - description
                      - quantity
                      - price
                      - net_value
                      - tax_rate
                      - total_value
                  - $ref: '#/components/schemas/mifleet-maintenance'
                    required:
                      - maintenance_date
                      - maintenance_type
                  - type: object
                    required:
                      - registration
                    properties:
                      general_ledger_code:
                        type: number
                        example: 100101
                        description: The general ledger number for the transaction.
                      discount:
                        type: number
                        example: 10
                        description: The discount value that applies.
                      registration:
                        $ref: '#/components/schemas/registration'
                      odometer:
                        type: number
                        example: 120000
                        description: The vehicle's odometer reading at the time of maintenance.
      responses:
        '200':
          description: Successful operation.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: This array returns the list of maintenance entries.
                    items:
                      $ref: '#/components/schemas/mifleet-maintenance-response'
                  meta:
                    type: object
                    description: The metadata such as result messages.
                    properties:
                      message:
                        type:
                          - string
                          - 'null'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /mifleet/maintenance/{id}:
    put:
      summary: Update MiFleet Maintenance Entry
      tags:
        - MiFleet
      deprecated: false
      description: Updates an existing maintenance entry in the MiFleet system. This endpoint allows for modifications to various aspects of a maintenance record, including service details, costs, and vehicle information. It is vital for keeping maintenance records up-to-date and accurate.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      parameters:
        - name: id
          in: path
          description: Unique identifier of the maintenance entry to be updated.
          required: true
          schema:
            type: integer
            example: 1010
      requestBody:
        description: JSON payload containing the details of maintenance entries. The structure should follow the schema defined in "update_mifleet_maintenance". Each entry includes comprehensive maintenance data, which is critical for accurate record-keeping and analysis.
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/mifleet-common'
                - $ref: '#/components/schemas/mifleet-maintenance'
                - type: object
                  properties:
                    general_ledger_code:
                      type: number
                      example: 100101
                      description: The general ledger number for the transaction.
                    discount:
                      type: number
                      example: 10
                      description: The discount value that applies.
                    registration:
                      $ref: '#/components/schemas/registration'
                    odometer:
                      type: number
                      example: 120000
                      description: The vehicle's odometer reading at the time of maintenance.
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/mifleet-maintenance-response'
                  meta:
                    type: object
                    description: The metadata such as result messages.
                    properties:
                      message:
                        type:
                          - string
                          - 'null'
                        description: Response message.
                        example: Entry updated successfully.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    delete:
      summary: Delete MiFleet Maintenance Entries
      tags:
        - MiFleet
      deprecated: false
      description: Deletes a specific maintenance entry from the MiFleet system.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      parameters:
        - name: id
          in: path
          description: Unique identifier of the maintenance entry to be deleted.
          required: true
          schema:
            type: integer
            example: 1010
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    description: The metadata such as result messages.
                    properties:
                      message:
                        type:
                          - string
                          - 'null'
                        description: Response message.
                        example: Entry deleted successfully.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /mifleet/toll:
    get:
      tags:
        - MiFleet
      summary: Get MiFleet Toll Entries
      description: Retrieves a detailed list of toll entries for MiFleet. This endpoint is designed for comprehensive tracking and management of toll-related expenses and activities.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      parameters:
        - $ref: '#/components/parameters/date_from'
          description: 'Start date for filtering toll entries on property toll_date. Returns entries recorded on or after this date. Format: YYYY-MM-DD HH:MM:SS.'
        - $ref: '#/components/parameters/date_to'
          description: 'End date for filtering toll entries on property toll_date. Returns entries recorded on or before this date. Format: YYYY-MM-DD HH:MM:SS.'
        - $ref: '#/components/parameters/registration'
          description: Filter entries by vehicle registration number.
        - $ref: '#/components/parameters/id-int'
          description: Filter entries by a specific integer ID.
        - name: filter[ids]
          in: query
          required: false
          description: Filter by multiple entry IDs, separated by commas. Suitable for batch queries.
          schema:
            type: string
            example: 67890,67891
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: This array returns the list of toll entries.
                    items:
                      $ref: '#/components/schemas/mifleet-toll-response'
                  meta:
                    $ref: '#/components/schemas/pagination'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    post:
      summary: Create a New MiFleet Toll Validation Entry
      tags:
        - MiFleet
      deprecated: false
      description: Creates new toll validation entries in the MiFleet system. This endpoint is used for adding toll transaction records, including details like toll amounts, vehicle information, and transaction dates. It supports batch processing, allowing multiple entries to be submitted simultaneously.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      requestBody:
        description: JSON payload containing the details of toll validation entries. Each entry within the array should adhere to the structure defined in "create_mifleet_toll", encompassing all relevant toll transaction data.
        required: true
        content:
          application/json:
            schema:
              type: array
              description: Array of toll entries to be created. Each entry should conform to the MiFleet toll structure defined in the schema.
              items:
                allOf:
                  - allOf:
                      - $ref: '#/components/schemas/mifleet-common'
                        required:
                          - supplier
                          - description
                          - quantity
                          - price
                          - net_value
                          - total_value
                      - type: object
                        required:
                          - tax_rate
                        properties:
                          driver:
                            type: string
                            description: Name of the driver associated with the transaction. Must be a registered driver in the system.
                          tax_rate:
                            type: number
                            minimum: 0
                            maximum: 1
                            example: 0.15
                            description: The tax rate applied to the transaction, represented as a fraction (e.g., 0.2 for 20%).
                  - $ref: '#/components/schemas/mifleet-toll'
                    required:
                      - passage_name
                      - toll_date
                  - type: object
                    required:
                      - registration
                    properties:
                      registration:
                        $ref: '#/components/schemas/registration'
                      general_ledger_code:
                        type: number
                        example: 54321
                        description: The unique code used in the general ledger to categorize this transaction.
                      discount:
                        type: number
                        example: 0.35
                        description: The discount amount, if any, applied to the transaction.
      responses:
        '200':
          description: Successful operation.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: This array returns the list of toll entries.
                    items:
                      $ref: '#/components/schemas/mifleet-toll-response'
                  meta:
                    type: object
                    description: The metadata such as result messages.
                    properties:
                      message:
                        type:
                          - string
                          - 'null'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /mifleet/toll/{id}:
    put:
      summary: Update MiFleet Toll Validation Entry
      tags:
        - MiFleet
      deprecated: false
      description: Updates an existing MiFleet toll validation entry. This endpoint enables modifications to toll transaction records, allowing changes to be made to details such as toll amounts, vehicle data, and dates. It is crucial for ensuring the accuracy and currency of toll records.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      parameters:
        - name: id
          in: path
          description: Unique identifier of the toll entry to be updated.
          required: true
          schema:
            type: integer
            example: 1010
      requestBody:
        description: JSON payload containing the details of toll validation entries. Each entry within the array should adhere to the structure defined in "create_mifleet_toll", encompassing all relevant toll transaction data.
        required: true
        content:
          application/json:
            schema:
              allOf:
                - allOf:
                    - $ref: '#/components/schemas/mifleet-common'
                    - type: object
                      properties:
                        driver:
                          type: string
                          description: Name of the driver associated with the transaction. Must be a registered driver in the system.
                        tax_rate:
                          type: number
                          minimum: 0
                          maximum: 1
                          example: 0.15
                          description: The tax rate applied to the transaction, represented as a fraction (e.g., 0.2 for 20%).
                - $ref: '#/components/schemas/mifleet-toll'
                - type: object
                  properties:
                    registration:
                      $ref: '#/components/schemas/registration'
                    general_ledger_code:
                      type: number
                      example: 54321
                      description: The unique code used in the general ledger to categorize this transaction.
                    discount:
                      type: number
                      example: 0.35
                      description: The discount amount, if any, applied to the transaction.
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/mifleet-toll-response'
                  meta:
                    type: object
                    description: The metadata such as result messages.
                    properties:
                      message:
                        type:
                          - string
                          - 'null'
                        description: Response message.
                        example: Entry updated successfully.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    delete:
      summary: Delete MiFleet Toll Entries
      tags:
        - MiFleet
      deprecated: false
      description: Deletes a specific toll entry from the MiFleet system.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      parameters:
        - name: id
          in: path
          description: Unique identifier of the toll entry to be deleted.
          required: true
          schema:
            type: integer
            example: 1010
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    description: The metadata such as result messages.
                    properties:
                      message:
                        type:
                          - string
                          - 'null'
                        description: Response message.
                        example: Entry deleted successfully.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /mifleet/accident:
    get:
      tags:
        - MiFleet
      summary: Get MiFleet Accident Entries
      description: Retrieves a detailed list of accident entries for MiFleet. This endpoint is designed for comprehensive tracking and management of accident-related expenses and activities.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      parameters:
        - $ref: '#/components/parameters/date_from'
          description: 'The start date for filtering entries on property accident_date. The API returns entries on or after this date. Format: YYYY-MM-DD HH:MM:SS.'
        - $ref: '#/components/parameters/date_to'
          description: 'The end date for the filter range on property accident_date. Entries on or before this date are included. Format: YYYY-MM-DD HH:MM:SS.'
        - $ref: '#/components/parameters/registration'
          description: Filter for entries based on vehicle registration number.
        - $ref: '#/components/parameters/id-int'
          description: Filter by a specific entry ID.
        - name: filter[ids]
          in: query
          required: false
          description: Filter by multiple entry IDs, separated by commas. Suitable for batch queries.
          schema:
            type: string
            example: 67890,67891
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: This array returns the list of accident entries.
                    items:
                      $ref: '#/components/schemas/mifleet-accident-response'
                  meta:
                    $ref: '#/components/schemas/pagination'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    post:
      summary: Create New MiFleet Accident Entries
      tags:
        - MiFleet
      deprecated: false
      description: Creates a new accident entry in the MiFleet system. This endpoint allows for adding accident entries to facilitate tracking and managing accident costs.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      requestBody:
        description: JSON payload containing the transaction entry data.
        required: true
        content:
          application/json:
            schema:
              type: array
              description: Array of accident entries to be created. Each entry should conform to the MiFleet accident structure defined in the schema.
              items:
                allOf:
                  - $ref: '#/components/schemas/mifleet-common'
                    required:
                      - supplier
                      - description
                      - quantity
                      - price
                      - net_value
                      - tax_rate
                      - total_value
                      - driver
                  - $ref: '#/components/schemas/mifleet-accident'
                    required:
                      - accident_date
                      - accident_type
                  - type: object
                    required:
                      - registration
                    properties:
                      registration:
                        $ref: '#/components/schemas/registration'
                      general_ledger_code:
                        type:
                          - number
                          - 'null'
                        example: 54321
                        description: Unique code for categorizing the transaction in the general ledger.
                      discount:
                        type:
                          - number
                          - 'null'
                        example: 0.35
                        description: Discount amount applied to the transaction.
                      third_parties:
                        type: array
                        items:
                          $ref: '#/components/schemas/mifleet-accident-third-party'
                          required:
                            - name
                            - identification
                            - contact
      responses:
        '200':
          description: Successful operation.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: This array returns the list of accident entries.
                    items:
                      $ref: '#/components/schemas/mifleet-accident-response'
                  meta:
                    type: object
                    description: The metadata such as result messages.
                    properties:
                      message:
                        type:
                          - string
                          - 'null'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /mifleet/accident/{id}:
    put:
      summary: Update MiFleet Accident Transaction Entry
      tags:
        - MiFleet
      deprecated: false
      description: Updates an existing MiFleet accident entry. This endpoint allows for modifying specific details of an accident entry identified by its unique ID.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      parameters:
        - name: id
          in: path
          description: Unique identifier of the accident entry to be updated.
          required: true
          schema:
            type: integer
            example: 1010
      requestBody:
        description: JSON payload containing the transaction entry data.
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/mifleet-common'
                - $ref: '#/components/schemas/mifleet-accident'
                - type: object
                  properties:
                    registration:
                      $ref: '#/components/schemas/registration'
                    general_ledger_code:
                      type:
                        - number
                        - 'null'
                      example: 54321
                      description: Unique code for categorizing the transaction in the general ledger.
                    discount:
                      type:
                        - number
                        - 'null'
                      example: 0.35
                      description: Discount amount applied to the transaction.
      responses:
        '200':
          description: Successful operation.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/mifleet-accident-response'
                  meta:
                    type: object
                    description: The metadata such as result messages.
                    properties:
                      message:
                        type:
                          - string
                          - 'null'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    delete:
      summary: Delete MiFleet Accident Entries
      tags:
        - MiFleet
      deprecated: false
      description: Deletes a specific accident entry from the MiFleet system.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      parameters:
        - name: id
          in: path
          description: Unique identifier of the accident entry to be deleted.
          required: true
          schema:
            type: integer
            example: 1010
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    description: The metadata such as result messages.
                    properties:
                      message:
                        type:
                          - string
                          - 'null'
                        description: Response message.
                        example: Entry deleted successfully.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /mifleet/breakdown:
    get:
      tags:
        - MiFleet
      summary: Get MiFleet Breakdown Entries
      description: Retrieves a detailed list of breakdown entries for MiFleet. This endpoint is designed for comprehensive tracking and management of breakdown-related expenses and activities.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      parameters:
        - $ref: '#/components/parameters/date_from'
          description: 'Start date and time for filtering breakdown entries based on their towing_delivery_date. Only entries recorded on or after this date will be included. Format: YYYY-MM-DD HH:MM:SS.'
        - $ref: '#/components/parameters/date_to'
          description: 'End date and time for filtering breakdown entries based on their towing_delivery_date. Includes entries up to and including this date. Format: YYYY-MM-DD HH:MM:SS.'
        - $ref: '#/components/parameters/registration'
          description: Filter breakdown entries based on vehicle registration number.
        - $ref: '#/components/parameters/id-int'
          description: Filter breakdown entries by a specific entry ID.
        - name: filter[ids]
          in: query
          required: false
          description: Filter by multiple entry IDs, separated by commas. Suitable for batch queries.
          schema:
            type: string
            example: 67890,67891
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: This array returns the list of breakdown entries.
                    items:
                      $ref: '#/components/schemas/mifleet-breakdown-response'
                  meta:
                    $ref: '#/components/schemas/pagination'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    post:
      summary: Create New MiFleet Breakdown Entry
      tags:
        - MiFleet
      deprecated: false
      description: Creates a new breakdown entry in the MiFleet system. This endpoint allows for adding breakdown entries to facilitate tracking and managing breakdowns.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      requestBody:
        description: JSON payload containing the breakdown entry data.
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: array
                  description: Array of breakdown entries to be created. Each entry should conform to the MiFleet breakdown structure defined in the schema.
                  items:
                    allOf:
                      - $ref: '#/components/schemas/mifleet-common'
                        required:
                          - supplier
                          - description
                          - quantity
                          - price
                          - net_value
                          - tax_rate
                          - total_value
                          - driver
                      - $ref: '#/components/schemas/mifleet-breakdown'
                      - type: object
                        required:
                          - registration
                        properties:
                          registration:
                            $ref: '#/components/schemas/registration'
                          general_ledger_code:
                            type:
                              - number
                              - 'null'
                            example: 54321
                            description: Unique code for categorizing the transaction in the general ledger.
                          discount:
                            type:
                              - number
                              - 'null'
                            example: 0.35
                            description: Discount amount applied to the transaction.
      responses:
        '200':
          description: Successful operation.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: This array returns the list of breakdown entries.
                    items:
                      $ref: '#/components/schemas/mifleet-breakdown-response'
                  meta:
                    type: object
                    description: The metadata such as result messages.
                    properties:
                      message:
                        type:
                          - string
                          - 'null'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /mifleet/breakdown/{id}:
    put:
      summary: Update MiFleet Breakdown Validation Entry
      tags:
        - MiFleet
      deprecated: false
      description: Updates an existing MiFleet breakdown entry. This endpoint allows for modifying specific details of a breakdown entry identified by its unique ID.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      parameters:
        - name: id
          in: path
          description: Unique identifier of the breakdown entry to be updated.
          required: true
          schema:
            type: integer
            example: 1010
      requestBody:
        description: JSON payload containing the breakdown entry data.
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/mifleet-common'
                - $ref: '#/components/schemas/mifleet-breakdown'
                - type: object
                  properties:
                    registration:
                      $ref: '#/components/schemas/registration'
                    general_ledger_code:
                      type:
                        - number
                        - 'null'
                      example: 54321
                      description: Unique code for categorizing the transaction in the general ledger.
                    discount:
                      type:
                        - number
                        - 'null'
                      example: 0.35
                      description: Discount amount applied to the transaction.
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/mifleet-breakdown-response'
                  meta:
                    type: object
                    description: The metadata such as result messages.
                    properties:
                      message:
                        type:
                          - string
                          - 'null'
                        description: Response message.
                        example: Entry updated successfully.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    delete:
      summary: Delete MiFleet Breakdown Entries
      tags:
        - MiFleet
      deprecated: false
      description: Deletes a specific breakdown entry from the MiFleet system.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      parameters:
        - name: id
          in: path
          description: Unique identifier of the breakdown entry to be deleted.
          required: true
          schema:
            type: integer
            example: 1010
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    description: The metadata such as result messages.
                    properties:
                      message:
                        type:
                          - string
                          - 'null'
                        description: Response message.
                        example: Entry deleted successfully.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /mifleet/cleaning:
    get:
      tags:
        - MiFleet
      summary: Get MiFleet Cleaning Entries
      description: Retrieves a detailed list of cleaning entries for MiFleet. This endpoint is designed for comprehensive tracking and management of cleaning-related expenses and activities.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      parameters:
        - $ref: '#/components/parameters/date_from'
          description: 'Start date and time for filtering cleaning entries based on their cleaning_date. Only entries recorded on or after this date will be included. Format: YYYY-MM-DD HH:MM:SS.'
        - $ref: '#/components/parameters/date_to'
          description: 'End date and time for filtering cleaning entries based on their cleaning_date. Includes entries up to and including this date. Format: YYYY-MM-DD HH:MM:SS.'
        - $ref: '#/components/parameters/registration'
          description: Filter cleaning entries based on vehicle registration number.
        - $ref: '#/components/parameters/id-int'
          description: Filter cleaning entries by a specific entry ID.
        - name: filter[ids]
          in: query
          required: false
          description: Filter by multiple entry IDs, separated by commas. Suitable for batch queries.
          schema:
            type: string
            example: 67890,67891
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: This array returns the list of cleaning entries.
                    items:
                      $ref: '#/components/schemas/mifleet-cleaning-response'
                  meta:
                    $ref: '#/components/schemas/pagination'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    post:
      summary: Create New MiFleet cleaning Entry
      tags:
        - MiFleet
      deprecated: false
      description: Creates a new cleaning entry in the MiFleet system. This endpoint allows for adding cleaning entries to facilitate tracking and managing cleaning.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      requestBody:
        description: JSON payload containing the cleaning entry data.
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: array
                  description: Array of cleaning entries to be created. Each entry should conform to the MiFleet cleaning structure defined in the schema.
                  items:
                    allOf:
                      - $ref: '#/components/schemas/mifleet-common'
                        required:
                          - supplier
                          - description
                          - quantity
                          - price
                          - net_value
                          - tax_rate
                          - total_value
                      - $ref: '#/components/schemas/mifleet-cleaning'
                        required:
                          - cleaning_type
                          - cleaning_date
                      - type: object
                        required:
                          - registration
                        properties:
                          registration:
                            $ref: '#/components/schemas/registration'
                          general_ledger_code:
                            type:
                              - number
                              - 'null'
                            example: 54321
                            description: Unique code for categorizing the transaction in the general ledger.
                          discount:
                            type:
                              - number
                              - 'null'
                            example: 0.35
                            description: Discount amount applied to the transaction.
      responses:
        '200':
          description: Successful operation.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: This array returns the list of cleaning entries.
                    items:
                      $ref: '#/components/schemas/mifleet-cleaning-response'
                  meta:
                    type: object
                    description: The metadata such as result messages.
                    properties:
                      message:
                        type:
                          - string
                          - 'null'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /mifleet/cleaning/{id}:
    put:
      summary: Update MiFleet Cleaning Entry
      tags:
        - MiFleet
      deprecated: false
      description: Updates an existing MiFleet cleaning entry. This endpoint allows for modifying specific details of a cleaning entry identified by its unique ID.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      parameters:
        - name: id
          in: path
          description: Unique identifier of the cleaning entry to be updated.
          required: true
          schema:
            type: integer
            example: 1010
      requestBody:
        description: JSON payload containing the cleaning entry data.
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/mifleet-common'
                - $ref: '#/components/schemas/mifleet-cleaning'
                - type: object
                  properties:
                    registration:
                      $ref: '#/components/schemas/registration'
                    general_ledger_code:
                      type:
                        - number
                        - 'null'
                      example: 54321
                      description: Unique code for categorizing the transaction in the general ledger.
                    discount:
                      type:
                        - number
                        - 'null'
                      example: 0.35
                      description: Discount amount applied to the transaction.
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/mifleet-cleaning-response'
                  meta:
                    type: object
                    description: The metadata such as result messages.
                    properties:
                      message:
                        type:
                          - string
                          - 'null'
                        description: Response message.
                        example: Entry updated successfully.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    delete:
      summary: Delete MiFleet Cleaning Entries
      tags:
        - MiFleet
      deprecated: false
      description: Deletes a specific cleaning entry from the MiFleet system.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      parameters:
        - name: id
          in: path
          description: Unique identifier of the cleaning entry to be deleted.
          required: true
          schema:
            type: integer
            example: 1010
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    description: The metadata such as result messages.
                    properties:
                      message:
                        type:
                          - string
                          - 'null'
                        description: Response message.
                        example: Entry deleted successfully.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /mifleet/consumable:
    get:
      tags:
        - MiFleet
      summary: Get MiFleet Consumable Entries
      description: Retrieves a detailed list of consumable entries for MiFleet. This endpoint is designed for comprehensive tracking and management of consumable-related expenses and activities.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      parameters:
        - $ref: '#/components/parameters/date_from'
          description: 'Start date and time for filtering consumable entries based on their consumable_date. Only entries recorded on or after this date will be included. Format: YYYY-MM-DD HH:MM:SS.'
        - $ref: '#/components/parameters/date_to'
          description: 'End date and time for filtering consumable entries based on their consumable_date. Includes entries up to and including this date. Format: YYYY-MM-DD HH:MM:SS.'
        - $ref: '#/components/parameters/registration'
          description: Filter consumable entries based on vehicle registration number.
        - $ref: '#/components/parameters/id-int'
          description: Filter consumable entries by a specific entry ID.
        - name: filter[ids]
          in: query
          required: false
          description: Filter by multiple entry IDs, separated by commas. Suitable for batch queries.
          schema:
            type: string
            example: 67890,67891
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: This array returns the list of consumable entries.
                    items:
                      $ref: '#/components/schemas/mifleet-consumable-response'
                  meta:
                    $ref: '#/components/schemas/pagination'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    post:
      summary: Create New MiFleet Consumable Entries
      tags:
        - MiFleet
      deprecated: false
      description: Creates a new consumable entry in the MiFleet system. This endpoint allows for adding consumable entries to facilitate tracking and managing consumable costs.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      requestBody:
        description: JSON payload containing the consumable entry data.
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: array
                  description: Array of consumable entries to be created. Each entry should conform to the MiFleet consumable structure defined in the schema.
                  items:
                    allOf:
                      - $ref: '#/components/schemas/mifleet-common'
                        required:
                          - supplier
                          - description
                          - quantity
                          - price
                          - net_value
                          - tax_rate
                          - total_value
                      - $ref: '#/components/schemas/mifleet-consumable'
                        required:
                          - consumable_date
                          - consumable_type
                      - type: object
                        required:
                          - registration
                        properties:
                          registration:
                            $ref: '#/components/schemas/registration'
                          general_ledger_code:
                            type:
                              - number
                              - 'null'
                            example: 54321
                            description: Unique code for categorizing the transaction in the general ledger.
                          discount:
                            type:
                              - number
                              - 'null'
                            example: 0.35
                            description: Discount amount applied to the transaction.
      responses:
        '200':
          description: Successful operation.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: This array returns the list of consumable entries.
                    items:
                      $ref: '#/components/schemas/mifleet-consumable-response'
                  meta:
                    type: object
                    description: The metadata such as result messages.
                    properties:
                      message:
                        type:
                          - string
                          - 'null'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /mifleet/consumable/{id}:
    put:
      summary: Update MiFleet Consumable Transaction Entry
      tags:
        - MiFleet
      deprecated: false
      description: Updates an existing MiFleet consumable entry. This endpoint allows for modifying specific details of an consumable entry identified by its unique ID.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      parameters:
        - name: id
          in: path
          description: Unique identifier of the consumable entry to be updated.
          required: true
          schema:
            type: integer
            example: 1010
      requestBody:
        description: JSON payload containing the consumable entry data.
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: array
                  description: Array of consumable entries to be created. Each entry should conform to the MiFleet consumable structure defined in the schema.
                  items:
                    allOf:
                      - $ref: '#/components/schemas/mifleet-common'
                      - $ref: '#/components/schemas/mifleet-consumable'
                      - type: object
                        properties:
                          registration:
                            $ref: '#/components/schemas/registration'
                          general_ledger_code:
                            type:
                              - number
                              - 'null'
                            example: 54321
                            description: Unique code for categorizing the transaction in the general ledger.
                          discount:
                            type:
                              - number
                              - 'null'
                            example: 0.35
                            description: Discount amount applied to the transaction.
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/mifleet-consumable-response'
                  meta:
                    type: object
                    description: The metadata such as result messages.
                    properties:
                      message:
                        type:
                          - string
                          - 'null'
                        description: Response message.
                        example: Entry updated successfully.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    delete:
      summary: Delete MiFleet Consumable Entries
      tags:
        - MiFleet
      deprecated: false
      description: Deletes a specific consumable entry from the MiFleet system.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      parameters:
        - name: id
          in: path
          description: Unique identifier of the consumable entry to be deleted.
          required: true
          schema:
            type: integer
            example: 1010
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    description: The metadata such as result messages.
                    properties:
                      message:
                        type:
                          - string
                          - 'null'
                        description: Response message.
                        example: Entry deleted successfully.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /mifleet/driver-cost:
    get:
      tags:
        - MiFleet
      summary: Get MiFleet Driver Cost Entries
      description: Retrieves a detailed list of driver cost entries for MiFleet. This endpoint is designed for comprehensive tracking and management of driver-related expenses and activities.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      parameters:
        - $ref: '#/components/parameters/date_from'
          description: 'The start date for filtering entries on property driver_cost_date. The API returns entries on or after this date. Format: YYYY-MM-DD HH:MM:SS.'
        - $ref: '#/components/parameters/date_to'
          description: 'The end date for filtering entries on property driver_cost_date. The API returns entries on or before this date. Format: YYYY-MM-DD HH:MM:SS.'
        - $ref: '#/components/parameters/id-int'
          description: Filter by a specific driver cost entry ID.
        - name: filter[ids]
          in: query
          required: false
          description: Filter by multiple entry IDs, separated by commas. Suitable for batch queries.
          schema:
            type: string
            example: 67890,67891
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: This array returns the list of driver cost entries.
                    items:
                      $ref: '#/components/schemas/mifleet-driver-cost-response'
                  meta:
                    $ref: '#/components/schemas/pagination'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    post:
      summary: Create New MiFleet Driver Cost Entries
      tags:
        - MiFleet
      deprecated: false
      description: Creates a new driver cost entry in the MiFleet system. This endpoint allows for adding driver cost entries to facilitate tracking and managing driver costs.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      requestBody:
        description: JSON payload containing the driver cost entry data.
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: array
                  description: Array of driver cost entries to be created. Each entry should conform to the MiFleet driver cost structure defined in the schema.
                  items:
                    allOf:
                      - $ref: '#/components/schemas/mifleet-common'
                        required:
                          - supplier
                          - description
                          - quantity
                          - price
                          - net_value
                          - tax_rate
                          - total_value
                          - driver
                      - $ref: '#/components/schemas/mifleet-driver-cost'
                        required:
                          - driver_cost_date
                          - driver_cost_type
                      - type: object
                        properties:
                          general_ledger_code:
                            type: number
                            example: 54321
                            description: Unique code for categorizing the transaction in the general ledger.
                          discount:
                            type: number
                            example: 0.35
                            description: Discount amount applied to the transaction.
      responses:
        '200':
          description: Successful operation.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: This array returns the list of driver cost entries.
                    items:
                      $ref: '#/components/schemas/mifleet-driver-cost-response'
                  meta:
                    type: object
                    description: The metadata such as result messages.
                    properties:
                      message:
                        type:
                          - string
                          - 'null'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /mifleet/driver-cost/{id}:
    put:
      summary: Update MiFleet Driver Cost Transaction Entry
      tags:
        - MiFleet
      deprecated: false
      description: Updates an existing MiFleet driver cost entry. This endpoint allows for modifying specific details of a driver cost entry identified by its unique ID.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      parameters:
        - name: id
          in: path
          description: Unique identifier of the driver cost entry to be updated.
          required: true
          schema:
            type: integer
            example: 1010
      requestBody:
        description: JSON payload containing the driver cost entry data.
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/mifleet-common'
                - $ref: '#/components/schemas/mifleet-driver-cost'
                - type: object
                  properties:
                    general_ledger_code:
                      type: number
                      example: 54321
                      description: Unique code for categorizing the transaction in the general ledger.
                    discount:
                      type: number
                      example: 0.35
                      description: Discount amount applied to the transaction.
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/mifleet-driver-cost-response'
                  meta:
                    type: object
                    description: The metadata such as result messages.
                    properties:
                      message:
                        type:
                          - string
                          - 'null'
                        description: Response message.
                        example: Entry updated successfully.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    delete:
      summary: Delete MiFleet Driver Cost Entries
      tags:
        - MiFleet
      deprecated: false
      description: Deletes a specific driver cost entry from the MiFleet system.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      parameters:
        - name: id
          in: path
          description: Unique identifier of the driver cost entry to be deleted.
          required: true
          schema:
            type: integer
            example: 1010
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    description: The metadata such as result messages.
                    properties:
                      message:
                        type:
                          - string
                          - 'null'
                        description: Response message.
                        example: Entry deleted successfully.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /mifleet/driver-license:
    get:
      tags:
        - MiFleet
      summary: Get MiFleet Driver License Entries
      description: Retrieves a detailed list of driver license entries for MiFleet. This endpoint is designed for comprehensive tracking and management of driver license-related expenses and activities.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      parameters:
        - $ref: '#/components/parameters/date_from'
          description: 'The start date for filtering entries on property begin_date. The API returns entries on or after this date. Format: YYYY-MM-DD HH:MM:SS.'
        - $ref: '#/components/parameters/date_to'
          description: 'The end date for filtering entries on property begin_date. The API returns entries on or before this date. Format: YYYY-MM-DD HH:MM:SS.'
        - $ref: '#/components/parameters/id-int'
          description: Filter by a specific driver license entry ID.
        - name: filter[ids]
          in: query
          required: false
          description: Filter by multiple entry IDs, separated by commas. Suitable for batch queries.
          schema:
            type: string
            example: 67890,67891
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: This array returns the list of driver license entries.
                    items:
                      $ref: '#/components/schemas/mifleet-driver-license-response'
                  meta:
                    $ref: '#/components/schemas/pagination'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    post:
      summary: Create New MiFleet Driver License Entries
      tags:
        - MiFleet
      deprecated: false
      description: Creates a new driver license entry in the MiFleet system. This endpoint allows for adding driver license entries to facilitate tracking and managing driver license costs.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      requestBody:
        description: JSON payload containing the driver license entry data.
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: array
                  description: Array of driver license entries to be created. Each entry should conform to the MiFleet driver license structure defined in the schema.
                  items:
                    allOf:
                      - $ref: '#/components/schemas/mifleet-common'
                        required:
                          - supplier
                          - description
                          - quantity
                          - price
                          - net_value
                          - tax_rate
                          - total_value
                          - driver
                      - $ref: '#/components/schemas/mifleet-driver-license'
                        required:
                          - begin_date
                          - expiration_date
                          - license_type
                          - license_number
                      - type: object
                        properties:
                          general_ledger_code:
                            type: number
                            example: 54321
                            description: Unique code for categorizing the transaction in the general ledger.
                          discount:
                            type: number
                            example: 0.35
                            description: Discount amount applied to the transaction.
      responses:
        '200':
          description: Successful operation.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: This array returns the list of driver license entries.
                    items:
                      $ref: '#/components/schemas/mifleet-driver-license-response'
                  meta:
                    type: object
                    description: The metadata such as result messages.
                    properties:
                      message:
                        type:
                          - string
                          - 'null'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /mifleet/driver-license/{id}:
    put:
      summary: Update MiFleet Driver License Transaction Entry
      tags:
        - MiFleet
      deprecated: false
      description: Updates an existing MiFleet driver license entry. This endpoint allows for modifying specific details of a driver license entry identified by its unique ID.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      parameters:
        - name: id
          in: path
          description: Unique identifier of the driver license entry to be updated.
          required: true
          schema:
            type: integer
            example: 1010
      requestBody:
        description: JSON payload containing the driver license entry data.
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/mifleet-common'
                - $ref: '#/components/schemas/mifleet-driver-license'
                - type: object
                  properties:
                    general_ledger_code:
                      type: number
                      example: 54321
                      description: Unique code for categorizing the transaction in the general ledger.
                    discount:
                      type: number
                      example: 0.35
                      description: Discount amount applied to the transaction.
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/mifleet-driver-license-response'
                  meta:
                    type: object
                    description: The metadata such as result messages.
                    properties:
                      message:
                        type:
                          - string
                          - 'null'
                        description: Response message.
                        example: Entry updated successfully.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    delete:
      summary: Delete MiFleet Driver License Entries
      tags:
        - MiFleet
      deprecated: false
      description: Deletes a specific driver license entry from the MiFleet system.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      parameters:
        - name: id
          in: path
          description: Unique identifier of the driver license entry to be deleted.
          required: true
          schema:
            type: integer
            example: 1010
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    description: The metadata such as result messages.
                    properties:
                      message:
                        type:
                          - string
                          - 'null'
                        description: Response message.
                        example: Entry deleted successfully.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /mifleet/contract/financing:
    get:
      tags:
        - MiFleet
      summary: Get MiFleet Contracts for Financing
      description: Retrieves a detailed list of financing contracts for MiFleet. This endpoint is designed for comprehensive tracking and management of financing-related contracts.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      parameters:
        - $ref: '#/components/parameters/date_from'
          description: 'The start date for filtering contracts. The API returns contracts on or after this date. Format: YYYY-MM-DD HH:MM:SS.'
        - $ref: '#/components/parameters/date_to'
          description: 'The end date for filtering contracts. The API includes contracts up to and including this date. Format: YYYY-MM-DD HH:MM:SS.'
        - $ref: '#/components/parameters/registration'
          description: Filter contracts based on vehicle registration number.
        - $ref: '#/components/parameters/id-int'
          description: Filter contracts by a specific contract ID.
        - name: filter[ids]
          in: query
          required: false
          description: Filter by multiple contract IDs, separated by commas. Suitable for batch queries.
          schema:
            type: string
            example: 67890,67891
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: This array returns the list of contract financing entries.
                    items:
                      $ref: '#/components/schemas/mifleet-contract-financing-response'
                  meta:
                    $ref: '#/components/schemas/pagination'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    post:
      summary: Create New MiFleet Financing Contract
      tags:
        - MiFleet
      deprecated: false
      description: Creates a new financing contract in the MiFleet system. This endpoint allows for adding financing contracts to facilitate tracking and managing financing contracts.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      requestBody:
        description: JSON payload containing the driver license entry data.
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: array
                  description: JSON payload containing the transaction entry data.
                  items:
                    allOf:
                      - type: object
                        required:
                          - supplier
                          - net_value
                          - tax_rate
                          - total_value
                          - registration
                        properties:
                          supplier:
                            type: string
                            example: ABC Bank
                            description: Name of the supplier or entity providing value or service.
                            maxLength: 50
                          net_value:
                            type: number
                            example: 4.45
                            description: Net value of the contract, calculated before taxes.
                          tax_rate:
                            type: number
                            example: 0.2
                            description: Applicable tax rate for the contract, represented as a decimal fraction.
                          total_value:
                            type: number
                            example: 4.99
                            description: Total value of the contract after applying any taxes.
                          registration:
                            $ref: '#/components/schemas/registration'
                          general_ledger_code:
                            type:
                              - integer
                              - 'null'
                            example: 54321
                            description: Code used for categorizing this transaction in the general ledger.
                      - $ref: '#/components/schemas/mifleet-contract-financing'
                        required:
                          - contract_date
                          - contract_start_date
                          - contract_end_date
                          - financing_type
      responses:
        '200':
          description: Successful operation.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: This array returns the list of contract financing entries.
                    items:
                      $ref: '#/components/schemas/mifleet-contract-financing-response'
                  meta:
                    type: object
                    description: The metadata such as result messages.
                    properties:
                      message:
                        type:
                          - string
                          - 'null'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /mifleet/contract/financing/{id}:
    put:
      summary: Update MiFleet Financing Contract
      tags:
        - MiFleet
      deprecated: false
      description: Updates an existing MiFleet financing contract. This endpoint allows for modifying specific details of a financing contract identified by its unique ID.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      parameters:
        - name: id
          in: path
          description: Unique identifier of the financing contract to be updated.
          required: true
          schema:
            type: integer
            example: 1010
      requestBody:
        description: JSON payload containing the driver license entry data.
        required: true
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  properties:
                    supplier:
                      type: string
                      example: ABC Bank
                      description: Name of the supplier or entity providing value or service.
                      maxLength: 50
                    net_value:
                      type: number
                      example: 4.45
                      description: Net value of the contract, calculated before taxes.
                    tax_rate:
                      type: number
                      example: 0.2
                      description: Applicable tax rate for the contract, represented as a decimal fraction.
                    total_value:
                      type: number
                      example: 4.99
                      description: Total value of the contract after applying any taxes.
                    registration:
                      $ref: '#/components/schemas/registration'
                    general_ledger_code:
                      type:
                        - integer
                        - 'null'
                      example: 54321
                      description: Code used for categorizing this transaction in the general ledger.
                - $ref: '#/components/schemas/mifleet-contract-financing'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/mifleet-contract-financing-response'
                  meta:
                    type: object
                    description: The metadata such as result messages.
                    properties:
                      message:
                        type:
                          - string
                          - 'null'
                        description: Response message.
                        example: Entry updated successfully.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    delete:
      summary: Delete MiFleet Financing Contracts
      tags:
        - MiFleet
      deprecated: false
      description: Deletes a specific financing contract from the MiFleet system.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      parameters:
        - name: id
          in: path
          description: Unique identifier of the financing contract to be deleted.
          required: true
          schema:
            type: integer
            example: 1010
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    description: The metadata such as result messages.
                    properties:
                      message:
                        type:
                          - string
                          - 'null'
                        description: Response message.
                        example: Entry deleted successfully.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /mifleet/financing:
    get:
      tags:
        - MiFleet
      summary: Get MiFleet Financing Entries
      description: Retrieves a detailed list of financing entries for MiFleet. This endpoint is designed for comprehensive tracking and management of financing-related expenses and activities.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      parameters:
        - $ref: '#/components/parameters/date_from'
          description: 'The start date for filtering entries on property financing_date. The API returns entries on or after this date. Format: YYYY-MM-DD HH:MM:SS.'
        - $ref: '#/components/parameters/date_to'
          description: 'The end date for filtering entries on property financing_date. The API returns entries on or before this date. Format: YYYY-MM-DD HH:MM:SS.'
        - $ref: '#/components/parameters/registration'
          description: Filter entries by vehicle registration number.
        - $ref: '#/components/parameters/id-int'
          description: Filter by a specific financing entry ID.
        - name: filter[ids]
          in: query
          required: false
          description: Filter by multiple entry IDs, separated by commas. Suitable for batch queries.
          schema:
            type: string
            example: 67890,67891
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: This array returns the list of financing transaction entries.
                    items:
                      $ref: '#/components/schemas/mifleet-financing-response'
                  meta:
                    $ref: '#/components/schemas/pagination'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    post:
      summary: Create New MiFleet Financing Entries
      tags:
        - MiFleet
      deprecated: false
      description: Creates a new financing entry in the MiFleet system. This endpoint allows for adding financing entries to facilitate tracking and managing financing costs.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      requestBody:
        description: JSON payload containing the transaction entry data.
        required: true
        content:
          application/json:
            schema:
              type: array
              description: Array of financing entries to be created. Each entry should conform to the MiFleet financing structure defined in the schema.
              items:
                allOf:
                  - type: object
                    required:
                      - supplier
                      - description
                      - quantity
                      - price
                      - net_value
                      - tax_rate
                      - total_value
                    properties:
                      document_number:
                        type: string
                        default: CONCEPT-XXXXXX
                        description: Unique reference number for the transaction document.
                        example: ACCIDENT-123456
                      document_type:
                        type: string
                        default: DOCUMENT_TYPE_INVOICE
                        description: The document type. Valid values are "DOCUMENT_TYPE_INVOICE", "DOCUMENT_TYPE_CREDIT_NOTE", "DOCUMENT_TYPE_DEBIT_NOTE", or "DOCUMENT_TYPE_RECEIPT".
                        example: DOCUMENT_TYPE_INVOICE
                        enum:
                          - DOCUMENT_TYPE_INVOICE
                          - DOCUMENT_TYPE_CREDIT_NOTE
                          - DOCUMENT_TYPE_DEBIT_NOTE
                          - DOCUMENT_TYPE_RECEIPT
                      document_status:
                        type: string
                        default: DOCUMENT_STATUS_PAID
                        description: The document status. Valid values are "DOCUMENT_STATUS_PENDING", "DOCUMENT_STATUS_VALIDATED", "DOCUMENT_STATUS_OVERDUE_PAYMENT", "DOCUMENT_STATUS_PAID", or "DOCUMENT_STATUS_CANCELLED".
                        example: DOCUMENT_STATUS_PAID
                        enum:
                          - DOCUMENT_STATUS_PENDING
                          - DOCUMENT_STATUS_VALIDATED
                          - DOCUMENT_STATUS_OVERDUE_PAYMENT
                          - DOCUMENT_STATUS_PAID
                          - DOCUMENT_STATUS_CANCELLED
                      supplier:
                        type: string
                        description: Supplier or service provider for the entry.
                        maxLength: 50
                        example: ABC Towing
                      description:
                        type: string
                        description: Brief summary or description of the transaction.
                        example: Service description
                      quantity:
                        type: number
                        description: Quantity of items or services.
                        example: 1
                      price:
                        type: number
                        description: Unit price of the item or service.
                        example: 100
                      net_value:
                        type: number
                        description: Net value before tax.
                        example: 100
                      tax_rate:
                        type: number
                        description: Tax rate applied.
                        example: 0.15
                      total_value:
                        type: number
                        description: Total value including tax.
                        example: 115
                  - $ref: '#/components/schemas/mifleet-financing'
                    required:
                      - financing_date
                  - type: object
                    required:
                      - registration
                    properties:
                      registration:
                        $ref: '#/components/schemas/registration'
                      general_ledger_code:
                        type:
                          - number
                          - 'null'
                        example: 54321
                        description: Unique code for categorizing the transaction in the general ledger.
                      discount:
                        type:
                          - number
                          - 'null'
                        example: 0.35
                        description: Discount amount applied to the transaction.
      responses:
        '200':
          description: Successful operation.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: This array returns the list of financing entries.
                    items:
                      $ref: '#/components/schemas/mifleet-financing-response'
                  meta:
                    type: object
                    description: The metadata such as result messages.
                    properties:
                      message:
                        type:
                          - string
                          - 'null'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /mifleet/financing/{id}:
    put:
      summary: Update MiFleet Financing Transaction Entry
      tags:
        - MiFleet
      deprecated: false
      description: Updates an existing MiFleet financing entry. This endpoint allows for modifying specific details of a financing entry identified by its unique ID.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      parameters:
        - name: id
          in: path
          description: Unique identifier of the financing entry to be updated.
          required: true
          schema:
            type: integer
            example: 1010
      requestBody:
        description: JSON payload containing the transaction entry data.
        required: true
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  properties:
                    document_number:
                      type: string
                      default: CONCEPT-XXXXXX
                      description: Unique reference number for the transaction document.
                      example: ACCIDENT-123456
                    document_type:
                      type: string
                      default: DOCUMENT_TYPE_INVOICE
                      description: The document type. Valid values are "DOCUMENT_TYPE_INVOICE", "DOCUMENT_TYPE_CREDIT_NOTE", "DOCUMENT_TYPE_DEBIT_NOTE", or "DOCUMENT_TYPE_RECEIPT".
                      example: DOCUMENT_TYPE_INVOICE
                      enum:
                        - DOCUMENT_TYPE_INVOICE
                        - DOCUMENT_TYPE_CREDIT_NOTE
                        - DOCUMENT_TYPE_DEBIT_NOTE
                        - DOCUMENT_TYPE_RECEIPT
                    document_status:
                      type: string
                      default: DOCUMENT_STATUS_PAID
                      description: The document status. Valid values are "DOCUMENT_STATUS_PENDING", "DOCUMENT_STATUS_VALIDATED", "DOCUMENT_STATUS_OVERDUE_PAYMENT", "DOCUMENT_STATUS_PAID", or "DOCUMENT_STATUS_CANCELLED".
                      example: DOCUMENT_STATUS_PAID
                      enum:
                        - DOCUMENT_STATUS_PENDING
                        - DOCUMENT_STATUS_VALIDATED
                        - DOCUMENT_STATUS_OVERDUE_PAYMENT
                        - DOCUMENT_STATUS_PAID
                        - DOCUMENT_STATUS_CANCELLED
                    supplier:
                      type: string
                      description: Supplier or service provider for the entry.
                      maxLength: 50
                      example: ABC Towing
                    description:
                      type: string
                      description: Brief summary or description of the transaction.
                      example: Service description
                    quantity:
                      type: number
                      description: Quantity of items or services.
                      example: 1
                    price:
                      type: number
                      description: Unit price of the item or service.
                      example: 100
                    net_value:
                      type: number
                      description: Net value before tax.
                      example: 100
                    tax_rate:
                      type: number
                      description: Tax rate applied.
                      example: 0.15
                    total_value:
                      type: number
                      description: Total value including tax.
                      example: 115
                - type: object
                  properties:
                    registration:
                      $ref: '#/components/schemas/registration'
                    general_ledger_code:
                      type:
                        - number
                        - 'null'
                      example: 54321
                      description: Unique code for categorizing the transaction in the general ledger.
                    discount:
                      type:
                        - number
                        - 'null'
                      example: 0.35
                      description: Discount amount applied to the transaction.
                - $ref: '#/components/schemas/mifleet-financing'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/mifleet-financing-response'
                  meta:
                    type: object
                    description: The metadata such as result messages.
                    properties:
                      message:
                        type:
                          - string
                          - 'null'
                        description: Response message.
                        example: Entry updated successfully.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    delete:
      summary: Delete MiFleet Financing Entries
      tags:
        - MiFleet
      deprecated: false
      description: Deletes a specific financing entry from the MiFleet system.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      parameters:
        - name: id
          in: path
          description: Unique identifier of the financing entry to be deleted.
          required: true
          schema:
            type: integer
            example: 1010
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    description: The metadata such as result messages.
                    properties:
                      message:
                        type:
                          - string
                          - 'null'
                        description: Response message.
                        example: Entry deleted successfully.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /mifleet/fine:
    get:
      tags:
        - MiFleet
      summary: Get MiFleet Fine Entries
      description: Retrieves a detailed list of fine entries for MiFleet. This endpoint is designed for comprehensive tracking and management of fine-related expenses and activities.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      parameters:
        - $ref: '#/components/parameters/date_from'
          description: 'The start date for filtering fine entries on property infringement_date. The API returns entries on or after this date. Format: YYYY-MM-DD HH:MM:SS.'
        - $ref: '#/components/parameters/date_to'
          description: 'The end date for filtering fine entries on property infringement_date. The API returns entries on or before this date. Format: YYYY-MM-DD HH:MM:SS.'
        - $ref: '#/components/parameters/registration'
          description: Filter fine entries by vehicle registration number.
        - $ref: '#/components/parameters/id-int'
          description: Filter by a specific fine entry ID.
        - name: filter[ids]
          in: query
          required: false
          description: Filter by multiple entry IDs, separated by commas. Suitable for batch queries.
          schema:
            type: string
            example: 67890,67891
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: This array returns the list of fine entries.
                    items:
                      $ref: '#/components/schemas/mifleet-fine-response'
                  meta:
                    $ref: '#/components/schemas/pagination'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    post:
      summary: Create New MiFleet Fine Validation Entry
      tags:
        - MiFleet
      deprecated: false
      description: Creates a new fine validation entry in the MiFleet system. This endpoint allows for adding fine entries to facilitate tracking and managing fines.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      requestBody:
        description: JSON payload containing the fine entry data.
        required: true
        content:
          application/json:
            schema:
              type: array
              description: JSON payload containing the fine validation entry data.
              items:
                allOf:
                  - $ref: '#/components/schemas/mifleet-common'
                    required:
                      - supplier
                      - description
                      - quantity
                      - price
                      - net_value
                      - tax_rate
                      - total_value
                  - $ref: '#/components/schemas/mifleet-fine'
                    required:
                      - infringement_location
                      - infringement_date
                      - infringement_number
                  - type: object
                    properties:
                      registration:
                        $ref: '#/components/schemas/registration'
                      general_ledger_code:
                        type:
                          - number
                          - 'null'
                        example: 54321
                        description: Unique code for categorizing the transaction in the general ledger.
                      discount:
                        type:
                          - number
                          - 'null'
                        example: 0.35
                        description: Discount amount applied to the transaction.
      responses:
        '200':
          description: Successful operation.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: This array returns the list of fine entries.
                    items:
                      $ref: '#/components/schemas/mifleet-fine-response'
                  meta:
                    type: object
                    description: The metadata such as result messages.
                    properties:
                      message:
                        type:
                          - string
                          - 'null'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /mifleet/fine/{id}:
    put:
      summary: Update MiFleet Fine Validation Entry
      tags:
        - MiFleet
      deprecated: false
      description: Updates an existing MiFleet fine validation entry. This endpoint allows for modifying specific details of a fine entry identified by its unique ID.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      parameters:
        - name: id
          in: path
          description: Unique identifier of the fine entry to be updated.
          required: true
          schema:
            type: integer
            example: 1010
      requestBody:
        description: JSON payload containing the fine entry data.
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/mifleet-common'
                - $ref: '#/components/schemas/mifleet-fine'
                - type: object
                  properties:
                    registration:
                      $ref: '#/components/schemas/registration'
                    general_ledger_code:
                      type:
                        - number
                        - 'null'
                      example: 54321
                      description: Unique code for categorizing the transaction in the general ledger.
                    discount:
                      type:
                        - number
                        - 'null'
                      example: 0.35
                      description: Discount amount applied to the transaction.
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/mifleet-fine-response'
                  meta:
                    type: object
                    description: The metadata such as result messages.
                    properties:
                      message:
                        type:
                          - string
                          - 'null'
                        description: Response message.
                        example: Entry updated successfully.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    delete:
      summary: Delete MiFleet Fine Entries
      tags:
        - MiFleet
      deprecated: false
      description: Deletes a specific fine entry from the MiFleet system.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      parameters:
        - name: id
          in: path
          description: Unique identifier of the fine entry to be deleted.
          required: true
          schema:
            type: integer
            example: 1010
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    description: The metadata such as result messages.
                    properties:
                      message:
                        type:
                          - string
                          - 'null'
                        description: Response message.
                        example: Entry deleted successfully.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /mifleet/contract/fuel-card:
    get:
      tags:
        - MiFleet
      summary: Get MiFleet Contracts for Fuel Card
      description: Retrieves a detailed list of fuel card contracts for MiFleet. This endpoint is designed for comprehensive tracking and management of fuel card-related contracts.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      parameters:
        - $ref: '#/components/parameters/date_from'
          description: 'The start date for filtering contracts. The API returns contracts on or after this date. Format: YYYY-MM-DD HH:MM:SS.'
        - $ref: '#/components/parameters/date_to'
          description: 'The end date for filtering contracts. The API includes contracts up to and including this date. Format: YYYY-MM-DD HH:MM:SS.'
        - $ref: '#/components/parameters/registration'
          description: Filter contracts by vehicle registration number to track specific vehicles.
        - $ref: '#/components/parameters/id-int'
          description: Filter by a specific contract ID.
        - name: filter[ids]
          in: query
          required: false
          description: Filter by multiple contract IDs, separated by commas. Suitable for batch queries.
          schema:
            type: string
            example: 67890,67891
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: This array returns the list of fuel card contracts.
                    items:
                      $ref: '#/components/schemas/mifleet-contract-fuel-card-response'
                  meta:
                    $ref: '#/components/schemas/pagination'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    post:
      summary: Create New MiFleet Fuel Card Contract
      tags:
        - MiFleet
      deprecated: false
      description: Creates a new fuel card contract in the MiFleet system. This endpoint allows for adding fuel card contracts to facilitate tracking and managing fuel card contracts.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      requestBody:
        description: JSON payload containing the fine entry data.
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                allOf:
                  - type: object
                    required:
                      - registration
                      - supplier
                      - net_value
                      - tax_rate
                      - total_value
                    properties:
                      registration:
                        $ref: '#/components/schemas/registration'
                      supplier:
                        type: string
                        example: Fuel Card Company
                        description: Name of the supplier or entity providing value or service.
                      net_value:
                        type:
                          - number
                          - 'null'
                        example: 100
                        description: Net value of the contract.
                      tax_rate:
                        type:
                          - number
                          - 'null'
                        example: 0.2
                        description: Tax rate for the contract.
                      total_value:
                        type:
                          - number
                          - 'null'
                        example: 120
                        description: Total value after taxes.
                      general_ledger_code:
                        type: integer
                        example: 12345
                        description: Code used for categorizing this transaction in the general ledger.
                  - $ref: '#/components/schemas/mifleet-contract-fuel-card'
                    required:
                      - contract_date
                      - contract_start_date
                      - contract_end_date
                  - $ref: '#/components/schemas/mifleet-contract-payment-card'
                    required:
                      - card_number
      responses:
        '200':
          description: Successful operation.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: This array returns the list of fuel card contracts.
                    items:
                      $ref: '#/components/schemas/mifleet-contract-fuel-card-response'
                  meta:
                    type: object
                    description: The metadata such as result messages.
                    properties:
                      message:
                        type: string
                        description: Total number of fuel card contracts created.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /mifleet/contract/fuel-card/{id}:
    put:
      summary: Update MiFleet Fuel Card Contract
      tags:
        - MiFleet
      deprecated: false
      description: Updates an existing MiFleet fuel card contract. This endpoint allows for modifying specific details of a fuel card contract identified by its unique ID.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      parameters:
        - name: id
          in: path
          description: Unique identifier of the fuel card contract to be updated.
          required: true
          schema:
            type: integer
            example: 1010
      requestBody:
        description: JSON payload containing the fine entry data.
        required: true
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  properties:
                    registration:
                      $ref: '#/components/schemas/registration'
                    supplier:
                      type: string
                      example: Fuel Card Company
                      description: Name of the supplier or entity providing value or service.
                    net_value:
                      type:
                        - number
                        - 'null'
                      example: 100
                      description: Net value of the contract.
                    tax_rate:
                      type:
                        - number
                        - 'null'
                      example: 0.2
                      description: Tax rate for the contract.
                    total_value:
                      type:
                        - number
                        - 'null'
                      example: 120
                      description: Total value after taxes.
                    general_ledger_code:
                      type: integer
                      example: 12345
                      description: Code used for categorizing this transaction in the general ledger.
                - $ref: '#/components/schemas/mifleet-contract-fuel-card'
                - $ref: '#/components/schemas/mifleet-contract-payment-card'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/mifleet-contract-fuel-card-response'
                  meta:
                    type: object
                    description: The metadata such as result messages.
                    properties:
                      message:
                        type:
                          - string
                          - 'null'
                        description: Response message.
                        example: Entry updated successfully.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    delete:
      summary: Delete MiFleet Fuel Card Contracts
      tags:
        - MiFleet
      deprecated: false
      description: Deletes a specific fuel card contract from the MiFleet system.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      parameters:
        - name: id
          in: path
          description: Unique identifier of the fuel card contract to be deleted.
          required: true
          schema:
            type: integer
            example: 1010
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    description: The metadata such as result messages.
                    properties:
                      message:
                        type:
                          - string
                          - 'null'
                        description: Response message.
                        example: Entry deleted successfully.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /mifleet/contract/insurance:
    get:
      tags:
        - MiFleet
      summary: Get MiFleet Contracts for Insurance
      description: Retrieves a detailed list of insurance contracts for MiFleet. This endpoint is designed for comprehensive tracking and management of insurance-related contracts.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      parameters:
        - $ref: '#/components/parameters/date_from'
          description: 'The start date for filtering contracts. The API returns contracts on or after this date. Format: YYYY-MM-DD HH:MM:SS.'
        - $ref: '#/components/parameters/date_to'
          description: 'The end date for filtering contracts. The API returns contracts on or before this date. Format: YYYY-MM-DD HH:MM:SS.'
        - $ref: '#/components/parameters/registration'
          description: Filter by vehicle registration number.
        - $ref: '#/components/parameters/id-int'
          description: Filter by a single contract ID.
        - name: filter[ids]
          in: query
          required: false
          description: Filter by multiple contract IDs, separated by commas. Suitable for batch queries.
          schema:
            type: string
            example: 67890,67891
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: This array returns the list of created insurance contracts.
                    items:
                      $ref: '#/components/schemas/mifleet-contract-insurance-response'
                  meta:
                    $ref: '#/components/schemas/pagination'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    post:
      summary: Create New MiFleet Insurance Contract
      tags:
        - MiFleet
      deprecated: false
      description: Creates a new insurance contract in the MiFleet system. This endpoint allows for adding insurance contracts to facilitate tracking and managing insurance contracts.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      requestBody:
        description: JSON payload containing the fine entry data.
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/mifleet-contract-insurance'
                required:
                  - contract_date
                  - contract_start_date
                  - contract_end_date
                  - registration
                  - supplier
                  - net_value
                  - tax_rate
                  - total_value
                  - insurance_type
      responses:
        '200':
          description: Successful operation.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: This array returns the list of created insurance contracts.
                    items:
                      $ref: '#/components/schemas/mifleet-contract-insurance-response'
                  meta:
                    type: object
                    description: The metadata such as result messages.
                    properties:
                      message:
                        type: string
                        description: Confirmation message for the creation of insurance contracts.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /mifleet/contract/insurance/{id}:
    put:
      summary: Update MiFleet Insurance Contract
      tags:
        - MiFleet
      deprecated: false
      description: Updates an existing MiFleet insurance contract. This endpoint allows for modifying specific details of a insurance contract identified by its unique ID.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      parameters:
        - name: id
          in: path
          description: Unique identifier of the insurance contract to be updated.
          required: true
          schema:
            type: integer
            example: 1010
      requestBody:
        description: JSON payload containing the fine entry data.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/mifleet-contract-insurance'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/mifleet-contract-insurance-response'
                  meta:
                    type: object
                    description: The metadata such as result messages.
                    properties:
                      message:
                        type:
                          - string
                          - 'null'
                        description: Response message.
                        example: Entry updated successfully.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    delete:
      summary: Delete MiFleet Insurance Contracts
      tags:
        - MiFleet
      deprecated: false
      description: Deletes a specific insurance contract from the MiFleet system.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      parameters:
        - name: id
          in: path
          description: Unique identifier of the insurance contract to be deleted.
          required: true
          schema:
            type: integer
            example: 1010
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    description: The metadata such as result messages.
                    properties:
                      message:
                        type:
                          - string
                          - 'null'
                        description: Response message.
                        example: Entry deleted successfully.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /mifleet/insurance:
    get:
      tags:
        - MiFleet
      summary: Get MiFleet Insurance Entries
      description: Retrieves a detailed list of insurance entries for MiFleet. This endpoint is designed for comprehensive tracking and management of insurance-related expenses and activities.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      parameters:
        - $ref: '#/components/parameters/date_from'
          description: 'The start date for filtering entries on property insurance_date. The API returns entries on or after this date. Format: YYYY-MM-DD HH:MM:SS.'
        - $ref: '#/components/parameters/date_to'
          description: 'The end date for filtering entries on property insurance_date. The API returns entries on or before this date. Format: YYYY-MM-DD HH:MM:SS.'
        - $ref: '#/components/parameters/registration'
          description: Filter entries by vehicle registration number.
        - $ref: '#/components/parameters/id-int'
          description: Filter entries by insurance entry ID.
        - name: filter[ids]
          in: query
          required: false
          description: Filter by multiple entry IDs, separated by commas. Suitable for batch queries.
          schema:
            type: string
            example: 67890,67891
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: This array returns the list of created insurance entries.
                    items:
                      $ref: '#/components/schemas/mifleet-insurance-response'
                  meta:
                    $ref: '#/components/schemas/pagination'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    post:
      summary: Create New MiFleet Insurance Entries
      tags:
        - MiFleet
      deprecated: false
      description: Creates a new insurance entry in the MiFleet system. This endpoint allows for adding insurance entries to facilitate tracking and managing insurance costs.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      requestBody:
        description: JSON payload containing the fine entry data.
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                allOf:
                  - $ref: '#/components/schemas/mifleet-common-without-driver'
                    required:
                      - supplier
                      - description
                      - quantity
                      - price
                      - net_value
                      - tax_rate
                      - total_value
                  - type: object
                    required:
                      - registration
                      - insurance_date
                    properties:
                      discount:
                        type: number
                        description: Discount applied to the insurance entry.
                        example: 5
                      registration:
                        $ref: '#/components/schemas/registration'
                      general_ledger_code:
                        type: integer
                        example: 12345
                        description: Code used for categorizing this transaction in the general ledger.
                      insurance_date:
                        $ref: '#/components/schemas/date'
                        description: The date of the insurance transaction.
      responses:
        '200':
          description: Successful operation.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: This array returns the list of created insurance entries.
                    items:
                      $ref: '#/components/schemas/mifleet-insurance-response'
                  meta:
                    type: object
                    description: The metadata such as result messages.
                    properties:
                      message:
                        type: string
                        description: Confirmation message for the creation of insurance entries.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /mifleet/insurance/{id}:
    put:
      summary: Update MiFleet Insurance Transaction Entry
      tags:
        - MiFleet
      deprecated: false
      description: Updates an existing MiFleet insurance entry. This endpoint allows for modifying specific details of a insurance entry identified by its unique ID.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      parameters:
        - name: id
          in: path
          description: Unique identifier of the insurance entry to be updated.
          required: true
          schema:
            type: integer
            example: 1010
      requestBody:
        description: JSON payload containing the fine entry data.
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/mifleet-common-without-driver'
                - type: object
                  properties:
                    discount:
                      type: number
                      description: Discount applied to the insurance entry.
                      example: 5
                    registration:
                      $ref: '#/components/schemas/registration'
                    general_ledger_code:
                      type: integer
                      example: 12345
                      description: Code used for categorizing this transaction in the general ledger.
                    insurance_date:
                      $ref: '#/components/schemas/date'
                      description: The date of the insurance transaction.
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/mifleet-insurance-response'
                  meta:
                    type: object
                    description: The metadata such as result messages.
                    properties:
                      message:
                        type:
                          - string
                          - 'null'
                        description: Response message.
                        example: Entry updated successfully.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    delete:
      summary: Delete MiFleet Insurance Entries
      tags:
        - MiFleet
      deprecated: false
      description: Deletes a specific insurance entry from the MiFleet system.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      parameters:
        - name: id
          in: path
          description: Unique identifier of the insurance entry to be deleted.
          required: true
          schema:
            type: integer
            example: 1010
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    description: The metadata such as result messages.
                    properties:
                      message:
                        type:
                          - string
                          - 'null'
                        description: Response message.
                        example: Entry deleted successfully.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /mifleet/leasing-cost:
    get:
      tags:
        - MiFleet
      summary: Get MiFleet Leasing Cost Entries
      description: Retrieves a detailed list of leasing cost entries for MiFleet. This endpoint is designed for comprehensive tracking and management of leasing cost-related expenses and activities.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      parameters:
        - $ref: '#/components/parameters/date_from'
          description: 'The start date for filtering entries on property leasing_cost_date. The API returns entries on or after this date. Format: YYYY-MM-DD HH:MM:SS.'
        - $ref: '#/components/parameters/date_to'
          description: 'The end date for filtering entries on property leasing_cost_date. The API returns entries on or before this date. Format: YYYY-MM-DD HH:MM:SS.'
        - $ref: '#/components/parameters/registration'
          description: Filter entries by vehicle registration number.
        - $ref: '#/components/parameters/id-int'
          description: Filter entries by leasing cost entry ID.
        - name: filter[ids]
          in: query
          required: false
          description: Filter by multiple entry IDs, separated by commas. Suitable for batch queries.
          schema:
            type: string
            example: 67890,67891
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: This array returns the list of leasing cost entries.
                    items:
                      $ref: '#/components/schemas/mifleet-leasing-cost-response'
                  meta:
                    $ref: '#/components/schemas/pagination'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    post:
      summary: Create New MiFleet Leasing Cost Entries
      tags:
        - MiFleet
      deprecated: false
      description: Creates a new leasing cost entry in the MiFleet system. This endpoint allows for adding leasing cost entries to facilitate tracking and managing leasing costs.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              description: JSON payload containing the transaction entry data.
              items:
                allOf:
                  - $ref: '#/components/schemas/mifleet-common-without-driver'
                    required:
                      - supplier
                      - description
                      - registration
                      - quantity
                      - price
                      - net_value
                      - tax_rate
                      - total_value
                  - type: object
                    required:
                      - registration
                      - leasing_cost_date
                      - leasing_cost_type
                    properties:
                      registration:
                        $ref: '#/components/schemas/registration'
                      general_ledger_code:
                        type: integer
                        example: 12345
                        description: Code used for categorizing this transaction in the general ledger.
                      discount:
                        type: number
                        description: Discount amount applied to the transaction.
                        example: 20
                      leasing_cost_date:
                        $ref: '#/components/schemas/date'
                        description: The date of the leasing cost transaction.
                      leasing_cost_type:
                        type: string
                        example: Trailer Lease
                        description: The type of leasing cost incurred.
      responses:
        '200':
          description: Successful operation.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: This array returns the list of leasing cost entries.
                    items:
                      $ref: '#/components/schemas/mifleet-leasing-cost-response'
                  meta:
                    type: object
                    description: The metadata such as result messages.
                    properties:
                      message:
                        type:
                          - string
                          - 'null'
                        description: Response message.
                        example: Entry created successfully.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /mifleet/leasing-cost/{id}:
    put:
      summary: Update MiFleet Leasing Cost Transaction Entry
      tags:
        - MiFleet
      deprecated: false
      description: Updates an existing MiFleet leasing cost entry. This endpoint allows for modifying specific details of a leasing cost entry identified by its unique ID.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      parameters:
        - name: id
          in: path
          description: Unique identifier of the leasing cost entry to be updated.
          required: true
          schema:
            type: integer
            example: 1010
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/mifleet-common-without-driver'
                - type: object
                  properties:
                    registration:
                      $ref: '#/components/schemas/registration'
                    general_ledger_code:
                      type: integer
                      example: 12345
                      description: Code used for categorizing this transaction in the general ledger.
                    discount:
                      type: number
                      description: Discount amount applied to the transaction.
                      example: 20
                    leasing_cost_date:
                      $ref: '#/components/schemas/date'
                      description: The date of the leasing cost transaction.
                    leasing_cost_type:
                      type: string
                      example: Trailer Lease
                      description: The type of leasing cost incurred.
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/mifleet-leasing-cost-response'
                  meta:
                    type: object
                    description: The metadata such as result messages.
                    properties:
                      message:
                        type:
                          - string
                          - 'null'
                        description: Response message.
                        example: Entry updated successfully.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    delete:
      summary: Delete MiFleet Leasing Cost Entries
      tags:
        - MiFleet
      deprecated: false
      description: Deletes a specific leasing cost entry from the MiFleet system.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      parameters:
        - name: id
          in: path
          description: Unique identifier of the leasing cost entry to be deleted.
          required: true
          schema:
            type: integer
            example: 1010
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    description: The metadata such as result messages.
                    properties:
                      message:
                        type:
                          - string
                          - 'null'
                        description: Response message.
                        example: Entry deleted successfully.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /mifleet/contract/maintenance:
    get:
      tags:
        - MiFleet
      summary: Get MiFleet Contracts for Maintenance
      description: Retrieves a detailed list of maintenance contracts for MiFleet. This endpoint is designed for comprehensive tracking and management of maintenance-related contracts.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      parameters:
        - $ref: '#/components/parameters/date_from'
          description: 'The start date for filtering contracts. The API returns contracts on or after this date. Format: YYYY-MM-DD HH:MM:SS.'
        - $ref: '#/components/parameters/date_to'
          description: 'The end date for filtering contracts. The API returns contracts on or before this date. Format: YYYY-MM-DD HH:MM:SS.'
        - $ref: '#/components/parameters/registration'
          description: Filter by vehicle registration number.
        - $ref: '#/components/parameters/id-int'
          description: Filter by a single contract ID.
        - name: filter[ids]
          in: query
          required: false
          description: Filter by multiple contract IDs, separated by commas. Suitable for batch queries.
          schema:
            type: string
            example: 67890,67891
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: This array returns the list of contract maintenance entries.
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 78901
                          description: Unique identifier for each contract, aiding in tracking and referencing.
                        contract_status:
                          type:
                            - string
                            - 'null'
                          example: CONTRACT_STATUS_ACTIVE
                          description: Current status of the contract, e.g., created, active, or concluded.
                        contract_date:
                          $ref: '#/components/schemas/date'
                          description: The date of the contract.
                        contract_start_date:
                          $ref: '#/components/schemas/date'
                          description: The date the contract is effective.
                        contract_end_date:
                          $ref: '#/components/schemas/date'
                          description: The date of conclusion of the contract.
                        notes:
                          type:
                            - string
                            - 'null'
                          example: Monthly maintenance contract for trailer.
                          description: Notes on the contract, detailing the nature of products/services.
                        registration:
                          type: string
                          example: ABC123
                          description: Vehicle registration number involved in the contract.
                        vehicle_deleted:
                          type: boolean
                          example: true
                          description: Indicates whether the associated vehicle is deleted or not
                        odometer:
                          type:
                            - integer
                            - 'null'
                          example: 101000
                          description: Any applicable odometer value that pertains to the contract.
                        supplier:
                          type: string
                          example: ABC Bank
                          description: Name of the supplier or entity providing value or service.
                          maxLength: 50
                        net_value:
                          type: number
                          example: 4.45
                          description: Net value of the contract, calculated before taxes.
                        tax_rate:
                          type: number
                          example: 0.2
                          description: Applicable tax rate for the contract, represented as a decimal fraction.
                        total_value:
                          type: number
                          example: 4.99
                          description: Total value of the contract after applying any taxes.
                        general_ledger_code:
                          type:
                            - integer
                            - 'null'
                          example: 54321
                          description: Code used for categorizing this transaction in the general ledger.
                        payment_term:
                          type:
                            - string
                            - 'null'
                          example: 30 Days
                          description: The term (in days) of payments for the contract.
                          maxLength: 100
                        payment_method:
                          type:
                            - string
                            - 'null'
                          example: Direct Debit
                          description: The method of payment associated to the contract.
                          maxLength: 100
                        maintenance_type:
                          type: string
                          example: Service B
                          description: The type of maintenance associated with the contract.
                          maxLength: 50
                        warranty_date:
                          $ref: '#/components/schemas/date'
                          description: The date of warranty cover for the contract.
                        warranty_odometer:
                          type:
                            - integer
                            - 'null'
                          example: 111000
                          description: The odometer of warranty cover for the contract.
                        service_interval_months:
                          type:
                            - integer
                            - 'null'
                          example: 12
                          description: The monthly interval for services covered under the contract.
                        service_interval_odometer:
                          type:
                            - integer
                            - 'null'
                          example: 20000
                          description: The odometer interval for services covered under the contract.
                  meta:
                    $ref: '#/components/schemas/pagination'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    post:
      summary: Create New MiFleet Contract Maintenance Entries
      tags:
        - MiFleet
      deprecated: false
      description: Creates new contract maintenance entries in the MiFleet system. This endpoint allows for adding maintenance contract entries to facilitate tracking and managing maintenance contracts.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              description: Array of contract maintenance entries to be created. Each entry should conform to the MiFleet contract maintenance structure defined in the schema.
              items:
                type: object
                required:
                  - contract_date
                  - contract_start_date
                  - contract_end_date
                  - registration
                  - supplier
                  - net_value
                  - tax_rate
                  - total_value
                  - maintenance_type
                  - warranty_date
                properties:
                  contract_status:
                    type:
                      - string
                      - 'null'
                    example: CONTRACT_STATUS_ACTIVE
                    default: CONTRACT_STATUS_CREATED
                    description: Current status of the contract, e.g., created, active, or concluded.
                    enum:
                      - CONTRACT_STATUS_CREATED
                      - CONTRACT_STATUS_ACTIVE
                      - CONTRACT_STATUS_SUSPENDED
                      - CONTRACT_STATUS_CONCLUDED
                      - CONTRACT_STATUS_CANCELLED
                  contract_date:
                    $ref: '#/components/schemas/date'
                    description: The date of the contract.
                  contract_start_date:
                    $ref: '#/components/schemas/date'
                    description: The date the contract is effective.
                  contract_end_date:
                    $ref: '#/components/schemas/date'
                    description: The date of conclusion of the contract.
                  notes:
                    type:
                      - string
                      - 'null'
                    example: Monthly rental maintenance contract for trailer.
                    description: Notes on the contract, detailing the nature of products/services.
                  registration:
                    $ref: '#/components/schemas/registration'
                  odometer:
                    type:
                      - integer
                      - 'null'
                    example: 101000
                    description: Any applicable odometer value that pertains to the contract.
                  supplier:
                    type: string
                    example: ABC Bank
                    description: Name of the supplier or entity providing value or service.
                    maxLength: 50
                  net_value:
                    type: number
                    example: 4.45
                    description: Net value of the contract, calculated before taxes.
                  tax_rate:
                    type: number
                    example: 0.2
                    description: Applicable tax rate for the contract, represented as a decimal fraction.
                  total_value:
                    type: number
                    example: 4.99
                    description: Total value of the contract after applying any taxes.
                  general_ledger_code:
                    type:
                      - integer
                      - 'null'
                    example: 54321
                    description: Code used for categorizing this transaction in the general ledger.
                  payment_term:
                    type:
                      - string
                      - 'null'
                    example: 30 Days
                    description: The term (in days) of payments for the contract. Importantly, an integer needs to be present in the string as per example.
                    maxLength: 100
                  payment_method:
                    type:
                      - string
                      - 'null'
                    example: Direct Debit
                    description: The method of payment associated to the contract.
                    maxLength: 100
                  maintenance_type:
                    type: string
                    example: Service B
                    description: The type of maintenance associated with the contract.
                    maxLength: 50
                  warranty_date:
                    $ref: '#/components/schemas/date'
                    description: The date of warranty cover for the contract.
                  warranty_odometer:
                    type:
                      - integer
                      - 'null'
                    example: 111000
                    description: The odometer of warranty cover for the contract.
                  service_interval_months:
                    type:
                      - integer
                      - 'null'
                    example: 12
                    description: The monthly interval for services covered under the contract.
                  service_interval_odometer:
                    type:
                      - integer
                      - 'null'
                    example: 20000
                    description: The odometer interval for services covered under the contract.
      responses:
        '200':
          description: Successful operation.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: This array returns the list of contract maintenance entries.
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 78901
                          description: Unique identifier for each contract, aiding in tracking and referencing.
                        contract_status:
                          type:
                            - string
                            - 'null'
                          example: CONTRACT_STATUS_ACTIVE
                          description: Current status of the contract, e.g., created, active, or concluded.
                        contract_date:
                          $ref: '#/components/schemas/date'
                          description: The date of the contract.
                        contract_start_date:
                          $ref: '#/components/schemas/date'
                          description: The date the contract is effective.
                        contract_end_date:
                          $ref: '#/components/schemas/date'
                          description: The date of conclusion of the contract.
                        notes:
                          type:
                            - string
                            - 'null'
                          example: Monthly maintenance contract for trailer.
                          description: Notes on the contract, detailing the nature of products/services.
                        registration:
                          type: string
                          example: ABC123
                          description: Vehicle registration number involved in the contract.
                        vehicle_deleted:
                          type: boolean
                          example: true
                          description: Indicates whether the associated vehicle is deleted or not
                        odometer:
                          type:
                            - integer
                            - 'null'
                          example: 101000
                          description: Any applicable odometer value that pertains to the contract.
                        supplier:
                          type: string
                          example: ABC Bank
                          description: Name of the supplier or entity providing value or service.
                          maxLength: 50
                        net_value:
                          type: number
                          example: 4.45
                          description: Net value of the contract, calculated before taxes.
                        tax_rate:
                          type: number
                          example: 0.2
                          description: Applicable tax rate for the contract, represented as a decimal fraction.
                        total_value:
                          type: number
                          example: 4.99
                          description: Total value of the contract after applying any taxes.
                        general_ledger_code:
                          type:
                            - integer
                            - 'null'
                          example: 54321
                          description: Code used for categorizing this transaction in the general ledger.
                        payment_term:
                          type:
                            - string
                            - 'null'
                          example: 30 Days
                          description: The term (in days) of payments for the contract.
                          maxLength: 100
                        payment_method:
                          type:
                            - string
                            - 'null'
                          example: Direct Debit
                          description: The method of payment associated to the contract.
                          maxLength: 100
                        maintenance_type:
                          type: string
                          example: Service B
                          description: The type of maintenance associated with the contract.
                          maxLength: 50
                        warranty_date:
                          $ref: '#/components/schemas/date'
                          description: The date of warranty cover for the contract.
                        warranty_odometer:
                          type:
                            - integer
                            - 'null'
                          example: 111000
                          description: The odometer of warranty cover for the contract.
                        service_interval_months:
                          type:
                            - integer
                            - 'null'
                          example: 12
                          description: The monthly interval for services covered under the contract.
                        service_interval_odometer:
                          type:
                            - integer
                            - 'null'
                          example: 20000
                          description: The odometer interval for services covered under the contract.
                  meta:
                    type: object
                    description: The metadata such as result messages.
                    properties:
                      message:
                        type:
                          - string
                          - 'null'
                        description: Response message.
                        example: Entry created successfully.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /mifleet/contract/maintenance/{id}:
    put:
      summary: Update MiFleet Maintenance Contract
      tags:
        - MiFleet
      deprecated: false
      description: Updates an existing MiFleet maintenance contract. This endpoint allows for modifying specific details of a maintenance contract identified by its unique ID.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      parameters:
        - name: id
          in: path
          description: Unique identifier of the maintenance contract to be updated.
          required: true
          schema:
            type: integer
            example: 1010
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                contract_status:
                  type:
                    - string
                    - 'null'
                  example: CONTRACT_STATUS_ACTIVE
                  default: CONTRACT_STATUS_CREATED
                  description: Current status of the contract, e.g., created, active, or concluded.
                  enum:
                    - CONTRACT_STATUS_CREATED
                    - CONTRACT_STATUS_ACTIVE
                    - CONTRACT_STATUS_SUSPENDED
                    - CONTRACT_STATUS_CONCLUDED
                    - CONTRACT_STATUS_CANCELLED
                contract_date:
                  $ref: '#/components/schemas/date'
                  description: The date of the contract.
                contract_start_date:
                  $ref: '#/components/schemas/date'
                  description: The date the contract is effective.
                contract_end_date:
                  $ref: '#/components/schemas/date'
                  description: The date of conclusion of the contract.
                notes:
                  type:
                    - string
                    - 'null'
                  example: Monthly rental maintenance contract for trailer.
                  description: Notes on the contract, detailing the nature of products/services.
                registration:
                  $ref: '#/components/schemas/registration'
                odometer:
                  type:
                    - integer
                    - 'null'
                  example: 101000
                  description: Any applicable odometer value that pertains to the contract.
                supplier:
                  type: string
                  example: ABC Bank
                  description: Name of the supplier or entity providing value or service.
                  maxLength: 50
                net_value:
                  type: number
                  example: 4.45
                  description: Net value of the contract, calculated before taxes.
                tax_rate:
                  type: number
                  example: 0.2
                  description: Applicable tax rate for the contract, represented as a decimal fraction.
                total_value:
                  type: number
                  example: 4.99
                  description: Total value of the contract after applying any taxes.
                general_ledger_code:
                  type:
                    - integer
                    - 'null'
                  example: 54321
                  description: Code used for categorizing this transaction in the general ledger.
                payment_term:
                  type:
                    - string
                    - 'null'
                  example: 30 Days
                  description: The term (in days) of payments for the contract. Importantly, an integer needs to be present in the string as per example.
                  maxLength: 100
                payment_method:
                  type:
                    - string
                    - 'null'
                  example: Direct Debit
                  description: The method of payment associated to the contract.
                  maxLength: 100
                maintenance_type:
                  type: string
                  example: Service B
                  description: The type of maintenance associated with the contract.
                  maxLength: 50
                warranty_date:
                  $ref: '#/components/schemas/date'
                  description: The date of warranty cover for the contract.
                warranty_odometer:
                  type:
                    - integer
                    - 'null'
                  example: 111000
                  description: The odometer of warranty cover for the contract.
                service_interval_months:
                  type:
                    - integer
                    - 'null'
                  example: 12
                  description: The monthly interval for services covered under the contract.
                service_interval_odometer:
                  type:
                    - integer
                    - 'null'
                  example: 20000
                  description: The odometer interval for services covered under the contract.
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 78901
                        description: Unique identifier for each contract, aiding in tracking and referencing.
                      contract_status:
                        type:
                          - string
                          - 'null'
                        example: CONTRACT_STATUS_ACTIVE
                        description: Current status of the contract, e.g., created, active, or concluded.
                      contract_date:
                        $ref: '#/components/schemas/date'
                        description: The date of the contract.
                      contract_start_date:
                        $ref: '#/components/schemas/date'
                        description: The date the contract is effective.
                      contract_end_date:
                        $ref: '#/components/schemas/date'
                        description: The date of conclusion of the contract.
                      notes:
                        type:
                          - string
                          - 'null'
                        example: Monthly maintenance contract for trailer.
                        description: Notes on the contract, detailing the nature of products/services.
                      registration:
                        type: string
                        example: ABC123
                        description: Vehicle registration number involved in the contract.
                      vehicle_deleted:
                        type: boolean
                        example: true
                        description: Indicates whether the associated vehicle is deleted or not
                      odometer:
                        type:
                          - integer
                          - 'null'
                        example: 101000
                        description: Any applicable odometer value that pertains to the contract.
                      supplier:
                        type: string
                        example: ABC Bank
                        description: Name of the supplier or entity providing value or service.
                        maxLength: 50
                      net_value:
                        type: number
                        example: 4.45
                        description: Net value of the contract, calculated before taxes.
                      tax_rate:
                        type: number
                        example: 0.2
                        description: Applicable tax rate for the contract, represented as a decimal fraction.
                      total_value:
                        type: number
                        example: 4.99
                        description: Total value of the contract after applying any taxes.
                      general_ledger_code:
                        type:
                          - integer
                          - 'null'
                        example: 54321
                        description: Code used for categorizing this transaction in the general ledger.
                      payment_term:
                        type:
                          - string
                          - 'null'
                        example: 30 Days
                        description: The term (in days) of payments for the contract.
                        maxLength: 100
                      payment_method:
                        type:
                          - string
                          - 'null'
                        example: Direct Debit
                        description: The method of payment associated to the contract.
                        maxLength: 100
                      maintenance_type:
                        type: string
                        example: Service B
                        description: The type of maintenance associated with the contract.
                        maxLength: 50
                      warranty_date:
                        $ref: '#/components/schemas/date'
                        description: The date of warranty cover for the contract.
                      warranty_odometer:
                        type:
                          - integer
                          - 'null'
                        example: 111000
                        description: The odometer of warranty cover for the contract.
                      service_interval_months:
                        type:
                          - integer
                          - 'null'
                        example: 12
                        description: The monthly interval for services covered under the contract.
                      service_interval_odometer:
                        type:
                          - integer
                          - 'null'
                        example: 20000
                        description: The odometer interval for services covered under the contract.
                  meta:
                    type: object
                    description: The metadata such as result messages.
                    properties:
                      message:
                        type:
                          - string
                          - 'null'
                        description: Response message.
                        example: Entry updated successfully.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    delete:
      summary: Delete MiFleet Maintenance Contracts
      tags:
        - MiFleet
      deprecated: false
      description: Deletes a specific maintenance contract from the MiFleet system.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      parameters:
        - name: id
          in: path
          description: Unique identifier of the maintenance contract to be deleted.
          required: true
          schema:
            type: integer
            example: 1010
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    description: The metadata such as result messages.
                    properties:
                      message:
                        type:
                          - string
                          - 'null'
                        description: Response message.
                        example: Entry deleted successfully.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /mifleet/oil:
    get:
      tags:
        - MiFleet
      summary: Get MiFleet Oil Entries
      description: Retrieves a detailed list of oil entries for MiFleet. This endpoint is designed for comprehensive tracking and management of oil-related expenses and activities.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      parameters:
        - $ref: '#/components/parameters/date_from'
          description: 'The start date for filtering entries on property fill_in_date. The API returns entries on or after this date. Format: YYYY-MM-DD HH:MM:SS.'
        - $ref: '#/components/parameters/date_to'
          description: 'The end date for filtering entries on property fill_in_date. The API returns entries on or before this date. Format: YYYY-MM-DD HH:MM:SS.'
        - $ref: '#/components/parameters/registration'
          description: Filter entries by vehicle registration number.
        - $ref: '#/components/parameters/id-int'
          description: Filter entries by oil entry ID.
        - name: filter[ids]
          in: query
          required: false
          description: Filter by multiple entry IDs, separated by commas. Suitable for batch queries.
          schema:
            type: string
            example: 67890,67891
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: This array returns the list of oil entries.
                    items:
                      $ref: '#/components/schemas/mifleet-oil-response'
                  meta:
                    $ref: '#/components/schemas/pagination'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    post:
      summary: Create New MiFleet Oil Entries
      tags:
        - MiFleet
      deprecated: false
      description: Creates a new oil entry in the MiFleet system. This endpoint allows for adding oil entries to facilitate tracking and managing oil costs.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              description: Array of oil entries to be created. Each entry should conform to the MiFleet oil structure defined in the schema.
              items:
                allOf:
                  - $ref: '#/components/schemas/mifleet-common-without-driver'
                    required:
                      - supplier
                      - description
                      - quantity
                      - price
                      - net_value
                      - tax_rate
                      - total_value
                  - $ref: '#/components/schemas/mifleet-oil'
                    required:
                      - fill_in_date
                      - oil_type
                  - type: object
                    required:
                      - registration
                    properties:
                      registration:
                        $ref: '#/components/schemas/registration'
                      general_ledger_code:
                        type:
                          - number
                          - 'null'
                        example: 54321
                        description: Unique code for categorizing the transaction in the general ledger.
                      discount:
                        type:
                          - number
                          - 'null'
                        example: 0.35
                        description: Discount amount applied to the transaction.
      responses:
        '200':
          description: Successful operation.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: This array returns the list of oil entries.
                    items:
                      $ref: '#/components/schemas/mifleet-oil-response'
                  meta:
                    type: object
                    description: The metadata such as result messages.
                    properties:
                      message:
                        type:
                          - string
                          - 'null'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /mifleet/oil/{id}:
    put:
      summary: Update MiFleet Oil Transaction Entry
      tags:
        - MiFleet
      deprecated: false
      description: Updates an existing MiFleet oil entry. This endpoint allows for modifying specific details of a oil entry identified by its unique ID.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      parameters:
        - name: id
          in: path
          description: Unique identifier of the oil entry to be updated.
          required: true
          schema:
            type: integer
            example: 1010
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/mifleet-common-without-driver'
                - $ref: '#/components/schemas/mifleet-oil'
                - type: object
                  properties:
                    registration:
                      $ref: '#/components/schemas/registration'
                    general_ledger_code:
                      type:
                        - number
                        - 'null'
                      example: 54321
                      description: Unique code for categorizing the transaction in the general ledger.
                    discount:
                      type:
                        - number
                        - 'null'
                      example: 0.35
                      description: Discount amount applied to the transaction.
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/mifleet-oil-response'
                  meta:
                    type: object
                    description: The metadata such as result messages.
                    properties:
                      message:
                        type:
                          - string
                          - 'null'
                        description: Response message.
                        example: Entry updated successfully.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    delete:
      summary: Delete MiFleet Oil Entries
      tags:
        - MiFleet
      deprecated: false
      description: Deletes a specific oil entry from the MiFleet system.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      parameters:
        - name: id
          in: path
          description: Unique identifier of the oil entry to be deleted.
          required: true
          schema:
            type: integer
            example: 1010
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    description: The metadata such as result messages.
                    properties:
                      message:
                        type:
                          - string
                          - 'null'
                        description: Response message.
                        example: Entry deleted successfully.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /mifleet/purchase:
    get:
      tags:
        - MiFleet
      summary: Get MiFleet Purchase Entries
      description: Retrieves a detailed list of purchase entries for MiFleet. This endpoint is designed for comprehensive tracking and management of purchase-related expenses and activities.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      parameters:
        - $ref: '#/components/parameters/date_from'
          description: 'The start date for filtering entries on property registration_date. The API returns entries on or after this date. Format: YYYY-MM-DD HH:MM:SS.'
        - $ref: '#/components/parameters/date_to'
          description: 'The end date for filtering entries on property registration_date. The API returns entries on or before this date. Format: YYYY-MM-DD HH:MM:SS.'
        - $ref: '#/components/parameters/registration'
          description: Filter entries by vehicle registration number.
        - $ref: '#/components/parameters/id-int'
          description: Filter entries by a specific integer ID.
        - name: filter[ids]
          in: query
          required: false
          description: Filter by multiple entry IDs, separated by commas. Suitable for batch queries.
          schema:
            type: string
            example: 67890,67891
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: This array returns the list of purchase entries.
                    items:
                      $ref: '#/components/schemas/mifleet-purchase-response'
                  meta:
                    $ref: '#/components/schemas/pagination'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    post:
      summary: Create New MiFleet Purchase Entries
      tags:
        - MiFleet
      deprecated: false
      description: Creates a new purchase entry in the MiFleet system. This endpoint allows for adding purchase entries to facilitate tracking and managing purchase costs.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              description: Array of purchase entries to be created. Each entry should conform to the MiFleet purchase structure defined in the schema.
              items:
                allOf:
                  - $ref: '#/components/schemas/mifleet-common-without-driver'
                    required:
                      - supplier
                      - description
                      - quantity
                      - price
                      - net_value
                      - tax_rate
                      - total_value
                  - $ref: '#/components/schemas/mifleet-purchase'
                    required:
                      - registration_date
                  - type: object
                    required:
                      - registration
                    properties:
                      registration:
                        $ref: '#/components/schemas/registration'
                      general_ledger_code:
                        type:
                          - number
                          - 'null'
                        example: 54321
                        description: Unique code for categorizing the transaction in the general ledger.
                      discount:
                        type:
                          - number
                          - 'null'
                        example: 0.35
                        description: Discount amount applied to the transaction.
      responses:
        '200':
          description: Successful operation.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: This array returns the list of purchase entries.
                    items:
                      $ref: '#/components/schemas/mifleet-purchase-response'
                  meta:
                    type: object
                    description: The metadata such as result messages.
                    properties:
                      message:
                        type:
                          - string
                          - 'null'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /mifleet/purchase/{id}:
    put:
      summary: Update MiFleet Purchase Transaction Entry
      tags:
        - MiFleet
      deprecated: false
      description: Updates an existing MiFleet purchase entry. This endpoint allows for modifying specific details of a purchase entry identified by its unique ID.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      parameters:
        - name: id
          in: path
          description: Unique identifier of the purchase entry to be updated.
          required: true
          schema:
            type: integer
            example: 1010
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/mifleet-common-without-driver'
                - $ref: '#/components/schemas/mifleet-purchase'
                - type: object
                  properties:
                    registration:
                      $ref: '#/components/schemas/registration'
                    general_ledger_code:
                      type:
                        - number
                        - 'null'
                      example: 54321
                      description: Unique code for categorizing the transaction in the general ledger.
                    discount:
                      type:
                        - number
                        - 'null'
                      example: 0.35
                      description: Discount amount applied to the transaction.
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/mifleet-purchase-response'
                  meta:
                    type: object
                    description: The metadata such as result messages.
                    properties:
                      message:
                        type:
                          - string
                          - 'null'
                        description: Response message.
                        example: Entry updated successfully.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    delete:
      summary: Delete MiFleet Purchase Entries
      tags:
        - MiFleet
      deprecated: false
      description: Deletes a specific purchase entry from the MiFleet system.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      parameters:
        - name: id
          in: path
          description: Unique identifier of the purchase entry to be deleted.
          required: true
          schema:
            type: integer
            example: 1010
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    description: The metadata such as result messages.
                    properties:
                      message:
                        type:
                          - string
                          - 'null'
                        description: Response message.
                        example: Entry deleted successfully.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /mifleet/rental-cost:
    get:
      tags:
        - MiFleet
      summary: Get MiFleet Rental Cost Entries
      description: Retrieves a detailed list of rental cost entries for MiFleet. This endpoint is designed for comprehensive tracking and management of rental cost-related expenses and activities.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      parameters:
        - $ref: '#/components/parameters/date_from'
          description: 'The start date for filtering entries on property document_date. The API returns entries on or after this date. Format: YYYY-MM-DD HH:MM:SS.'
        - $ref: '#/components/parameters/date_to'
          description: 'The end date for filtering entries on property document_date. The API returns entries on or before this date. Format: YYYY-MM-DD HH:MM:SS.'
        - $ref: '#/components/parameters/registration'
          description: Filter entries by vehicle registration number.
        - $ref: '#/components/parameters/id-int'
          description: Filter entries by a specific integer ID.
        - name: filter[ids]
          in: query
          required: false
          description: Filter by multiple entry IDs, separated by commas. Suitable for batch queries.
          schema:
            type: string
            example: 67890,67891
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: This array returns the list of rental cost entries.
                    items:
                      $ref: '#/components/schemas/mifleet-rental-cost-response'
                  meta:
                    $ref: '#/components/schemas/pagination'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    post:
      summary: Create New MiFleet Rental Cost Entries
      tags:
        - MiFleet
      deprecated: false
      description: Creates a new rental cost entry in the MiFleet system. This endpoint allows for adding rental cost entries to facilitate tracking and managing rental cost costs.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              description: Array of rental cost entries to be created. Each entry should conform to the MiFleet rental cost structure defined in the schema.
              items:
                allOf:
                  - $ref: '#/components/schemas/mifleet-common-without-driver'
                    required:
                      - supplier
                      - description
                      - quantity
                      - price
                      - net_value
                      - tax_rate
                      - total_value
                  - $ref: '#/components/schemas/mifleet-rental-cost'
                    required:
                      - rental_cost_date
                      - rental_cost_type
                  - type: object
                    required:
                      - registration
                    properties:
                      registration:
                        $ref: '#/components/schemas/registration'
                      general_ledger_code:
                        type:
                          - number
                          - 'null'
                        example: 54321
                        description: Unique code for categorizing the transaction in the general ledger.
                      discount:
                        type:
                          - number
                          - 'null'
                        example: 0.35
                        description: Discount amount applied to the transaction.
      responses:
        '200':
          description: Successful operation.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: This array returns the list of rental cost entries.
                    items:
                      $ref: '#/components/schemas/mifleet-rental-cost-response'
                  meta:
                    type: object
                    description: The metadata such as result messages.
                    properties:
                      message:
                        type:
                          - string
                          - 'null'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /mifleet/rental-cost/{id}:
    put:
      summary: Update MiFleet Rental Cost Transaction Entry
      tags:
        - MiFleet
      deprecated: false
      description: Updates an existing MiFleet rental cost entry. This endpoint allows for modifying specific details of a rental cost entry identified by its unique ID.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      parameters:
        - name: id
          in: path
          description: Unique identifier of the rental cost entry to be updated.
          required: true
          schema:
            type: integer
            example: 1010
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/mifleet-common-without-driver'
                - $ref: '#/components/schemas/mifleet-rental-cost'
                - type: object
                  properties:
                    registration:
                      $ref: '#/components/schemas/registration'
                    general_ledger_code:
                      type:
                        - number
                        - 'null'
                      example: 54321
                      description: Unique code for categorizing the transaction in the general ledger.
                    discount:
                      type:
                        - number
                        - 'null'
                      example: 0.35
                      description: Discount amount applied to the transaction.
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/mifleet-rental-cost-response'
                  meta:
                    type: object
                    description: The metadata such as result messages.
                    properties:
                      message:
                        type:
                          - string
                          - 'null'
                        description: Response message.
                        example: Entry updated successfully.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    delete:
      summary: Delete MiFleet Rental Cost Entries
      tags:
        - MiFleet
      deprecated: false
      description: Deletes a specific rental cost entry from the MiFleet system.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      parameters:
        - name: id
          in: path
          description: Unique identifier of the rental cost entry to be deleted.
          required: true
          schema:
            type: integer
            example: 1010
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    description: The metadata such as result messages.
                    properties:
                      message:
                        type:
                          - string
                          - 'null'
                        description: Response message.
                        example: Entry deleted successfully.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /mifleet/tax:
    get:
      tags:
        - MiFleet
      summary: Get MiFleet Tax Entries
      description: Retrieves a detailed list of tax entries for MiFleet. This endpoint is designed for comprehensive tracking and management of tax-related expenses and activities.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      parameters:
        - $ref: '#/components/parameters/date_from'
          description: 'The start date for filtering entries on property begin_date. The API returns entries on or after this date. Format: YYYY-MM-DD HH:MM:SS.'
        - $ref: '#/components/parameters/date_to'
          description: 'The end date for filtering entries on property begin_date. The API returns entries on or before this date. Format: YYYY-MM-DD HH:MM:SS.'
        - $ref: '#/components/parameters/registration'
          description: Filter entries by vehicle registration number.
        - $ref: '#/components/parameters/id-int'
          description: Filter entries by a specific integer ID.
        - name: filter[ids]
          in: query
          required: false
          description: Filter by multiple entry IDs, separated by commas. Suitable for batch queries.
          schema:
            type: string
            example: 67890,67891
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: This array returns the list of tax entries.
                    items:
                      $ref: '#/components/schemas/mifleet-tax-response'
                  meta:
                    $ref: '#/components/schemas/pagination'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    post:
      summary: Create New MiFleet Tax Entries
      tags:
        - MiFleet
      deprecated: false
      description: Creates a new tax entry in the MiFleet system. This endpoint allows for adding tax entries to facilitate tracking and managing tax costs.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              description: Array of tax entries to be created. Each entry should conform to the MiFleet tax structure defined in the schema.
              items:
                allOf:
                  - $ref: '#/components/schemas/mifleet-common-without-driver'
                    required:
                      - supplier
                      - description
                      - net_value
                      - quantity
                      - tax_rate
                      - total_value
                      - price
                  - $ref: '#/components/schemas/mifleet-tax'
                    required:
                      - begin_date
                      - expiration_date
                  - type: object
                    required:
                      - registration
                    properties:
                      registration:
                        $ref: '#/components/schemas/registration'
                      general_ledger_code:
                        type:
                          - number
                          - 'null'
                        example: 54321
                        description: Unique code for categorizing the transaction in the general ledger.
                      discount:
                        type:
                          - number
                          - 'null'
                        example: 0.35
                        description: Discount amount applied to the transaction.
      responses:
        '200':
          description: Successful operation.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: This array returns the list of tax entries.
                    items:
                      $ref: '#/components/schemas/mifleet-tax-response'
                  meta:
                    type: object
                    description: The metadata such as result messages.
                    properties:
                      message:
                        type:
                          - string
                          - 'null'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /mifleet/tax/{id}:
    put:
      summary: Update MiFleet Tax Transaction Entry
      tags:
        - MiFleet
      deprecated: false
      description: Updates an existing MiFleet tax entry. This endpoint allows for modifying specific details of a tax entry identified by its unique ID.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      parameters:
        - name: id
          in: path
          description: Unique identifier of the tax entry to be updated.
          required: true
          schema:
            type: integer
            example: 1010
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/mifleet-common-without-driver'
                - $ref: '#/components/schemas/mifleet-tax'
                - type: object
                  properties:
                    registration:
                      $ref: '#/components/schemas/registration'
                    general_ledger_code:
                      type:
                        - number
                        - 'null'
                      example: 54321
                      description: Unique code for categorizing the transaction in the general ledger.
                    discount:
                      type:
                        - number
                        - 'null'
                      example: 0.35
                      description: Discount amount applied to the transaction.
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/mifleet-tax-response'
                  meta:
                    type: object
                    description: The metadata such as result messages.
                    properties:
                      message:
                        type:
                          - string
                          - 'null'
                        description: Response message.
                        example: Entry updated successfully.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    delete:
      summary: Delete MiFleet Tax Entries
      tags:
        - MiFleet
      deprecated: false
      description: Deletes a specific tax entry from the MiFleet system.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      parameters:
        - name: id
          in: path
          description: Unique identifier of the tax entry to be deleted.
          required: true
          schema:
            type: integer
            example: 1010
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    description: The metadata such as result messages.
                    properties:
                      message:
                        type:
                          - string
                          - 'null'
                        description: Response message.
                        example: Entry deleted successfully.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /mifleet/tyre:
    get:
      tags:
        - MiFleet
      summary: Get MiFleet Tyre Entries
      description: Retrieves a detailed list of tyre entries for MiFleet. This endpoint is designed for comprehensive tracking and management of tyre-related expenses and activities.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      parameters:
        - $ref: '#/components/parameters/date_from'
          description: 'The start date for filtering entries on property tyre_date. The API returns entries on or after this date. Format: YYYY-MM-DD HH:MM:SS.'
        - $ref: '#/components/parameters/date_to'
          description: 'The end date for filtering entries on property tyre_date. The API returns entries on or before this date. Format: YYYY-MM-DD HH:MM:SS.'
        - $ref: '#/components/parameters/registration'
          description: Filter entries by vehicle registration number.
        - $ref: '#/components/parameters/id-int'
          description: Filter entries by a specific integer ID.
        - name: filter[ids]
          in: query
          required: false
          description: Filter by multiple entry IDs, separated by commas. Suitable for batch queries.
          schema:
            type: string
            example: 67890,67891
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/mifleet-tyre-response'
                  meta:
                    $ref: '#/components/schemas/pagination'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    post:
      summary: Create New MiFleet Tyre Entries
      tags:
        - MiFleet
      deprecated: false
      description: Creates a new tyre transaction entry in the MiFleet system. This endpoint allows for adding tyre entries to facilitate tracking and managing tyre costs.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              description: Array of tyre entries to be created. Each entry should conform to the MiFleet tyre structure defined in the schema.
              items:
                allOf:
                  - $ref: '#/components/schemas/mifleet-common'
                    required:
                      - supplier
                      - description
                      - registration
                      - quantity
                      - price
                      - net_value
                      - tax_rate
                      - total_value
                  - type: object
                    required:
                      - tyre_date
                      - tyre_operation
                    properties:
                      registration:
                        $ref: '#/components/schemas/registration'
                      discount:
                        type:
                          - number
                          - 'null'
                        example: 0.35
                        description: Discount amount applied to the transaction.
                      general_ledger_code:
                        type:
                          - number
                          - 'null'
                        example: 54321
                        description: Unique code for categorizing the transaction in the general ledger.
                      tyre_date:
                        $ref: '#/components/schemas/date'
                        description: Date and time of the transaction.
                      tyre_operation:
                        type: string
                        example: Tyre Rotation
                        description: Operation performed in this transaction.
                      odometer:
                        type: integer
                        example: 101001
                        description: The vehicle odometer value at the time of the transaction.
                      tyres:
                        type: array
                        description: An optional array of each tyre specifically impacted by this transaction.
                        items:
                          type: object
                          required:
                            - location
                            - brand
                            - size
                            - code
                          properties:
                            location:
                              type: string
                              example: Front-Left
                              description: The location on the vehicle of this specific tyre.
                            brand:
                              type: string
                              example: Bestyear
                              description: The brand of the tyre.
                            size:
                              type: string
                              example: 17 inch
                              description: The size of the tyre, for instance 17 inch.
                            code:
                              type: string
                              example: 255/55 R16 105V
                              description: The tyre specification code, for instance 255/55 R16 105V.
      responses:
        '200':
          description: Successful operation.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/mifleet-tyre-response'
                  meta:
                    type: object
                    description: The metadata such as result messages.
                    properties:
                      message:
                        type:
                          - string
                          - 'null'
                        description: Response message.
                        example: Entry created successfully.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /mifleet/tyre/{id}:
    put:
      summary: Update MiFleet Tyre Transaction Entry
      tags:
        - MiFleet
      deprecated: false
      description: Updates an existing MiFleet tyre transaction entry. This endpoint allows for modifying specific details of a tyre entry identified by its unique ID.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      parameters:
        - name: id
          in: path
          description: Unique identifier of the tyre entry to be updated.
          required: true
          schema:
            type: integer
            example: 1010
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/mifleet-common'
                - type: object
                  properties:
                    registration:
                      $ref: '#/components/schemas/registration'
                    discount:
                      type:
                        - number
                        - 'null'
                      example: 0.35
                      description: Discount amount applied to the transaction.
                    general_ledger_code:
                      type:
                        - number
                        - 'null'
                      example: 54321
                      description: Unique code for categorizing the transaction in the general ledger.
                    tyre_date:
                      $ref: '#/components/schemas/date'
                      description: Date and time of the transaction.
                    tyre_operation:
                      type: string
                      example: Tyre Rotation
                      description: Operation performed in this transaction.
                    odometer:
                      type: integer
                      example: 101001
                      description: The vehicle odometer value at the time of the transaction.
                    tyres:
                      type: array
                      description: An optional array of each tyre specifically impacted by this transaction.
                      items:
                        type: object
                        required:
                          - location
                          - brand
                          - size
                          - code
                        properties:
                          location:
                            type: string
                            example: Front-Left
                            description: The location on the vehicle of this specific tyre.
                          brand:
                            type: string
                            example: Bestyear
                            description: The brand of the tyre.
                          size:
                            type: string
                            example: 17 inch
                            description: The size of the tyre, for instance 17 inch.
                          code:
                            type: string
                            example: 255/55 R16 105V
                            description: The tyre specification code, for instance 255/55 R16 105V.
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/mifleet-tyre-response'
                  meta:
                    type: object
                    description: The metadata such as result messages.
                    properties:
                      message:
                        type:
                          - string
                          - 'null'
                        description: Response message.
                        example: Entry updated successfully.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    delete:
      summary: Delete MiFleet Tyre Entries
      tags:
        - MiFleet
      deprecated: false
      description: Deletes a specific tyre entry from the MiFleet system.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      parameters:
        - name: id
          in: path
          description: Unique identifier of the tyre entry to be deleted.
          required: true
          schema:
            type: integer
            example: 1010
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    description: The metadata such as result messages.
                    properties:
                      message:
                        type:
                          - string
                          - 'null'
                        description: Response message.
                        example: Entry deleted successfully.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /mifleet/vehicle-license:
    get:
      tags:
        - MiFleet
      summary: Get MiFleet Vehicle License Entries
      description: Retrieves a detailed list of vehicle license entries for MiFleet. This endpoint is designed for comprehensive tracking and management of vehicle license-related expenses and activities.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      parameters:
        - $ref: '#/components/parameters/date_from'
          description: 'The start date for filtering entries on property begin_date. The API returns entries on or after this date. Format: YYYY-MM-DD HH:MM:SS.'
        - $ref: '#/components/parameters/date_to'
          description: 'The end date for filtering entries on property begin_date. The API returns entries on or before this date. Format: YYYY-MM-DD HH:MM:SS.'
        - $ref: '#/components/parameters/registration'
          description: Filter entries by vehicle registration number.
        - $ref: '#/components/parameters/id-int'
          description: Filter entries by a specific integer ID.
        - name: filter[ids]
          in: query
          required: false
          description: Filter by multiple entry IDs, separated by commas. Suitable for batch queries.
          schema:
            type: string
            example: 67890,67891
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: This array returns the list of vehicle license entries.
                    items:
                      $ref: '#/components/schemas/mifleet-vehicle-license-response'
                  meta:
                    $ref: '#/components/schemas/pagination'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    post:
      summary: Create New MiFleet Vehicle License Entries
      tags:
        - MiFleet
      deprecated: false
      description: Creates a new vehicle license entry in the MiFleet system. This endpoint allows for adding vehicle license entries to facilitate tracking and managing vehicle license costs.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              description: Array of vehicle license entries to be created. Each entry should conform to the MiFleet vehicle license structure defined in the schema.
              items:
                allOf:
                  - $ref: '#/components/schemas/mifleet-common-without-driver'
                    required:
                      - supplier
                      - description
                      - quantity
                      - price
                      - net_value
                      - tax_rate
                      - total_value
                  - type: object
                    required:
                      - registration
                      - begin_date
                      - expiration_date
                      - vehicle_license_type
                    properties:
                      registration:
                        $ref: '#/components/schemas/registration'
                      discount:
                        type: number
                        example: 0.35
                        description: Discount amount applied to the transaction.
                      general_ledger_code:
                        type: number
                        example: 54321
                        description: Unique code for categorizing the transaction in the general ledger.
                      vehicle_license_type:
                        type: string
                        example: Trailer License
                        description: The type of license for this transaction.
                        maxLength: 50
                      begin_odometer:
                        type: integer
                        example: 100000
                        description: The start odometer of the license period.
                      end_odometer:
                        type: integer
                        example: 120000
                        description: The end odometer of the license period.
                      begin_date:
                        $ref: '#/components/schemas/date'
                        description: The start date of the license period.
                      expiration_date:
                        $ref: '#/components/schemas/date'
                        description: The end date of the license period.
      responses:
        '200':
          description: Successful operation.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: This array returns the list of vehicle license entries.
                    items:
                      $ref: '#/components/schemas/mifleet-vehicle-license-response'
                  meta:
                    type: object
                    description: The metadata such as result messages.
                    properties:
                      message:
                        type: string
                        description: Response message.
                        example: Entry created successfully.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /mifleet/vehicle-license/{id}:
    put:
      summary: Update MiFleet Vehicle License Transaction Entry
      tags:
        - MiFleet
      deprecated: false
      description: Updates an existing MiFleet vehicle license entry. This endpoint allows for modifying specific details of a vehicle license entry identified by its unique ID.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      parameters:
        - name: id
          in: path
          description: Unique identifier of the vehicle license entry to be updated.
          required: true
          schema:
            type: integer
            example: 1010
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/mifleet-common-without-driver'
                - type: object
                  properties:
                    registration:
                      $ref: '#/components/schemas/registration'
                    discount:
                      type: number
                      example: 0.35
                      description: Discount amount applied to the transaction.
                    general_ledger_code:
                      type: number
                      example: 54321
                      description: Unique code for categorizing the transaction in the general ledger.
                    vehicle_license_type:
                      type: string
                      example: Trailer License
                      description: The type of license for this transaction.
                      maxLength: 50
                    begin_odometer:
                      type: integer
                      example: 100000
                      description: The start odometer of the license period.
                    end_odometer:
                      type: integer
                      example: 120000
                      description: The end odometer of the license period.
                    begin_date:
                      $ref: '#/components/schemas/date'
                      description: The start date of the license period.
                    expiration_date:
                      $ref: '#/components/schemas/date'
                      description: The end date of the license period.
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/mifleet-vehicle-license-response'
                  meta:
                    type: object
                    description: The metadata such as result messages.
                    properties:
                      message:
                        type:
                          - string
                          - 'null'
                        description: Response message.
                        example: Entry updated successfully.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    delete:
      summary: Delete MiFleet Vehicle License Entries
      tags:
        - MiFleet
      deprecated: false
      description: Deletes a specific vehicle license entry from the MiFleet system.<br/><br/> <strong>Note:</strong> MiFleet API endpoints are only accessible to main account administrators. Subusers do not have access to these APIs.
      parameters:
        - name: id
          in: path
          description: Unique identifier of the vehicle license entry to be deleted.
          required: true
          schema:
            type: integer
            example: 1010
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    description: The metadata such as result messages.
                    properties:
                      message:
                        type:
                          - string
                          - 'null'
                        description: Response message.
                        example: Entry deleted successfully.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /mikey:
    get:
      summary: Get all vehicle's bluetooth keys
      tags:
        - Mikey
      description: This endpoint will return the vehicles' 32 bytes bluetooth key for the entire fleet
      parameters:
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      required:
                        - bluetooth_key
                        - vehicle
                      description: This returns the vehicle's bluetooth key
                      properties:
                        bluetooth_key:
                          type:
                            - string
                            - 'null'
                          description: The 32 bytes bluetooth key.
                          example: 83936874C3404131D645399DFD8BDB36ED9561934D48D6ABCD1F7AD7863627C1
                        vehicle:
                          type: object
                          required:
                            - terminal_id
                            - vehicle_id
                            - registration
                            - terminal_serial
                          description: The vehicle information.
                          properties:
                            vehicle_id:
                              $ref: '#/components/schemas/vehicle-id'
                            registration:
                              $ref: '#/components/schemas/registration'
                            chassis_number:
                              $ref: '#/components/schemas/chassis-number'
                            terminal_id:
                              $ref: '#/components/schemas/terminal-id'
                            terminal_serial:
                              $ref: '#/components/schemas/terminal-serial'
                  meta:
                    $ref: '#/components/schemas/pagination'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /mikey/{registration}:
    get:
      summary: Get a vehicle's bluetooth key by registration
      tags:
        - Mikey
      description: This endpoint will return the 32 bytes bluetooth key of the vehicle
      parameters:
        - name: registration
          in: path
          description: The vehicle's license plate
          required: true
          schema:
            $ref: '#/components/schemas/registration'
          example: ABC1234X
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    description: The bluetooth key
                    required:
                      - bluetooth_key
                      - vehicle
                    properties:
                      bluetooth_key:
                        type:
                          - string
                          - 'null'
                        example: 83936874C3404131D645399DFD8BDB36ED9561934D48D6ABCD1F7AD7863627C1
                        description: The 32 bytes bluetooth key.
                      vehicle:
                        type: object
                        required:
                          - terminal_id
                          - vehicle_id
                          - registration
                          - terminal_serial
                        description: The vehicle information.
                        properties:
                          vehicle_id:
                            $ref: '#/components/schemas/vehicle-id'
                          registration:
                            $ref: '#/components/schemas/registration'
                          chassis_number:
                            $ref: '#/components/schemas/chassis-number'
                          terminal_id:
                            $ref: '#/components/schemas/terminal-id'
                          terminal_serial:
                            $ref: '#/components/schemas/terminal-serial'
                  meta:
                    type: object
                    description: Result
                    required:
                      - message
                    properties:
                      message:
                        type: string
                        example: Bluetooth key retrieved successfully
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    put:
      summary: Update a vehicle's mikey code by registration
      tags:
        - Mikey
      description: This endpoint sets a random key that locks|unlocks the vehicle
      parameters:
        - name: registration
          in: path
          description: The vehicle's license plate
          required: true
          schema:
            $ref: '#/components/schemas/registration'
          example: ABC1234X
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    description: This object returns the request id for randomising the key, and vehicle information object
                    required:
                      - terminal_request_id
                      - vehicle
                    properties:
                      terminal_request_id:
                        type: integer
                        example: 12345
                        description: The randomisation request id
                      vehicle:
                        type: object
                        required:
                          - terminal_id
                          - vehicle_id
                          - registration
                          - terminal_serial
                        description: The vehicle information.
                        properties:
                          vehicle_id:
                            $ref: '#/components/schemas/vehicle-id'
                          registration:
                            $ref: '#/components/schemas/registration'
                          chassis_number:
                            $ref: '#/components/schemas/chassis-number'
                          terminal_id:
                            $ref: '#/components/schemas/terminal-id'
                          terminal_serial:
                            $ref: '#/components/schemas/terminal-serial'
                  meta:
                    type: object
                    description: Result
                    required:
                      - message
                    properties:
                      message:
                        type: string
                        example: The request to randomise the key for the vehicle registration ABC-12345 is received. The former key will remain active until the new key reaches the device.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /notifications:
    get:
      summary: '[Deprecated] Get your fleet account''s notifications'
      tags:
        - Notifications
      deprecated: true
      description: 'DEPRECIATION NOTICE: This endpoint has moved, please use GET /alerts/notifications'
      parameters:
        - $ref: '#/components/parameters/date_from'
          description: This will return notifications from this date and time. (limited to <strong>31 days</strong>)
          required: true
        - $ref: '#/components/parameters/date_to'
          description: This will return notifications to this date and time. (limited to <strong>31 days</strong>)
          required: true
        - $ref: '#/components/parameters/registration'
        - $ref: '#/components/parameters/contact_type'
        - $ref: '#/components/parameters/alert_type'
        - $ref: '#/components/parameters/status'
        - $ref: '#/components/parameters/notification_contact'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/limit'
        - name: sort_by
          in: query
          description: The field to sort the results by. Prefix with '-' for descending order.
          schema:
            type: string
            example: create_ts
            enum:
              - create_ts
              - event_ts
          required: false
        - name: sort_order
          in: query
          description: The order to sort the results. Can be 'asc' for ascending or 'desc' for descending.
          schema:
            type: string
            enum:
              - asc
              - desc
            example: desc
          required: false
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: This array returns the list of notifications
                    items:
                      type: object
                      required:
                        - registration
                      properties:
                        vehicle_id:
                          $ref: '#/components/schemas/vehicle-id'
                        registration:
                          $ref: '#/components/schemas/registration'
                        trigger_description:
                          type: string
                          example: IGNITION_ON_OFF
                          description: The notification alert type
                          enum:
                            - ROUTE_SLOW_PROGRESS
                            - ROUTE_DEVIATION
                            - ROUTE_NOT_ENDED_ON_TIME
                            - IDLE
                            - OVERREV
                            - REMINDERS
                            - ETOLL_GANTRY
                            - DYNAMIC_BIT_EVENT
                            - DRIVER_LICENSE_EXPIRED
                            - MAX_SPEED_EXCEEDED
                            - POWER_ON_OFF
                            - ROUTE_NOT_STARED_WITHIN_TIME
                            - ROAD_SPEED
                            - ROUTE_DEVIATION_RETURNED
                            - ZONE_ARRIVE_DEPART
                            - SPEEDING
                            - COOLANT_TEMPERATURE
                            - ROUTE_DEVIATION_CANCELLED
                            - GEOFENCE_ENTERING_LEAVING
                            - ROUTE_START_END
                            - FUEL_GAIN_LOSS
                            - UNKOWN_TRIGGER
                            - STATIC_BIT_EVENT
                            - AFTER_HOURS_MOVEMENT
                            - HIGH_RPM
                            - TRIP_SUMMARY
                            - HARSH_EVENTS
                            - STATIONARY
                            - EXCESSIVE_DRIVING
                            - TEMPERATURE_DIAGNOSTIC
                            - SENSORS
                            - ENGINE_DIAGNOSTIC
                            - VEHICLE_LICENSE_EXPIRED
                            - ENGINE_TEMPERATURE
                            - IGNITION_ON_OFF
                            - DRIVER_ID
                            - ARM_ALERT
                            - RECOVERY
                            - MOTION
                        notification_contact:
                          type:
                            - string
                            - 'null'
                          example: mark.steven@example.com
                          description: The contact information
                        name:
                          type:
                            - string
                            - 'null'
                          example: Vehicles geofence entries alert.
                          description: The notification alert name
                        contact_description:
                          type:
                            - string
                            - 'null'
                          example: E-Mail Message
                          description: The notification contact method
                        notification_id:
                          $ref: '#/components/schemas/uuid'
                          description: The Id of the notification
                        notification_msg:
                          type:
                            - string
                            - 'null'
                          example: ABC1234X igition turned off at x timestamp
                          description: The notification message
                        status:
                          type:
                            - string
                            - 'null'
                          example: Sent
                          description: The notification status
                        event_ts:
                          $ref: '#/components/schemas/timestamp'
                          description: The timestamp when the notification was triggered
                        geofence_id:
                          oneOf:
                            - $ref: '#/components/schemas/geofence-id'
                            - type: 'null'
                          description: If the notification is associated with a geofence, then the geofence_id will be provided
                        latitude:
                          type:
                            - string
                            - 'null'
                          example: '-25.00225'
                          description: The latitude of the vehicle when the notification was triggered
                        longitude:
                          type:
                            - string
                            - 'null'
                          example: '30.114089'
                          description: The longitude of the vehicle when the notification was triggered
                        odometer:
                          type:
                            - integer
                            - 'null'
                          example: 73213
                          description: The odometer of the vehicle when the notification was triggered
                        speed:
                          type:
                            - integer
                            - 'null'
                          example: 22
                          description: The speed of the vehicle when the notification was triggered
                        create_ts:
                          $ref: '#/components/schemas/timestamp'
                          description: The timestamp when the notification was created
                  meta:
                    $ref: '#/components/schemas/pagination'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /pois:
    get:
      summary: Get all points of interest (POIs)
      tags:
        - Points of interest
      deprecated: false
      description: Get all/filtered list of points of interest (POIs)
      parameters:
        - $ref: '#/components/parameters/name'
          description: Filter by POI name, case insensitive, can be partial match
        - $ref: '#/components/parameters/filter_group_description'
          description: Filter by POI description, case insensitive, can be partial match
          example: home
        - $ref: '#/components/parameters/filter_subuser_id'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      required:
                        - poi_id
                        - name
                        - latitude
                        - longitude
                      properties:
                        poi_id:
                          type: integer
                          description: The id of the point of interest
                          example: 12345
                        name:
                          type: string
                          description: The name of the point of interest
                          example: Head office
                        description:
                          type:
                            - string
                            - 'null'
                          description: The description of the point of interest
                          example: Where the big bosses are
                        update_ts:
                          $ref: '#/components/schemas/date'
                          description: Update timestamp
                        geo_radius:
                          type:
                            - string
                            - 'null'
                          description: The point of interest's radius in meters
                          example: '300'
                        colour:
                          type:
                            - string
                            - 'null'
                          description: The colour of the point of interest
                          example: '#334455'
                        latitude:
                          type: number
                          description: Geocoded data (not directly editable)
                          example: -26.180765
                        longitude:
                          type: number
                          description: Geocoded data (not directly editable)
                          example: 28.442755
                        position_description:
                          type: string
                          description: Geocoded location information (not directly editable)
                          example: ABC near XYZ
                        subuser_id:
                          oneOf:
                            - $ref: '#/components/schemas/uuid'
                            - type: 'null'
                          description: If the point of interest is owned by a subuser
                          example: 7489ff44-xxxx-11eb-xxxx-005056a801ca
                  meta:
                    $ref: '#/components/schemas/pagination'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    post:
      summary: Add a new point of interest (POI)
      tags:
        - Points of interest
      deprecated: false
      description: This endpoint creates a point of interest (POI)
      requestBody:
        description: The json data that needs to be processed
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - latitude
                - longitude
                - geo_radius
                - name
              properties:
                name:
                  type: string
                  description: The point of interest's name
                  example: Name for POI
                description:
                  type: string
                  description: The point of interest's description
                  example: Your description
                latitude:
                  type: number
                  description: Decimal latitude
                  example: 28.858403
                longitude:
                  type: number
                  description: Decimal longitude
                  example: 28.2945
                geo_radius:
                  type: integer
                  description: The point of interest's radius in meters
                  example: 300
                colour:
                  type: string
                  description: Hexadecimal colour value
                  example: '#334455'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    required:
                      - poi_id
                      - name
                      - latitude
                      - longitude
                    properties:
                      poi_id:
                        type: integer
                        description: The id of the point of interest
                        example: 12345
                      name:
                        type: string
                        description: The name of the point of interest
                        example: Head office
                      description:
                        type:
                          - string
                          - 'null'
                        description: The description of the point of interest
                        example: Where the big bosses are
                      update_ts:
                        $ref: '#/components/schemas/date'
                        description: Update timestamp
                      geo_radius:
                        type:
                          - string
                          - 'null'
                        description: The point of interest's radius in meters
                        example: '300'
                      colour:
                        type:
                          - string
                          - 'null'
                        description: The colour of the point of interest
                        example: '#334455'
                      latitude:
                        type: number
                        description: Geocoded data (not directly editable)
                        example: -26.180765
                      longitude:
                        type: number
                        description: Geocoded data (not directly editable)
                        example: 28.442755
                      position_description:
                        type: string
                        description: Geocoded location information (not directly editable)
                        example: ABC near XYZ
                      subuser_id:
                        oneOf:
                          - $ref: '#/components/schemas/uuid'
                          - type: 'null'
                        description: If the point of interest is owned by a subuser
                        example: 7489ff44-xxxx-11eb-xxxx-005056a801ca
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /pois/{poi_id}:
    get:
      summary: Get a point of interest (POI) by id
      tags:
        - Points of interest
      deprecated: false
      description: This endpoint gets a single point of interest (POI) by its id
      parameters:
        - name: poi_id
          in: path
          description: The POI's ID
          required: true
          schema:
            type: integer
          example: 12345
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      poi_id:
                        type: integer
                        description: The id of the point of interest
                        example: 12345
                      name:
                        type: string
                        description: The name of the point of interest
                        example: Head office
                      description:
                        type:
                          - string
                          - 'null'
                        description: The description of the point of interest
                        example: Where the big bosses are
                      update_ts:
                        $ref: '#/components/schemas/date'
                        description: Update timestamp
                      geo_radius:
                        type:
                          - string
                          - 'null'
                        description: The point of interest's radius in meters
                        example: '300'
                      colour:
                        type:
                          - string
                          - 'null'
                        description: The colour of the point of interest
                        example: '#334455'
                      latitude:
                        type: number
                        description: Geocoded data (not directly editable)
                        example: -26.180765
                      longitude:
                        type: number
                        description: Geocoded data (not directly editable)
                        example: 28.442755
                      position_description:
                        type: string
                        description: Geocoded location information (not directly editable)
                        example: ABC near XYZ
                      subuser_id:
                        oneOf:
                          - $ref: '#/components/schemas/uuid'
                          - type: 'null'
                        description: If the point of interest is owned by a subuser
                        example: 7489ff44-xxxx-11eb-xxxx-005056a801ca
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    put:
      summary: Update a point of interest (POI)
      tags:
        - Points of interest
      deprecated: false
      description: This endpoint updates a point of interest (POI)
      parameters:
        - name: poi_id
          in: path
          description: The POI's ID
          required: true
          schema:
            type: integer
          example: 12345
      requestBody:
        description: One or more of the parameters to be updated
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: The point of interest's name
                  example: Name for POI
                description:
                  type: string
                  description: The point of interest's description
                  example: Your description
                latitude:
                  type: number
                  description: Decimal latitude
                  example: 28.858403
                longitude:
                  type: number
                  description: Decimal longitude
                  example: 28.2945
                geo_radius:
                  type: integer
                  description: The point of interest's radius in meters
                  example: 300
                colour:
                  type: string
                  description: Hexadecimal colour value
                  example: '#334455'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      poi_id:
                        type: integer
                        description: The id of the point of interest
                        example: 12345
                      name:
                        type: string
                        description: The name of the point of interest
                        example: Head office
                      description:
                        type:
                          - string
                          - 'null'
                        description: The description of the point of interest
                        example: Where the big bosses are
                      update_ts:
                        $ref: '#/components/schemas/date'
                        description: Update timestamp
                      geo_radius:
                        type:
                          - string
                          - 'null'
                        description: The point of interest's radius in meters
                        example: '300'
                      colour:
                        type:
                          - string
                          - 'null'
                        description: The colour of the point of interest
                        example: '#334455'
                      latitude:
                        type: number
                        description: Geocoded data (not directly editable)
                        example: -26.180765
                      longitude:
                        type: number
                        description: Geocoded data (not directly editable)
                        example: 28.442755
                      position_description:
                        type: string
                        description: Geocoded location information (not directly editable)
                        example: ABC near XYZ
                      subuser_id:
                        oneOf:
                          - $ref: '#/components/schemas/uuid'
                          - type: 'null'
                        description: If the point of interest is owned by a subuser
                        example: 7489ff44-xxxx-11eb-xxxx-005056a801ca
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    delete:
      summary: Delete a point of interest (POI)
      tags:
        - Points of interest
      deprecated: false
      description: This endpoint deletes a point of interest (POI)
      parameters:
        - name: poi_id
          in: path
          description: The POI's ID
          required: true
          schema:
            type: integer
          example: 12345
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    description: Data won't return anything
                    example: '{}'
                  meta:
                    type: object
                    description: The meta object containing a message
                    properties:
                      message:
                        type: string
                        example: Successfully deleted the POI.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /reminders/fleet:
    get:
      summary: Get Fleet Reminders
      tags:
        - Reminders
      deprecated: false
      description: This endpoint returns all/filtered list of reminders for the fleet.
      parameters:
        - $ref: '#/components/parameters/vehicle_id'
        - $ref: '#/components/parameters/registration'
          description: Filter by vehicle registration. Case sensitive, exact match.
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      required:
                        - vehicle_id
                        - registration
                        - reminders
                      properties:
                        vehicle_id:
                          $ref: '#/components/schemas/vehicle-id'
                        registration:
                          $ref: '#/components/schemas/registration'
                        reminders:
                          type: array
                          items:
                            type: object
                            required:
                              - reminder_category
                              - current_value
                              - next_reminder
                              - remaining
                              - unit_of_measure
                            properties:
                              reminder_category:
                                type: string
                                description: Reminder category name
                                example: SERVICE
                              current_value:
                                type:
                                  - number
                                  - string
                                description: Current vehicle value based on the configured reminder criteria.
                                example: 177472
                              next_reminder:
                                type:
                                  - number
                                  - string
                                description: Next reminder value based on the scheduled reminder.
                                example: 180000
                              remaining:
                                type: number
                                description: Remaining value based on the scheduled reminder.
                                example: 2528
                              unit_of_measure:
                                type: string
                                description: Measurement unit applied to this reminder.
                                example: kilometer
                                enum:
                                  - kilometer
                                  - hour
                                  - day
                  meta:
                    $ref: '#/components/schemas/pagination'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /ruc/latest:
    get:
      summary: Retrieve Vehicle Latest RUC License Record
      tags:
        - Road User Charge (RUC)
      deprecated: false
      description: This endpoint returns the latest RUC license record for the vehicles in the fleet.
      parameters:
        - $ref: '#/components/parameters/registration'
          description: Optional filter to retrieve license by the vehicle registration.
        - name: filter[license]
          in: query
          description: Optional filter to retrieve records by license
          required: false
          schema:
            type:
              - string
              - 'null'
          example: '745381999'
        - name: filter[weight]
          in: query
          description: Optional filter to retrieve license records by weight
          required: false
          schema:
            type:
              - string
              - 'null'
            enum:
              - 2c
              - 16c
          example: 2c
        - name: filter[permit_type]
          in: query
          description: Optional filter to retrieve license records by permit_type
          required: false
          schema:
            type:
              - string
              - 'null'
            enum:
              - D
              - E
              - F
          example: D
        - name: filter[is_valid]
          in: query
          description: Optional filter to filter the license records by its validity
          required: false
          schema:
            type:
              - boolean
              - 'null'
            enum:
              - true
              - false
          example: 'true'
        - name: filter[issue_timestamp_from]
          in: query
          description: Optional filter to retrieve license records on or after a specific date and time.
          required: false
          schema:
            $ref: '#/components/schemas/date'
          example: '2024-09-01 00:00:00'
        - name: filter[issue_timestamp_to]
          in: query
          description: Optional filter to retrieve license records on or before a specific date and time.
          required: false
          schema:
            $ref: '#/components/schemas/date'
          example: '2024-09-31 23:59:59'
        - $ref: '#/components/parameters/page_without_validation'
        - $ref: '#/components/parameters/limit_without_validation'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        license:
                          type: integer
                          description: The license ID.
                          example: '752348492'
                        issue_date:
                          $ref: '#/components/schemas/timestamp'
                          description: Timestamp of license issuance date
                        permit_id:
                          type: integer
                          description: Unique identifier.
                          example: 1251
                        permit_type:
                          type:
                            - integer
                            - string
                          description: The permit type.
                          example: D
                        permit_number:
                          type: string
                          description: The permit number.
                          example: '752348492'
                        vehicle_id:
                          $ref: '#/components/schemas/vehicle-id'
                        registration:
                          $ref: '#/components/schemas/registration'
                        chassis_number:
                          $ref: '#/components/schemas/chassis-number'
                        odometer:
                          type: integer
                          description: The vehicle's odometer reading at the time of the last update, in meters
                          example: '80998277'
                        min_odometer:
                          type: integer
                          description: The vehicle's minimum odometer, in meters
                          example: '65000'
                        max_odometer:
                          type: integer
                          description: The vehicle's maximum odometer, in meters
                          example: '70000'
                        current_km:
                          type: integer
                          description: The vehicle's current distance, in kilometers
                          example: '80998'
                        remaining_km:
                          type: integer
                          description: The vehicle's remaining distance, in kilometers
                          example: '0'
                        distance_recorded:
                          type: string
                          description: The vehicle's distance reading
                          example: distance_recorder
                        weight:
                          type: string
                          description: The vehicle weight classification.
                          example: 2c
                        is_valid:
                          type: integer
                          description: The license validity identifier
                          example: 'true'
                        created_ts:
                          $ref: '#/components/schemas/timestamp'
                          description: Created timestamp
                        updated_ts:
                          oneOf:
                            - $ref: '#/components/schemas/timestamp'
                            - type: 'null'
                          description: Updated timestamp
                  meta:
                    $ref: '#/components/schemas/pagination'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /subusers:
    get:
      summary: Get all subusers
      tags:
        - Subusers
      deprecated: false
      description: This endpoint returns all the subusers of your account
      parameters:
        - $ref: '#/components/parameters/page_without_validation'
        - $ref: '#/components/parameters/limit_without_validation'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        subuser_id:
                          $ref: '#/components/schemas/uuid'
                          description: The ID of the subuser
                        subuser_name:
                          type: string
                          description: The username of the subuser
                          example: DMX179222
                        create_ts:
                          $ref: '#/components/schemas/timestamp'
                          description: The date of creation of this subuser
                        update_ts:
                          oneOf:
                            - $ref: '#/components/schemas/timestamp'
                            - type: 'null'
                          description: The last update of this subuser
                        cell_number:
                          oneOf:
                            - $ref: '#/components/schemas/phone-number'
                            - type: 'null'
                          description: The phone number of the subuser
                        email:
                          oneOf:
                            - $ref: '#/components/schemas/email'
                            - type: 'null'
                          description: The email of the subuser
                        is_locked:
                          type: boolean
                          description: The state of the subuser's account locked/unlocked
                          example: false
                        is_active:
                          type: boolean
                          description: The state of the subuser's account active/inactive
                          example: false
                        api_key:
                          type:
                            - string
                            - 'null'
                          description: The api access key for the subuer
                          example: 0O6UZDrvRVm6Vh58vfD4bf1d4QBRep1233456789x
                  meta:
                    $ref: '#/components/schemas/pagination'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /subusers/apikey/{subuser_id}:
    post:
      summary: Generate an API Key
      tags:
        - Subusers
      deprecated: false
      description: This endpoint will generate or regenerate an API key a subuser of your account
      parameters:
        - name: subuser_id
          in: path
          description: The subuser's ID
          required: true
          schema:
            $ref: '#/components/schemas/uuid'
            example: 6226624c-f819-11ec-b939-0242ac120002
      requestBody:
        description: The json data (empty object)
        required: true
        content:
          application/json:
            schema:
              type: object
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      api_key:
                        type:
                          - string
                          - 'null'
                        description: The api access key for the subuser
                        example: 0O6UZDrvRVm6Vh58vfD4bf1d4QBRep1233456789x
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    delete:
      summary: Revoke an API Key
      tags:
        - Subusers
      deprecated: false
      description: This endpoint will revoke the API key of a subuser of your account
      parameters:
        - name: subuser_id
          in: path
          description: The subuser's ID
          required: true
          schema:
            $ref: '#/components/schemas/uuid'
            example: 6226624c-f819-11ec-b939-0242ac120002
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: 'null'
                    description: Data won't return anything
                    example: null
                  meta:
                    type: object
                    description: The meta object containing a message
                    properties:
                      message:
                        type: string
                        example: Successfully revoked the API Key.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /subusers/login-history:
    get:
      summary: Get subusers login history
      tags:
        - Subusers
      deprecated: false
      description: This endpoint returns all the subusers of login history
      parameters:
        - $ref: '#/components/parameters/date_from'
          description: The date where filtering will start
          required: true
        - $ref: '#/components/parameters/date_to'
          description: The date where filtering will end
          required: true
        - $ref: '#/components/parameters/filter_subuser_id'
          description: The subuser id
        - $ref: '#/components/parameters/page_without_validation'
        - $ref: '#/components/parameters/limit_without_validation'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        subuser_id:
                          $ref: '#/components/schemas/uuid'
                          description: The ID of the subuser
                        event_ts:
                          $ref: '#/components/schemas/timestamp'
                          description: The date of login took place
                        origin:
                          type: string
                          description: Displays the current login origin
                          example: Fleet-App-Andriod
                        status:
                          type: string
                          enum:
                            - SUCCESS
                            - FAILURE
                          description: The state of the subuser's login success/failure
                          example: SUCCESS
                  meta:
                    $ref: '#/components/schemas/pagination'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /health:
    get:
      summary: Health Check
      tags:
        - System
      deprecated: false
      description: This endpoint allows you to verify the availability of Fleet API without requiring user authentication.<br/><br/> <strong>Note:</strong> This endpoint is subject to a rate limit, allowing a maximum of 1 request every 5 minutes.
      parameters: []
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: ok
                    description: Current status
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /tachographs:
    get:
      summary: Get All Tachograph Files
      tags:
        - Tachograph
      deprecated: false
      description: This endpoint returns all/filtered list of tachograph files.
      parameters:
        - name: filter[created_at_from]
          in: query
          description: This will return files from this date and time.
          required: false
          schema:
            $ref: '#/components/schemas/date'
          example: '2022-01-01 00:00:00'
        - name: filter[created_at_to]
          in: query
          description: This will return files to this date and time.
          required: false
          schema:
            $ref: '#/components/schemas/date'
          example: '2022-01-01 23:59:59'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: List of files.
                    items:
                      type: object
                      properties:
                        filename:
                          type: string
                          description: The relative path of the file
                          example: driver/C_20180522_1503_J_00000008771420.DDD
                        size:
                          type: integer
                          description: The file size in bytes
                          example: 26145
                        created_at:
                          $ref: '#/components/schemas/timestamp-with-offset'
                          description: The file creation date
                          example: '2023-04-06T11:07:40+00:00'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /tachographs/download:
    get:
      summary: Download Tachograph File
      tags:
        - Tachograph
      deprecated: false
      description: This endpoint allows you to download a tachograph file based on the filename.
      parameters:
        - name: filename
          in: query
          description: The relative path of the file
          required: true
          schema:
            type: string
          example: driver/C_20180522_1503_J_00000008771420.DDD
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: 'null'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /tachographs/driving-times:
    get:
      summary: Retrieve Tachograph Driver Driving Times
      tags:
        - Tachograph
      deprecated: false
      description: This endpoint retrieves tachograph driver driving times for a specified date range, providing the total driving and rest times per driver per day within that range.
      parameters:
        - name: filter[driver_ids]
          in: query
          description: The list of unique identifiers (UUIDs) of the tachograph drivers whose driving times are being requested, separated by commas.
          required: false
          schema:
            type: string
          example: 550e8400-e29b-41d4-a716-446655440000,660e8400-e29b-41d4-a716-446655440111
        - name: filter[start_date]
          in: query
          description: 'The start date for the driving times being requested, default is today. Format: YYYY-MM-DD.<br/> Note: The maximum date range allowed is 1 month.'
          required: false
          schema:
            $ref: '#/components/schemas/date-only'
          example: '2022-01-01'
        - name: filter[end_date]
          in: query
          description: 'The end date for the driving times being requested, default is today. Format: YYYY-MM-DD.<br/> Note: The maximum date range allowed is 1 month.'
          required: false
          schema:
            $ref: '#/components/schemas/date-only'
          example: '2022-01-01'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/limit'
          schema:
            $ref: ../../components/properties/limit.yaml
            type: integer
            description: Number of items per page
            example: 15
            default: 10
            minimum: 1
            maximum: 100
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: List of driving times.
                    items:
                      type: object
                      properties:
                        driver_id:
                          $ref: '#/components/schemas/uuid'
                          description: The unique identifier of the driver
                        date:
                          $ref: '#/components/schemas/date-only'
                          description: The date of the driving times
                        driving_time_seconds:
                          type: integer
                          description: The total driving time in seconds for the driver on the specified date
                          example: 3600
                        rest_time_seconds:
                          type: integer
                          description: The total rest time in seconds for the driver on the specified date
                          example: 7200
                  meta:
                    $ref: '#/components/schemas/pagination'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /terminal/config1:
    get:
      summary: Get DID, immobilisation and buzzer configuration for a list of vehicles (config 1)
      tags:
        - Terminal Commands
      deprecated: false
      description: 'This function returns the current configuration (with 1 = ON, 0 = OFF) for the following:<br/> <ul> <li>Driver identification toggle</li> <li>Immobilisation toggle</li> <li>Buzzer toggle</li> </ul> <p> You can use this endpoint by passing the list of identifiers (comma separated) inside the query parameter <code>terminal_identifiers</code> with either: </p> <ul> <li>the vehicles'' identification numbers (VIN)</li> <li>the Cartrack terminals'' serials</li> <li>the vehicles'' registrations</li> </ul> <p><em>Important: All identifiers in the list must be of the same type.</em></p>'
      parameters:
        - name: terminal_identifiers
          in: query
          description: The terminal identifiers, comma separated. They must be of the same type
          required: true
          schema:
            type: string
          example: ABC123X
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        terminal_identifier:
                          type: string
                          description: The terminal identifiers, comma seperated. They must be of the same type
                          example: ABC1234X
                        valid_configuration:
                          type: boolean
                          description: It will be true if the configuration is valid
                          example: true
                        configuration_ts:
                          oneOf:
                            - $ref: '#/components/schemas/timestamp'
                            - type: 'null'
                          description: The timestamp of the latest configuration received by the unit
                          example: '2023-01-27 09:35:46.677791+08'
                        did_io:
                          type: integer
                          description: The driver identification tag - for drivers to identify themselves with a tag - active/inactive
                          example: 1
                        immobilisation_io:
                          type: integer
                          description: Immobilisation of the vehicle - if active, it won't be possible to turn on the engine  - active/inactive
                          example: 0
                        buzzer_io:
                          type: integer
                          description: Buzzer in the vehicle - if active and the driver is not identified, it will buzz - active/inactive
                          example: 0
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    put:
      summary: Update the config 1 for a list of vehicles
      tags:
        - Terminal Commands
      deprecated: false
      description: |-
        Please use this function to toggle on/off:<br/> <ul> <li>the driver identification</li> <li>the vehicle immobilisation</li> <li>the buzzer</li> </ul>
        <p>The expected values are: <strong>ON</strong>, <strong>OFF</strong>, <strong>UNCHANGED</strong></p>
        <p> You can use this endpoint by passing the list of identifiers (comma separated) inside the query parameter <code>terminal_identifiers</code> with either: </p>
        <ul> <li>the vehicles' identification numbers (VIN)</li> <li>the Cartrack terminals' serials</li> <li>the vehicles' registrations</li> </ul>
        <p><em>Important: All identifiers in the list must be of the same type.</em></p>
        <p><strong>Notice:</strong></p> <ol> <li> After making a call, please verify the returned value <code>configuration_ts</code> to make sure the configuration is received by the vehicle. </li> <li> This endpoint should ***not be called more than once every 5 minutes*** to prevent hardware failures. </li> </ol>
      requestBody:
        description: The json data that needs to be processed
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - terminal_identifiers
                - did_toggle
                - immobilisation_toggle
                - buzzer_toggle
              properties:
                terminal_identifiers:
                  type: string
                  description: The terminal identifiers, comma seperated. They must be of the same type
                  example: ABC123X
                did_toggle:
                  type: string
                  description: The driver identification tag - for drivers to identify themselves with a tag - active/inactive
                  example: 'ON'
                  enum:
                    - 'ON'
                    - 'OFF'
                    - UNCHANGED
                immobilisation_toggle:
                  type: string
                  description: Immobilisation of the vehicle - if active, it won't be possible to turn on the engine  - active/inactive
                  example: 'OFF'
                  enum:
                    - 'ON'
                    - 'OFF'
                    - UNCHANGED
                buzzer_toggle:
                  type: string
                  description: Buzzer in the vehicle - if active and the driver is not identified, it will buzz - active/inactive
                  example: 'OFF'
                  enum:
                    - 'ON'
                    - 'OFF'
                    - UNCHANGED
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        terminal_identifier:
                          type: string
                          description: The terminal identifier
                          example: ABC1234X
                        configuration_request_id:
                          type: integer
                          description: The configuration request Id
                          example: 12345X
                        error:
                          type: string
                          description: The error, if not empty
                          example: ''
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /terminal/config9:
    get:
      summary: Get overspeed configuration for a list of vehicles (config9)
      tags:
        - Terminal Commands
      deprecated: false
      description: |-
        This function returns the current configuration (with 1 = ON, 0 = OFF) for the following:<br/> <ul> <li>Overspeed buzzer thresholds in km/h</li> <li>Buzzer toggle</li> </ul>
        <p> You can use this endpoint by passing the list of identifiers (comma separated) inside the query parameter <code>terminal_identifiers</code> with either: </p>
        <ul> <li>the vehicles' identification numbers (VIN)</li> <li>the Cartrack terminals' serials</li> <li>the vehicles' registrations</li> </ul>
        <p><em>Important: All identifiers in the list must be of the same type.</em></p>
      parameters:
        - name: terminal_identifiers
          in: query
          description: The terminal identifiers, comma separated. They must be of the same type
          required: true
          schema:
            type: string
          example: ABC123X
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        terminal_identifier:
                          type: string
                          description: The terminal identifier
                          example: ABC1234X
                        valid_configuration:
                          type: boolean
                          description: It will be true if the configuration is valid
                          example: true
                        configuration_ts:
                          oneOf:
                            - $ref: '#/components/schemas/timestamp'
                            - type: 'null'
                          description: The timestamp of the latest configuration received by the unit
                          example: '2023-01-27 09:35:46.677791+08'
                        overspeed_threshold:
                          type: integer
                          description: The configured overspeed threshold - if the vehicle goes over this limit, it will trigger overspeeding events
                          example: 120
                        overspeed_buzzer:
                          type:
                            - integer
                            - 'null'
                          description: The configured overspeed buzzer - if the vehicle goes over the specified speed limit, it will trigger the buzzer
                          example: null
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    put:
      summary: Update the config 9 for a list of vehicles
      tags:
        - Terminal Commands
      deprecated: false
      description: |-
        Please use this function to toggle on/off:<br/> <ul> <li>the overspeed buzzer threshold</li> <li>the overspeed buzzer toggle</li> </ul>
        <p>The expected values are: <strong>ON</strong>, <strong>OFF</strong>, <strong>UNCHANGED</strong></p>
        <p> You can use this endpoint by passing the list of identifiers (comma separated) inside the query parameter <code>terminal_identifiers</code> with either: </p>
        <ul> <li>the vehicles' identification numbers (VIN)</li> <li>the Cartrack terminals' serials</li> <li>the vehicles' registrations</li> </ul>
        <p><em>Important: All identifiers in the list must be of the same type.</em></p>
        <p><strong>Notice:</strong></p> <ol> <li> After making a call, please verify the returned value <code>configuration_ts</code> to make sure the configuration is received by the vehicle. </li> <li> This endpoint should ***not be called more than once every 5 minutes*** to prevent hardware failures. </li> </ol>
      requestBody:
        description: The json data that needs to be processed
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - terminal_identifiers
                - overspeed_buzzer
                - overspeed_threshold
              properties:
                terminal_identifiers:
                  type: string
                  description: The terminal identifiers, comma seperated. They must be of the same type
                  example: ABC123X
                overspeed_threshold:
                  type: integer
                  description: The configured overpseed threshold - if the vehicle goes over this limit, it will trigger overspeeding events
                  example: 130
                overspeed_buzzer:
                  type: string
                  description: The configured overspeed buzzer - if the vehicle goes over the specified speed limit, it will trigger the buzzer
                  example: 'ON'
                  enum:
                    - 'ON'
                    - 'OFF'
                    - UNCHANGED
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        terminal_identifier:
                          type: string
                          description: The terminal identifier
                          example: ABC1234X
                        configuration_request_id:
                          type: integer
                          description: The configuration request Id
                          example: 6541345
                        error:
                          type: string
                          description: The error, if not empty
                          example: ''
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /topics/vehicles/door:
    get:
      summary: Get Vehicles Door Open/Close Events
      tags:
        - Topics
      deprecated: false
      description: This endpoint allows you to retrieve door open/close event data for all vehicles in the account. <br/><br/> <strong>Note:</strong> This endpoint supports Topic-Based Access Control. Grant the `DOOR` topic to a subuser to provide the same data access as the account administrator for this endpoint.
      parameters:
        - $ref: '#/components/parameters/registration'
          description: The vehicle's registration
        - $ref: '#/components/parameters/start_timestamp'
          description: Returns door open/close event data within the specified range, limited to a maximum 24-hour period. `end_timestamp` defaults to <strong>24 hours</strong> after the specified `start_timestamp` if omitted. <br/><br/> Omit both timestamps to get the latest vehicle door open/close event, if data was reported within the last 2 months.
          required: false
          example: '2025-08-26 00:00:00'
        - $ref: '#/components/parameters/end_timestamp'
          description: Returns door open/close event data within the specified range, limited to a maximum 24-hour period. `start_timestamp` defaults to <strong>24 hours</strong> before the specified `end_timestamp` if omitted. <br/><br/> Omit both timestamps to get the latest vehicle door open/close event, if data was reported within the last 2 months.
          example: '2025-08-26 23:59:59'
          required: false
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      required:
                        - vehicle_id
                        - registration
                        - event_ts
                        - recieved_ts
                      properties:
                        vehicle_id:
                          $ref: '#/components/schemas/vehicle-id'
                        registration:
                          $ref: '#/components/schemas/registration'
                        event_description:
                          type: string
                          description: The description of the door open/close event
                          example: DOOR_1_CLOSE
                        event_ts:
                          $ref: '#/components/schemas/timestamp'
                          description: The timestamp when the door open/close event occurred
                        recieved_ts:
                          $ref: '#/components/schemas/timestamp'
                          description: The timestamp when the door open/close event data was received by the system
                  meta:
                    $ref: '#/components/schemas/pagination'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /topics/vehicles/temperature:
    get:
      summary: Get Vehicles Temperature Data
      tags:
        - Topics
      deprecated: false
      description: This endpoint allows you to retrieve vehicle temperature data from all vehicles in the account. <br/><br/> <strong>Note:</strong> This endpoint supports Topic-Based Access Control. Grant the `TEMPERATURE` topic to a subuser to provide the same data access as the account administrator for this endpoint.
      parameters:
        - $ref: '#/components/parameters/registration'
          description: The vehicle's registration
        - $ref: '#/components/parameters/start_timestamp'
          description: Returns temperature data within the specified range, limited to a maximum 24-hour period. `end_timestamp` defaults to <strong>24 hours</strong> after the specified `start_timestamp` if omitted. <br/><br/> Omit both timestamps to get the latest vehicle temperature data, if data was reported within the last 2 months.
          example: '2025-08-26 00:00:00'
          required: false
        - $ref: '#/components/parameters/end_timestamp'
          description: Returns temperature data within the specified range, limited to a maximum 24-hour period. `start_timestamp` defaults to <strong>24 hours</strong> before the specified `end_timestamp` if omitted. <br/><br/> Omit both timestamps to get the latest vehicle temperature data, if data was reported within the last 2 months.
          example: '2025-08-26 23:59:59'
          required: false
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      required:
                        - vehicle_id
                        - registration
                        - event_ts
                        - recieved_ts
                      properties:
                        vehicle_id:
                          $ref: '#/components/schemas/vehicle-id'
                        registration:
                          $ref: '#/components/schemas/registration'
                        temp1:
                          type:
                            - number
                            - 'null'
                          format: float
                          description: Temperature reading from sensor 1 (in Celsius)
                          example: 23.5
                        temp2:
                          type:
                            - number
                            - 'null'
                          format: float
                          description: Temperature reading from sensor 2 (in Celsius)
                          example: 24.1
                        temp3:
                          type:
                            - number
                            - 'null'
                          format: float
                          description: Temperature reading from sensor 3 (in Celsius)
                          example: 22.8
                        temp4:
                          type:
                            - number
                            - 'null'
                          format: float
                          description: Temperature reading from sensor 4 (in Celsius)
                          example: 25.2
                        event_ts:
                          $ref: '#/components/schemas/timestamp'
                          description: The timestamp when the temperature data was recorded
                          example: '2025-08-25 22:48:09+08'
                        recieved_ts:
                          $ref: '#/components/schemas/timestamp'
                          description: The timestamp when the temperature data was received by the system
                          example: '2025-08-25 22:48:09+08'
                  meta:
                    $ref: '#/components/schemas/pagination'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /trips:
    get:
      summary: Get All Trips
      tags:
        - Trips
      deprecated: false
      description: This API endpoint is designed to fetch a comprehensive list of all your trips linked to your account, specifically within a designated date range. It's important to note that the functionality of the "start_coordinates" and "end_coordinates" parameters is applicable solely to trips initiated on or after January 24, 2023.
      parameters:
        - $ref: '#/components/parameters/start_timestamp'
          description: Returns all trips that overlap the specified time range. Any trip that starts before this timestamp but ends after it will be included. Any trip that starts within the range but ends after the end_timestamp will also be included
          required: true
          example: '2022-01-01 00:00:00'
        - $ref: '#/components/parameters/end_timestamp'
          description: "Returns trips that overlap up to this date and time. Any trip that starts or ends within the period will be included, even if it extends outside the end_timestamp. <br/><br/>\r\n                The lookup period is of <strong>maximum 31 days</strong> between the start_timestamp and the end_timestamp\r\n            "
          required: true
          example: '2022-01-01 23:59:59'
        - name: incl_private
          in: query
          description: Setting this to true will include private trips data in the results<br/> Private trips are controlled and only a limited set of data will be returned
          required: false
          schema:
            type: boolean
            default: false
          example: false
        - $ref: '#/components/parameters/page_without_validation'
        - $ref: '#/components/parameters/limit_without_validation'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: This array returns the list of trips
                    items:
                      type: object
                      properties:
                        trip_id:
                          type: integer
                          example: 123456
                          description: The unique identifier of the trip.
                        vehicle_id:
                          $ref: '#/components/schemas/vehicle-id'
                        registration:
                          $ref: '#/components/schemas/registration'
                        chassis_number:
                          $ref: '#/components/schemas/chassis-number'
                        terminal_id:
                          oneOf:
                            - $ref: '#/components/schemas/terminal-id'
                            - type: 'null'
                          description: The unique identifier of the terminal installed in the vehicle.
                        terminal_serial:
                          oneOf:
                            - $ref: '#/components/schemas/terminal-serial'
                            - type: 'null'
                          description: The serial number of the Cartrack terminal.
                        start_timestamp:
                          oneOf:
                            - $ref: '#/components/schemas/date'
                            - type: 'null'
                          description: The date and time when the trip started.
                        end_timestamp:
                          oneOf:
                            - $ref: '#/components/schemas/date'
                            - type: 'null'
                          description: The date and time when the trip ended.
                        trip_duration:
                          type:
                            - string
                            - 'null'
                          format: duration
                          example: '00:20:11'
                          description: The duration of the trip in HH:MM:SS format (between the moment the ignition went ON and the moment the ignition went OFF).
                        trip_duration_seconds:
                          type:
                            - integer
                            - 'null'
                          example: 1211
                          description: The duration of the trip in seconds (between the moment the ignition went ON and the moment the ignition went OFF).
                        start_location:
                          type:
                            - string
                            - 'null'
                          example: LOCATION X
                          description: The initial location of the trip.
                        start_coordinates:
                          type: object
                          description: The latitude and longitude coordinates of the trip's starting point. These coordinates may be null if the vehicle did not have a GPS fix at the start. Applicable only for trips that began after January 24, 2023.
                          properties:
                            latitude:
                              type:
                                - number
                                - 'null'
                              description: The latitude coordinate of the trip's starting point.
                              example: 1.373211
                            longitude:
                              type:
                                - number
                                - 'null'
                              description: The longitude coordinate of the trip's starting point.
                              example: 103.955124
                        end_location:
                          type:
                            - string
                            - 'null'
                          example: LOCATION Y
                          description: The final location of the trip.
                        end_coordinates:
                          type: object
                          description: The latitude and longitude coordinates of the trip's ending point. These coordinates may be null if the vehicle did not have a GPS fix at the end. Applicable only for trips that began after January 24, 2023.
                          properties:
                            latitude:
                              type:
                                - number
                                - 'null'
                              description: The latitude coordinate of the trip's ending point.
                              example: 1.31974
                            longitude:
                              type:
                                - number
                                - 'null'
                              description: The longitude coordinate of the trip's ending point.
                              example: 103.889633
                        start_odometer:
                          type:
                            - integer
                            - 'null'
                          example: 10100
                          description: The odometer reading at the beginning of the trip, measured in meters.
                        end_odometer:
                          type:
                            - integer
                            - 'null'
                          example: 10230
                          description: The odometer reading at the end of the trip, measured in meters.
                        trip_distance:
                          type:
                            - integer
                            - 'null'
                          example: 130
                          description: The total distance covered during the trip, measured in meters.
                        start_geofence_name:
                          type:
                            - string
                            - 'null'
                          example: GEOFENCE NAME A
                          maxLength: 200
                          description: The name of the geofence where the trip started.
                        end_geofence_name:
                          type:
                            - string
                            - 'null'
                          example: GEOFENCE NAME B
                          maxLength: 200
                          description: The name of the geofence where the trip ended.
                        clock_start:
                          type:
                            - integer
                            - 'null'
                          example: 1200
                          description: The reading on the clock when the trip started, measured in minutes. The clock value represents the total time the engine has been ON since the Cartrack tracker was first installed.
                        clock_end:
                          type:
                            - integer
                            - 'null'
                          example: 1303
                          description: The reading on the clock when the trip ended, measured in minutes. The clock value represents the total time the engine has been ON since the Cartrack tracker was first installed.
                        thresholds_speeding_events:
                          type:
                            - integer
                            - 'null'
                          example: 2
                          description: The number of instances of speeding events that exceeded an absolute speed limit, triggering alerts.
                        thresholds_speeding_duration_seconds:
                          type:
                            - integer
                            - 'null'
                          example: 60
                          description: The total duration in seconds of speeding events that exceeded an absolute speed limit, triggering alerts.
                        road_speeding_events:
                          type:
                            - integer
                            - 'null'
                          example: 5
                          description: The number of instances of speeding events that exceeded the road speed limit, triggering alerts.
                        road_speeding_duration_seconds:
                          type:
                            - integer
                            - 'null'
                          example: 120
                          description: The total duration in seconds of speeding events that exceeded the road speed limit, triggering alerts.
                        max_speed:
                          type:
                            - integer
                            - 'null'
                          example: 4
                          description: The maximum speed reached during the trip, measured in meters per second.
                        harsh_braking_events:
                          type:
                            - integer
                            - 'null'
                          example: 1
                          description: The number of "harsh braking" events that occurred during the trip.
                        harsh_cornering_events:
                          type:
                            - integer
                            - 'null'
                          example: 0
                          description: The number of "harsh cornering" events that occurred during the trip.
                        harsh_acceleration_events:
                          type:
                            - integer
                            - 'null'
                          example: 2
                          description: The number of "harsh acceleration" events that occurred during the trip.
                        idle_time:
                          type:
                            - string
                            - 'null'
                          example: '00:01:08'
                          description: The total time the vehicle was idling during the trip, represented in HH:MM:SS format.
                        idle_time_seconds:
                          type:
                            - integer
                            - 'null'
                          example: 68
                          description: The total time the vehicle was idling during the trip, measured in seconds.
                        events_idle:
                          type:
                            - integer
                            - 'null'
                          example: 3
                          description: The number of "idle" events that occurred during the trip.
                        driver_id:
                          oneOf:
                            - $ref: '#/components/schemas/uuid'
                            - type: 'null'
                          example: f3a42187-0c6e-11ec-aa41-a4bf016cd6b2
                          description: The unique identifier of the driver associated with the trip.
                        driver_name:
                          type:
                            - string
                            - 'null'
                          example: Donald
                          description: The name of the driver associated with the trip.
                        driver_surname:
                          type:
                            - string
                            - 'null'
                          example: Smith
                          description: The surname of the driver associated with the trip.
                        identification_tag_id:
                          oneOf:
                            - $ref: '#/components/schemas/uuid'
                            - type: 'null'
                          example: 7489ff44-xxxx-11eb-xxxx-005056a801ca
                          description: The unique identifier for the identification tag used during the trip.
                        driver_tag_description:
                          type:
                            - string
                            - 'null'
                          example: Donald's Tag ID
                          description: The description of the driver's identification tag used during the trip.
                        trip_title:
                          type:
                            - string
                            - 'null'
                          example: Delivery
                          maxLength: 50
                          description: The title or name associated with the trip.
                        trip_extra_notes:
                          type:
                            - string
                            - 'null'
                          example: Deliver package A to customer X
                          maxLength: 200
                          description: Additional notes or details related to the trip.
                        trip_type:
                          type:
                            - string
                            - 'null'
                          example: Business
                          description: Indicates the user-defined classification of the trip. Can be set by users in the Fleet web interface or via the `PUT /trips/{registration}endpoint`. This is distinct from theis_private flag, which is driven by the telematic box configuration.
                        is_private:
                          type: boolean
                          example: false
                          description: Indicates whether the trip is considered private by the telematic device's onboard settings. This flag is set automatically based on the box configuration and cannot be modified via the Fleet web interface or API.
                  meta:
                    $ref: '#/components/schemas/pagination'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /trips/{registration}:
    get:
      summary: Get Trips By Registration
      tags:
        - Trips
      deprecated: false
      description: This endpoint returns all the trips of a vehicle between provided date range. Please note the parameters start_coordinates and end_coordinates are effective only for trips started after 2023-01-24.
      parameters:
        - name: registration
          in: path
          description: The license plate of the vehicle
          required: true
          schema:
            $ref: '#/components/schemas/registration'
            example: ABC1234
        - $ref: '#/components/parameters/start_timestamp'
          in: query
          description: Returns all trips that overlap the specified time range. Any trip that starts before this timestamp but ends after it will be included. Any trip that starts within the range but ends after the end_timestamp will also be included
          required: true
          example: '2022-01-01 00:00:00'
        - $ref: '#/components/parameters/end_timestamp'
          in: query
          description: Returns trips that overlap up to this date and time. Any trip that starts or ends within the period will be included, even if it extends outside the end_timestamp. <br/><br/> The lookup period is of <strong>maximum 31 days</strong> between the start_timestamp and the end_timestamp
          required: true
          example: '2022-01-01 23:59:59'
        - name: incl_private
          in: query
          description: Setting this to true will include private trips data in the results<br/> Private trips are controlled and only a limited set of data will be returned
          required: false
          schema:
            type: boolean
            default: false
          example: false
        - $ref: '#/components/parameters/page_without_validation'
        - $ref: '#/components/parameters/limit_without_validation'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: This array returns the list of trips
                    items:
                      type: object
                      properties:
                        trip_id:
                          type: integer
                          description: The unique identifier of the trip.
                          example: 123456
                        vehicle_id:
                          $ref: '#/components/schemas/vehicle-id'
                        registration:
                          $ref: '#/components/schemas/registration'
                        chassis_number:
                          $ref: '#/components/schemas/chassis-number'
                        terminal_id:
                          oneOf:
                            - $ref: '#/components/schemas/terminal-id'
                            - type: 'null'
                          description: The unique identifier of the terminal installed in the vehicle.
                          example: 456789
                        terminal_serial:
                          oneOf:
                            - $ref: '#/components/schemas/terminal-serial'
                            - type: 'null'
                          example: CTEF456S
                          description: The serial number of the Cartrack terminal.
                        start_timestamp:
                          oneOf:
                            - $ref: '#/components/schemas/date'
                            - type: 'null'
                          example: '2022-01-01 12:00:01'
                          description: The date and time when the trip started.
                        end_timestamp:
                          oneOf:
                            - $ref: '#/components/schemas/date'
                            - type: 'null'
                          example: '2022-01-01 12:00:01'
                          description: The date and time when the trip ended.
                        trip_duration:
                          type:
                            - string
                            - 'null'
                          format: duration
                          example: '00:20:11'
                          description: The duration of the trip in HH:MM:SS format (between the moment the ignition went ON and the moment the ignition went OFF).
                        trip_duration_seconds:
                          type:
                            - integer
                            - 'null'
                          example: 1211
                          description: The duration of the trip in seconds (between the moment the ignition went ON and the moment the ignition went OFF).
                        start_location:
                          type:
                            - string
                            - 'null'
                          example: LOCATION X
                          description: The initial location of the trip.
                        start_coordinates:
                          type: object
                          description: The latitude and longitude coordinates of the trip's starting point. These coordinates may be null if the vehicle did not have a GPS fix at the start. Applicable only for trips that began after January 24, 2023.
                          properties:
                            latitude:
                              type:
                                - number
                                - 'null'
                              description: The latitude coordinate of the trip's starting point.
                              example: 1.373211
                            longitude:
                              type:
                                - number
                                - 'null'
                              description: The longitude coordinate of the trip's starting point.
                              example: 103.955124
                        end_location:
                          type:
                            - string
                            - 'null'
                          example: LOCATION Y
                          description: The final location of the trip.
                        end_coordinates:
                          type: object
                          description: The latitude and longitude coordinates of the trip's ending point. These coordinates may be null if the vehicle did not have a GPS fix at the end. Applicable only for trips that began after January 24, 2023.
                          properties:
                            latitude:
                              type:
                                - number
                                - 'null'
                              description: The latitude coordinate of the trip's ending point.
                              example: 1.31974
                            longitude:
                              type:
                                - number
                                - 'null'
                              description: The longitude coordinate of the trip's ending point.
                              example: 103.889633
                        start_odometer:
                          type:
                            - integer
                            - 'null'
                          example: 10100
                          description: The odometer reading at the beginning of the trip, measured in meters.
                        end_odometer:
                          type:
                            - integer
                            - 'null'
                          example: 10230
                          description: The odometer reading at the end of the trip, measured in meters.
                        trip_distance:
                          type:
                            - integer
                            - 'null'
                          example: 130
                          description: The total distance covered during the trip, measured in meters.
                        start_geofence_name:
                          type:
                            - string
                            - 'null'
                          example: GEOFENCE NAME A
                          maxLength: 200
                          description: The name of the geofence where the trip started.
                        end_geofence_name:
                          type:
                            - string
                            - 'null'
                          example: GEOFENCE NAME B
                          maxLength: 200
                          description: The name of the geofence where the trip ended.
                        clock_start:
                          type:
                            - integer
                            - 'null'
                          example: 1200
                          description: The reading on the clock when the trip started, measured in minutes. The clock value represents the total time the engine has been ON since the Cartrack tracker was first installed.
                        clock_end:
                          type:
                            - integer
                            - 'null'
                          example: 1303
                          description: The reading on the clock when the trip ended, measured in minutes. The clock value represents the total time the engine has been ON since the Cartrack tracker was first installed.
                        thresholds_speeding_events:
                          type:
                            - integer
                            - 'null'
                          example: 2
                          description: The number of instances of speeding events that exceeded an absolute speed limit, triggering alerts.
                        thresholds_speeding_duration_seconds:
                          type:
                            - integer
                            - 'null'
                          example: 60
                          description: The total duration in seconds of speeding events that exceeded an absolute speed limit, triggering alerts.
                        road_speeding_events:
                          type:
                            - integer
                            - 'null'
                          example: 5
                          description: The number of instances of speeding events that exceeded the road speed limit, triggering alerts.
                        road_speeding_duration_seconds:
                          type:
                            - integer
                            - 'null'
                          example: 120
                          description: The total duration in seconds of speeding events that exceeded the road speed limit, triggering alerts.
                        max_speed:
                          type:
                            - integer
                            - 'null'
                          example: 4
                          description: The maximum speed reached during the trip, measured in meters per second.
                        harsh_braking_events:
                          type:
                            - integer
                            - 'null'
                          example: 1
                          description: The number of "harsh braking" events that occurred during the trip.
                        harsh_cornering_events:
                          type:
                            - integer
                            - 'null'
                          example: 0
                          description: The number of "harsh cornering" events that occurred during the trip.
                        harsh_acceleration_events:
                          type:
                            - integer
                            - 'null'
                          example: 2
                          description: The number of "harsh acceleration" events that occurred during the trip.
                        idle_time:
                          type:
                            - string
                            - 'null'
                          example: '00:01:08'
                          description: The total time the vehicle was idling during the trip, represented in HH:MM:SS format.
                        idle_time_seconds:
                          type:
                            - integer
                            - 'null'
                          example: 68
                          description: The total time the vehicle was idling during the trip, measured in seconds.
                        events_idle:
                          type:
                            - integer
                            - 'null'
                          example: 3
                          description: The number of "idle" events that occurred during the trip.
                        driver_id:
                          oneOf:
                            - $ref: '#/components/schemas/uuid'
                            - type: 'null'
                          example: f3a42187-0c6e-11ec-aa41-a4bf016cd6b2
                          description: The unique identifier of the driver associated with the trip.
                        driver_name:
                          type:
                            - string
                            - 'null'
                          example: Donald Smith
                          description: The name of the driver associated with the trip.
                        driver_surname:
                          type:
                            - string
                            - 'null'
                          example: Smith
                          description: The surname of the driver associated with the trip.
                        identification_tag_id:
                          oneOf:
                            - $ref: '#/components/schemas/uuid'
                            - type: 'null'
                          example: f3a42187-0c6e-11ec-aa41-a4bf016cd6b2
                          description: The unique identifier for the identification tag used during the trip.
                        driver_tag_description:
                          type:
                            - string
                            - 'null'
                          example: Donald's Tag ID
                          description: The description of the driver's identification tag used during the trip.
                        trip_title:
                          type:
                            - string
                            - 'null'
                          example: Delivery
                          maxLength: 50
                          description: The title or name associated with the trip.
                        trip_extra_notes:
                          type:
                            - string
                            - 'null'
                          example: Deliver package A to customer X
                          maxLength: 200
                          description: Additional notes or details related to the trip.
                        trip_type:
                          type:
                            - string
                            - 'null'
                          example: Business
                          description: Indicates the user-defined classification of the trip. Can be set by users in the Fleet web interface or via the `PUT /trips/{registration}endpoint`. This is distinct from theis_private flag, which is driven by the telematic box configuration.
                        is_private:
                          type: boolean
                          example: false
                          description: Indicates whether the trip is considered private by the telematic device's onboard settings. This flag is set automatically based on the box configuration and cannot be modified via the Fleet web interface or API.
                        ev_battery:
                          type:
                            - object
                            - 'null'
                          description: Information related to electric vehicle (EV) battery usage within the context of a vehicle trip record.
                          properties:
                            start_kwh:
                              type:
                                - number
                                - string
                                - 'null'
                              format: float
                              description: The starting kilowatt-hour (kWh) of the electric vehicle battery. For some vehicles, it can be returned as a percentage (text)
                              example: 10.5
                            end_kwh:
                              type:
                                - number
                                - string
                                - 'null'
                              format: float
                              description: The ending kilowatt-hour (kWh) of the electric vehicle battery. For some vehicles, it can be returned as a percentage (text)
                              example: 9.9
                            difference_kwh:
                              type:
                                - number
                                - 'null'
                              format: float
                              description: The difference in kilowatt-hours (kWh) between start and end values.
                              example: 0.6
                  meta:
                    $ref: '#/components/schemas/pagination'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    put:
      summary: Update Trip Information
      tags:
        - Trips
      deprecated: false
      description: This endpoint allows you to update the trip type, trip title and/or extra trip notes by specifying the vehicle registration and a timestamp. This can be useful if you want to automate the categorisation of your trips or add any additional information.
      parameters:
        - name: registration
          in: path
          description: The license plate of the vehicle
          required: true
          schema:
            $ref: '#/components/schemas/registration'
          example: ABC1234
      requestBody:
        description: The json data that needs to be processed
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - trip_title
                - trip_type
                - start_timestamp
              properties:
                trip_title:
                  type: string
                  maxLength: 50
                  description: The name or title of the trip you want to update.
                  example: ABC Cargo Services Inc.
                trip_type:
                  type: string
                  default: None
                  description: 'The type of the trip you want to update, which can be one of the following values: "None," "Business," or "Private."'
                  enum:
                    - None
                    - Business
                    - Private
                  example: Business
                trip_extra_notes:
                  type: string
                  maxLength: 200
                  description: Any additional notes or details related to the trip.
                  example: ABC Cargo Services Inc. Other Description
                start_timestamp:
                  $ref: '#/components/schemas/date'
                  description: The date and time when the trip you want to update started. Use the format "YYYY-MM-DD HH:MM:SS".
                  example: '2023-01-13 02:53:24'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      registration:
                        $ref: '#/components/schemas/registration'
                  meta:
                    type: object
                    properties:
                      message:
                        type: string
                        example: The trip information was successfully updated.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /trips/elapsed:
    get:
      summary: Get All Trips Elapsed
      tags:
        - Trips
      deprecated: false
      description: Returns a list of all trips with elapsed time within the specified time range, along with optional filtering and sorting capabilities.
      parameters:
        - $ref: '#/components/parameters/start_timestamp'
          description: Returns all trips that overlap the specified time range. Any trip that starts before this timestamp but ends after it will be included. Any trip that starts within the range but ends after the end_timestamp will also be included
          required: true
          example: '2022-01-01 00:00:00'
        - $ref: '#/components/parameters/end_timestamp'
          description: "Returns trips that overlap up to this date and time. Any trip that starts or ends within the period will be included, even if it extends outside the end_timestamp. <br/><br/>\r\n                The lookup period is of <strong>maximum 31 days</strong> between the start_timestamp and the end_timestamp\r\n            "
          required: true
          example: '2022-01-01 23:59:59'
        - $ref: '#/components/parameters/vehicle_id'
        - $ref: '#/components/parameters/driver_id'
        - name: sort_by
          in: query
          description: Sort by a specific field. Default is sorted by start_timestamp.
          required: false
          schema:
            type: string
            default: start_timestamp
            example: start_timestamp
            enum:
              - start_timestamp
              - end_timestamp
        - name: sort_order
          in: query
          description: Sort order for the specified field. Default is ascending order.
          required: false
          schema:
            type: string
            default: asc
            example: asc
            enum:
              - asc
              - desc
        - $ref: '#/components/parameters/page_without_validation'
        - $ref: '#/components/parameters/limit_without_validation'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: This array returns the list of trips
                    items:
                      type: object
                      properties:
                        trip_id:
                          type: integer
                          example: 123456
                          description: The unique identifier of the trip.
                        driver_id:
                          $ref: '#/components/schemas/uuid'
                          description: The unique identifier of the driver.
                        driver_name:
                          type: string
                          description: The name of the driver.
                        identification_tag:
                          oneOf:
                            - $ref: '#/components/schemas/uuid'
                            - type: 'null'
                          example: 7489ff44-xxxx-11eb-xxxx-005056a801ca
                          description: The trip's identification tag
                        vehicle_id:
                          $ref: '#/components/schemas/vehicle-id'
                        registration:
                          $ref: '#/components/schemas/registration'
                        chassisnr:
                          $ref: '#/components/schemas/chassis-number'
                        start_timestamp:
                          oneOf:
                            - $ref: '#/components/schemas/date'
                            - type: 'null'
                          description: The date and time when the trip started.
                        end_timestamp:
                          oneOf:
                            - $ref: '#/components/schemas/date'
                            - type: 'null'
                          description: The date and time when the trip ended.
                        time_elapsed:
                          type:
                            - string
                            - 'null'
                          format: duration
                          example: '00:20:11'
                          description: The elapsed time between the start and end of the trip in HH:MM:SS format..
                        time_elapsed_seconds:
                          type:
                            - integer
                            - 'null'
                          example: 1211
                          description: The elapsed time between the start and end of the trip in seconds.
                        address:
                          type:
                            - string
                            - 'null'
                          example: 123 Main St, Springfield, IL
                          description: The name of the address where the trip ended.
                        geofence:
                          type:
                            - string
                            - 'null'
                          example: Warehouse Zone
                          description: The name of the geofence where the trip ended.
                        longitude:
                          type: number
                          example: -89.64
                          description: The longitude coordinate where the trip ended.
                        latitude:
                          type: number
                          example: 39.78
                          description: The latitude coordinate where the trip ended.
                  meta:
                    $ref: '#/components/schemas/pagination'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /vehicles/drivers/historical:
    post:
      summary: Patch Historical Vehicle Data
      tags:
        - Vehicle Driver Linkage
      deprecated: false
      description: "This endpoint updates historical vehicle data by patching driver information for periods where a vehicle-driver linkage was not updated promptly with the correct driver.\r\n    <br/><br/><strong>Note</strong>: Vehicle Driver Linkage endpoints must <strong>NOT</strong> be used alongside other Cartrack driver-vehicle assignment services (e.g., driver mobile app, driver tags).\r\n    <br/><br/><strong>Warning</strong>: This patching action is irreversible. Exercise caution and ensure all considerations are addressed before proceeding with any modifications."
      requestBody:
        description: A JSON payload containing the data required to patch historical vehicle data.
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - registration
                - start_timestamp
              properties:
                registration:
                  $ref: '#/components/schemas/registration'
                start_timestamp:
                  $ref: '#/components/schemas/date'
                  description: Updates historical vehicle data from the specified date and time.<br/><br/> The lookup period is limited to a maximum of <strong>24 hours</strong> between start_timestamp and end_timestamp or the past 24 hours from the current time if end_timestamp is not provided.
                  example: '2025-01-01 00:00:00'
                end_timestamp:
                  $ref: '#/components/schemas/date'
                  description: Updates historical vehicle data up to the specified date and time.<br/><br/> The lookup period is limited to a maximum of <strong>24 hours</strong> between start_timestamp and end_timestamp.
                  example: '2025-01-02 00:00:00'
                employee_number:
                  type: string
                  description: The driver's employee number. Provide either this, driver_name, or driver_id, but not all. <br/><br/> Must be unique within your driver pool; Request will fail if duplicates exist.
                  example: '11221001'
                driver_name:
                  type: string
                  description: The driver's name. Provide either this, employee_number, or driver_id, but not all. <br/><br/>Case-insensitive exact match on "driver_name driver_surname". Must be unique within your driver pool; Request will fail if duplicates exist.
                  example: Mark Steven
                driver_id:
                  $ref: '#/components/schemas/uuid'
                  description: The driver's unique identifier. Provide either this, employee_number, or driver_name, but not all.
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      message:
                        type: string
                        example: Successfully updated historical data of this vehicle.
                        description: Success message
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /vehicles/drivers/link:
    post:
      summary: Link Driver to a Vehicle
      tags:
        - Vehicle Driver Linkage
      deprecated: false
      description: "This endpoint links a driver to a vehicle, ensuring subsequent vehicle data includes the driver info. Any previous API-created linkage for the same vehicle or driver will be overwritten.\r\n    <br/><br/><strong>Note</strong>: Vehicle Driver Linkage endpoints must <strong>NOT</strong> be used alongside other Cartrack driver-vehicle assignment services (e.g., driver mobile app, driver tags)."
      requestBody:
        description: A JSON payload containing the data required to link a driver to a vehicle.
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - registration
              properties:
                registration:
                  $ref: '#/components/schemas/registration'
                employee_number:
                  type: string
                  description: The driver's employee number. Provide either this, driver_name, or driver_id, but not all.<br/><br/> Must be unique within your driver pool; Request will fail if duplicates exist.
                  example: '11221001'
                driver_name:
                  type: string
                  description: The driver's name. Provide either this, employee_number, or driver_id, but not all.<br/><br/> Case-insensitive exact match on "driver_name driver_surname". Must be unique within your driver pool; Request will fail if duplicates exist.
                  example: Mark Steven
                driver_id:
                  $ref: '#/components/schemas/uuid'
                  description: The driver's unique identifier. Provide either this, employee_number, or driver_name, but not all.
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      message:
                        type: string
                        example: Successfully linked driver to vehicle.
                        description: Success message
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    delete:
      summary: Unlink Driver from a Vehicle
      tags:
        - Vehicle Driver Linkage
      deprecated: false
      description: 'This endpoint unlinks a driver from a vehicle, removing the association so that subsequent vehicle data will no longer include the driver info. Any existing linkage created via API for the requested vehicle and/or driver will be removed.<br/><br/> <strong>Note</strong>: Vehicle Driver Linkage endpoints must <strong>NOT</strong> be used alongside other Cartrack driver-vehicle assignment services (e.g., driver mobile app, driver tags).'
      requestBody:
        description: A JSON payload containing the data required to unlink a driver from a vehicle.
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - registration
              properties:
                registration:
                  $ref: '#/components/schemas/registration'
                force:
                  type: boolean
                  description: The force flag enables deletion of the vehicle-driver linkage without requiring driver details (employee_number, driver_name, or driver_id).
                  example: true
                employee_number:
                  type: string
                  description: The driver's employee number. Provide either this, driver_name, or driver_id, but not all.<br/><br/> Must be unique within your driver pool; Request will fail if duplicates exist.
                  example: '11221001'
                driver_name:
                  type: string
                  description: The driver's name. Provide either this, employee_number, or driver_id, but not all.<br/><br/> Case-insensitive exact match on "driver_name driver_surname". Must be unique within your driver pool; Request will fail if duplicates exist.
                  example: Mark Steven
                driver_id:
                  $ref: '#/components/schemas/uuid'
                  description: The driver's unique identifier. Provide either this, employee_number, or driver_name, but not all.
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      message:
                        type: string
                        example: Successfully unlinked driver from vehicle.
                        description: Success message
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /vehicles/drivers/links:
    get:
      summary: Retrieve Current Linkages
      tags:
        - Vehicle Driver Linkage
      deprecated: false
      description: "This endpoint retrieves a list of linkages, providing details of currently linked drivers and vehicles. The retrieved data reflects only linkages created via the API.\r\n    <br/><br/><strong>Note</strong>: Vehicle Driver Linkage endpoints must <strong>NOT</strong> be used alongside other Cartrack driver-vehicle assignment services (e.g., driver mobile app, driver tags)."
      parameters:
        - $ref: '#/components/parameters/registration'
        - $ref: '#/components/parameters/driver_id'
          description: The driver's unique identifier.
        - name: filter[driver_name]
          in: query
          description: The driver's name.<br/><br/>Case-insensitive exact match on "driver_name driver_surname". Must be unique in your driver pool.
          required: false
          schema:
            type: string
          example: Mark Steven
        - name: filter[employee_number]
          in: query
          description: The driver's employee number.
          required: false
          schema:
            type: string
          example: '1101123'
        - $ref: '#/components/parameters/page_without_validation'
        - $ref: '#/components/parameters/limit_without_validation'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: The list of events generated during that period
                    items:
                      type: object
                      required:
                        - registration
                        - driver_id
                        - driver_name
                        - updated_ts
                      properties:
                        registration:
                          $ref: '#/components/schemas/registration'
                        driver_id:
                          $ref: '#/components/schemas/uuid'
                          description: The driver's unique identifier
                        driver_name:
                          type: string
                          example: Mark
                          description: The driver's first name
                          minLength: 2
                          maxLength: 50
                        driver_surname:
                          type:
                            - string
                            - 'null'
                          example: Steven
                          description: The driver's last name
                          maxLength: 100
                        employee_number:
                          type:
                            - string
                            - 'null'
                          example: ABC12345678
                          description: The driver's employee number
                        updated_ts:
                          $ref: '#/components/schemas/timestamp'
                          description: The last update timestamp
                  meta:
                    $ref: '#/components/schemas/pagination'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /vehicles/groups:
    get:
      summary: Retrieve Vehicle Groups
      tags:
        - Vehicle Groups
      deprecated: false
      description: Fetches a list of available vehicle groups along with their details.
      parameters:
        - $ref: '#/components/parameters/registration'
          description: Filter vehicle registration, case insensitive, can be partial match
        - name: filter[name]
          in: query
          description: Filter by group name, case insensitive, can be partial match
          required: false
          schema:
            type: string
          example: Good looking vehicles
        - name: filter[description]
          in: query
          description: Filter by group description, case insensitive, can be partial match
          required: false
          schema:
            type: string
          example: All active vehicles
        - $ref: '#/components/parameters/page_without_validation'
        - $ref: '#/components/parameters/limit_without_validation'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        group_id:
                          type: integer
                          description: Unique identifier for the group.
                          example: 12345
                        name:
                          type: string
                          description: Name of the vehicle group.
                          example: Good-looking Vehicles
                        description:
                          type:
                            - string
                            - 'null'
                          description: Description of the vehicle group.
                          example: This group gathers good-looking vehicles.
                        subuser_id:
                          oneOf:
                            - $ref: '#/components/schemas/uuid'
                            - type: 'null'
                          description: Unique identifier for the associated subuser of this vehicle group.
                          example: 7489ff44-xxxx-11eb-xxxx-005056a801ca
                        vehicles:
                          type: array
                          description: List of vehicles associated with this group.
                          items:
                            type: object
                            properties:
                              vehicle_id:
                                $ref: '#/components/schemas/vehicle-id'
                              registration:
                                $ref: '#/components/schemas/registration'
                  meta:
                    $ref: '#/components/schemas/pagination'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    post:
      summary: Create New Vehicle Group
      tags:
        - Vehicle Groups
      deprecated: false
      description: Adds a new vehicle group to the system with the provided details.
      requestBody:
        description: One or more of the parameters to be created
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - name
              properties:
                name:
                  type: string
                  description: The name of the new vehicle group.
                  example: Luxury Cars Club
                description:
                  type:
                    - string
                    - 'null'
                  description: A brief description of the new vehicle group.
                  example: A community for enthusiasts of high-end and luxury cars.
                subuser_id:
                  oneOf:
                    - $ref: '#/components/schemas/uuid'
                    - type: 'null'
                  description: The unique identifier of the subuser to whom the vehicle group is assigned.
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    description: Details about the newly created group
                    required:
                      - group_id
                      - name
                    properties:
                      group_id:
                        type: integer
                        description: Unique identifier of the group
                        example: 12345
                      name:
                        type: string
                        description: Name of the group
                        example: Sports Cars
                      description:
                        type:
                          - string
                          - 'null'
                        description: Description of the group
                        example: This group gathers information about sports cars
                      subuser_id:
                        oneOf:
                          - $ref: '#/components/schemas/uuid'
                          - type: 'null'
                        description: UUID of the subuser associated with the group
                        example: 7489ff44-xxxx-11eb-xxxx-005056a801ca
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /vehicles/groups/{group_id}:
    delete:
      summary: Remove Vehicle Group
      tags:
        - Vehicle Groups
      deprecated: false
      description: Deletes a specific vehicle group from the system.
      parameters:
        - name: group_id
          in: path
          description: 'The vehicle group ID '
          required: true
          schema:
            type: integer
          example: 1010
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type:
                      - object
                      - 'null'
                    example: '{}'
                  meta:
                    type: object
                    properties:
                      message:
                        type: string
                        example: Successfully deleted the group.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    put:
      summary: Update Existing Vehicle Group
      tags:
        - Vehicle Groups
      deprecated: false
      description: Modifies the details of an existing vehicle group based on the provided information.
      parameters:
        - name: group_id
          in: path
          description: 'The vehicle group ID '
          required: true
          schema:
            type: integer
          example: 1010
      requestBody:
        description: One or more of the parameters to be updated
        required: true
        content:
          application/json:
            schema:
              type: object
              minProperties: 1
              properties:
                name:
                  type: string
                  description: The updated name of the vehicle group.
                  example: Group of vintage cars manufactured before 1990.
                description:
                  type:
                    - string
                    - 'null'
                  description: The updated description of the vehicle group.
                  example: This group includes cars with historical significance.
                subuser_id:
                  oneOf:
                    - $ref: '#/components/schemas/uuid'
                    - type: 'null'
                  description: The updated subuser ID associated with the vehicle group.
                  example: 7489ff44-xxxx-11eb-xxxx-005056a801ca
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    description: Details about the newly created group
                    required:
                      - group_id
                      - name
                    properties:
                      group_id:
                        type: integer
                        description: Unique identifier of the group
                        example: 12345
                      name:
                        type: string
                        description: Name of the group
                        example: Sports Cars
                      description:
                        type:
                          - string
                          - 'null'
                        description: Description of the group
                        example: This group gathers information about sports cars
                      subuser_id:
                        oneOf:
                          - $ref: '#/components/schemas/uuid'
                          - type: 'null'
                        description: UUID of the subuser associated with the group
                        example: 7489ff44-xxxx-11eb-xxxx-005056a801ca
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /vehicles/{registration}/groups/{group_id}:
    put:
      summary: Assign Vehicle to Group
      tags:
        - Vehicle Groups
      deprecated: false
      description: Associates a specific vehicle with a designated vehicle group, using the vehicle's registration number and the group's unique ID.
      parameters:
        - name: registration
          in: path
          description: The vehicle's license plate
          required: true
          schema:
            $ref: '#/components/schemas/registration'
          example: ABC1234X
        - name: group_id
          in: path
          description: 'The vehicle group ID '
          required: true
          schema:
            type: integer
          example: 1010
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type:
                      - object
                      - 'null'
                  meta:
                    type: object
                    properties:
                      message:
                        type: string
                        example: Successfully added the vehicle to the group.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    delete:
      summary: Remove Vehicle from Group
      tags:
        - Vehicle Groups
      deprecated: false
      description: Removes a specified vehicle from an assigned group, using the vehicle's registration number and the group's unique ID.
      parameters:
        - name: registration
          in: path
          description: The vehicle's license plate
          required: true
          schema:
            $ref: '#/components/schemas/registration'
          example: ABC1234X
        - name: group_id
          in: path
          description: 'The vehicle group ID '
          required: true
          schema:
            type: integer
          example: 1010
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type:
                      - object
                      - 'null'
                  meta:
                    type: object
                    properties:
                      message:
                        type: string
                        example: Successfully deleted the vehicle from the group.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /vehicles:
    get:
      tags:
        - Vehicles
      summary: Get Vehicles List
      description: This endpoint returns all/filtered list of vehicles with their details.
      parameters:
        - $ref: '#/components/parameters/vehicle_filters'
        - $ref: '#/components/parameters/registration_filter'
        - $ref: '#/components/parameters/manufacturer_filter'
        - $ref: '#/components/parameters/model_year_filter'
        - $ref: '#/components/parameters/colour_filter'
        - $ref: '#/components/parameters/chassis_number_filter'
        - $ref: '#/components/parameters/page_without_validation'
        - $ref: '#/components/parameters/limit_without_validation'
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      required:
                        - vehicle_id
                        - terminal_id
                        - registration
                        - sensors
                        - is_under_maintenance
                      properties:
                        vehicle_id:
                          $ref: '#/components/schemas/vehicle-id'
                        terminal_id:
                          oneOf:
                            - $ref: '#/components/schemas/terminal-id'
                            - type: 'null'
                          description: The id of the terminal installed in the vehicle
                          example: 456789
                        registration:
                          $ref: '#/components/schemas/registration'
                        terminal_serial:
                          oneOf:
                            - $ref: '#/components/schemas/terminal-serial'
                            - type: 'null'
                          example: CTEF456S
                          description: The serial of the Cartrack terminal
                        default_timezone:
                          type:
                            - string
                            - 'null'
                          description: The default timezone of the vehicle
                          example: Asia/Singapore
                        monthly_mileage_limit:
                          type:
                            - integer
                            - 'null'
                          description: The monthly mileage limit in km
                          example: 1300
                        tolling_tag_id:
                          type:
                            - string
                            - 'null'
                          description: The tolling tag id assigned to the vehicle
                          maxLength: 48
                          example: '12345'
                        vehicle_name:
                          type:
                            - string
                            - 'null'
                          description: A name that can be given to the vehicle
                          maxLength: 64
                          example: Big car
                        client_vehicle_description:
                          type:
                            - string
                            - 'null'
                          description: A description that can be given to the vehicle
                          maxLength: 64
                          example: The oldest car in the fleet
                        client_vehicle_description2:
                          type:
                            - string
                            - 'null'
                          description: A second description that can be given to the vehicle
                          maxLength: 64
                          example: The oldest car in the fleet 2
                        client_vehicle_description3:
                          type:
                            - string
                            - 'null'
                          description: A third description that can be given to the vehicle
                          maxLength: 64
                          example: The oldest car in the fleet 3
                        licence_code:
                          type:
                            - string
                            - 'null'
                          description: The license code assigned to the vehicle
                          maxLength: 10
                          example: B
                        licence_issued_date:
                          oneOf:
                            - $ref: '#/components/schemas/date-only'
                            - type: 'null'
                          description: The license issued date
                        licence_expiry_date:
                          oneOf:
                            - $ref: '#/components/schemas/date-only'
                            - type: 'null'
                          description: The license expiry date
                        max_speed:
                          type:
                            - integer
                            - 'null'
                          description: The maximum speed for this vehicle in km/h
                          example: 130
                        manufacturer:
                          type:
                            - string
                            - 'null'
                          description: The vehicle manufacturer
                          example: Toyota
                        default_driver:
                          oneOf:
                            - $ref: '#/components/schemas/uuid'
                            - type: 'null'
                          format: uuid
                          description: The default driver assigned to this vehicle
                          example: bca277ee-xxxx-11ec-xxxx-005056a825ae
                        home_geofence:
                          oneOf:
                            - $ref: '#/components/schemas/uuid'
                            - type: 'null'
                          description: The default geofence assigned to this vehicle
                          example: bca277ee-yyyy-11ec-yyyy-005056a825ae
                        model:
                          type:
                            - string
                            - 'null'
                          description: The vehicle model
                          example: Land Cruiser
                        model_year:
                          type:
                            - integer
                            - 'null'
                          description: The vehicle model year
                          example: 1983
                        colour:
                          type:
                            - string
                            - 'null'
                          description: The vehicle colour
                          example: Pink
                        chassis_number:
                          $ref: '#/components/schemas/chassis-number'
                        is_under_maintenance:
                          type: boolean
                          description: Indicates if a vehicle is currently under maintenance
                          example: true
                        vehicle_type_id:
                          type:
                            - integer
                            - 'null'
                          description: The vehicle type id of this vehicle
                          example: 32
                        vehicle_type:
                          type:
                            - string
                            - 'null'
                          description: The vehicle type description
                          example: Motorbike
                        has_camera:
                          type: boolean
                          description: Indicates if a vehicle has a camera
                          example: false
                        terminal_in_repair:
                          type: boolean
                          description: Indicates if a vehicle terminal is in repair
                          example: false
                        sensors:
                          type: object
                          description: The fuel and electric battery sensors installed on the vehicle
                          required:
                            - fuel_canbus_consumed
                            - fuel_canbus_level
                            - fuel_analog_level
                            - electric_battery
                            - electric_charging
                          properties:
                            fuel_canbus_consumed:
                              type: boolean
                              example: true
                              description: The vehicle canbus data for fuel consumed is available
                            fuel_canbus_level:
                              type: boolean
                              description: The vehicle canbus data for fuel level is available
                              example: true
                            fuel_analog_level:
                              type: boolean
                              description: The vehicle has an analog fuel sensor installed
                              example: false
                            electric_battery:
                              type: boolean
                              description: The vehicle has an electric battery sensor installed
                              example: false
                            electric_charging:
                              type: boolean
                              description: The vehicle has an electric charging status sensor installed
                              example: false
                        custom_fields:
                          type:
                            - object
                            - 'null'
                          description: The custom fields for the vehicle (up to a max of 7).<br/><br/> Only applicable if custom fields are configured in your company settings on Fleet Web.
                          properties:
                            custom_1:
                              type:
                                - string
                                - 'null'
                              example: Use this field to specify a shipment id?
                              description: The custom fields 1 to 7 can be used for your operations. You can label the custom fields in your fleet web account. They are displayed on the vehicle detail page.
                            custom_2:
                              type:
                                - string
                                - 'null'
                              example: Use this field to specify a delivery address?
                              description: ''
                            custom_3:
                              type:
                                - string
                                - 'null'
                              example: Use this field to specify a different id?
                              description: ''
                            custom_4:
                              type:
                                - string
                                - 'null'
                              example: Use this field to map your own statuses?
                              description: ''
                            custom_5:
                              type:
                                - string
                                - 'null'
                              example: You can use this field for your own use cases
                              description: ''
                            custom_6:
                              type:
                                - string
                                - 'null'
                              example: You can use this field for your own use cases
                              description: ''
                            custom_7:
                              type:
                                - string
                                - 'null'
                              example: You can use this field for your own use cases.
                              description: ''
                  meta:
                    $ref: '#/components/schemas/pagination'
        '400':
          $ref: '#/components/responses/validation-error'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '500':
          $ref: '#/components/responses/server-error'
  /vehicles/activity:
    get:
      tags:
        - Vehicles
      summary: Get All Vehicles' Activity
      description: This endpoints returns all of your your vehicles' total activity and break time for a given day.
      parameters:
        - $ref: '#/components/parameters/registration_filter'
          description: This will filter results for a given vehicle registration
        - $ref: '#/components/parameters/date_filter'
          required: true
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        vehicle_id:
                          $ref: '#/components/schemas/vehicle-id'
                        registration:
                          $ref: '#/components/schemas/registration'
                        chassis_number:
                          $ref: '#/components/schemas/chassis-number'
                        first_ignition_on:
                          oneOf:
                            - $ref: '#/components/schemas/date'
                            - type: 'null'
                          description: The first recorded ignition on timestamp for that date
                        last_ignition_off:
                          oneOf:
                            - $ref: '#/components/schemas/date'
                            - type: 'null'
                          description: The last recorded igntition off timestamp for that date
                        idle_time_seconds:
                          type:
                            - integer
                            - 'null'
                          description: This represent the total time in seconds that the vehicle was idle (ignition on but stationary)
                          example: 3600
                        driving_time_seconds:
                          type:
                            - integer
                            - 'null'
                          description: This indicate the total time in seconds that the vehicle was driven (ignition on and moving)
                          example: 7200
                        total_working_hours:
                          type: string
                          description: The total time where the vehicle ignition was on on that date. A trip that started late on that date and ended the next day will be accounted entirely for the day where the trip started.
                          example: '09:00'
                        total_break_hours:
                          type: string
                          description: The total time (as hh:mi) the vehicle had ignition off. based on a 24 hour day.
                          example: '01:00'
                        total_break_hours_trimmed:
                          type: string
                          description: The total time (as hh:mi) the vehicle had ignition off between the first ignition on and the last ignition off.
                          example: '22:00'
                        drivers:
                          type: array
                          description: The drivers that have been using this vehicle on that date, if associated with a tag ID
                          items:
                            type: object
                            properties:
                              driver_id:
                                oneOf:
                                  - $ref: '#/components/schemas/uuid'
                                  - type: 'null'
                                description: The unique identifier of the driver
                              first_name:
                                type:
                                  - string
                                  - 'null'
                                description: The driver's first name
                                example: John Doe
                              last_name:
                                type:
                                  - string
                                  - 'null'
                                description: The driver's last name
                                example: Smith
        '400':
          $ref: '#/components/responses/validation-error'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '500':
          $ref: '#/components/responses/server-error'
  /vehicles/events:
    get:
      tags:
        - Vehicles
      summary: Get Events for All Vehicles
      description: This endpoint fetches events for all vehicles associated with an account within a specified date and time range. The acceptable date and time format is "YYYY-MM-DD hh:mm:ss". Note that the start and end times for the event search are restricted to a maximum duration of 24 hours, ensuring focused and relevant data retrieval.
      parameters:
        - $ref: '#/components/parameters/start_timestamp_filter'
          description: The earliest date and time to retrieve events. (limited to **24 hours**)
          required: true
        - $ref: '#/components/parameters/end_timestamp_filter'
          description: The latest date and time to retrieve events. (limited to **24 hours**)
          required: true
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/vehicle-event-base'
                  meta:
                    $ref: '#/components/schemas/pagination'
        '400':
          $ref: '#/components/responses/validation-error'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '500':
          $ref: '#/components/responses/server-error'
  /vehicles/events/types:
    get:
      tags:
        - Vehicles
      summary: Get Vehicle Event Types
      description: This endpoint retrieves a list of all available event types for vehicles associated with the account.
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          description: Event type ID
                          example: 1
                        description:
                          type: string
                          description: Event type description
                          example: IGNITION_OFF
        '400':
          $ref: '#/components/responses/validation-error'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '500':
          $ref: '#/components/responses/server-error'
  /vehicles/{registration}/events:
    get:
      tags:
        - Vehicles
      summary: Get Events for One Vehicle
      description: This endpoint returns the events for the given dates (YYYY-MM-DD hh:mm:ss) for a given registration.
      parameters:
        - name: registration
          in: path
          description: The vehicle's registration
          required: true
          schema:
            type: string
            example: ABC-12345
        - $ref: '#/components/parameters/start_timestamp_filter'
          description: The earliest date and time to retrieve events (limited to **31 days**)
          required: true
        - $ref: '#/components/parameters/end_timestamp_filter'
          description: The latest date and time to retrieve events. (limited to **31 days**)
          required: true
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/vehicle-event-base'
                  meta:
                    $ref: '#/components/schemas/pagination'
        '400':
          $ref: '#/components/responses/validation-error'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '500':
          $ref: '#/components/responses/server-error'
  /vehicles/{registration}/events/idling:
    get:
      tags:
        - Vehicles
      summary: Get Idling Events for One Vehicle
      description: Retrieves idling events within specified date and time ranges for a given vehicle registration number. The format for dates is YYYY-MM-DD hh:mm:ss.
      parameters:
        - name: registration
          in: path
          description: The registration number of the vehicle for which idling events are requested.
          required: true
          schema:
            $ref: '#/components/schemas/registration'
            example: ABC1234
        - $ref: '#/components/parameters/start_timestamp_filter'
          description: The start date and time for the event retrieval period.
          required: true
        - $ref: '#/components/parameters/end_timestamp_filter'
          description: The end date and time for the event retrieval period. The range between start_timestamp and end_timestamp cannot exceed 31 days.
          required: true
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                  - meta
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        vehicle_id:
                          $ref: '#/components/schemas/vehicle-id'
                        registration:
                          $ref: '#/components/schemas/registration'
                        chassis_number:
                          $ref: '#/components/schemas/chassis-number'
                        terminal_id:
                          $ref: '#/components/schemas/terminal-id'
                        terminal_serial:
                          $ref: '#/components/schemas/terminal-serial'
                        start_timestamp:
                          $ref: '#/components/schemas/timestamp'
                          description: Start date and time of the vehicle idling event.
                        end_timestamp:
                          $ref: '#/components/schemas/timestamp'
                          description: End date and time of the vehicle idling event.
                        start_address:
                          type:
                            - string
                            - 'null'
                          description: Starting address of the vehicle at the beginning of the idling event.
                          example: Tanjong Pagar, Singapore
                        end_address:
                          type:
                            - string
                            - 'null'
                          description: Ending address of the vehicle at the end of the idling event.
                          example: Tanjong Pagar, Singapore
                        start_odometer:
                          type:
                            - integer
                            - 'null'
                          description: Odometer reading in meters at the start of the idling event.
                          example: 1000
                        end_odometer:
                          type:
                            - integer
                            - 'null'
                          description: Odometer reading in meters at the end of the idling event.
                          example: 1100
                        idling_duration:
                          type:
                            - integer
                            - 'null'
                          description: Total duration in seconds the vehicle was in an idle state during the event.
                          example: 152
                        event_location:
                          type: object
                          description: Geographical location details of the idling event.
                          properties:
                            type:
                              type: string
                              example: LineString
                              enum:
                                - Point
                                - LineString
                                - Polygon
                                - MultiPoint
                                - MultiLineString
                                - MultiPolygon
                                - GeometryCollection
                              description: The type of geographical representation used for the event location.
                            coordinates:
                              type: array
                              description: A series of latitude and longitude coordinates representing the vehicle's path during the idling event.
                              items:
                                type: array
                                items:
                                  type: number
                              example:
                                - - 121.085087
                                  - 14.281024
                                - - 121.085412
                                  - 14.28132
                        intersecting_geofences:
                          type: array
                          description: List of geofences that intersect with the vehicle's idling event path.
                          items:
                            type: object
                            properties:
                              geofence_id:
                                $ref: '#/components/schemas/geofence-id'
                              geofence_name:
                                type: string
                                description: Name assigned to the geofence for easy identification.
                                example: The Office
                              geofence_description:
                                type:
                                  - string
                                  - 'null'
                                description: Detailed description of the geofence, providing context or additional information such as its purpose or the area it encompasses.
                                example: An Office With A Coffee Machine and Bagels
                  meta:
                    $ref: '#/components/schemas/pagination'
        '400':
          $ref: '#/components/responses/validation-error'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '500':
          $ref: '#/components/responses/server-error'
  /vehicles/{registration}/clock:
    get:
      tags:
        - Vehicles
      summary: Get the Clock Reading
      description: This endpoint returns the clock at the start and at the end of a given period. It also returns the current clock value. The clock is the total number of seconds of engine ON since the Cartrack tracker was first installed.
      parameters:
        - name: registration
          in: path
          description: The vehicle's registration
          required: true
          schema:
            $ref: '#/components/schemas/registration'
            example: ABC1234
        - $ref: '#/components/parameters/start_timestamp_filter'
          description: The earliest date and time to retrieve average clock readings. (limited to **31 days**)
          required: true
        - $ref: '#/components/parameters/end_timestamp_filter'
          description: The latest date and time to retrieve average clock readings. (limited to **31 days**)
          required: true
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type:
                      - object
                      - 'null'
                    properties:
                      vehicle_id:
                        $ref: '#/components/schemas/vehicle-id'
                      registration:
                        $ref: '#/components/schemas/registration'
                      chassis_number:
                        $ref: '#/components/schemas/chassis-number'
                      latest_event_ts:
                        oneOf:
                          - $ref: '#/components/schemas/timestamp'
                          - type: 'null'
                        description: The timestamp of the latest event received from this vehicle. Note that if the vehicle is in an area without network coverage, the data may not have been transmitted to our servers yet. In such cases, you should check this value again later to ensure you have the most recent data, especially if you query with an end_timestamp greater than the latest_event_ts.
                        example: '2023-02-24 16:48:03+02'
                      terminal_has_changed:
                        type: boolean
                        description: Indicates whether the Cartrack terminal inside the vehicle has changed (e.g., due to repairs or maintenance) over the queried period. If it has changed, this parameter will be true, which may affect the values read from the vehicle.
                      terminal_serial:
                        oneOf:
                          - $ref: '#/components/schemas/terminal-serial'
                          - type: 'null'
                        description: Indicates the latest Cartrack terminal serial number associated with the vehicle at the end of the period. Consistent with the terminal_has_changed property, the terminal may change during the period (e.g., due to repairs).
                      start_timestamp:
                        oneOf:
                          - $ref: '#/components/schemas/timestamp'
                          - type: 'null'
                        description: The start date and time of the first clock reading over the given period
                        example: '2022-05-05 01:02:00+02'
                      end_timestamp:
                        oneOf:
                          - $ref: '#/components/schemas/timestamp'
                          - type: 'null'
                        description: The end date and time of the last clock reading over the given period
                        example: '2022-05-05 18:22:13+02'
                      start_clock_value:
                        type:
                          - integer
                          - 'null'
                        description: The vehicle's clock reading, in seconds, at the start of the given date and time
                        example: 1500
                      end_clock_value:
                        type:
                          - integer
                          - 'null'
                        description: The vehicle's clock reading, in seconds, at the end of the given date and time
                        example: 2000
                      duration:
                        type:
                          - integer
                          - 'null'
                        description: The vehicle's clock duration, in seconds
                        example: 2000
                      clock_reset:
                        type: boolean
                        description: The flag determines whether the vehicle's clock is reset over the requested period. A clock reset may happen for different reasons, including a tracker change or repair on the vehicle.
                        example: true
                      current_clock_value:
                        type:
                          - integer
                          - 'null'
                        description: The vehicle's current clock reading in seconds
                        example: 3000
        '400':
          $ref: '#/components/responses/validation-error'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '500':
          $ref: '#/components/responses/server-error'
  /vehicles/{registration}/odometer:
    get:
      tags:
        - Vehicles
      summary: Get the Odometer Reading
      description: This endpoint returns the odometer at the start and at the end of a given period. The odometer is calculated from data sent by the device itself, if available. If the vehicle's odometer is not available, it will be calculated from GPS data.
      parameters:
        - name: registration
          in: path
          description: The vehicle's registration
          required: true
          schema:
            $ref: '#/components/schemas/registration'
            example: ABC1234
        - $ref: '#/components/parameters/start_timestamp_filter'
          description: The earliest date and time to retrieve average odometer readings. (limited to **31 days**)
          required: true
        - $ref: '#/components/parameters/end_timestamp_filter'
          description: The latest date and time to retrieve average odometer readings. (limited to **31 days**)
          required: true
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type:
                      - object
                      - 'null'
                    properties:
                      vehicle_id:
                        $ref: '#/components/schemas/vehicle-id'
                      registration:
                        $ref: '#/components/schemas/registration'
                      chassis_number:
                        $ref: '#/components/schemas/chassis-number'
                      latest_event_ts:
                        oneOf:
                          - $ref: '#/components/schemas/timestamp'
                          - type: 'null'
                        description: The timestamp of the latest event received from this vehicle. Note that if the vehicle is in an area without network coverage, the data may not have been transmitted to our servers yet. In such cases, you should check this value again later to ensure you have the most recent data, especially if you query with an end_timestamp greater than the latest_event_ts.
                        example: '2023-02-24 16:48:03+02'
                      terminal_has_changed:
                        type: boolean
                        description: Indicates whether the Cartrack terminal inside the vehicle has changed (e.g., due to repairs or maintenance) over the queried period. If it has changed, this parameter will be true, which may affect the values read from the vehicle.
                      terminal_serial:
                        oneOf:
                          - $ref: '#/components/schemas/terminal-serial'
                          - type: 'null'
                        description: Indicates the latest Cartrack terminal serial number associated with the vehicle at the end of the period. Consistent with the terminal_has_changed property, the terminal may change during the period (e.g., due to repairs).
                      start_timestamp:
                        oneOf:
                          - $ref: '#/components/schemas/timestamp'
                          - type: 'null'
                        description: The start date and time of the odometer reading
                        example: '2022-05-05 01:02:00+02'
                      end_timestamp:
                        oneOf:
                          - $ref: '#/components/schemas/timestamp'
                          - type: 'null'
                        description: The end date and time of the odometer reading
                        example: '2022-05-05 18:22:13+02'
                      start_odometer_value:
                        type:
                          - integer
                          - 'null'
                        description: The vehicle's odometer reading at the start of the datetime provided
                        example: 1500
                      end_odometer_value:
                        type:
                          - integer
                          - 'null'
                        description: The vehicle's odometer reading at the end of the datetime provided
                        example: 2000
                      distance:
                        type:
                          - integer
                          - 'null'
                        description: The distance travelled during the period, in meters
                        example: 500
                      odometer_reset:
                        type: boolean
                        description: This flag indicates whether the vehicle's odometer is reset during the specified period. Odometer resets may occur for various reasons, such as a change in tracker configuration from GPS odometer to CAN odometer. Alternatively, users may choose to reset the GPS odometer manually.
                        example: true
                      current_odometer_value:
                        type:
                          - integer
                          - 'null'
                        description: The vehicle's current odometer reading.
                        example: 3000
        '400':
          $ref: '#/components/responses/validation-error'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '500':
          $ref: '#/components/responses/server-error'
  /vehicles/audit:
    get:
      tags:
        - Vehicles
      summary: Get Vehicle Audit History
      description: Retrieves a paginated list of historical changes to all vehicles in the account within a specified date range (YYYY-MM-DD).<br/> Each record represents a change event — such as updates to vehicle descriptions or default driver assignments — along with the timestamp when the change occurred.<br/> This allows you to review and track how vehicle details have evolved over time
      parameters:
        - $ref: '#/components/parameters/update_ts_from'
        - $ref: '#/components/parameters/update_ts_to'
        - $ref: '#/components/parameters/registration'
          description: The vehicle registration number to filter audit logs.
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          description: The unique identifier for the audit log entry.
                        registration:
                          $ref: '#/components/schemas/registration'
                        vehicle_id:
                          $ref: '#/components/schemas/vehicle-id'
                        vehicle_description1:
                          type: string
                          description: The first vehicle description.
                        vehicle_description2:
                          type: string
                          description: The second vehicle description.
                        vehicle_description3:
                          type: string
                          description: The third vehicle description.
                        default_driver_id:
                          $ref: '#/components/schemas/uuid'
                          description: The unique identifier for the default driver.
                        update_ts:
                          $ref: '#/components/schemas/timestamp-with-offset'
                          description: The timestamp when the vehicle entry was modified.
                  meta:
                    $ref: '#/components/schemas/pagination'
        '400':
          $ref: '#/components/responses/validation-error'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '500':
          $ref: '#/components/responses/server-error'
  /vehicles/{registration}/share-location-link:
    post:
      tags:
        - Vehicles
      summary: Generate Shareable Location URL for Vehicle by Registration
      description: Generate a shareable location link for a vehicle. Each vehicle and account is limited to a maximum of 10 links.
      parameters:
        - name: registration
          in: path
          description: The vehicle's license plate
          required: true
          schema:
            $ref: '#/components/schemas/registration'
            example: ABC1234
      requestBody:
        description: The json data that needs to be processed
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - expiration_ts
              properties:
                expiration_ts:
                  $ref: '#/components/schemas/date'
                  description: The shareable location URL expiration date-time in the future.
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                properties:
                  data:
                    type:
                      - object
                      - 'null'
                    properties:
                      url:
                        type:
                          - string
                          - 'null'
                        format: url
                        description: The shareable location URL
                        example: https://fleet.cartrack.com/share?vehicle=12345&account=1234&token=6Hh1TNTY5SNQKq7Muu5F&client=
        '400':
          $ref: '#/components/responses/validation-error'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '500':
          $ref: '#/components/responses/server-error'
  /vehicles/{registration}/power-takeoff:
    get:
      tags:
        - Vehicles
      summary: Get Vehicle Power Takeoff Status
      description: 'This endpoint returns the events when a vehicle''s power take-off was active or inactive. You can measure the active time of your vehicles. These vehicles are: <ul> <li>Running a water pump on a fire engine or water truck</li> <li>Running a truck mounted hot water extraction machine for carpet cleaning (driving vacuum blower and high-pressure solution pumps)</li> <li>Powering a blower system used to move dry materials such as cement</li> <li>Powering a vehicle-integrated air compressor system</li> <li>Raising a dump truck bed</li> <li>Operating the mechanical arm on a bucket truck used by electrical maintenance personnel or cable TV maintenance crews</li> <li>Operating a winch on a tow truck</li> <li>Operating the compactor on a garbage truck</li> <li>Operating a Boom/Grapple truck</li> <li>Operating a truck mounted tree spade and lift-mast assembly</li> </ul>'
      parameters:
        - name: registration
          in: path
          description: The vehicle's registration
          required: true
          schema:
            $ref: '#/components/schemas/registration'
            example: ABC1234
        - $ref: '#/components/parameters/start_date'
          description: The earliest date and time to retrieve events.
          required: true
        - $ref: '#/components/parameters/end_date'
          description: The latest date and time to retrieve events.
          required: true
        - $ref: '#/components/parameters/page_without_validation'
        - $ref: '#/components/parameters/limit_without_validation'
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: The list of events generated during that period
                    items:
                      type: object
                      properties:
                        event_time:
                          $ref: '#/components/schemas/timestamp'
                          description: The event date and time
                        status:
                          type: string
                          enum:
                            - Active
                            - Inactive
                          description: The status of the PTO - either Active or Inactive
                  meta:
                    $ref: '#/components/schemas/pagination'
        '400':
          $ref: '#/components/responses/validation-error'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '500':
          $ref: '#/components/responses/server-error'
  /vehicles/seat/occupancy:
    get:
      tags:
        - Vehicles
      summary: Get Vehicle's Seat Occupancy
      description: This endpoint returns the latest seat occupancy status for your vehicles. The vehicle must have the seat sensor (sensor type id 63) and Cartrack telematic device must be connected to the CAN bus.
      parameters:
        - $ref: '#/components/parameters/registration'
          description: Filter by vehicle registration.
        - $ref: '#/components/parameters/vehicle_id'
          description: Filter by vehicle ID.
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: List of vehicle's seat occupancy.
                    items:
                      type: object
                      properties:
                        vehicle_id:
                          $ref: '#/components/schemas/vehicle-id'
                        registration:
                          $ref: '#/components/schemas/registration'
                        event_ts:
                          $ref: '#/components/schemas/timestamp'
                          description: The timestamp of the latest seat occupancy event.
                        seats:
                          type: array
                          description: List of seats with their occupancy status.
                          items:
                            type: object
                            properties:
                              seat:
                                type: string
                                description: The seat position.
                                example: front_passenger_seat
                              seat_occupied:
                                type: boolean
                                description: Indicate whether the seat is occupied or not.
                                example: true
                        total_occupied:
                          type: integer
                          description: The total number of occupied seats.
                          example: 3
                  meta:
                    $ref: '#/components/schemas/pagination'
        '400':
          $ref: '#/components/responses/validation-error'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '500':
          $ref: '#/components/responses/server-error'
  /vehicles/status:
    get:
      tags:
        - Vehicles
      summary: 'Get Vehicle''s Status: location, fuel, odometer and more'
      description: Get a glance at your vehicles's latest status, including fuel, location, driver and other telematic data.
      parameters:
        - $ref: '#/components/parameters/registration'
          description: Filter by vehicle registration, case insensitive, can be partial match.
        - name: filter[engine_type]
          in: query
          description: Filter by vehicle engine type (e.g. combustion, electric, etc.), case insensitive, can be partial match.
          required: false
          schema:
            type: string
            example: Electric
        - $ref: '#/components/parameters/vehicle_id'
          description: Filter by vehicle ID.
        - $ref: '#/components/parameters/chassis_number'
          description: Filter by vehicle chassis number, case insensitive, can be partial match.
        - name: filter[ignition]
          in: query
          description: Filters vehicles by ignition status. true for ignition on, false for ignition off.
          required: false
          schema:
            type: string
            enum:
              - 'true'
              - 'false'
            example: 'true'
        - name: odometer_in_km
          in: query
          description: If true, the odometer will be returned in kilometers, otherwise in meters.
          required: false
          schema:
            type: string
            enum:
              - 'true'
              - 'false'
            example: 'true'
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        vehicle_id:
                          $ref: '#/components/schemas/vehicle-id'
                        registration:
                          $ref: '#/components/schemas/registration'
                        engine_type:
                          type:
                            - string
                            - 'null'
                          description: The vehicle's engine type
                          example: Electric
                        chassis_number:
                          $ref: '#/components/schemas/chassis-number'
                        event_ts:
                          $ref: '#/components/schemas/timestamp'
                          description: The event date and time
                          example: '2022-01-28 16:48:03+02'
                        bearing:
                          type:
                            - integer
                            - 'null'
                          description: The vehicle's bearing (degree 0-360)
                          example: 100
                        speed:
                          type:
                            - integer
                            - 'null'
                          description: The speed of the vehicle's in km/h
                          example: 60
                        ignition:
                          type:
                            - boolean
                            - 'null'
                          description: Whether the vehicle's ignition is on
                          example: true
                        idling:
                          type:
                            - boolean
                            - 'null'
                          description: Whether the vehicle's idling. true = idling, false = moving
                          example: false
                        odometer:
                          type:
                            - integer
                            - 'null'
                          description: The vehicle's odometer, in meters.
                          example: 1000
                        clock:
                          type:
                            - integer
                            - 'null'
                          description: The vehicle's clock reading, in minutes. The clock value is the total time of engine ON since the Cartrack tracker was first installed.
                          example: 100500
                        altitude:
                          type:
                            - integer
                            - 'null'
                          description: The vehicle's altitude, in meters
                          example: 152
                        rpm:
                          type:
                            - integer
                            - 'null'
                          description: The vehicle's revolution per minute
                          example: 764
                        road_speed:
                          type:
                            - integer
                            - 'null'
                          description: The speed limit of the road where the vehicle is, in km/h
                          example: 70
                        vext:
                          type:
                            - number
                            - 'null'
                          description: The vehicle's external battery voltage
                          example: 4.04
                        temp1:
                          type:
                            - number
                            - 'null'
                          description: The vehicle's temperature sensor 1
                          example: 0
                        temp2:
                          type:
                            - number
                            - 'null'
                          description: The vehicle's temperature sensor 2
                          example: 0
                        temp3:
                          type:
                            - number
                            - 'null'
                          description: The vehicle's temperature sensor 3
                          example: 0
                        temp4:
                          type:
                            - number
                            - 'null'
                          description: The vehicle's temperature sensor 4
                          example: 0
                        last_identification_tag_id:
                          oneOf:
                            - $ref: '#/components/schemas/uuid'
                            - type: 'null'
                          description: The most recently used driver tag ID
                        io_panic:
                          type:
                            - string
                            - 'null'
                          enum:
                            - HIGH
                            - LOW
                          description: Whether the vehicle's panic system is activate or not activate. Please make sure you have this option installed before using its values.
                          example: HIGH
                        io_disarm:
                          type:
                            - string
                            - 'null'
                          enum:
                            - HIGH
                            - LOW
                          description: Whether the vehicle's is locked or unlocked. HIGH = unlocked. LOW = locked.
                          example: HIGH
                        dynamic1:
                          type:
                            - integer
                            - 'null'
                          description: The vehicle's first dynamic value. A range of values that can be set from the can bus data, without a placeholder
                          example: 1
                        dynamic2:
                          type:
                            - integer
                            - 'null'
                          description: The vehicle's second dynamic value. A range of values that can be set from the can bus data, without a placeholder
                        dynamic3:
                          type:
                            - integer
                            - 'null'
                          description: The vehicle's third dynamic value. A range of values that can be set from the can bus data, without a placeholder
                        dynamic4:
                          type:
                            - integer
                            - 'null'
                          description: The vehicle's fourth dynamic value. A range of values that can be set from the can bus data, without a placeholder
                        input_state:
                          type:
                            - integer
                            - 'null'
                          description: The vehicle's first input state. A summation of can bus bit event in decimal place
                          example: 1601
                        input_state2:
                          type:
                            - integer
                            - 'null'
                          description: The vehicle's second input state. A summation of can bus bit event in decimal place
                          example: -2147483648
                        input_state3:
                          type:
                            - integer
                            - 'null'
                          description: The vehicle's third input state. A summation of can bus bit event in decimal place
                          example: -1
                        central_locking_status:
                          type:
                            - boolean
                            - 'null'
                          description: The vehicle's central locking state, if fase, the vehicle is unlocked, else it's locked.
                          example: true
                        tcu_battery_percentage:
                          type:
                            - integer
                            - 'null'
                          description: The vehicle's Telematic Control Unit (TCU) battery percentage.
                          example: 85
                        driver:
                          type: object
                          description: The driver if associated with the tag ID
                          properties:
                            driver_id:
                              oneOf:
                                - $ref: '#/components/schemas/uuid'
                                - type: 'null'
                              description: The driver's uuid
                              example: 98547217-d5b7-11ec-b1fb-a4bf016cd6b2
                            first_name:
                              type:
                                - string
                                - 'null'
                              description: The driver's first name
                              example: John
                            last_name:
                              type:
                                - string
                                - 'null'
                              description: The driver's last name
                              example: Doe
                            id_number:
                              type:
                                - string
                                - 'null'
                              description: The driver's identification number
                              example: ABC12345678
                            license_number:
                              type:
                                - string
                                - 'null'
                              description: The driver's license number
                              example: D1234567
                            tag_id:
                              oneOf:
                                - $ref: '#/components/schemas/uuid'
                                - type: 'null'
                              description: The driver's tag uuid
                              example: 98547217-d5b7-11ec-b1fb-a4bf016cd6b2
                            phone_number:
                              type:
                                - string
                                - 'null'
                              description: The driver's phone number
                              example: '+27123456789'
                        fuel:
                          type: object
                          description: The latest fuel information
                          properties:
                            updated:
                              oneOf:
                                - $ref: '#/components/schemas/timestamp'
                                - type: 'null'
                              description: Date and time the fuel level updated
                            level:
                              type:
                                - number
                                - 'null'
                              description: Volume of fuel left in the tank
                              example: 75
                            precentage_left:
                              type:
                                - number
                                - 'null'
                              description: Percentage of fuel left in the tank
                              example: 55.5
                            total_consumed:
                              type:
                                - number
                                - 'null'
                              description: Total consumption of the vehicle, in liters, since it was first introduced on the road. The data is obtained from the vehicle canbus, using the OEM sensor. Not available for all vehicles, please check with your sales representative.
                              example: 1234.5
                        electric:
                          type: object
                          description: The latest electric vehicle information
                          properties:
                            battery_percentage_left:
                              type:
                                - integer
                                - 'null'
                              description: The battery percentage left
                              example: 85
                            battery_ts:
                              oneOf:
                                - $ref: '#/components/schemas/timestamp'
                                - type: 'null'
                              description: The date and time of the last battery percentage left update
                              example: null
                        location:
                          type: object
                          description: The latest location information
                          properties:
                            updated:
                              oneOf:
                                - $ref: '#/components/schemas/timestamp'
                                - type: 'null'
                              description: The date and time when the geolocation was updated.
                            longitude:
                              type:
                                - number
                                - 'null'
                              description: The vehicle's longitude
                              example: 28.0473
                            latitude:
                              type:
                                - number
                                - 'null'
                              description: The vehicle's latitude
                              example: -26.2041
                            gps_fix_type:
                              type:
                                - integer
                                - 'null'
                              description: Fix type of 3 is full GPS positioning
                              example: 3
                            position_description:
                              type:
                                - string
                                - 'null'
                              description: Human readable address of the vehicle's location
                              example: 221B Baker Street, London, UK
                            geofence_ids:
                              type: array
                              description: This array returns the list of the vehicle's geofence id's where the vehicle is currently in
                              items:
                                $ref: '#/components/schemas/geofence-id'
        '400':
          $ref: '#/components/responses/validation-error'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '500':
          $ref: '#/components/responses/server-error'
  /vehicles/nearest:
    get:
      tags:
        - Vehicles
      summary: Get Vehicles Nearest to Point
      description: Get the nearest vehicles for a given latitude, longitude, radius (meters)
      parameters:
        - name: longitude
          in: query
          description: The longitude
          required: true
          schema:
            type: number
            example: 103.123456
        - name: latitude
          in: query
          description: The latitude
          required: true
          schema:
            type: number
            example: 1.345877
        - name: filter[max_distance]
          in: query
          description: The radius in meters
          required: false
          schema:
            type: integer
            default: 100
            example: 100
        - name: filter[include_many_registrations]
          in: query
          description: An optional vehicle registration list (comma seperated), to limit the results to certain vehicles
          required: false
          schema:
            type: string
            example: FBP111G,FBP112S,FBP113Q
        - name: filter[exclude_many_registrations]
          in: query
          description: An optional vehicle registration list (comma seperated), to exclude certain vehicles from the results
          required: false
          schema:
            type: string
            example: BG650001,BG650002,BG650003
        - name: google_api_key
          in: query
          description: An optional Google API Key, to fetch the route information from vehicle position to the given coordinates. If no key is passed, the properties inside "to_destination_google_api" object will be null. The key will be used to call for each vehicle in the response. You can make use of the exclusion/inclusion parameters to reduce the key usage to specific vehicles only. They key is not stored in our systems.
          required: false
          schema:
            type: string
            example: 8uScO1Y5OzM3cLllh5gQwTTtgp7FhmxwUZ9Ig8Oy
        - name: limit
          in: query
          description: In order to limit the number of vehicles for which Cartrack will invoke the Google API and calculate the road distance to the destination, you can specify an optional limit to fetch a limited number of vehicles closest to the given latitude and longitude based on the Euclidean distance. This parameter allows you to limit Google API usage and reduce costs.
          required: false
          schema:
            type: integer
            example: 0
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: This array returns the list of vehicles
                    items:
                      type: object
                      required:
                        - vehicle_id
                        - registration
                      properties:
                        vehicle_id:
                          $ref: '#/components/schemas/vehicle-id'
                        registration:
                          $ref: '#/components/schemas/registration'
                        chassis_number:
                          $ref: '#/components/schemas/chassis-number'
                        client_vehicle_description:
                          type:
                            - string
                            - 'null'
                          description: A description that can be given to the vehicle
                          maxLength: 64
                          example: The oldest car in the fleet
                        ignition:
                          type:
                            - boolean
                            - 'null'
                          example: true
                          description: Whether the vehicle's ignition is on
                        location_updated:
                          type: string
                          format: date-time
                          description: The updated location date & time
                          example: '2022-01-30 00:49:24'
                        distance_meters:
                          type: number
                          example: 1.5
                          description: The distance in meters
                        driver:
                          type: object
                          description: The driver if associated with the tag ID
                          properties:
                            driver_id:
                              oneOf:
                                - $ref: '#/components/schemas/uuid'
                                - type: 'null'
                              example: 667e1124-xxxx-11eb-xxxx-005056a801ca
                              description: The driver's ID
                            first_name:
                              type:
                                - string
                                - 'null'
                              description: The driver's first name
                              example: Joe
                            last_name:
                              type:
                                - string
                                - 'null'
                              description: The driver's last name
                              example: Blogs
                            phone_number:
                              type:
                                - string
                                - 'null'
                              description: The driver's phone number
                              example: '27659700000'
                        vehicle_position:
                          type: object
                          description: The vehicle position information
                          properties:
                            longitude:
                              type: number
                              description: The longitude coordinate
                              example: 103.123456
                            latitude:
                              type: number
                              description: The latitude coordinate
                              example: 1.345877
                            position_description:
                              type:
                                - string
                                - 'null'
                              description: The position description - if available
                              example: Yishun Ave 8, Singapore, Singapore
                        to_destination_google_api:
                          type: object
                          description: The destination information
                          properties:
                            driving_distance_meters:
                              type:
                                - number
                                - 'null'
                              description: The driving distance in meters to the destination, if it is available
                              example: 4500
                            driving_distance_text:
                              type:
                                - string
                                - 'null'
                              description: The driving distance in text to the destination, if it is available
                              example: 4.5 km
                            driving_time_seconds:
                              type:
                                - number
                                - 'null'
                              description: The driving time in seconds to the destination, if it is available
                              example: 900
                            driving_time_text:
                              type:
                                - string
                                - 'null'
                              description: The driving time in text to the destination, if it is available
                              example: 15 mins
                            traffic_driving_time_seconds:
                              type:
                                - number
                                - 'null'
                              description: The driving time in seconds based on current traffic conditions to the destination, if it is available
                              example: 1080
                            traffic_driving_time_text:
                              type:
                                - string
                                - 'null'
                              description: The driving time in text based on current traffic conditions to the destination, if it is available
                              example: 18 mins
                            error:
                              type:
                                - string
                                - 'null'
                              description: Google API error message
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /vehicles/vext:
    get:
      tags:
        - Vehicles
      summary: Get Vehicles Vext At Ignition OFF
      description: In telematics, VEXT (Vehicle External Voltage) refers to the voltage supplied to a telematics device from the vehicle's electrical system.<br/><br/> This endpoint returns the VEXT data of your vehicles at ignition OFF. For the latest data at ignition ON, please refer to GET /vehicles/status.<br/><br/> <strong>Note:</strong> This endpoint is subject to a rate limit, allowing a maximum of 10 request per minute.
      parameters:
        - $ref: '#/components/parameters/registration'
          description: Filter by vehicle registration. Case sensitive, exact match.
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        vehicle_id:
                          $ref: '#/components/schemas/vehicle-id'
                        registration:
                          $ref: '#/components/schemas/registration'
                        chassis_number:
                          $ref: '#/components/schemas/chassis-number'
                        vext:
                          type: number
                          description: The vehicle's VEXT reading.
                          example: 12.5
                        timestamp:
                          oneOf:
                            - $ref: '#/components/schemas/timestamp'
                            - type: 'null'
                          description: The timestamp of the latest event received from this vehicle.
                          example: '2023-02-24 16:48:03+02'
                  meta:
                    $ref: '#/components/schemas/pagination'
        '400':
          $ref: '#/components/responses/validation-error'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '500':
          $ref: '#/components/responses/server-error'
  /vehicles/{registration}:
    put:
      tags:
        - Vehicles
      summary: Update a Vehicle's Details
      description: This endpoint is to update information relating to the vehicle.<br/><br/> For instance, you can update the GPS odometer (in meters). If your Cartrack device is set to use the GPS odometer, the reading won't be 100% accurate. You may want to reset the odometer reading from time to time with the actual dashboard reading. If your Cartrack device is using the canbus odometer, please ignore this field. Please get in touch with our technicians if you have any questions.<br/><br/> The custom fields 1 to 7 can be used for your operations (for instance, adding shipment references to your vehicles for deliveries or any other information from your systems). You can label the custom fields in your fleet web account. They are displayed on the vehicle detail page.
      parameters:
        - name: registration
          in: path
          description: The vehicle's registration
          required: true
          schema:
            $ref: '#/components/schemas/registration'
            example: ABC1234
      requestBody:
        description: Vehicle information to update
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                default_timezone:
                  type: string
                  example: Asia/Singapore
                  description: The vehicle's default timezone
                monthly_mileage_limit:
                  type:
                    - integer
                    - 'null'
                  example: 1300
                  description: The monthly mileage limit in km
                tolling_tag_id:
                  type:
                    - string
                    - 'null'
                  example: '12345'
                  description: The tolling tag id to be assigned to the vehicle
                  maxLength: 48
                vehicle_name:
                  type:
                    - string
                    - 'null'
                  example: Big car
                  description: A name that can be given to the vehicle
                  maxLength: 64
                client_vehicle_description:
                  type:
                    - string
                    - 'null'
                  example: A description that can be given to the vehicle
                  description: A description that can be given to the vehicle
                  maxLength: 64
                client_vehicle_description2:
                  type:
                    - string
                    - 'null'
                  example: A second description that can be given to the vehicle
                  description: A second description that can be given to the vehicle
                  maxLength: 64
                client_vehicle_description3:
                  type:
                    - string
                    - 'null'
                  example: A third description that can be given to the vehicle
                  maxLength: 64
                licence_code:
                  type:
                    - string
                    - 'null'
                  example: B
                  maxLength: 10
                  description: The license code of the vehicle. Please check the Vienna convention of 1968 for the accepted license codes (page 71)
                  enum:
                    - A
                    - A1
                    - B
                    - B1
                    - BE
                    - C
                    - C1
                    - C1E
                    - CE
                    - D
                    - D1
                    - D1E
                    - DE
                licence_issued_date:
                  oneOf:
                    - $ref: '#/components/schemas/date-only'
                    - type: 'null'
                  example: '2020-01-01'
                  description: The license issued date
                licence_expiry_date:
                  oneOf:
                    - $ref: '#/components/schemas/date-only'
                    - type: 'null'
                  description: The license expiry date
                  example: '2025-01-01'
                default_driver:
                  oneOf:
                    - $ref: '#/components/schemas/uuid'
                    - type: 'null'
                  example: bca277ee-xxxx-11ec-xxxx-005056a825ae
                  description: The default driver to be assigned to this vehicle. Trips will be assigned to this driver by default, when no driver tag was used.
                home_geofence:
                  type:
                    - string
                    - 'null'
                  format: uuid
                  example: bca277ee-yyyy-11ec-yyyy-005056a825ae
                  description: The default geofence to be assigned to this vehicle.
                gps_odometer:
                  type: number
                  example: 100000
                  description: A field to reset the GPS odometer (in meters). If your Cartrack device is set to use the GPS odometer, the reading won't be 100% accurate. You may want to reset the odometer reading from time to time with the actual dashboard reading. If your Cartrack device is using the canbus odometer, please ignore this field. Please get in touch with our technicians if you have any questions.
                vehicle_type_id:
                  type: integer
                  example: 23
                  description: 'The vehicle type ID and its corresponding description: <table> <thead> <tr> <th>ID</th> <th>Description</th> </tr> </thead> <tbody> <tr><td>0</td><td>Default</td></tr> <tr><td>1</td><td>Motorbike</td></tr> <tr><td>2</td><td>Small Car</td></tr> <tr><td>3</td><td>Sedan Car</td></tr> <tr><td>4</td><td>4X4</td></tr> <tr><td>5</td><td>Van</td></tr> <tr><td>6</td><td>Small Truck</td></tr> <tr><td>7</td><td>Large Truck</td></tr> <tr><td>8</td><td>Small Machine</td></tr> <tr><td>9</td><td>Large Machine</td></tr> <tr><td>10</td><td>Bus</td></tr> <tr><td>11</td><td>Golf Cart / Buggy</td></tr> <tr><td>12</td><td>Truck Concrete Pump</td></tr> <tr><td>13</td><td>Truck Mixer</td></tr> <tr><td>14</td><td>Mobile Crane</td></tr> <tr><td>15</td><td>Boat</td></tr> <tr><td>16</td><td>Generator</td></tr> <tr><td>17</td><td>Crane</td></tr> <tr><td>18</td><td>Static Pump</td></tr> <tr><td>19</td><td>Trailer</td></tr> <tr><td>20</td><td>WiFi Units</td></tr> <tr><td>21</td><td>Pickup Truck</td></tr> <tr><td>22</td><td>Ambulance</td></tr> <tr><td>23</td><td>Water Truck</td></tr> <tr><td>24</td><td>Fire Truck</td></tr> <tr><td>25</td><td>Road Roller</td></tr> <tr><td>26</td><td>Grader</td></tr> <tr><td>27</td><td>Forklift</td></tr> <tr><td>28</td><td>Tractor</td></tr> <tr><td>29</td><td>Dump Truck</td></tr> <tr><td>30</td><td>Backhoe</td></tr> <tr><td>31</td><td>Loader</td></tr> <tr><td>32</td><td>Lorry</td></tr> <tr><td>33</td><td>Lorry Crane</td></tr> <tr><td>34</td><td>Tow Truck</td></tr> <tr><td>35</td><td>Uncharacterized</td></tr> <tr><td>36</td><td>Patrol</td></tr> <tr><td>37</td><td>Prisoner Transport</td></tr> <tr><td>38</td><td>Bullet Proof</td></tr> <tr><td>39</td><td>Jetski</td></tr> <tr><td>40</td><td>Railway Car</td></tr> <tr><td>41</td><td>Drilling Rig</td></tr> <tr><td>42</td><td>RTX Machine</td></tr> <tr><td>43</td><td>Skid Steer</td></tr> <tr><td>44</td><td>Excavator</td></tr> </tbody> </table>'
                custom_fields:
                  type: object
                  description: The custom fields for the vehicle (up to a max of 7).<br/><br/> Only applicable if custom fields are configured in your company settings on Fleet Web.
                  properties:
                    custom_1:
                      type:
                        - string
                        - 'null'
                      example: The custom fields 1 to 7 can be used for your operations. You can label the custom fields in your fleet web account. They are displayed on the vehicle detail page.
                    custom_2:
                      type:
                        - string
                        - 'null'
                      example: Use this field to specify a delivery address?
                    custom_3:
                      type:
                        - string
                        - 'null'
                      example: Use this field to specify a different id?
                    custom_4:
                      type:
                        - string
                        - 'null'
                      example: Use this field to map your own statuses?
                    custom_5:
                      type:
                        - string
                        - 'null'
                      example: You can use this field for your own use cases
                    custom_6:
                      type:
                        - string
                        - 'null'
                      example: You can use this field for your own use cases
                    custom_7:
                      type:
                        - string
                        - 'null'
                      example: You can use this field for your own use cases
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      registration:
                        $ref: '#/components/schemas/registration'
                  meta:
                    type: string
                    example: Vehicle information updated successfully
        '400':
          $ref: '#/components/responses/validation-error'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '500':
          $ref: '#/components/responses/server-error'
  /vehicles/contracts:
    get:
      tags:
        - Vehicles
      summary: Get Vehicle's Contracts
      description: This endpoint is to get vehicle's which are active in given time period.
      parameters:
        - $ref: '#/components/parameters/registration_filter'
          description: The vehicle's registration.
        - $ref: '#/components/parameters/active_from'
          description: The date from which the contract is active (YYYY-MM-DD HH:MM:SS)
        - $ref: '#/components/parameters/active_to'
          description: The date until which the contract is active (YYYY-MM-DD HH:MM:SS)
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        contract_id:
                          type: integer
                          description: The unique identifier of the contract
                          example: 98765
                        vehicle_id:
                          $ref: '#/components/schemas/vehicle-id'
                        registration:
                          $ref: '#/components/schemas/registration'
                        active_from:
                          $ref: '#/components/schemas/timestamp-with-offset'
                          description: The date from which the contract is active
                        active_to:
                          oneOf:
                            - $ref: '#/components/schemas/timestamp-with-offset'
                            - type: 'null'
                          description: The date until which the contract is active. Null if the contract is ongoing.
                          example: '2023-12-31 23:59:59+00:00'
                  meta:
                    $ref: '#/components/schemas/pagination'
        '400':
          $ref: '#/components/responses/validation-error'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '500':
          $ref: '#/components/responses/server-error'
  /vehicles/{registration}/soc:
    get:
      tags:
        - Vehicles (Electric)
      summary: Get a Vehicle State of Charge (SoC) Events by Registration
      description: This endpoint returns the events for the given dates (YYYY-MM-DD hh:mm:ss) for a given registration
      parameters:
        - name: registration
          in: path
          description: The vehicle's license plate
          required: true
          schema:
            $ref: '#/components/schemas/registration'
            example: ABC1234
        - $ref: '#/components/parameters/start_timestamp_filter'
          description: The earliest date and time to retrieve events (limited to **24 hours**)
          required: true
        - $ref: '#/components/parameters/end_timestamp_filter'
          description: The latest date and time to retrieve events. (limited to **24 hours**)
          required: true
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        vehicle_id:
                          $ref: '#/components/schemas/vehicle-id'
                        registration:
                          $ref: '#/components/schemas/registration'
                        event_ts:
                          $ref: '#/components/schemas/timestamp'
                          description: The event date and time.
                        value_unit:
                          type:
                            - string
                            - 'null'
                          description: The unit of the measured value.
                          example: '%'
                        value:
                          type:
                            - integer
                            - 'null'
                          description: The actual value.
                          example: 46
                        odometer:
                          type:
                            - integer
                            - 'null'
                          description: The odometer value at the time of the event, in kilometers
                          example: 4435
                  meta:
                    $ref: '#/components/schemas/pagination'
        '400':
          $ref: '#/components/responses/validation-error'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '500':
          $ref: '#/components/responses/server-error'
  /vehicles/battery:
    get:
      tags:
        - Vehicles (Electric)
      summary: Get Electric Vehicle's Battery Percentage Left
      description: This endpoint returns the battery percentage left for your electic vehicles.
      parameters:
        - $ref: '#/components/parameters/registration'
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        vehicle_id:
                          $ref: '#/components/schemas/vehicle-id'
                        registration:
                          $ref: '#/components/schemas/registration'
                        chassis_number:
                          $ref: '#/components/schemas/chassis-number'
                        battery_percentage_left:
                          type: integer
                          description: The battery percentage left
                          example: 90
                        battery_ts:
                          $ref: '#/components/schemas/timestamp'
                          description: The date and time of the last battery percentage left update
        '400':
          $ref: '#/components/responses/validation-error'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '500':
          $ref: '#/components/responses/server-error'
  /vehicles/{registration}/charging/events:
    get:
      tags:
        - Vehicles (Electric)
      summary: Get Electric Vehicle's Charging Events by Registration
      description: This endpoint returns the charging events for a given electric vehicle over a given period.
      parameters:
        - name: registration
          in: path
          description: The vehicle's license plate
          required: true
          schema:
            $ref: '#/components/schemas/registration'
            example: ABC1234
        - $ref: '#/components/parameters/start_timestamp_filter'
          description: The earliest date and time to retrieve events. (limited to **31 days**)
          required: true
        - $ref: '#/components/parameters/end_timestamp_filter'
          description: The latest date and time to retrieve events. (limited to **31 days**)
          required: true
        - $ref: '#/components/parameters/page_without_validation'
        - $ref: '#/components/parameters/limit_without_validation'
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: The list of events generated during that period
                    items:
                      type: object
                      properties:
                        event_ts:
                          $ref: '#/components/schemas/timestamp'
                          description: The event date and time
                        status:
                          type: string
                          description: The status of the event
                          enum:
                            - PLUGGED_CHARGING
                            - PLUGGED_NOT_CHARGING
                            - UNPLUGGED
                          example: PLUGGED_CHARGING
                  meta:
                    $ref: '#/components/schemas/pagination'
        '400':
          $ref: '#/components/responses/validation-error'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '500':
          $ref: '#/components/responses/server-error'
  /vehicles/{registration}/range:
    get:
      tags:
        - Vehicles (Electric)
      summary: Get Electric Vehicle's Remaining Range
      description: This endpoint provides the EV range reported events for a specific registration, covering the given dates (YYYY-MM-DD hh:mm:ss)
      parameters:
        - name: registration
          in: path
          description: The vehicle's registration
          required: true
          schema:
            $ref: '#/components/schemas/registration'
            example: ABC1234
        - $ref: '#/components/parameters/start_timestamp_filter'
          description: The earliest date and time to retrieve events (limited to **24 hours**)
          required: true
        - $ref: '#/components/parameters/end_timestamp_filter'
          description: The latest date and time to retrieve events. (limited to **24 hours**)
          required: true
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        vehicle_id:
                          $ref: '#/components/schemas/vehicle-id'
                        registration:
                          $ref: '#/components/schemas/registration'
                        event_ts:
                          $ref: '#/components/schemas/timestamp'
                          description: The event date and time
                        value_unit:
                          type:
                            - string
                            - 'null'
                          description: The unit of the measured value
                          example: km
                        value:
                          type:
                            - integer
                            - 'null'
                          description: The remaining range value
                          example: 143
                        odometer:
                          type:
                            - integer
                            - 'null'
                          description: The odometer value at the time of the event, in kilometers
                          example: 4435
                  meta:
                    $ref: '#/components/schemas/pagination'
        '400':
          $ref: '#/components/responses/validation-error'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '500':
          $ref: '#/components/responses/server-error'
  /vehicles/ev-consumption:
    post:
      tags:
        - Vehicles (Electric)
      summary: Retrieve Electric Vehicles' Estimated Battery Consumptions
      description: 'This endpoint allows you to retrieve the estimated electric vehicle battery consumptions for up to 100 vehicles per request within your fleet, at the start and at the end of a given period with a maximum time range of 24 hours. The values are estimated based on energy consumption and distance traveled.<br/><br/> **Note**: This endpoint is subject to a rate limit, allowing a maximum of 10 requests per minute.'
      requestBody:
        description: The json data that needs to be processed
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - registrations
                - start_timestamp
                - end_timestamp
              properties:
                vehicle_id:
                  $ref: '#/components/schemas/vehicle-id'
                registrations:
                  type: array
                  example:
                    - ABC1234X
                    - DEF5678X
                  description: Array of vehicle registrations
                  maxItems: 100
                  items:
                    $ref: '#/components/schemas/registration'
                start_timestamp:
                  $ref: '#/components/schemas/date'
                  example: '2022-01-01 00:00:00'
                  description: This will return the battery consumption between the start and end timestamp
                end_timestamp:
                  $ref: '#/components/schemas/date'
                  example: '2022-01-01 23:59:59'
                  description: This will return the fuel level between the start and end timestamp.<br/><br/> The lookup period is of **maximum 24 hours** between the start_timestamp and the end_timestamp
                page:
                  type: integer
                  example: 1
                  default: 1
                  description: The current page
                limit:
                  type: integer
                  example: 10
                  default: 10
                  maximum: 100
                  description: The number of items to display per page
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        vehicle_id:
                          $ref: '#/components/schemas/vehicle-id'
                        registration:
                          $ref: '#/components/schemas/registration'
                        battery_capacity:
                          type:
                            - number
                            - 'null'
                          example: 100
                          description: The vehicle battery capacity
                        distance:
                          type: number
                          description: The traveled distance, in kilometers(km)
                          example: 207
                        consumed_kwh:
                          type: number
                          description: The vehicle battery consumed in Kilowatt-hour(kWh)
                          example: 91
                        avg_consumption:
                          type: number
                          description: The average battery consumption in Kilowatt-hour (kWh) per 100km, calculated as (consumed_kWh / distance) * 100. This is an estimate and the consumption will become more accurate as the vehicle drives longer distances.
                          example: 45.41
                  meta:
                    $ref: '#/components/schemas/pagination'
        '400':
          $ref: '#/components/responses/validation-error'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '500':
          $ref: '#/components/responses/server-error'
  /vehicles/range:
    post:
      tags:
        - Vehicles (Electric)
      summary: Retrieve Multiple Electric Vehicles' Remaining Range
      description: 'This endpoint allows you to retrieve the EV range reported events for up to 100 vehicles per request within your fleet, at the start and at the end of a given period with a maximum time range of 24 hours.<br/><br/> **Note**: This endpoint is subject to a rate limit, allowing a maximum of 10 request per minute.'
      requestBody:
        description: The json data that needs to be processed
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - registrations
                - start_timestamp
                - end_timestamp
              properties:
                vehicle_id:
                  $ref: '#/components/schemas/vehicle-id'
                registrations:
                  type: array
                  example:
                    - ABC1234X
                    - DEF5678X
                  description: Array of vehicle registrations
                  maxItems: 100
                  items:
                    $ref: '#/components/schemas/registration'
                start_timestamp:
                  $ref: '#/components/schemas/date'
                  example: '2022-01-01 00:00:00'
                  description: This will return the remaining range between the start and end timestamp
                end_timestamp:
                  $ref: '#/components/schemas/date'
                  example: '2022-01-01 23:59:59'
                  description: This will return the remaining range between the start and end timestamp.<br/><br/> The lookup period is of **maximum 24 hours** between the start_timestamp and the end_timestamp
                page:
                  type: integer
                  example: 1
                  default: 1
                  description: The current page
                limit:
                  type: integer
                  example: 10
                  default: 10
                  maximum: 100
                  description: The number of items to display per page
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        vehicle_id:
                          $ref: '#/components/schemas/vehicle-id'
                        registration:
                          $ref: '#/components/schemas/registration'
                        event_ts:
                          $ref: '#/components/schemas/timestamp'
                          description: The event date and time
                          example: '2022-01-28 16:48:03+02'
                        value_unit:
                          type:
                            - string
                            - 'null'
                          description: The unit of the measured value
                          example: km
                        value:
                          type:
                            - integer
                            - 'null'
                          description: The remaining range value
                          example: 143
                        odometer:
                          type:
                            - integer
                            - 'null'
                          description: The odometer value at the time of the event, in kilometers
                          example: 4435
                  meta:
                    $ref: '#/components/schemas/pagination'
        '400':
          $ref: '#/components/responses/validation-error'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '500':
          $ref: '#/components/responses/server-error'
  /vehicles/soc:
    post:
      tags:
        - Vehicles (Electric)
      summary: Retrieve Multiple Electric Vehicles' State of Charge (SoC) Events
      description: 'This endpoint allows you to retrieve the EV state of charge (SoC) reported events for up to 100 vehicles per request within your fleet, at the start and at the end of a given period with a maximum time range of 24 hours.<br/><br/> **Note**: This endpoint is subject to a rate limit, allowing a maximum of 10 request per minute.'
      requestBody:
        description: The json data that needs to be processed
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - registrations
                - start_timestamp
                - end_timestamp
              properties:
                registrations:
                  type: array
                  example:
                    - ABC1234X
                    - DEF5678X
                  description: Array of vehicle registrations
                  maxItems: 100
                  items:
                    type: string
                start_timestamp:
                  $ref: '#/components/schemas/date'
                  example: '2022-01-01 00:00:00'
                  description: The earliest date and time to retrieve events (limited to **24 hours**)
                end_timestamp:
                  $ref: '#/components/schemas/date'
                  example: '2022-01-01 23:59:59'
                  description: The latest date and time to retrieve events.<br/><br/> The lookup period is of **maximum 24 hours** between the start_timestamp and the end_timestamp
                page:
                  type: integer
                  example: 1
                  default: 1
                  description: The current page
                limit:
                  type: integer
                  example: 10
                  default: 10
                  maximum: 1000
                  description: The number of items to display per page
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        vehicle_id:
                          $ref: '#/components/schemas/vehicle-id'
                        registration:
                          $ref: '#/components/schemas/registration'
                        event_ts:
                          $ref: '#/components/schemas/timestamp'
                          description: The event date and time.
                          example: '2022-01-28 16:48:03+02'
                        value_unit:
                          type:
                            - string
                            - 'null'
                          description: The unit of the measured value.
                          example: '%'
                        value:
                          type:
                            - integer
                            - 'null'
                          description: The actual value.
                          example: 46
                        odometer:
                          type:
                            - integer
                            - 'null'
                          description: The odometer value at the time of the event, in kilometers
                          example: 4435
                  meta:
                    $ref: '#/components/schemas/pagination'
        '400':
          $ref: '#/components/responses/validation-error'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '500':
          $ref: '#/components/responses/server-error'
  /vehicles/immobilise/status:
    get:
      summary: Get Immobilise Status for All Vehicles
      description: <p>This function requires a specific fitment by Cartrack. To retrieve the Immobilise Status for All Vehicles.</p>
      tags:
        - Vehicles Commands
      parameters:
        - $ref: '#/components/parameters/registration'
        - $ref: '#/components/parameters/page_without_validation'
        - $ref: '#/components/parameters/limit_without_validation'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        vehicle_id:
                          $ref: '#/components/schemas/vehicle-id'
                        registration:
                          $ref: '#/components/schemas/registration'
                        immobilise_status:
                          type: boolean
                          description: The immobilisation status of the vehicle
                          example: true
                  meta:
                    $ref: '#/components/schemas/pagination'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /vehicles/{registration}/immobilise:
    put:
      summary: Immobilise a vehicle by blocking ignition
      description: This function requires a specific fitment by Cartrack. When immobilising the vehicle, the user won't be able to power on the vehicle. If the vehicle's engine is already on, the immobilisation will be effective after the current ignition cycle.
      tags:
        - Vehicles Commands
      parameters:
        - name: registration
          in: path
          description: The license plate of the vehicle
          required: true
          schema:
            $ref: '#/components/schemas/registration'
            example: ABC1234
      requestBody:
        description: The json data that needs to be processed
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - immobilise
              properties:
                immobilise:
                  type: boolean
                  description: Send true to immobilise the vehicle. Send false to release the vehicle.
                  example: true
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      registration:
                        $ref: '#/components/schemas/registration'
                  meta:
                    type:
                      - string
                      - 'null'
                    properties:
                      message:
                        type:
                          - string
                          - 'null'
                        example: Instruction has been sent to the Cartrack terminal.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /vehicles/{registration}/central-locking:
    put:
      summary: Send command to lock or unlock a vehicle
      description: '<p>This function requires a specific fitment by Cartrack. You can remotely lock or unlock the vehicle by sending the commands "UNLOCK", "UNLOCK_0", "LOCK". A device is installed in your vehicle and reproduces the keyfob signals.<br/> <ul> <li>"UNLOCK": this command turns on the keyfob in the car and uses it to send the unlock command. The doors can now be opened. The keyfob stays powered up, the user can turn on the engine.</li> <li>"UNLOCK_0": this command turns on the keyfob in the car and uses it to send a different set of unlock command. The doors can now be opened. However, the keyfob will be immediately powered down, the user won''t be able to turn on the engine.</li> <li>"LOCK": this command turns on the keyfob in the vehicle and it uses it to send a lock command. The doors are now locked. The keyfob is powered down immediately after, the engine can''t be turned on.</li> </ul></p>'
      tags:
        - Vehicles Commands
      parameters:
        - name: registration
          in: path
          description: The license plate of the vehicle
          required: true
          schema:
            $ref: '#/components/schemas/registration'
            example: ABC1234
      requestBody:
        description: The json data that needs to be processed
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - command
              properties:
                command:
                  type: string
                  description: The vehicle's lock status
                  example: LOCK
                  enum:
                    - LOCK
                    - UNLOCK
                    - UNLOCK_0
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      registration:
                        $ref: '#/components/schemas/registration'
                  meta:
                    type:
                      - string
                      - 'null'
                    example: Instruction has been sent to the Cartrack terminal.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /vehicles/commands/{registration}:
    post:
      summary: Send command to sound horn or turn on hazard lights on vehicle
      description: '<p>This function requires a specific fitment by Cartrack. You can remotely sound the horn on the vehicle or turn on the hazard lights by sending the commands "HORN", "HAZARD_LIGHTS". A device is installed in your vehicle and reproduces the keyfob signals.<br/>     <ul> <li>"HORN": this command turns on the keyfob in the car and uses it to send the horn command.</li> <li>"HAZARD_LIGHTS": this command turns on the keyfob in the car and uses it to send the hazard lights command.</li> </ul></p>'
      tags:
        - Vehicles Commands
      parameters:
        - name: registration
          in: path
          description: The license plate of the vehicle
          required: true
          schema:
            $ref: '#/components/schemas/registration'
            example: ABC1234X
      requestBody:
        description: The json data that needs to be processed
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - command
              properties:
                command:
                  type: string
                  description: The vehicle's action triggered
                  example: HORN
                  enum:
                    - HORN
                    - HAZARD_LIGHTS
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      registration:
                        $ref: '#/components/schemas/registration'
                  meta:
                    type:
                      - string
                      - 'null'
                    properties:
                      message:
                        type:
                          - string
                          - 'null'
                        example: Instruction has been sent to the Cartrack terminal.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /vision/video/bulk-upload:
    post:
      summary: Bulk Upload Videos
      description: 'This endpoint allows you to upload multiple videos from custom third party camera device(s). Note: This service is available exclusively for Cartrack Vision API enabled accounts. If you do not have access (HTTP 403), contact our sales representative.'
      tags:
        - Vision
      requestBody:
        description: The json data that needs to be processed
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - data
              properties:
                data:
                  type: array
                  description: Collection of vision video records to be created. May not have more than 100 items.
                  items:
                    type: object
                    required:
                      - registration
                      - videos
                    properties:
                      registration:
                        $ref: '#/components/schemas/registration'
                      videos:
                        type: array
                        description: The list of video files to be uploaded. May not have more than 8 videos.
                        items:
                          type: object
                          required:
                            - camera
                            - start_timestamp
                            - end_timestamp
                            - video_url
                          properties:
                            camera:
                              type: integer
                              enum:
                                - 1
                                - 2
                                - 3
                                - 4
                                - 5
                                - 6
                                - 7
                                - 8
                              description: The camera property specifies the channel from which the video should be tagged to.
                              example: 1
                            start_timestamp:
                              $ref: '#/components/schemas/date'
                              description: The start timestamp of the video to be uploaded.
                              example: '2024-12-31 00:00:00'
                            end_timestamp:
                              $ref: '#/components/schemas/date'
                              description: The end timestamp of the video to be uploaded. <br/>Total duration limit to be within 5 minutes from start_timestamp.
                              example: '2024-12-31 00:03:00'
                            video_url:
                              type: string
                              description: The URL of the video.
                              example: https://example.com/videos/sample.mp4?expires=1700000000&signature=abc123
                            comments:
                              type: string
                              maxLength: 100
                              description: The comment to be included with the uploaded video. <br/>Previously uploaded video with the same registration, start_timestamp and end_timestamp will be updated.
                              example: Footage captured from XXX camera.
                webhook_url:
                  type: string
                  description: 'The webhook URL to receive the video bulk upload status.<br/><br/> A x-webhook-signature header will be sent with the webhook for you to verify the request.  Please refer to webhook documentation in the introduction section for more details.<br/><br/> Sample webhook payload:<pre> [ { "registration": "ABC1234X", "videos": [ { "camera": "3", "start_timestamp": "2025-01-01 00:00:00", "end_timestamp": "2025-01-01 00:05:00", "errors": "The file is not of MP4 video format." }, { "camera": 2, "start_timestamp": "2025-01-01 00:00:00", "end_timestamp": "2025-01-01 00:05:00", "request_id": 15139 } ] }, { "registration": "DEF4321X", "videos": [ { "camera": "1", "start_timestamp": "2025-01-01 01:35:00", "end_timestamp": "2025-01-01 01:36:00", "request_id": 15140 } ] } ] </pre>'
                  example: https://your-webhook-url.com/delivery-jobs-bulk-upload
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      webhook_url:
                        type: string
                        description: The webhook URL to receive the delivery bulk upload videos status.
                        example: https://your-webhook-url.com/video/bulk-upload
                      message:
                        type: string
                        example: Bulk videos upload request received. Please check the status via webhook.
            application/xml:
              schema:
                type: object
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /vision/video/upload:
    post:
      summary: Upload Video
      description: 'This endpoint allows you to upload video from custom third party camera device(s). Note: This service is available exclusively for Cartrack Vision API enabled accounts. If you do not have access (HTTP 403), contact our sales representative.'
      tags:
        - Vision
      requestBody:
        description: The json data that needs to be processed
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - registration
                - start_timestamp
                - end_timestamp
                - camera
                - video_file
              properties:
                video_file:
                  type: string
                  format: binary
                  description: 'Video file to be uploaded.<br/> Only MP4 format with H.246 audio codec is accepted. <br/> Note: Maximum accepted file size: 50 MB.'
                registration:
                  $ref: '#/components/schemas/registration'
                start_timestamp:
                  $ref: '#/components/schemas/date'
                  description: The start timestamp of the video to be uploaded.
                  example: '2024-12-31 00:00:00'
                end_timestamp:
                  $ref: '#/components/schemas/date'
                  description: The end timestamp of the video to be uploaded.<br/>Total duration limit to be within 5 minutes from start_timestamp.
                  example: '2024-12-31 00:30:00'
                camera:
                  type:
                    - integer
                    - 'null'
                  enum:
                    - 1
                    - 2
                    - 3
                    - 4
                    - 5
                    - 6
                    - 7
                    - 8
                  description: The camera property specifies the channel from which the video should be tagged to.
                  example: 1
                comments:
                  type: string
                  maxLength: 100
                  description: The comment to be included with the uploaded video.<br/>Previously uploaded video with the same registration, start_timestamp and end_timestamp will be updated.
                  example: Footage captured from XXX camera.
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      request_id:
                        type: integer
                        description: The request ID of the uploaded video.
                        example: 12345
                      vehicle_id:
                        $ref: '#/components/schemas/vehicle-id'
                      registration:
                        $ref: '#/components/schemas/registration'
                      camera:
                        type:
                          - integer
                          - 'null'
                        description: The camera ID.
                        example: 1
                      status_id:
                        type: integer
                        description: The video request status_id.
                        example: 2
                      start_timestamp:
                        $ref: '#/components/schemas/timestamp'
                        description: The start timestamp of the video.
                      end_timestamp:
                        $ref: '#/components/schemas/timestamp'
                        description: The end timestamp of the video.
                      upload_timestamp:
                        $ref: '#/components/schemas/timestamp'
                        description: The video uploaded timestamp.
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /vision/videos/requests:
    get:
      summary: Get Video Requests
      description: 'This endpoint retrieves the video clips downloaded from your vehicles. Note: This service is available exclusively for Cartrack Vision API enabled accounts. If you do not have access (HTTP 403), contact our sales representative.'
      tags:
        - Vision
      parameters:
        - $ref: '#/components/parameters/registration'
        - name: filter[request_id][]
          in: query
          description: The video request ID
          required: false
          schema:
            type:
              - integer
              - 'null'
            example: 12345
        - $ref: '#/components/parameters/chassis_number'
        - name: filter[request_comment]
          in: query
          description: The video request comment
          required: false
          schema:
            type:
              - string
              - 'null'
            maxLength: 100
            example: Video of an incident
        - name: filter[camera]
          in: query
          description: The number indicator of the camera responsible for capturing the video on a certain angle or position
          required: false
          schema:
            type:
              - integer
              - 'null'
            example: 3
        - name: filter[status_id]
          in: query
          description: The video request status.<br/> <table> <thead> <tr> <th>status_id</th> <th>description</th> </tr> </thead> <tbody> <tr> <td>1</td> <td>Pending</td> </tr> <tr> <td>2</td> <td>In progress</td> </tr> <tr> <td>3</td> <td>Complete</td> </tr> <tr> <td>4</td> <td>Cancelled</td> </tr> <tr> <td>5</td> <td>Does not exist</td> </tr> <tr> <td>6</td> <td>Timeout</td> </tr> </tbody> </table>
          required: false
          schema:
            type: integer
            example: 3
        - name: filter[event_type_id]
          in: query
          description: The event type. <br/>  <table> <tr> <th>event_type_id</th> <th>event_description</th> </tr> <tr><td>289</td><td>ABSENCE_LOITERING</td></tr> <tr><td>282</td><td>ACTION_DETECTION</td></tr> <tr><td>275</td><td>CAMERA_BUTTON</td></tr> <tr><td>271</td><td>CAMERA_COVERED</td></tr> <tr><td>286</td><td>CAMERA_STATUS</td></tr> <tr><td>287</td><td>CUSTOM</td></tr> <tr><td>291</td><td>CUSTOM_OBJECT_DETECTION</td></tr> <tr><td>263</td><td>DISTRACTION_DETECTED</td></tr> <tr><td>269</td><td>EYE_CLOSED_DETECTED</td></tr> <tr><td>280</td><td>FACEMASK</td></tr> <tr><td>283</td><td>FACE_RECOGNITION</td></tr> <tr><td>266</td><td>FATIGUE_DETECTED</td></tr> <tr><td>264</td><td>FORWARD_COLLISION_WARNING</td></tr> <tr><td>272</td><td>HEADWAY_MONITORING_WARNING</td></tr> <tr><td>288</td><td>HIGH_PRIORITY_LINE_CROSS</td></tr> <tr><td>273</td><td>LANE_DEPARTURE_WARNING</td></tr> <tr><td>284</td><td>LICENSE_PLATE_RECOGNITION</td></tr> <tr><td>279</td><td>LINE_CROSS</td></tr> <tr><td>212</td><td>MOBILE_EYE_DELTA</td></tr> <tr><td>278</td><td>MULTI_OBJECT</td></tr> <tr><td>277</td><td>NO_SEATBELT_DETECTED</td></tr> <tr><td>276</td><td>PASSENGER_DETECTED</td></tr> <tr><td>265</td><td>PEDESTRIAN_COLLISION_WARNING</td></tr> <tr><td>267</td><td>PHONE_DETECTED</td></tr> <tr><td>285</td><td>SAFETY_HELMET_DETECTION</td></tr> <tr><td>268</td><td>SMOKING_DETECTED</td></tr> <tr><td>281</td><td>SOCIAL_DISTANCING</td></tr> <tr><td>290</td><td>SUSPICIOUS_BEHAVIOUR</td></tr> <tr><td>274</td><td>URBAN_FORWARD_COLLISION_WARNING</td></tr> <tr><td>270</td><td>YAWNING_DETECTED</td></tr> </table>
          required: false
          schema:
            type: integer
            example: 263
        - name: filter[video_start_ts_from]
          in: query
          description: The earliest date and time to retrieve the videos based on video start timestamp
          required: false
          schema:
            $ref: '#/components/schemas/date'
            example: '2024-09-27 00:00:00'
        - name: filter[video_start_ts_to]
          in: query
          description: The latest date and time to retrieve the videos based on video start timestamp
          required: false
          schema:
            $ref: '#/components/schemas/date'
            example: '2024-09-27 10:15:00'
        - name: filter[video_end_ts_from]
          in: query
          description: The earliest date and time to retrieve the videos based on video end timestamp
          required: false
          schema:
            $ref: '#/components/schemas/date'
            example: '2024-09-27 00:00:00'
        - name: filter[video_end_ts_to]
          in: query
          description: The latest date and time to retrieve the videos based on video end timestamp
          required: false
          schema:
            $ref: '#/components/schemas/date'
            example: '2024-09-27 10:15:00'
        - name: filter[start_request_ts]
          in: query
          description: The earliest date and time to retrieve the videos based on video request timestamp
          required: false
          schema:
            $ref: '#/components/schemas/date'
            example: '2024-09-27 00:00:00'
        - name: filter[end_request_ts]
          in: query
          description: The latest date and time to retrieve the videos based on video request timestamp
          required: false
          schema:
            $ref: '#/components/schemas/date'
            example: '2024-09-27 10:15:00'
        - name: filter[start_updated_ts]
          in: query
          description: The earliest date and time to retrieve the videos based on video updated timestamp
          required: false
          schema:
            $ref: '#/components/schemas/date'
            example: '2024-09-27 00:00:00'
        - name: filter[end_updated_ts]
          in: query
          description: The latest date and time to retrieve the videos based on video updated timestamp
          required: false
          schema:
            $ref: '#/components/schemas/date'
            example: '2024-09-27 10:15:00'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        request_id:
                          type: integer
                          description: The video request ID
                          example: 12345
                        vehicle_id:
                          $ref: '#/components/schemas/vehicle-id'
                        registration:
                          $ref: '#/components/schemas/registration'
                        chassis_number:
                          $ref: '#/components/schemas/chassis-number'
                        camera:
                          type:
                            - integer
                            - 'null'
                          description: The camera ID
                          example: 1
                        video_start_ts:
                          oneOf:
                            - $ref: '#/components/schemas/timestamp'
                            - type: 'null'
                          description: The video start timestamp
                        video_end_ts:
                          oneOf:
                            - $ref: '#/components/schemas/timestamp'
                            - type: 'null'
                          description: The video start timestamp
                        status_id:
                          type:
                            - integer
                            - 'null'
                          description: The status ID
                          example: 3
                        request_ts:
                          oneOf:
                            - $ref: '#/components/schemas/timestamp'
                            - type: 'null'
                          description: The video request timestamp
                        subuser_id:
                          oneOf:
                            - $ref: '#/components/schemas/uuid'
                            - type: 'null'
                          description: The subuser ID who made the request
                          example: 7489ff44-xxxx-11eb-xxxx-005056a801ca
                        url:
                          type:
                            - string
                            - 'null'
                          description: The video URL
                          example: https://example.com/video.mp4
                        request_comment:
                          type:
                            - string
                            - 'null'
                          description: The request comment
                          example: Video of an incident
                        updated_ts:
                          oneOf:
                            - $ref: '#/components/schemas/timestamp'
                            - type: 'null'
                          description: The request updated timestamp
                        event_type_id:
                          type: integer
                          description: The event type id.
                          example: 263
                        event_description:
                          type:
                            - string
                            - 'null'
                          description: The event description.
                          example: YAWNING_DETECTED
                  meta:
                    $ref: '#/components/schemas/pagination'
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
    post:
      summary: Create Video Requests
      description: 'This endpoint creates a request of vehicle video clips. Note: This service is available exclusively for Cartrack Vision API enabled accounts. If you do not have access (HTTP 403), contact our sales representative.'
      tags:
        - Vision
      requestBody:
        description: JSON payload containing the data required for driver creation.
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - registration
                - start_timestamp
                - duration
                - camera
              properties:
                registration:
                  $ref: '#/components/schemas/registration'
                start_timestamp:
                  $ref: '#/components/schemas/date'
                  description: The requested video start timestamp
                duration:
                  type:
                    - integer
                    - 'null'
                  minimum: 10
                  maximum: 300
                  description: The video duration starting from the start timestamp, in seconds.
                  example: 10
                camera:
                  type: array
                  items:
                    type:
                      - integer
                      - 'null'
                    enum:
                      - 1
                      - 2
                      - 3
                      - 4
                      - 5
                      - 6
                      - 7
                      - 8
                    example: 1
                  maxItems: 8
                  description: The camera property specifies the channel from which the video should be retrieved. You must indicate the desired camera channel, and the API will fetch the video from the DVR storage if it is still available.
                comments:
                  type:
                    - string
                    - 'null'
                  maxLength: 100
                  description: The request video comment.
                  example: Requesting for camera 1 video.
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        request_id:
                          type: integer
                          description: The video request ID
                          example: 12345
                        vehicle_id:
                          $ref: '#/components/schemas/vehicle-id'
                        registration:
                          $ref: '#/components/schemas/registration'
                        camera:
                          type:
                            - integer
                            - 'null'
                          description: The camera ID
                          example: 1
                        status_id:
                          type:
                            - integer
                            - 'null'
                          description: The status ID
                          example: 3
                        address:
                          type:
                            - string
                            - 'null'
                          description: The address or location of the vehicle where the video being requested was captured
                          example: 123 Main St, City, Country
                        video_start_ts:
                          oneOf:
                            - $ref: '#/components/schemas/timestamp'
                            - type: 'null'
                          description: The video start timestamp
                        video_end_ts:
                          oneOf:
                            - $ref: '#/components/schemas/timestamp'
                            - type: 'null'
                          description: The video start timestamp
                        request_ts:
                          oneOf:
                            - $ref: '#/components/schemas/timestamp'
                            - type: 'null'
                          description: The video request timestamp
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /vision/videos/status:
    get:
      summary: Get Video Requests Status
      description: 'This endpoint retrieves the list of video request status. Note: This service is available exclusively for Cartrack Vision API enabled accounts. If you do not have access (HTTP 403), contact our sales representative.'
      tags:
        - Vision
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        status_id:
                          type: integer
                          description: The status ID
                          example: 1
                        status_description:
                          type: string
                          description: The status description
                          example: Pending
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
  /vision/livestream/{registration}:
    post:
      summary: Video Livestream Requests
      description: 'This endpoint returns the vehicle''s livestream links. Note: This service is available exclusively for Cartrack Vision API enabled accounts. If you do not have access (HTTP 403), contact our sales representative.'
      tags:
        - Vision
      parameters:
        - name: registration
          in: path
          description: The vehicle registration.
          required: true
          schema:
            $ref: '#/components/schemas/registration'
            example: ABC1234X
      requestBody:
        description: JSON payload containing the data required for livestream request.
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - camera
              properties:
                camera:
                  type: array
                  items:
                    type: integer
                    enum:
                      - 1
                      - 2
                      - 3
                      - 4
                      - 5
                      - 6
                      - 7
                      - 8
                    example: 1
                  maxItems: 8
                  description: The camera streaming the live video on a certain angle or position.
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        camera:
                          type: integer
                          description: The camera ID
                          example: 1
                        url:
                          type: string
                          description: The livestream URL.
                          example: https://livestream.video.com/video-sample-url
        '401':
          $ref: '#/components/responses/unauthorized-error'
        '403':
          $ref: '#/components/responses/forbidden-error'
        '404':
          $ref: '#/components/responses/not-found-error'
        '422':
          $ref: '#/components/responses/validation-error'
        '500':
          $ref: '#/components/responses/server-error'
components:
  securitySchemes:
    BasicAuth:
      type: http
      scheme: basic
  responses:
    UnauthorizedError:
      $ref: '#/components/responses/unauthorized-error'
    ForbiddenError:
      $ref: '#/components/responses/forbidden-error'
    NotFoundError:
      $ref: '#/components/responses/not-found-error'
    ValidationError:
      $ref: '#/components/responses/validation-error'
    ServerError:
      $ref: '#/components/responses/server-error'
    equipment-snapshot:
      description: Equipment snapshot information response
      content:
        application/json:
          schema:
            type: object
            properties:
              EquipmentHeader:
                $ref: '#/components/schemas/aemp-equipment-header'
              Location:
                $ref: '#/components/schemas/aemp-location'
                description: The last known vehicle location
              FuelUsed:
                type: object
                description: Fuel consumed by the vehicle
                properties:
                  DateTime:
                    $ref: '#/components/schemas/aemp-datetime'
                    description: The last known datetime
                  FuelConsumed:
                    type: number
                    description: Cumulative fuel used
                    example: 514
                  FuelUsedUnits:
                    type: string
                    description: Unit of measure of fuel
                    example: liter
              Distance:
                type: object
                description: Distance travelled by the vehicle
                properties:
                  DateTime:
                    $ref: '#/components/schemas/aemp-datetime'
                    description: The last known datetime
                  OdometerUnits:
                    type: string
                    description: Unit of measure of distance
                    example: kilometre
                  Distance:
                    type: number
                    description: Cumulative distance traveled
                    example: 176071
              FuelRemaining:
                type: object
                description: Fuel remaining percentage of the vehicle
                properties:
                  DateTime:
                    $ref: '#/components/schemas/aemp-datetime'
                    description: The last known datetime
                  Percent:
                    type: number
                    description: Fuel remaining percentage of the vehicle
                    minimum: 0
                    maximum: 100
                    example: 85
              EngineStatus:
                type: object
                description: Engine status of the vehicle
                properties:
                  DateTime:
                    $ref: '#/components/schemas/aemp-datetime'
                    description: The last known datetime
                  Running:
                    type: boolean
                    description: Engine status of the vehicle
                    example: true
              CumulativeOperatingHours:
                type: object
                description: The current total cumulative operating hours of the vehicle
                properties:
                  DateTime:
                    $ref: '#/components/schemas/aemp-datetime'
                    description: The last known datetime
                  Hour:
                    type: number
                    description: The current total operating hours of the vehicle
                    example: 176071
              CumulativeIdleHours:
                type: object
                description: The cumulative idle non-operating hours of the vehicle
                properties:
                  DateTime:
                    $ref: '#/components/schemas/aemp-datetime'
                    description: The last known datetime
                  Hour:
                    type: number
                    description: The cumulative idle non-operating hours of the vehicle
                    example: 6505
            required:
              - EquipmentHeader
    unauthorized-error:
      description: Unauthorized access. Authentication is required.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                description: The detail of the error
                required:
                  - code
                  - message
                properties:
                  code:
                    type: integer
                    description: The error code
                    example: 401
                  message:
                    type: string
                    description: A message providing additional context as to why the error occurred
                    example: 'Unauthorized. In order to access this web service you must be a Cartrack Subscriber. Please refer to this page for how to authenticate: https://developer.cartrack.com/fleet-api#authentication. If you are still having trouble using this service please contact fleet-api@cartrack.com'
    forbidden-error:
      description: Access is forbidden. The user does not have permission to access this resource.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                description: The detail of the error
                required:
                  - code
                  - message
                properties:
                  code:
                    type: integer
                    description: The error code
                    example: 403
                  message:
                    type: string
                    description: A message providing additional context as to why the error occurred
                    example: Access Forbidden.
    not-found-error:
      description: The requested resource was not found.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                description: The detail of the error
                required:
                  - code
                  - message
                properties:
                  code:
                    type: integer
                    description: The error code
                    example: 404
                  message:
                    type: string
                    description: A message providing additional context as to why the error occurred.
                    example: The requested resource was not found.
    validation-error:
      description: Validation failed for the input parameters.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                description: The detail of the error
                required:
                  - code
                  - message
                properties:
                  code:
                    type: integer
                    description: The error code
                    example: 422
                  message:
                    type: string
                    description: A message providing additional context as to why the error occurred
                  data:
                    type: object
                    description: An object containing the different properties having issues
                    additionalProperties:
                      type: array
                      description: A description of the problem
                      items:
                        type: string
                        description: Expected format or reason for the validation error
                        example: The example_property must be a date in the future
    server-error:
      description: Internal server error.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                description: The detail of the error
                properties:
                  code:
                    type: integer
                    description: The error code
                    example: 500
                  message:
                    type: string
                    description: A message providing additional context as to why the error occurred
                    example: Internal server error.
                  data:
                    type: object
                    description: An object containing the different properties having issues
                    properties:
                      message:
                        type: string
                        description: The error message
                        example: Application error encountered - Please contact our customer support.
    fleet-snapshot:
      description: Fleet snapshot response with pagination
      content:
        application/json:
          schema:
            type: object
            properties:
              Equipment:
                type: array
                description: List of equipments (vehicles).
                items:
                  type: object
                  properties:
                    EquipmentHeader:
                      type: object
                      description: The EquipmentHeader.
                      properties:
                        UnitInstallDateTime:
                          $ref: '#/components/schemas/aemp-datetime'
                          description: Telematics Unit Installation Date.
                        OEMName:
                          type: string
                          description: The Manufacturer Name.
                          example: Mazda
                        Model:
                          type: string
                          description: The Model Name.
                          example: MAZDA3 HATCHBACK 1.5 AT DELUXE EU6
                        EquipmentID:
                          type: string
                          description: The Vehicle Registration.
                          example: SNN7868C-2K
                        SerialNumber:
                          type: string
                          description: The Vehicle Chassis Number.
                          example: '1231231'
                    Location:
                      type: object
                      description: The last known vehicle location.
                      properties:
                        DateTime:
                          $ref: '#/components/schemas/aemp-datetime'
                          description: The last known datetime.
                        Latitude:
                          type: number
                          description: The Latitude.
                          example: -26.123456
                        Longitude:
                          type: number
                          description: The Longitude.
                          example: 28.123456
                        Altitude:
                          type: number
                          description: The Altitude.
                          example: 1500.5
                        AltitudeUnits:
                          type: string
                          description: The Altitude Units.
                          example: meter
                    FuelUsed:
                      type: object
                      description: Fuel consumed by the vehicle.
                      properties:
                        DateTime:
                          $ref: '#/components/schemas/aemp-datetime'
                          description: The last known datetime.
                        FuelConsumed:
                          type: number
                          description: Cumulative fuel used.
                          example: 514
                        FuelUsedUnits:
                          type: string
                          description: Unit of measure of fuel as "liter".
                          example: liter
                    Distance:
                      type: object
                      description: Distance travelled by the vehicle.
                      properties:
                        DateTime:
                          $ref: '#/components/schemas/aemp-datetime'
                          description: The last known datetime.
                        OdometerUnits:
                          type: string
                          description: Unit of measure of distance as "kilometre".
                          example: kilometre
                        Distance:
                          type: number
                          description: Cumulative distance traveled.
                          example: 176071
                    FuelRemaining:
                      type: object
                      description: Fuel remaining percentage of the vehicle.
                      properties:
                        DateTime:
                          $ref: '#/components/schemas/aemp-datetime'
                          description: The last known datetime.
                        Percent:
                          type: number
                          description: Fuel remaining percentage of the vehicle.
                          example: 85
                    EngineStatus:
                      type: object
                      description: The engine status of the vehicle.
                      properties:
                        DateTime:
                          $ref: '#/components/schemas/aemp-datetime'
                          description: The last known datetime.
                        Running:
                          type: boolean
                          description: The engine status of the vehicle.
                          example: true
                    CumulativeOperatingHours:
                      type: object
                      description: The current total cumulative operating hours of the vehicle.
                      properties:
                        DateTime:
                          $ref: '#/components/schemas/aemp-datetime'
                          description: The last known datetime.
                        Hour:
                          type: number
                          description: The current total operating hours of the vehicle.
                          example: 176071
                    CumulativeIdleHours:
                      type: object
                      description: The cumulative idle non-operating hours of the vehicle.
                      properties:
                        DateTime:
                          $ref: '#/components/schemas/aemp-datetime'
                          description: The last known datetime.
                        Hour:
                          type: number
                          description: The cumulative idle non-operating hours of the vehicle.
                          example: 6505
              Links:
                type: array
                items:
                  type: object
                  properties:
                    Rel:
                      type: string
                      description: The reference attribute describes the link. Paginated services shall include a collection of links that describe the current page (Current), next page (Next), previous page (Previous), first page (First), and last page (Last).
                      example: Next
                    Href:
                      type: string
                      description: The hypermedia reference URL (href) is a reference to another endpoint. These references are provided so that available data is discoverable by automated systems. The reference is an absolute URL.
                      example: https://api.cartrack.com/aemp/iso15143-3/beta/fleet?page=2
                example:
                  - Rel: Current
                    Href: https://api.cartrack.com/aemp/iso15143-3/beta/fleet?page=1
                  - Rel: Next
                    Href: https://api.cartrack.com/aemp/iso15143-3/beta/fleet?page=2
                  - Rel: Last
                    Href: https://api.cartrack.com/aemp/iso15143-3/beta/fleet?page=10
                  - Rel: First
                    Href: https://api.cartrack.com/aemp/iso15143-3/beta/fleet?page=1
            required:
              - Equipment
              - Links
    customers:
      description: Customer details for authorised vehicle manufacturers
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                type: array
                description: This array returns the list of customer entries
                items:
                  type: object
                  properties:
                    customer_industry:
                      type: string
                      description: The industry of the customer
                      example: Agriculture
                    customer_company_name:
                      type: string
                      description: The name of the customer company
                      example: AAPDRAAI BOERDERY
                    contract_start_date:
                      $ref: '#/components/schemas/date'
                      description: Date and time when the customer contract started
                    vehicle_id:
                      $ref: '#/components/schemas/vehicle-id'
                    registration:
                      $ref: '#/components/schemas/registration'
                      description: Vehicle registration number
                    manufacturer:
                      oneOf:
                        - type: string
                        - type: 'null'
                      description: The vehicle manufacturer
                      example: Toyota
                    model:
                      oneOf:
                        - type: string
                        - type: 'null'
                      description: The vehicle model
                      example: Land Cruiser
                    chassis_number:
                      $ref: '#/components/schemas/chassis-number'
                      description: Vehicle chassis number
                    engine_number:
                      type: string
                      description: The engine number of the vehicle
                      example: 52WVXVC10338
                    colour:
                      oneOf:
                        - type: string
                        - type: 'null'
                      description: The vehicle colour
                      example: Pink
                    model_year:
                      oneOf:
                        - type: integer
                        - type: 'null'
                      description: The vehicle model year
                      example: 1983
                    contract_state:
                      type: string
                      description: Indicates the current status of the customer contract, such as active or fitment pending
                      enum:
                        - Active
                        - Fitment Pending
                      example: Active
                    vehicle_derivative:
                      type: string
                      description: A derivative name for the vehicle
                      example: Tesla Model S AWD 100D
              meta:
                $ref: '#/components/schemas/pagination'
            required:
              - data
  schemas:
    aemp-equipment-id:
      type: string
      description: Equipment identifier following AEMP ISO15143-3 standard
      pattern: ^[A-Z0-9\-]{1,20}$
      example: SNN7868C-2K
    aemp-datetime:
      type: string
      format: date-time
      description: ISO 8601 formatted datetime with timezone information
      example: '2025-05-02T13:22:19+08:00'
    aemp-equipment-header:
      type: object
      description: Standard AEMP equipment header information
      properties:
        EquipmentID:
          $ref: '#/components/schemas/aemp-equipment-id'
          description: The Vehicle Registration or Equipment Identifier
        SerialNumber:
          type: string
          description: The Vehicle Chassis Number or Serial Number
          example: '1231231'
        OEMName:
          type: string
          description: The Original Equipment Manufacturer Name
          example: Mazda
        Model:
          type: string
          description: The Equipment Model Name
          example: MAZDA3 HATCHBACK 1.5 AT DELUXE EU6
        UnitInstallDateTime:
          $ref: '#/components/schemas/aemp-datetime'
          description: Telematics Unit Installation Date and Time
      required:
        - EquipmentID
        - SerialNumber
        - OEMName
        - Model
    aemp-location:
      type: object
      description: Geographic location information following AEMP standard
      properties:
        DateTime:
          $ref: '#/components/schemas/aemp-datetime'
          description: The timestamp when location was recorded
        Latitude:
          type: number
          format: double
          description: Latitude coordinate in decimal degrees
          minimum: -90
          maximum: 90
          example: -26.123456
        Longitude:
          type: number
          format: double
          description: Longitude coordinate in decimal degrees
          minimum: -180
          maximum: 180
          example: 28.123456
        Altitude:
          type: number
          format: double
          description: Altitude above sea level
          example: 1500.5
        AltitudeUnits:
          type: string
          description: Unit of altitude measurement
          example: meter
      required:
        - DateTime
        - Latitude
        - Longitude
    page:
      type: integer
      description: Page number for pagination.
      example: 1
      default: 1
      minimum: 1
    limit:
      type: integer
      description: Number of items per page
      example: 15
      default: 10
      minimum: 1
      maximum: 1000
    uuid:
      type: string
      description: Universally unique identifier
      format: uuid
      example: 62462fcf-0938-11ec-8c4d-a4bf016cd6b2
    alert-name:
      type: string
      example: This is an API alert for Gofence 0724
      description: The alert's name
    id:
      type: integer
      description: User identification number
      example: 123456
    chassis-number:
      type: string
      description: The chassis number of the vehicle.
      example: 1HGCM82633A123456
      maxLength: 50
      oneOf:
        - type: string
        - type: 'null'
    date:
      type: string
      description: Timestamp
      example: '2023-01-01 12:00:00'
      format: date-time
    pagination:
      type: object
      properties:
        from:
          type: integer
          example: 1
        to:
          type: integer
          example: 15
        current_page:
          type: integer
          example: 1
        per_page:
          type: integer
          example: 15
        last_page:
          type: integer
          example: 3
        total:
          type: integer
          example: 45
      required:
        - from
        - to
        - current_page
        - per_page
        - last_page
        - total
      description: The metadata such as pagination, current_page and more.
    email:
      type: string
      description: The email address
      format: email
      example: steven.jobs@apple.com
    registrations:
      type: array
      example:
        - ABC1234
        - ABC5678
      description: A list of vehicle registrations for which the alert must be set. If no registrations are provided, the alert will apply to all vehicles in the fleet.
    ignition-trigger-id:
      type: integer
      example: 2
      description: "The trigger is currently limited to ids 1, 2 and 3. <br>\r\n                    <ul>\r\n                    <li>1 represents Ignition ON</li>\r\n                    <li>2 represents Ignition OFF</li>\r\n                    <li>3 for both Ignition ON and OFF</li>\r\n                    </ul>"
      enum:
        - 1
        - 2
        - 3
    geofence-id:
      type: string
      format: uuid
      description: Geofence identification number
      example: 123e4567-e89b-12d3-a456-426614174000
    priority-id:
      type: integer
      example: 1
      description: "The priority_id is the type of alert you want to prioritize over other alerts.<br>\r\n                            <ul><li>1 represents High</li>\r\n                            <li>2 represents Medium</li>\r\n                            <li>3 represents Low</li></ul>"
      enum:
        - 1
        - 2
        - 3
    registration:
      type: string
      description: The registration number of the vehicle.
      example: ABX123
      maxLength: 100
    vehicle-id:
      type: integer
      description: Vehicle identification number
      example: 654321
    carwatch-status:
      title: carwatch object
      type: object
      properties:
        vehicle_id:
          type: integer
          description: The id of the vehicle
          example: 123456
        registration:
          type: string
          description: The registration of the vehicle
          example: 12ABC1234X345
        is_active:
          type: boolean
          description: The current status
          example: true
    customer-id:
      type: string
      description: Unique identifier (UUID) of the customer
      format: uuid
      example: f3a42187-0c6e-11ec-aa41-a4bf016cd6b2
    country-id:
      type: integer
      description: Country ID for filtering customers
      example: 193
    customer-name:
      type: string
      description: The customer's name
      example: Mark
    customer-base:
      title: Delivery Customer Base Schema
      type: object
      properties:
        customer_id:
          allOf:
            - $ref: '#/components/schemas/customer-id'
            - readOnly: true
        customer_name:
          $ref: '#/components/schemas/customer-name'
        email:
          $ref: '#/components/schemas/email'
          description: The customer's email
        contact_code:
          type:
            - string
            - 'null'
          example: '63'
          description: The contact country code
        contact_number:
          type:
            - string
            - 'null'
          example: '92729821'
          description: The mobile device number
        address_line_1:
          type:
            - string
            - 'null'
          example: Mcnair Road
          description: The address line 1
        address_line_2:
          type:
            - string
            - 'null'
          example: Boonkeng Road
          description: The address line 2
        postal_code:
          type:
            - string
            - 'null'
          example: '320119'
          description: The postal code
        country_id:
          $ref: '#/components/schemas/country-id'
          description: The country ID
        latitude:
          type:
            - number
            - 'null'
          example: 1.31972
          description: The latitude
        longitude:
          type:
            - number
            - 'null'
          example: 103.85687
          description: The longitude
        subuser_id:
          allOf:
            - $ref: '#/components/schemas/customer-id'
              description: The subuser_id
            - type: 'null'
            - readOnly: true
          description: The subuser_id
        client_reference:
          type:
            - string
            - 'null'
          description: The client reference.
          minLength: 1
          maxLength: 255
          example: '#AB123456'
        create_ts:
          allOf:
            - readOnly: true
            - $ref: '#/components/schemas/date'
          description: The creation timestamp
        update_ts:
          allOf:
            - readOnly: true
            - $ref: '#/components/schemas/date'
            - type: 'null'
          description: The last update timestamp
    delivery-driver-id:
      type: string
      description: Unique UUID of the delivery driver
      format: uuid
      example: f3a42187-0c6e-11ec-aa41-a4bf016cd6b2
    driver-status-id:
      type: integer
      description: 1 = Online, 2 = On Route, 3 = Not Active, 4 = Offline, 5 = On Break
      example: 4
      enum:
        - 1
        - 2
        - 3
        - 4
        - 5
      x-enum-descriptions:
        - 1 = Online
        - 2 = On Route
        - 3 = Not Active
        - 4 = Offline
        - 5 = On Break
    phone-code:
      type: string
      description: Phone country code
      example: '65'
    phone-number:
      type: string
      description: Phone number
      example: '94281277'
    login-username:
      type: string
      description: Login username for driver authentication
      example: steven.jobs
    hour-with-timezone:
      type: string
      description: Timestamp with timezone offset
      example: 12:00:00+08:00
    delivery-driver:
      type: object
      properties:
        delivery_driver_id:
          $ref: '#/components/schemas/delivery-driver-id'
        create_ts:
          $ref: '#/components/schemas/date'
        update_ts:
          allOf:
            - $ref: '#/components/schemas/date'
            - type: 'null'
        first_name:
          type: string
          example: Mark Steven
          description: Driver first name
        last_name:
          type:
            - string
            - 'null'
          example: Jobs
          description: Driver last name
        phone_code:
          $ref: '#/components/schemas/phone-code'
        phone_number:
          $ref: '#/components/schemas/phone-number'
        email:
          allOf:
            - $ref: '#/components/schemas/email'
            - type: 'null'
        registration:
          allOf:
            - $ref: '#/components/schemas/registration'
            - type: 'null'
        login_username:
          $ref: '#/components/schemas/login-username'
        driver_status_id:
          $ref: '#/components/schemas/driver-status-id'
        user_id:
          $ref: '#/components/schemas/id'
        last_login_ts:
          allOf:
            - $ref: '#/components/schemas/date'
            - type: 'null'
        is_active:
          type: boolean
          example: true
          description: Flag to determine if the account is active
        latitude:
          type:
            - number
            - 'null'
          example: 1.3201800174182
          description: Driver latitude position
        longitude:
          type:
            - number
            - 'null'
          example: 103.88890856757
          description: Driver longitude position
        subuser_id:
          allOf:
            - $ref: '#/components/schemas/uuid'
            - type: 'null'
          description: Subuser ID
        login_type:
          type: integer
          example: 1
          description: Login type identifier
          x-nullable: true
        remember_token:
          type: string
          description: Remember token hash value
          x-nullable: true
        shift_time_start:
          allOf:
            - $ref: '#/components/schemas/hour-with-timezone'
          description: Start time of driver's shift in HH:MM:SS+TZ format
        shift_time_end:
          allOf:
            - $ref: '#/components/schemas/hour-with-timezone'
            - type: 'null'
          description: End time of driver's shift in HH:MM:SS+TZ format
        start_location_customer_id:
          allOf:
            - $ref: '#/components/schemas/customer-id'
            - type: 'null'
          description: Start location customer ID
        end_location_customer_id:
          allOf:
            - $ref: '#/components/schemas/customer-id'
            - type: 'null'
          description: End location customer ID
        is_planning:
          type: boolean
          example: true
          description: Flag to determine if planning
        fleet_driver_id:
          allOf:
            - $ref: '#/components/schemas/uuid'
            - type: 'null'
          description: Must be driver id. Format in uuid
    password:
      type: string
      description: Password for authentication
      example: password123
      format: password
    job-id:
      type: number
      description: Job identifier
      example: 12345678
    order-id:
      type: string
      description: A system generated order no.
      example: '20210908000021'
    timestamp:
      type: string
      description: Timestamp
      example: '2023-01-01 12:00:00+00'
    schedule-type-id:
      type: integer
      example: 1
      enum:
        - 1
        - 2
        - 3
      x-enum-descriptions:
        - 1 = ASAP
        - 2 = Scheduled
        - 3 = Unscheduled
      description: <br/>Schedule type identifier<br/> <table> <thead> <tr><th>schedule_type_id</th><th>Description</th></tr> </thead> <tbody> <tr> <td>1</td> <td>As Soon As Possible</td> </tr> <tr> <td>2</td> <td>Scheduled</td> </tr> <tr> <td>3</td> <td>Unscheduled</td> </tr> </tbody> </table>
    job-status-id:
      type: integer
      example: 2
      enum:
        - 2
        - 3
        - 4
        - 5
      x-enum-descriptions:
        - 2 = Assign Later
        - 3 = Rejected/Failed
        - 4 = Assigned
        - 5 = Completed
      description: <br/>Job status identifier<br/> <table> <thead> <tr><th>job_status_id</th><th>Description</th></tr> </thead> <tbody> <tr><td>2</td><td>Assign Later</td></tr> <tr><td>3</td><td>Rejected/Failed</td></tr> <tr><td>4</td><td>Assigned</td></tr> <tr><td>5</td><td>Completed</td></tr> </tbody> </table>
    item-tracking-number:
      type: string
      description: Item tracking number
      example: TRACK-123456-SIN2
    reference-number:
      type: string
      description: Reference number
      example: ABC123
    job-type-id:
      type: integer
      example: 1
      enum:
        - 1
        - 3
      description: <br/>Job types<br/> <table> <thead> <tr><th>job_type_id</th><th>Description</th></tr> </thead> <tbody> <tr><td>1</td><td>Pickup+Dropoff job</td></tr> <tr><td>3</td><td>Single stop job</td></tr> </tbody> </table>
    delivery-job-base:
      title: Job Object
      type: object
      properties:
        job_id:
          allOf:
            - $ref: '#/components/schemas/id'
            - example: 12
          description: Unique identifier of the delivery job
        create_ts:
          $ref: '#/components/schemas/timestamp'
        update_ts:
          allOf:
            - $ref: '#/components/schemas/timestamp'
            - description: Update timestamp
        order_id:
          anyOf:
            - $ref: '#/components/schemas/order-id'
            - type: 'null'
        reference_number:
          anyOf:
            - $ref: '#/components/schemas/reference-number'
            - type: 'null'
        scheduled_delivery_ts:
          anyOf:
            - $ref: '#/components/schemas/date'
            - type: 'null'
          description: Delivery scheduled timestamp
        delivery_driver_id:
          anyOf:
            - $ref: '#/components/schemas/delivery-driver-id'
            - type: 'null'
        assigned_ts:
          anyOf:
            - $ref: '#/components/schemas/timestamp'
            - type: 'null'
          description: Assigned timestamp
        schedule_type_id:
          $ref: '#/components/schemas/schedule-type-id'
        job_status_id:
          $ref: '#/components/schemas/job-status-id'
        user_id:
          $ref: '#/components/schemas/id'
        is_visible:
          type: boolean
          example: true
          description: Flag to determine if job is visible in mobile
          deprecated: true
        is_deleted:
          type: boolean
          example: true
          description: Flag to determine if job deleted
        job_type_id:
          $ref: '#/components/schemas/job-type-id'
        is_planning:
          type: boolean
          example: false
          description: Flag to determine if the job is plan
        allow_add_item:
          type: boolean
          example: true
          description: Allow user item
        notes:
          anyOf:
            - type: string
            - type: 'null'
          description: Notes
        subuser_id:
          anyOf:
            - $ref: '#/components/schemas/uuid'
            - type: 'null'
          description: Subuser ID
          example: 72856440-1047-11ec-a6d3-a4bf016cd6b2
        allowed_to_start_at:
          anyOf:
            - $ref: '#/components/schemas/date'
            - type: 'null'
          example: '2021-09-18 12:30:00'
          description: Allowed to start timestamp
        send_to_driver_at:
          anyOf:
            - $ref: '#/components/schemas/date'
            - type: 'null'
          example: '2021-09-18 12:30:00'
          description: Send to driver timestamp
    stop-type-id:
      enum:
        - 1
        - 2
        - 3
      type: integer
      description: Delivery stop type ID<br/> <table> <thead> <tr><th>stop_type_id</th><th>Description</th></tr> </thead> <tbody> <tr> <td>1</td> <td>Pickup</td> </tr> <tr> <td>2</td> <td>Delivery</td> </tr> <tr> <td>3</td> <td>Dropoff</td> </tr> </tbody> </table>
    stop-status-id:
      enum:
        - 1
        - 2
        - 3
        - 4
        - 5
      type: integer
      description: Delivery stop status ID<br/> <table> <thead> <tr><th>stop_status_id</th><th>Description</th></tr> </thead> <tbody> <tr> <td>1</td> <td>Created</td> </tr> <tr> <td>2</td> <td>Started</td> </tr> <tr> <td>3</td> <td>Arrived</td> </tr> <tr> <td>4</td> <td>Completed</td> </tr> <tr> <td>5</td> <td>Rejected</td> </tr> </tbody> </table>
    stop-todo-type-id:
      enum:
        - 1
        - 2
        - 3
        - 5
      type: integer
      description: Todo type ID<br/> <table> <thead> <tr><th>todo_type_id</th><th>Description</th></tr> </thead> <tbody> <tr> <td>1</td> <td>Get Signature</td> </tr> <tr> <td>2</td> <td>Take Photo (POD)</td> </tr> <tr> <td>3</td> <td>Scan to Attach</td> </tr> <tr> <td>5</td> <td>Note</td> </tr> </tbody> </table>
    stop-todo-status-id:
      enum:
        - 1
        - 2
        - 3
        - 4
        - 5
        - 6
        - 7
        - 8
        - 9
      type: integer
      description: Todo status ID<br/> <table> <thead> <tr><th>todo_status_id</th><th>Description</th><th>Valid for todo_type_id</th></tr> </thead> <tbody> <tr> <td>1</td> <td>Customer Not Show</td> <td>1</td> </tr> <tr> <td>2</td> <td>Refuse to Sign</td> <td>1</td> </tr> <tr> <td>3</td> <td>Others</td> <td>1</td> </tr> <tr> <td>4</td> <td>No Response</td> <td>2</td> </tr> <tr> <td>5</td> <td>No Person at Home</td> <td>2</td> </tr> <tr> <td>6</td> <td>Others</td> <td>2</td> </tr> <tr> <td>7</td> <td>Technical Issue</td> <td>3</td> </tr> <tr> <td>8</td> <td>Others</td> <td>3</td> </tr> <tr> <td>9</td> <td>Completed OK</td> <td>1, 2, 3</td> </tr> </tbody> </table>
    image:
      type: object
      properties:
        image_id:
          type: integer
          description: The image id number
        create_ts:
          $ref: '#/components/schemas/date'
          description: Created timestamp
        image_filename:
          type: string
          description: Image filename
        image_path:
          type: string
          description: Image path URL
        customer_name:
          type: string
          description: Customer name
        image_url:
          type: string
          description: The full path of the image url
    delivery-stop-todo:
      type: object
      properties:
        stop_todo_id:
          type: integer
          description: Unique identifier of the stop todo
        create_ts:
          $ref: '#/components/schemas/date'
          description: Created timestamp
        update_ts:
          allOf:
            - $ref: '#/components/schemas/date'
            - type: 'null'
          description: Updated timestamp
        stop_id:
          type: integer
          description: Delivery stop ID
        todo_type_id:
          $ref: '#/components/schemas/stop-todo-type-id'
        todo_status_id:
          $ref: '#/components/schemas/stop-todo-status-id'
        status_remarks:
          type:
            - string
            - 'null'
          description: Status information
        complete_ts:
          allOf:
            - $ref: '#/components/schemas/date'
            - type: 'null'
          description: Completed timestamp
        is_required:
          type: boolean
          description: The required flag
        description:
          type:
            - string
            - 'null'
          description: Client description
        note:
          type:
            - string
            - 'null'
          description: Client note
        images:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/image'
              - type: object
                properties:
                  stop_todo_id:
                    type: integer
                    description: The parent id
    delivery-stops-customer:
      title: Delivery Customer Base Schema
      type: object
      properties:
        customer_id:
          allOf:
            - $ref: '#/components/schemas/customer-id'
            - readOnly: true
        customer_name:
          $ref: '#/components/schemas/customer-name'
        email:
          $ref: '#/components/schemas/email'
          description: The customer's email
        contact_code:
          type:
            - string
            - 'null'
          example: '63'
          description: The contact country code
        contact_number:
          type:
            - string
            - 'null'
          example: '92729821'
          description: The mobile device number
        address_line_1:
          type:
            - string
            - 'null'
          example: Mcnair Road
          description: The address line 1
        address_line_2:
          type:
            - string
            - 'null'
          example: Boonkeng Road
          description: The address line 2
        postal_code:
          type:
            - string
            - 'null'
          example: '320119'
          description: The postal code
        country_id:
          $ref: '#/components/schemas/country-id'
          description: The country ID
        latitude:
          type:
            - number
            - 'null'
          example: 1.31972
          description: The latitude
        longitude:
          type:
            - number
            - 'null'
          example: 103.85687
          description: The longitude
        subuser_id:
          allOf:
            - $ref: '#/components/schemas/customer-id'
              description: The subuser_id
            - type: 'null'
          description: The subuser_id
          readOnly: true
        create_ts:
          $ref: '#/components/schemas/date'
          description: The creation timestamp
          readOnly: true
        update_ts:
          allOf:
            - $ref: '#/components/schemas/date'
            - type: 'null'
          description: The last update timestamp
          readOnly: true
    timestamp-with-offset:
      type: string
      description: Timestamp with timezone offset
      example: '2023-01-01 12:00:00+08:00'
    delivery-stops:
      type: object
      properties:
        stop_id:
          type: integer
          description: Delivery stop ID
        create_ts:
          $ref: '#/components/schemas/date'
          description: Created timestamp
        update_ts:
          allOf:
            - $ref: '#/components/schemas/date'
            - type: 'null'
          description: Updated timestamp
        job_id:
          $ref: '#/components/schemas/job-id'
        stop_type_id:
          $ref: '#/components/schemas/stop-type-id'
        stop_status_id:
          $ref: '#/components/schemas/stop-status-id'
        country_id:
          type: integer
          description: Country ID
        customer_id:
          $ref: '#/components/schemas/customer-id'
        user_id:
          $ref: '#/components/schemas/id'
          description: The currently logged in user.
        ordering:
          type: integer
          description: Ordering of stops
        scheduled_delivery_ts:
          $ref: '#/components/schemas/date'
          description: Scheduled delivery timestamp
        contact_number:
          type:
            - string
            - 'null'
          description: The contact country code
        contact_code:
          type:
            - string
            - 'null'
          description: The mobile device number
        email:
          type:
            - string
            - 'null'
          format: email
          description: The contact email address
        address_line_1:
          type:
            - string
            - 'null'
          description: Address line 1
        address_line_2:
          type:
            - string
            - 'null'
          description: Address line 2
        postal_code:
          type:
            - string
            - 'null'
          description: The address postal code
        latitude:
          type:
            - number
            - 'null'
          format: float
          description: The latitude of the delivery stop
        longitude:
          type:
            - number
            - 'null'
          format: float
          description: The longitude of the delivery stop
        note:
          type:
            - string
            - 'null'
          description: Additional notes for the delivery stop
        status_remarks:
          type:
            - string
            - 'null'
          description: Status information
        todo_complete_ts:
          allOf:
            - $ref: '#/components/schemas/date'
            - type: 'null'
          description: Todo Complete timestamp
        activity_started_ts:
          allOf:
            - $ref: '#/components/schemas/date'
            - type: 'null'
          description: Activity started timestamp
        activity_arrived_ts:
          allOf:
            - $ref: '#/components/schemas/date'
            - type: 'null'
          description: Activity arrived timestamp
        activity_completed_ts:
          allOf:
            - $ref: '#/components/schemas/date'
            - type: 'null'
          description: Activity completed timestamp
        activity_rejected_ts:
          allOf:
            - $ref: '#/components/schemas/date'
            - type: 'null'
          description: Activity rejected timestamp
        customer_name:
          type: string
          description: Customer name
        priority:
          type:
            - integer
            - 'null'
          description: Priority value
        duration:
          type:
            - integer
            - 'null'
          description: Duration
        todos:
          type: array
          items:
            $ref: '#/components/schemas/delivery-stop-todo'
        customer:
          $ref: '#/components/schemas/delivery-stops-customer'
        delivery_window:
          type: array
          items:
            type: object
            properties:
              stop_id:
                type:
                  - integer
                  - 'null'
                description: Stop ID
              time_from:
                $ref: '#/components/schemas/timestamp-with-offset'
                description: Delivery window start time with timezone offset
              time_to:
                $ref: '#/components/schemas/timestamp-with-offset'
                description: Delivery window end time with timezone offset
    job-item-type-id:
      enum:
        - 1
        - 2
        - 3
      type: integer
      description: Item type ID<br/> <table> <thead> <tr><th>item_type_id</th><th>Description</th></tr> </thead> <tbody> <tr> <td>1</td> <td>Package</td> </tr> <tr> <td>2</td> <td>Service</td> </tr> <tr> <td>3</td> <td>Person</td> </tr> </tbody> </table>
    delivery-job-todo:
      type: object
      properties:
        job_item_todo_id:
          type: integer
        create_ts:
          $ref: '#/components/schemas/date'
          description: Created timestamp
        update_ts:
          $ref: '#/components/schemas/date'
          description: Updated timestamp
        job_item_id:
          type: integer
        todo_type_id:
          enum:
            - 1
            - 2
            - 3
            - 5
          type: integer
          description: Todo type ID<br/> <table> <thead> <tr><th>todo_type_id</th><th>Description</th><th>Valid For item_type_id</th></tr> </thead> <tbody> <tr> <td>1</td> <td>Get Signature</td> <td>1, 2, 3</td> </tr> <tr> <td>2</td> <td>Take Photo (POD)</td> <td>1, 2, 3</td> </tr> <tr> <td>3</td> <td>Scan to Attach</td> <td>1, 3</td> </tr> <tr> <td>5</td> <td>Note</td> <td>1, 2, 3</td> </tr> </tbody> </table>
        todo_status_id:
          enum:
            - 1
            - 2
            - 3
            - 4
            - 5
            - 6
            - 7
            - 8
            - 9
          type: integer
          description: Todo status ID<br/> <table> <thead> <tr><th>todo_status_id</th><th>Description</th><th>Valid for todo_type_id</th></tr> </thead> <tbody> <tr> <td>1</td> <td>Customer Not Show</td> <td>1</td> </tr> <tr> <td>2</td> <td>Refuse to Sign</td> <td>1</td> </tr> <tr> <td>3</td> <td>Others</td> <td>1</td> </tr> <tr> <td>4</td> <td>No Response</td> <td>2</td> </tr> <tr> <td>5</td> <td>No Person at Home</td> <td>2</td> </tr> <tr> <td>6</td> <td>Others</td> <td>2</td> </tr> <tr> <td>7</td> <td>Technical Issue</td> <td>3</td> </tr> <tr> <td>8</td> <td>Others</td> <td>3</td> </tr> <tr> <td>9</td> <td>Completed OK</td> <td>1, 2, 3</td> </tr> </tbody> </table>
        status_remarks:
          type:
            - string
            - 'null'
          description: Status information
        complete_ts:
          allOf:
            - $ref: '#/components/schemas/date'
            - type: 'null'
          description: Completed timestamp
        is_required:
          type: boolean
          description: The flag for required
        stop_type_id:
          enum:
            - 1
            - 2
            - 3
          type: integer
          description: Stop type ID<br/> <table> <thead> <tr><th>stop_type_id</th><th>Description</th></tr> </thead> <tbody> <tr> <td>1</td> <td>Pickup</td> </tr> <tr> <td>2</td> <td>Dropoff</td> </tr> <tr> <td>3</td> <td>Single</td> </tr> </tbody> </table>
        tag:
          type:
            - string
            - 'null'
          description: The tag for the todo
        ordering:
          type:
            - integer
            - 'null'
          description: Ordering of item
        description:
          type:
            - string
            - 'null'
          description: The todo description
        note:
          type:
            - string
            - 'null'
          description: Additional notes for the todo
        latitude:
          type:
            - number
            - 'null'
          format: float
          description: The latitude of the todo location
          example: 1.3521
        longitude:
          type:
            - number
            - 'null'
          format: float
          description: The longitude of the todo location
          example: 103.8198
        images:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/image'
              - type: object
                properties:
                  job_item_todo_id:
                    type: integer
                    description: The parent id
    delivery-job-item:
      type: object
      properties:
        job_item_todo_id:
          type: integer
        job_item_id:
          type: integer
          description: Job item ID
        create_ts:
          $ref: '#/components/schemas/date'
          description: Created timestamp
        update_ts:
          $ref: '#/components/schemas/date'
          description: Updated timestamp
        job_id:
          type: integer
          description: Unique identifier of the delivery job to be completed
        item_type_id:
          $ref: '#/components/schemas/job-item-type-id'
        weight_measure_id:
          type: integer
          description: 1 = KG
        description:
          type: string
          description: The item description
        weight:
          type: number
          format: float
          description: The item weight
        job_item_status_id_pickup:
          enum:
            - 1
            - 2
            - 3
            - 4
            - 5
          type: integer
          description: Job item status ID for pickup<br/> 1 = Uncompleted, 2 = Completed OK, 3 = Rejected, 4 = Partial Rejected, 5 = Damage Return
        job_item_status_id_dropoff:
          enum:
            - 1
            - 2
            - 3
            - 4
            - 5
          type: integer
          description: Job item status ID for dropoff<br/> 1 = Uncompleted, 2 = Completed OK, 3 = Rejected, 4 = Partial Rejected, 5 = Damage Return
        quantity:
          type: integer
          description: number of items
        length:
          type:
            - string
            - 'null'
          description: Length of item
        width:
          type:
            - string
            - 'null'
          description: Width of item
        height:
          type:
            - string
            - 'null'
          description: Height of item
        tracking_number:
          type:
            - string
            - 'null'
          description: A unique ID or number assigned to a package/parcel
        job_item_status_id_single:
          type: integer
          description: Job item status
        sku:
          type:
            - string
            - 'null'
          description: Stock Keeping Unit
        upc:
          type:
            - string
            - 'null'
          description: Universal Product Code
        todos:
          type: array
          items:
            $ref: '#/components/schemas/delivery-job-todo'
    special-equipment:
      type: object
      properties:
        equipment_id:
          type: integer
          description: The equipment ID
        equipment_name:
          type: string
          description: The equipment name
    item-todo-type-id:
      enum:
        - 1
        - 2
        - 3
        - 5
      type: integer
      description: Description of the todo <table> <thead> <tr><th>todo_type_id</th><th>Description</th><th>Valid For item_type_id</th></tr> </thead> <tbody> <tr><td>1</td><td>Get Signature</td><td>1, 2, 3</td></tr> <tr><td>2</td><td>Take Photo (POD)</td><td>1, 2, 3</td></tr> <tr><td>3</td><td>Scan to Attach</td><td>1, 3</td></tr> <tr><td>5</td><td>Note</td><td>1, 2, 3</td></tr> </tbody> </table>
    plan-id:
      type: integer
      description: The ID of the delivery plan
      example: 12345
    equipment-id:
      type: number
      description: The unique identifier of the special equipment capability
      example: 10
    equipment-name:
      type: string
      description: The name/description of the special equipment capability
      example: Refrigerated Transport
    driver-base:
      title: Driver Base Schema
      type: object
      properties:
        first_name:
          type: string
          example: Mark
          description: The driver's first name
          minLength: 2
          maxLength: 50
        last_name:
          oneOf:
            - type: string
              maxLength: 100
              minLength: 2
            - type: 'null'
          example: Steven
          description: The driver's last name
        email:
          oneOf:
            - $ref: '#/components/schemas/email'
            - type: 'null'
          example: mark.steven@hotmail.com
          description: The driver's email address
        id_number:
          oneOf:
            - type: string
              maxLength: 50
            - type: 'null'
          example: '931919191'
          description: The driver's id number
        phone_number:
          oneOf:
            - type: string
              maxLength: 20
            - type: 'null'
          example: '659449912'
          description: The driver's contact number
        gender:
          oneOf:
            - type: string
              enum:
                - male
                - female
            - type: 'null'
          example: female
          description: The driver's gender
        license_number:
          oneOf:
            - type: string
              maxLength: 50
            - type: 'null'
          example: ABC1234X
          description: The driver's license number
        license_issued_country:
          oneOf:
            - type: string
              minLength: 2
              maxLength: 2
              pattern: ^[A-Z]{2}$
            - type: 'null'
          example: SG
          description: The driver's issued license country code
        license_driver_restrictions:
          oneOf:
            - type: string
              maxLength: 20
            - type: 'null'
          example: Weekdays only
          description: The driver's restrictions
        license_points:
          oneOf:
            - type: integer
            - type: 'null'
          example: 10
          description: The driver's license points
        license_first_issue_date:
          oneOf:
            - type: string
              format: date
            - type: 'null'
          example: '2000-01-25'
          description: The first issued date of the license
        license_valid_start:
          oneOf:
            - type: string
              format: date
            - type: 'null'
          example: '2000-02-01'
          description: The start date of the license
        license_valid_end:
          oneOf:
            - type: string
              format: date
            - type: 'null'
          example: '2000-12-30'
          description: The end date fo the license
        employee_number:
          oneOf:
            - type: string
            - type: 'null'
          example: '123456'
          description: The employee number of the driver
        custom_fields:
          oneOf:
            - type: object
              properties:
                custom_1:
                  oneOf:
                    - type: string
                    - type: 'null'
                  example: Use this field to specify a shipment id?
                  description: The custom fields 1 to 7 can be used for your operations. You can label the custom fields in your fleet web account. They are displayed on the driver detail page.
                custom_2:
                  oneOf:
                    - type: string
                    - type: 'null'
                  example: Use this field to specify a delivery address?
                custom_3:
                  oneOf:
                    - type: string
                    - type: 'null'
                  example: Use this field to specify a different id?
                custom_4:
                  oneOf:
                    - type: string
                    - type: 'null'
                  example: Use this field to map your own statuses?
                custom_5:
                  oneOf:
                    - type: string
                    - type: 'null'
                  example: You can use this field for your own use cases
                custom_6:
                  oneOf:
                    - type: string
                    - type: 'null'
                  example: You can use this field for your own use cases
                custom_7:
                  oneOf:
                    - type: string
                    - type: 'null'
                  example: You can use this field for your own use cases
                custom_8:
                  oneOf:
                    - type: string
                    - type: 'null'
                  example: You can use this field for your own use cases
            - type: 'null'
          description: The custom fields for the driver (up to a max of 7).
    driver:
      title: Driver Object
      allOf:
        - $ref: '#/components/schemas/driver-base'
          required:
            - first_name
            - last_name
            - gender
            - status
        - type: object
          required:
            - driver_id
          properties:
            driver_id:
              $ref: '#/components/schemas/uuid'
              description: The driver's unique identifier
            logo_image_base64:
              type:
                - string
                - 'null'
              description: Base64 encoded image string for the driver's logo or profile picture
              example: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+ip1sAAAAASUVORK5CYII=
            status:
              type: string
              example: Active
              default: Active
              enum:
                - Active
                - Inactive
              description: The status of the driver
    driver-create-request:
      title: Driver Creation Request
      allOf:
        - $ref: '#/components/schemas/driver-base'
          required:
            - first_name
            - last_name
            - email
            - gender
          properties:
            id_number:
              type: string
            email:
              type: string
            last_name:
              type: string
              maxLength: 100
              minLength: 2
            gender:
              type: string
            phone_number:
              type: string
            phone_code:
              type: string
              example: '65'
              description: The country contact code without the phone code
              minLength: 1
              maxLength: 4
              pattern: ^[0-9]{1,4}$
            license_number:
              type: string
            license_issued_country:
              type: string
            license_driver_restrictions:
              type: string
            license_points:
              type: integer
            employee_number:
              type: string
    driver-update-request:
      title: Driver Update Request
      allOf:
        - $ref: '#/components/schemas/driver-base'
        - type: object
          properties:
            id_number:
              type: string
            email:
              type: string
            last_name:
              type: string
              maxLength: 100
              minLength: 2
            gender:
              type: string
            phone_number:
              type: string
            phone_code:
              type: string
              example: '65'
              description: The country contact code without the phone code
              minLength: 1
              maxLength: 4
              pattern: ^[0-9]{1,4}$
            license_number:
              type: string
            license_issued_country:
              type: string
            license_driver_restrictions:
              type: string
            license_points:
              type: integer
            employee_number:
              type: string
            status:
              type: string
              example: Active
              enum:
                - Active
                - Inactive
              description: The status of the driver
    terminal-id:
      type: integer
      description: The id of the terminal installed in the vehicle.
      example: 123456789
    terminal-serial:
      type: string
      description: The serial of the Cartrack terminal.
      example: TS123456789
    group-id:
      type: integer
      description: Unique identifier for a geofence group
      example: 12345
    group-name:
      type:
        - string
        - 'null'
      description: Name of the geofence group
      example: Main Warehouse Group
    group-description:
      type:
        - string
        - 'null'
      description: Description of the geofence group
      example: Group containing all warehouse geofences
    mifleet-fuel-response:
      type: object
      properties:
        id:
          type: integer
          example: 12345
          description: Unique identifier for the fuel entry.
        document_number:
          type: string
          default: CONCEPT-XXXXXX
          description: Unique reference number for the transaction document.
          example: ACCIDENT-123456
        document_type:
          type: string
          default: DOCUMENT_TYPE_INVOICE
          description: The document type. Valid values are "DOCUMENT_TYPE_INVOICE", "DOCUMENT_TYPE_CREDIT_NOTE", "DOCUMENT_TYPE_DEBIT_NOTE", or "DOCUMENT_TYPE_RECEIPT".
          example: DOCUMENT_TYPE_INVOICE
        document_status:
          type: string
          default: DOCUMENT_STATUS_PAID
          description: The document status. Valid values are "DOCUMENT_STATUS_PENDING", "DOCUMENT_STATUS_VALIDATED", "DOCUMENT_STATUS_OVERDUE_PAYMENT", "DOCUMENT_STATUS_PAID", or "DOCUMENT_STATUS_CANCELLED".
          example: DOCUMENT_STATUS_PAID
        supplier:
          type: string
          description: Supplier or service provider for the entry.
          maxLength: 50
          example: ABC Towing
        description:
          type: string
          description: Brief summary or description of the transaction.
          example: Service description
        quantity:
          type: number
          description: Quantity of items or services.
          example: 1
        price:
          type: number
          description: Unit price of the item or service.
          example: 100
        net_value:
          type: number
          description: Net value before tax.
          example: 100
        tax_rate:
          type: number
          minimum: 0
          maximum: 1
          description: Tax rate for the transaction (e.g., 0.2 for 20%).
          example: 0.15
        total_value:
          type: number
          description: Total value including tax.
          example: 115
        driver:
          type: string
          description: Driver associated with the entry.
          example: John Doe
        general_ledger_code:
          type:
            - number
            - 'null'
          example: 100101
          description: The general ledger number for the transaction.
        discount:
          type:
            - number
            - 'null'
          example: 1.25
          description: The discount value that applies.
        registration:
          $ref: '#/components/schemas/registration'
        vehicle_deleted:
          type: boolean
          example: false
          description: Indicates if the vehicle associated with the fuel entry has been deleted.
        fuel_transaction_type:
          type: string
          example: FUEL_TRANSACTION_TYPE_PRIVATE
          description: The fuel transaction type. Valid values are "FUEL_TRANSACTION_TYPE_PRIVATE" or "FUEL_TRANSACTION_TYPE_BUSINESS". Defaults to "FUEL_TRANSACTION_TYPE_BUSINESS" if not provided.
          default: FUEL_TRANSACTION_TYPE_BUSINESS
        fuelling_date:
          $ref: '#/components/schemas/date'
          description: The timestamp of the fuel transaction.
        fuelling_station:
          type:
            - string
            - 'null'
          example: Park Service Station
          description: The input name of the specific fuel station where the event took place.
        ct_fuel_station:
          type:
            - string
            - 'null'
          example: Park Service Station
          description: Fuel station system found closest to the transaction time
        ct_fuel_station_latitude:
          type:
            - number
            - 'null'
          example: 40.712776
          description: Latitude of the fuel station closest to the transaction time
        ct_fuel_station_longitude:
          type:
            - number
            - 'null'
          example: -74.005974
          description: Longitude of the fuel station closest to the transaction time
        ct_latitude:
          type:
            - number
            - 'null'
          example: 40.713776
          description: Latitude of the vehicle closest to the transaction time (system found)
        ct_longitude:
          type:
            - number
            - 'null'
          example: -74.004974
          description: Longitude of the vehicle closest to the transaction time (system found)
        consumption:
          type:
            - number
            - 'null'
          example: 8.5
          description: Calculated consumption in L/100km since the last fuel event.
        fuel_validation_status:
          type:
            - string
            - 'null'
          example: FUEL_VALIDATION_MANAGER_APPROVED
          description: Result status of the fuel validation process
        ct_odometer:
          type:
            - number
            - 'null'
          example: 100101
          description: Odometer value for the vehicle closest to the transaction time (system found)
        ct_quantity:
          type:
            - number
            - 'null'
          example: 50
          description: Amount of litres at the transaction time (system sensor found)
        is_tank_full:
          type:
            - boolean
            - 'null'
          example: true
          default: true
          description: Indicates if the vehicle's fuel tank is full.
        fuel_card:
          type:
            - string
            - 'null'
          example: '1234567890'
          description: The card number used in the transaction. Registration is required with this field. Card number must be registered in Contract Storage -> Fuel Cards.
        odometer:
          type:
            - integer
            - 'null'
          example: 100101
          description: The input odometer value for the vehicle at the transaction time.
    mifleet-common-without-driver:
      type: object
      properties:
        document_number:
          type: string
          default: CONCEPT-XXXXXX
          description: Unique reference number for the transaction document.
          example: ACCIDENT-123456
        document_type:
          type: string
          default: DOCUMENT_TYPE_INVOICE
          description: The document type. Valid values are "DOCUMENT_TYPE_INVOICE", "DOCUMENT_TYPE_CREDIT_NOTE", "DOCUMENT_TYPE_DEBIT_NOTE", or "DOCUMENT_TYPE_RECEIPT".
          example: DOCUMENT_TYPE_INVOICE
          enum:
            - DOCUMENT_TYPE_INVOICE
            - DOCUMENT_TYPE_CREDIT_NOTE
            - DOCUMENT_TYPE_DEBIT_NOTE
            - DOCUMENT_TYPE_RECEIPT
        document_status:
          type: string
          default: DOCUMENT_STATUS_PAID
          description: The document status. Valid values are "DOCUMENT_STATUS_PENDING", "DOCUMENT_STATUS_VALIDATED", "DOCUMENT_STATUS_OVERDUE_PAYMENT", "DOCUMENT_STATUS_PAID", or "DOCUMENT_STATUS_CANCELLED".
          example: DOCUMENT_STATUS_PAID
          enum:
            - DOCUMENT_STATUS_PENDING
            - DOCUMENT_STATUS_VALIDATED
            - DOCUMENT_STATUS_OVERDUE_PAYMENT
            - DOCUMENT_STATUS_PAID
            - DOCUMENT_STATUS_CANCELLED
        supplier:
          type: string
          description: Supplier or service provider for the entry.
          maxLength: 50
          example: ABC Towing
        description:
          type: string
          description: Brief summary or description of the transaction.
          example: Service description
        quantity:
          type: number
          description: Quantity of items or services.
          example: 1
        price:
          type: number
          description: Unit price of the item or service.
          example: 100
        net_value:
          type: number
          description: Net value before tax.
          example: 100
        tax_rate:
          type: number
          minimum: 0
          maximum: 1
          description: Tax rate for the transaction (e.g., 0.2 for 20%).
          example: 0.15
        total_value:
          type: number
          description: Total value including tax.
          example: 115
    mifleet-common:
      type: object
      allOf:
        - $ref: '#/components/schemas/mifleet-common-without-driver'
        - type: object
          properties:
            driver:
              type: string
              description: Driver associated with the entry.
              example: John Doe
    mifleet-fuel:
      type: object
      properties:
        fuel_transaction_type:
          type: string
          example: FUEL_TRANSACTION_TYPE_PRIVATE
          description: The fuel transaction type. Valid values are "FUEL_TRANSACTION_TYPE_PRIVATE" or "FUEL_TRANSACTION_TYPE_BUSINESS". Defaults to "FUEL_TRANSACTION_TYPE_BUSINESS" if not provided.
          default: FUEL_TRANSACTION_TYPE_BUSINESS
          enum:
            - FUEL_TRANSACTION_TYPE_PRIVATE
            - FUEL_TRANSACTION_TYPE_BUSINESS
        fuelling_date:
          $ref: '#/components/schemas/date'
          description: The timestamp of the fuel transaction.
        fuelling_station:
          type: string
          example: Park Service Station
          description: The input name of the specific fuel station where the event took place.
        is_tank_full:
          type:
            - boolean
            - 'null'
          example: true
          default: true
          description: Indicates if the vehicle's fuel tank is full.
        fuel_card:
          type:
            - string
            - 'null'
          example: '1234567890'
          description: The card number used in the transaction. Registration is required with this field. Card number must be registered in Contract Storage -> Fuel Cards.
        odometer:
          type:
            - integer
            - 'null'
          example: 100101
          description: The input odometer value for the vehicle at the transaction time.
    mifleet-maintenance-response:
      type: object
      properties:
        id:
          type: integer
          example: 12345
          description: Unique identifier for the maintenance entry.
        document_number:
          type: string
          default: CONCEPT-XXXXXX
          description: Unique reference number for the transaction document.
          example: ACCIDENT-123456
        document_type:
          type: string
          default: DOCUMENT_TYPE_INVOICE
          description: The document type. Valid values are "DOCUMENT_TYPE_INVOICE", "DOCUMENT_TYPE_CREDIT_NOTE", "DOCUMENT_TYPE_DEBIT_NOTE", or "DOCUMENT_TYPE_RECEIPT".
          example: DOCUMENT_TYPE_INVOICE
        document_status:
          type: string
          default: DOCUMENT_STATUS_PAID
          description: The document status. Valid values are "DOCUMENT_STATUS_PENDING", "DOCUMENT_STATUS_VALIDATED", "DOCUMENT_STATUS_OVERDUE_PAYMENT", "DOCUMENT_STATUS_PAID", or "DOCUMENT_STATUS_CANCELLED".
          example: DOCUMENT_STATUS_PAID
        supplier:
          type: string
          description: Supplier or service provider for the entry.
          maxLength: 50
          example: ABC Towing
        description:
          type: string
          description: Brief summary or description of the transaction.
          example: Service description
        quantity:
          type: number
          description: Quantity of items or services.
          example: 1
        price:
          type: number
          description: Unit price of the item or service.
          example: 100
        net_value:
          type: number
          description: Net value before tax.
          example: 100
        tax_rate:
          type: number
          minimum: 0
          maximum: 1
          description: Tax rate for the transaction (e.g., 0.2 for 20%).
          example: 0.15
        total_value:
          type: number
          description: Total value including tax.
          example: 115
        driver:
          type: string
          description: Driver associated with the entry.
          example: John Doe
        registration:
          $ref: '#/components/schemas/registration'
        vehicle_deleted:
          type: boolean
          example: false
          description: Indicates whether the vehicle associated with this transaction has been marked as deleted.
        general_ledger_code:
          type:
            - integer
            - 'null'
          example: 100101
          description: General ledger code assigned to the transaction for accounting purposes.
        discount:
          type:
            - number
            - 'null'
          example: 10
          description: Discount amount, if any, applied to the transaction. Can be null.
        odometer:
          type:
            - number
            - 'null'
          example: 120000
          description: Recorded odometer reading of the vehicle at the time of maintenance, can be null.
        maintenance_date:
          $ref: '#/components/schemas/date'
          description: The timestamp of the maintenance transaction.
        maintenance_type:
          type: string
          example: Cleaning
          description: The type of maintenance performed.
        budget:
          type: number
          example: 150
          description: The budget set for the maintenance operation.
        vehicle_mmv:
          type: string
          example: ISUZU NQR 500 AMT F/C C/C
          description: The make/model/variant of the vehicle.
        job_card_reference:
          type: string
          example: JOB1234
          description: The job card reference for the maintenance operation.
        fleet_controller:
          type: string
          example: John Doe
          description: The fleet controller responsible for the maintenance operation.
    mifleet-maintenance:
      type: object
      properties:
        maintenance_date:
          $ref: '#/components/schemas/date'
          description: The timestamp of the maintenance transaction.
        maintenance_type:
          type: string
          example: Cleaning
          description: The type of maintenance performed.
        budget:
          type: number
          example: 150
          description: The budget set for the maintenance operation.
        vehicle_mmv:
          type: string
          example: ISUZU NQR 500 AMT F/C C/C
          description: The make/model/variant of the vehicle.
        job_card_reference:
          type: string
          example: JOB1234
          description: The job card reference for the maintenance operation.
        fleet_controller:
          type: string
          example: John Doe
          description: The fleet controller responsible for the maintenance operation.
    mifleet-toll-response:
      type: object
      properties:
        id:
          type: integer
          example: 12345
          description: A unique identifier for each toll transaction, facilitating easy tracking and reference.
        document_number:
          type: string
          default: CONCEPT-XXXXXX
          description: Unique reference number for the transaction document.
          example: ACCIDENT-123456
        document_type:
          type: string
          default: DOCUMENT_TYPE_INVOICE
          description: The document type. Valid values are "DOCUMENT_TYPE_INVOICE", "DOCUMENT_TYPE_CREDIT_NOTE", "DOCUMENT_TYPE_DEBIT_NOTE", or "DOCUMENT_TYPE_RECEIPT".
          example: DOCUMENT_TYPE_INVOICE
        document_status:
          type: string
          default: DOCUMENT_STATUS_PAID
          description: The document status. Valid values are "DOCUMENT_STATUS_PENDING", "DOCUMENT_STATUS_VALIDATED", "DOCUMENT_STATUS_OVERDUE_PAYMENT", "DOCUMENT_STATUS_PAID", or "DOCUMENT_STATUS_CANCELLED".
          example: DOCUMENT_STATUS_PAID
        supplier:
          type: string
          description: Supplier or service provider for the entry.
          maxLength: 50
          example: ABC Towing
        description:
          type: string
          description: Brief summary or description of the transaction.
          example: Service description
        quantity:
          type: number
          description: Quantity of items or services.
          example: 1
        price:
          type: number
          description: Unit price of the item or service.
          example: 100
        net_value:
          type: number
          description: Net value before tax.
          example: 100
        tax_rate:
          type: number
          minimum: 0
          maximum: 1
          description: Tax rate for the transaction (e.g., 0.2 for 20%).
          example: 0.15
        total_value:
          type: number
          description: Total value including tax.
          example: 115
        driver:
          type: string
          description: Driver associated with the entry.
          example: John Doe
        registration:
          $ref: '#/components/schemas/registration'
        vehicle_deleted:
          type: boolean
          example: false
          description: If the vehicle is deleted or not.
        ct_toll_station:
          type:
            - string
            - 'null'
          example: Downtown Toll Plaza
          description: The toll station system found closest to the transaction time.
        ct_toll_station_latitude:
          type:
            - number
            - 'null'
          example: 40.7128
          description: The latitude coordinate of the toll station.
        ct_toll_station_longitude:
          type:
            - number
            - 'null'
          example: -74.006
          description: The longitude coordinate of the toll station.
        ct_latitude:
          type:
            - number
            - 'null'
          example: 40.713
          description: The system found latitude for the vehicle closest to the transaction time.
        ct_longitude:
          type:
            - number
            - 'null'
          example: -74.0059
          description: The system found longitude for the vehicle closest to the transaction time.
        ct_odometer:
          type:
            - number
            - 'null'
          example: 15000
          description: The odometer value system found closest to the transaction time.
        general_ledger_code:
          type:
            - integer
            - 'null'
          example: 54321
          description: The general ledger code.
        discount:
          type:
            - number
            - 'null'
          example: 0.35
          description: The discount amount, if any, applied to the transaction.
        toll_validation_status:
          type:
            - string
            - 'null'
          example: TOLL_VALIDATION_MANAGER_APPROVED
          description: The result status of the validation process.
        toll_date:
          $ref: '#/components/schemas/date'
          description: The exact date and time when the toll transaction occurred.
        passage_name:
          type: string
          example: Main Street Toll Booth
          description: The specific name or identifier of the toll passage or station.
    mifleet-toll:
      type: object
      properties:
        toll_date:
          $ref: '#/components/schemas/date'
          description: The exact date and time when the toll transaction occurred.
        passage_name:
          type: string
          example: Main Street Toll Booth
          description: The specific name or identifier of the toll passage or station.
    mifleet-accident-third-party:
      type: object
      properties:
        name:
          type: string
          example: Johnny Crash
          description: The name of the third party involved.
          maxLength: 256
        identification:
          type: string
          example: LMN567
          description: An identification/registration number for the third party.
          maxLength: 256
        contact:
          type: string
          example: '+351123456789'
          description: Contact details for the third party.
          maxLength: 256
        notes:
          type: string
          example: This vehicle was the one crashed into.
          description: Optional notes regarding the third party.
    mifleet-accident-response:
      type: object
      properties:
        id:
          type: integer
          example: 12345
          description: Unique identifier for each transaction, aiding in tracking and referencing.
        document_number:
          type: string
          default: CONCEPT-XXXXXX
          description: Unique reference number for the transaction document.
          example: ACCIDENT-123456
        document_type:
          type: string
          default: DOCUMENT_TYPE_INVOICE
          description: The document type. Valid values are "DOCUMENT_TYPE_INVOICE", "DOCUMENT_TYPE_CREDIT_NOTE", "DOCUMENT_TYPE_DEBIT_NOTE", or "DOCUMENT_TYPE_RECEIPT".
          example: DOCUMENT_TYPE_INVOICE
        document_status:
          type: string
          default: DOCUMENT_STATUS_PAID
          description: The document status. Valid values are "DOCUMENT_STATUS_PENDING", "DOCUMENT_STATUS_VALIDATED", "DOCUMENT_STATUS_OVERDUE_PAYMENT", "DOCUMENT_STATUS_PAID", or "DOCUMENT_STATUS_CANCELLED".
          example: DOCUMENT_STATUS_PAID
        supplier:
          type: string
          description: Supplier or service provider for the entry.
          maxLength: 50
          example: ABC Towing
        description:
          type: string
          description: Brief summary or description of the transaction.
          example: Service description
        quantity:
          type: number
          description: Quantity of items or services.
          example: 1
        price:
          type: number
          description: Unit price of the item or service.
          example: 100
        net_value:
          type: number
          description: Net value before tax.
          example: 100
        tax_rate:
          type: number
          minimum: 0
          maximum: 1
          description: Tax rate for the transaction (e.g., 0.2 for 20%).
          example: 0.15
        total_value:
          type: number
          description: Total value including tax.
          example: 115
        driver:
          type: string
          description: Driver associated with the entry.
          example: John Doe
        registration:
          $ref: '#/components/schemas/registration'
        vehicle_deleted:
          type: boolean
          example: false
          description: Indicates whether the vehicle related to this entry is marked as deleted.
        general_ledger_code:
          type:
            - number
            - 'null'
          example: 54321
          description: Unique code for categorizing the transaction in the general ledger.
        discount:
          type:
            - number
            - 'null'
          example: 0.35
          description: Discount amount applied to the transaction.
        accident_date:
          $ref: '#/components/schemas/date'
          example: '2023-08-23 16:59:26'
          description: Date and time of the accident.
        accident_type:
          type: string
          example: Fender Bender
          description: The type of accident that took place.
          maxLength: 50
        accident_location:
          type: string
          example: Main Road between 1st and 2nd Avenues
          description: Location where the accident took place.
          maxLength: 50
        accident_loss_value:
          type: number
          example: 10000
          description: Value of loss as a result of this accident.
        accident_has_recoveries:
          type: boolean
          example: true
          description: A boolean representing the possibility of recoveries from this accident.
        accident_process_number:
          type: string
          example: XYZ123
          description: Process number assigned to this accident.
          maxLength: 50
        accident_claim_number:
          type: string
          example: ABC987
          description: Claim number assigned to this accident.
          maxLength: 50
        third_parties:
          type: array
          description: An optional array of third parties involved in this accident.
          items:
            $ref: '#/components/schemas/mifleet-accident-third-party'
    mifleet-accident:
      type: object
      properties:
        accident_date:
          $ref: '#/components/schemas/date'
          example: '2023-08-23 16:59:26'
          description: Date and time of the accident.
        accident_type:
          type: string
          example: Fender Bender
          description: The type of accident that took place.
          maxLength: 50
        accident_location:
          type: string
          example: Main Road between 1st and 2nd Avenues
          description: Location where the accident took place.
          maxLength: 50
        accident_loss_value:
          type: number
          example: 10000
          description: Value of loss as a result of this accident.
        accident_has_recoveries:
          type: boolean
          example: true
          description: A boolean representing the possibility of recoveries from this accident.
        accident_process_number:
          type: string
          example: XYZ123
          description: Process number assigned to this accident.
          maxLength: 50
        accident_claim_number:
          type: string
          example: ABC987
          description: Claim number assigned to this accident.
          maxLength: 50
        third_parties:
          type: array
          description: An optional array of third parties involved in this accident.
          items:
            $ref: '#/components/schemas/mifleet-accident-third-party'
    mifleet-breakdown-response:
      type: object
      properties:
        id:
          type: integer
          example: 12345
          description: Unique identifier for the breakdown entry.
        document_number:
          type: string
          default: CONCEPT-XXXXXX
          description: Unique reference number for the transaction document.
          example: ACCIDENT-123456
        document_type:
          type: string
          default: DOCUMENT_TYPE_INVOICE
          description: The document type. Valid values are "DOCUMENT_TYPE_INVOICE", "DOCUMENT_TYPE_CREDIT_NOTE", "DOCUMENT_TYPE_DEBIT_NOTE", or "DOCUMENT_TYPE_RECEIPT".
          example: DOCUMENT_TYPE_INVOICE
        document_status:
          type: string
          default: DOCUMENT_STATUS_PAID
          description: The document status. Valid values are "DOCUMENT_STATUS_PENDING", "DOCUMENT_STATUS_VALIDATED", "DOCUMENT_STATUS_OVERDUE_PAYMENT", "DOCUMENT_STATUS_PAID", or "DOCUMENT_STATUS_CANCELLED".
          example: DOCUMENT_STATUS_PAID
        supplier:
          type: string
          description: Supplier or service provider for the entry.
          maxLength: 50
          example: ABC Towing
        description:
          type: string
          description: Brief summary or description of the transaction.
          example: Service description
        quantity:
          type: number
          description: Quantity of items or services.
          example: 1
        price:
          type: number
          description: Unit price of the item or service.
          example: 100
        net_value:
          type: number
          description: Net value before tax.
          example: 100
        tax_rate:
          type: number
          minimum: 0
          maximum: 1
          description: Tax rate for the transaction (e.g., 0.2 for 20%).
          example: 0.15
        total_value:
          type: number
          description: Total value including tax.
          example: 115
        driver:
          type: string
          description: Driver associated with the entry.
          example: John Doe
        registration:
          $ref: '#/components/schemas/registration'
        vehicle_deleted:
          type: boolean
          description: Indicates whether the vehicle associated with this transaction has been marked as deleted.
        general_ledger_code:
          type:
            - integer
            - 'null'
          example: 54321
          description: Unique code for categorizing the transaction in the general ledger.
        discount:
          type:
            - number
            - 'null'
          example: 0.35
          description: Discount amount applied to the transaction.
        towing_start_date:
          $ref: '#/components/schemas/date'
          example: '2023-08-23T16:59:26'
          description: Date and time of the breakdown issuance.
        towing_delivery_date:
          $ref: '#/components/schemas/date'
          example: '2023-08-23T16:59:26'
          description: Date and time of the breakdown deliver.
        breakdown_type:
          type: string
          example: Towing
          description: Breakdown type (e.g., Towing, Tyre Change).
          maxLength: 50
        towing_description:
          type:
            - string
            - 'null'
          example: Red light breakdown
          description: Towing description
    mifleet-breakdown:
      type: object
      properties:
        towing_start_date:
          $ref: '#/components/schemas/date'
          example: '2023-08-23T16:59:26'
          description: Date and time of the breakdown issuance.
        towing_delivery_date:
          $ref: '#/components/schemas/date'
          example: '2023-08-23T16:59:26'
          description: Date and time of the breakdown deliver.
        breakdown_type:
          type: string
          example: Towing
          description: Breakdown type (e.g., Towing, Tyre Change).
          maxLength: 50
        towing_description:
          type:
            - string
            - 'null'
          example: Red light breakdown
          description: Towing description
    mifleet-cleaning-response:
      type: object
      properties:
        id:
          type: integer
          example: 12345
          description: Unique identifier for the cleaning entry.
        document_number:
          type: string
          default: CONCEPT-XXXXXX
          description: Unique reference number for the transaction document.
          example: ACCIDENT-123456
        document_type:
          type: string
          default: DOCUMENT_TYPE_INVOICE
          description: The document type. Valid values are "DOCUMENT_TYPE_INVOICE", "DOCUMENT_TYPE_CREDIT_NOTE", "DOCUMENT_TYPE_DEBIT_NOTE", or "DOCUMENT_TYPE_RECEIPT".
          example: DOCUMENT_TYPE_INVOICE
        document_status:
          type: string
          default: DOCUMENT_STATUS_PAID
          description: The document status. Valid values are "DOCUMENT_STATUS_PENDING", "DOCUMENT_STATUS_VALIDATED", "DOCUMENT_STATUS_OVERDUE_PAYMENT", "DOCUMENT_STATUS_PAID", or "DOCUMENT_STATUS_CANCELLED".
          example: DOCUMENT_STATUS_PAID
        supplier:
          type: string
          description: Supplier or service provider for the entry.
          maxLength: 50
          example: ABC Towing
        description:
          type: string
          description: Brief summary or description of the transaction.
          example: Service description
        quantity:
          type: number
          description: Quantity of items or services.
          example: 1
        price:
          type: number
          description: Unit price of the item or service.
          example: 100
        net_value:
          type: number
          description: Net value before tax.
          example: 100
        tax_rate:
          type: number
          minimum: 0
          maximum: 1
          description: Tax rate for the transaction (e.g., 0.2 for 20%).
          example: 0.15
        total_value:
          type: number
          description: Total value including tax.
          example: 115
        driver:
          type: string
          description: Driver associated with the entry.
          example: John Doe
        registration:
          $ref: '#/components/schemas/registration'
        vehicle_deleted:
          type: boolean
          description: Indicates whether the vehicle associated with this transaction has been marked as deleted.
        general_ledger_code:
          type:
            - integer
            - 'null'
          example: 54321
          description: Unique code for categorizing the transaction in the general ledger.
        discount:
          type:
            - number
            - 'null'
          example: 0.35
          description: Discount amount applied to the transaction.
        cleaning_date:
          $ref: '#/components/schemas/date'
          description: Date and time of the cleaning issuance.
        cleaning_type:
          type:
            - string
            - 'null'
          example: Interior cleaning
          description: Specific category or type of cleaning performed.
          maxLength: 50
    mifleet-cleaning:
      type: object
      properties:
        cleaning_date:
          $ref: '#/components/schemas/date'
          description: Date and time of the cleaning issuance.
        cleaning_type:
          type: string
          example: Interior cleaning
          description: Specific category or type of cleaning performed.
          maxLength: 50
    mifleet-consumable-response:
      type: object
      properties:
        id:
          type: integer
          example: 12345
          description: Unique identifier for the consumable entry.
        document_number:
          type: string
          default: CONCEPT-XXXXXX
          description: Unique reference number for the transaction document.
          example: ACCIDENT-123456
        document_type:
          type: string
          default: DOCUMENT_TYPE_INVOICE
          description: The document type. Valid values are "DOCUMENT_TYPE_INVOICE", "DOCUMENT_TYPE_CREDIT_NOTE", "DOCUMENT_TYPE_DEBIT_NOTE", or "DOCUMENT_TYPE_RECEIPT".
          example: DOCUMENT_TYPE_INVOICE
        document_status:
          type: string
          default: DOCUMENT_STATUS_PAID
          description: The document status. Valid values are "DOCUMENT_STATUS_PENDING", "DOCUMENT_STATUS_VALIDATED", "DOCUMENT_STATUS_OVERDUE_PAYMENT", "DOCUMENT_STATUS_PAID", or "DOCUMENT_STATUS_CANCELLED".
          example: DOCUMENT_STATUS_PAID
        supplier:
          type: string
          description: Supplier or service provider for the entry.
          maxLength: 50
          example: ABC Towing
        description:
          type: string
          description: Brief summary or description of the transaction.
          example: Service description
        quantity:
          type: number
          description: Quantity of items or services.
          example: 1
        price:
          type: number
          description: Unit price of the item or service.
          example: 100
        net_value:
          type: number
          description: Net value before tax.
          example: 100
        tax_rate:
          type: number
          minimum: 0
          maximum: 1
          description: Tax rate for the transaction (e.g., 0.2 for 20%).
          example: 0.15
        total_value:
          type: number
          description: Total value including tax.
          example: 115
        registration:
          $ref: '#/components/schemas/registration'
        vehicle_deleted:
          type: boolean
          description: Indicates whether the vehicle related to this consumable is marked as deleted.
        general_ledger_code:
          type:
            - integer
            - 'null'
          example: 54321
          description: Unique code for categorizing the transaction in the general ledger.
        discount:
          type:
            - number
            - 'null'
          example: 0.35
          description: Discount amount applied to the transaction.
        driver:
          type: string
          description: Driver associated with the entry.
          example: John Doe
        consumable_date:
          $ref: '#/components/schemas/date'
          description: Date and time of the transaction.
        consumable_type:
          type: string
          example: Brake Fluid
          description: The type of consumable purchased.
    mifleet-consumable:
      type: object
      properties:
        consumable_date:
          $ref: '#/components/schemas/date'
          description: Date and time of the transaction.
        consumable_type:
          type: string
          example: Brake Fluid
          description: The type of consumable purchased.
    mifleet-driver-cost-response:
      type: object
      properties:
        id:
          type: integer
          example: 12345
          description: Unique identifier for the driver cost entry.
        document_number:
          type: string
          default: CONCEPT-XXXXXX
          description: Unique reference number for the transaction document.
          example: ACCIDENT-123456
        document_type:
          type: string
          default: DOCUMENT_TYPE_INVOICE
          description: The document type. Valid values are "DOCUMENT_TYPE_INVOICE", "DOCUMENT_TYPE_CREDIT_NOTE", "DOCUMENT_TYPE_DEBIT_NOTE", or "DOCUMENT_TYPE_RECEIPT".
          example: DOCUMENT_TYPE_INVOICE
        document_status:
          type: string
          default: DOCUMENT_STATUS_PAID
          description: The document status. Valid values are "DOCUMENT_STATUS_PENDING", "DOCUMENT_STATUS_VALIDATED", "DOCUMENT_STATUS_OVERDUE_PAYMENT", "DOCUMENT_STATUS_PAID", or "DOCUMENT_STATUS_CANCELLED".
          example: DOCUMENT_STATUS_PAID
        supplier:
          type: string
          description: Supplier or service provider for the entry.
          maxLength: 50
          example: ABC Towing
        description:
          type: string
          description: Brief summary or description of the transaction.
          example: Service description
        quantity:
          type: number
          description: Quantity of items or services.
          example: 1
        price:
          type: number
          description: Unit price of the item or service.
          example: 100
        net_value:
          type: number
          description: Net value before tax.
          example: 100
        tax_rate:
          type: number
          minimum: 0
          maximum: 1
          description: Tax rate for the transaction (e.g., 0.2 for 20%).
          example: 0.15
        total_value:
          type: number
          description: Total value including tax.
          example: 115
        general_ledger_code:
          type: number
          example: 54321
          description: Unique code for categorizing the transaction in the general ledger.
        discount:
          type: number
          example: 0.35
          description: Discount amount applied to the transaction.
        driver:
          type: string
          description: Driver associated with the entry.
          example: John Doe
        driver_cost_date:
          $ref: '#/components/schemas/date'
          description: Date and time of the transaction.
        driver_cost_type:
          type: string
          example: Meal
          description: The type of driver cost incurred.
          maxLength: 50
    mifleet-driver-cost:
      type: object
      properties:
        driver_cost_date:
          $ref: '#/components/schemas/date'
          description: Date and time of the transaction.
        driver_cost_type:
          type: string
          example: Meal
          description: The type of driver cost incurred.
          maxLength: 50
    mifleet-driver-license-response:
      type: object
      properties:
        id:
          type: integer
          example: 12345
          description: Unique identifier for the driver license entry.
        document_number:
          type: string
          default: CONCEPT-XXXXXX
          description: Unique reference number for the transaction document.
          example: ACCIDENT-123456
        document_type:
          type: string
          default: DOCUMENT_TYPE_INVOICE
          description: The document type. Valid values are "DOCUMENT_TYPE_INVOICE", "DOCUMENT_TYPE_CREDIT_NOTE", "DOCUMENT_TYPE_DEBIT_NOTE", or "DOCUMENT_TYPE_RECEIPT".
          example: DOCUMENT_TYPE_INVOICE
        document_status:
          type: string
          default: DOCUMENT_STATUS_PAID
          description: The document status. Valid values are "DOCUMENT_STATUS_PENDING", "DOCUMENT_STATUS_VALIDATED", "DOCUMENT_STATUS_OVERDUE_PAYMENT", "DOCUMENT_STATUS_PAID", or "DOCUMENT_STATUS_CANCELLED".
          example: DOCUMENT_STATUS_PAID
        supplier:
          type: string
          description: Supplier or service provider for the entry.
          maxLength: 50
          example: ABC Towing
        description:
          type: string
          description: Brief summary or description of the transaction.
          example: Service description
        quantity:
          type: number
          description: Quantity of items or services.
          example: 1
        price:
          type: number
          description: Unit price of the item or service.
          example: 100
        net_value:
          type: number
          description: Net value before tax.
          example: 100
        tax_rate:
          type: number
          minimum: 0
          maximum: 1
          description: Tax rate for the transaction (e.g., 0.2 for 20%).
          example: 0.15
        total_value:
          type: number
          description: Total value including tax.
          example: 115
        general_ledger_code:
          type: number
          example: 54321
          description: Unique code for categorizing the transaction in the general ledger.
        discount:
          type: number
          example: 0.35
          description: Discount amount applied to the transaction.
        driver:
          type: string
          description: Driver associated with the entry.
        begin_date:
          $ref: '#/components/schemas/date'
          description: Begin date for the validity of the license.
        expiration_date:
          $ref: '#/components/schemas/date'
          description: End date for the validity of the license.
        license_type:
          type: string
          example: Trailer
          description: The type of driver license.
          maxLength: 50
        license_number:
          type: string
          example: ABC123
          description: The license number associated with this license.
          maxLength: 50
    mifleet-driver-license:
      type: object
      properties:
        begin_date:
          $ref: '#/components/schemas/date'
          description: Begin date for the validity of the license.
        expiration_date:
          $ref: '#/components/schemas/date'
          description: End date for the validity of the license.
        license_type:
          type: string
          example: Trailer
          description: The type of driver license.
          maxLength: 50
        license_number:
          type: string
          example: ABC123
          description: The license number associated with this license.
          maxLength: 50
    mifleet-contract-financing-response:
      type: object
      properties:
        id:
          type: integer
          example: 12345
          description: Unique identifier for the contract financing entry.
        supplier:
          type: string
          example: ABC Bank
          description: Name of the supplier or entity providing value or service.
          maxLength: 50
        net_value:
          type: number
          example: 4.45
          description: Net value of the contract, calculated before taxes.
        tax_rate:
          type: number
          example: 0.2
          description: Applicable tax rate for the contract, represented as a decimal fraction.
        total_value:
          type: number
          example: 4.99
          description: Total value of the contract after applying any taxes.
        registration:
          $ref: '#/components/schemas/registration'
        vehicle_deleted:
          type: boolean
          description: Indicates whether the associated vehicle is deleted or not.
        general_ledger_code:
          type:
            - integer
            - 'null'
          example: 54321
          description: Code used for categorizing this transaction in the general ledger.
        contract_status:
          type: string
          example: CONTRACT_STATUS_ACTIVE
          default: CONTRACT_STATUS_CREATED
          description: Current status of the contract, e.g., created, active, or concluded.
        contract_date:
          $ref: '#/components/schemas/date'
          description: The date of the contract.
        contract_start_date:
          $ref: '#/components/schemas/date'
          description: The date the contract is effective.
        contract_end_date:
          $ref: '#/components/schemas/date'
          description: The date of conclusion of the contract.
        notes:
          type:
            - string
            - 'null'
          example: Monthly rental financing contract for trailer.
          description: Notes on the contract, detailing the nature of products/services.
        odometer:
          type:
            - integer
            - 'null'
          example: 101000
          description: Any applicable odometer value that pertains to the contract.
        payment_term:
          type:
            - string
            - 'null'
          example: 30 Days
          description: The term (in days) of payments for the contract. Importantly, an integer needs to be present in the string as per example.
          maxLength: 100
        payment_method:
          type:
            - string
            - 'null'
          example: Direct Debit
          description: The method of payment associated to the contract.
          maxLength: 100
        financing_type:
          type: string
          example: Renting
          description: The type of financing associated with the contract.
          maxLength: 50
        odometer_limit:
          type:
            - integer
            - 'null'
          example: 111000
          description: An optional odometer limit pertaining to the contract.
        residual_value:
          type:
            - number
            - 'null'
          example: 5.01
          description: Any residual value payable on the contract.
        interest:
          type:
            - number
            - 'null'
          example: 4.5
          description: Interest rate on the contract.
    mifleet-contract-financing:
      type: object
      properties:
        contract_status:
          type: string
          example: CONTRACT_STATUS_ACTIVE
          default: CONTRACT_STATUS_CREATED
          description: Current status of the contract, e.g., created, active, or concluded.
          enum:
            - CONTRACT_STATUS_CREATED
            - CONTRACT_STATUS_ACTIVE
            - CONTRACT_STATUS_SUSPENDED
            - CONTRACT_STATUS_CONCLUDED
            - CONTRACT_STATUS_CANCELLED
        contract_date:
          $ref: '#/components/schemas/date'
          description: The date of the contract.
        contract_start_date:
          $ref: '#/components/schemas/date'
          description: The date the contract is effective.
        contract_end_date:
          $ref: '#/components/schemas/date'
          description: The date of conclusion of the contract.
        notes:
          type:
            - string
            - 'null'
          example: Monthly rental financing contract for trailer.
          description: Notes on the contract, detailing the nature of products/services.
        odometer:
          type:
            - integer
            - 'null'
          example: 101000
          description: Any applicable odometer value that pertains to the contract.
        payment_term:
          type:
            - string
            - 'null'
          example: 30 Days
          description: The term (in days) of payments for the contract. Importantly, an integer needs to be present in the string as per example.
          maxLength: 100
        payment_method:
          type:
            - string
            - 'null'
          example: Direct Debit
          description: The method of payment associated to the contract.
          maxLength: 100
        financing_type:
          type: string
          example: Renting
          description: The type of financing associated with the contract.
          maxLength: 50
        odometer_limit:
          type:
            - integer
            - 'null'
          example: 111000
          description: An optional odometer limit pertaining to the contract.
        residual_value:
          type:
            - number
            - 'null'
          example: 5.01
          description: Any residual value payable on the contract.
        interest:
          type:
            - number
            - 'null'
          example: 4.5
          description: Interest rate on the contract.
    mifleet-financing-response:
      type: object
      properties:
        id:
          type: integer
          example: 12345
          description: Unique identifier for the financing entry.
        document_number:
          type: string
          default: CONCEPT-XXXXXX
          description: Unique reference number for the transaction document.
          example: ACCIDENT-123456
        document_type:
          type: string
          default: DOCUMENT_TYPE_INVOICE
          description: The document type. Valid values are "DOCUMENT_TYPE_INVOICE", "DOCUMENT_TYPE_CREDIT_NOTE", "DOCUMENT_TYPE_DEBIT_NOTE", or "DOCUMENT_TYPE_RECEIPT".
          example: DOCUMENT_TYPE_INVOICE
        document_status:
          type: string
          default: DOCUMENT_STATUS_PAID
          description: The document status. Valid values are "DOCUMENT_STATUS_PENDING", "DOCUMENT_STATUS_VALIDATED", "DOCUMENT_STATUS_OVERDUE_PAYMENT", "DOCUMENT_STATUS_PAID", or "DOCUMENT_STATUS_CANCELLED".
          example: DOCUMENT_STATUS_PAID
        supplier:
          type: string
          description: Supplier or service provider for the entry.
          maxLength: 50
          example: ABC Towing
        description:
          type: string
          description: Brief summary or description of the transaction.
          example: Service description
        quantity:
          type: number
          description: Quantity of items or services.
          example: 1
        price:
          type: number
          description: Unit price of the item or service.
          example: 100
        net_value:
          type: number
          description: Net value before tax.
          example: 100
        tax_rate:
          type: number
          description: Tax rate applied.
          example: 0.15
        total_value:
          type: number
          description: Total value including tax.
          example: 115
        registration:
          $ref: '#/components/schemas/registration'
        vehicle_deleted:
          type: boolean
          example: false
          description: Indicates whether the associated vehicle is deleted or not.
        general_ledger_code:
          type:
            - number
            - 'null'
          example: 54321
          description: Unique code for categorizing the transaction in the general ledger.
        discount:
          type:
            - number
            - 'null'
          example: 0.35
          description: Discount amount applied to the transaction.
        financing_date:
          $ref: '#/components/schemas/date'
          description: The date of the financing transaction.
    mifleet-financing:
      type: object
      properties:
        financing_date:
          $ref: '#/components/schemas/date'
          description: The date of the financing transaction.
    mifleet-fine-response:
      type: object
      properties:
        id:
          type: integer
          example: 12345
          description: Unique identifier for the fine entry.
        document_number:
          type: string
          default: CONCEPT-XXXXXX
          description: Unique reference number for the transaction document.
          example: ACCIDENT-123456
        document_type:
          type: string
          default: DOCUMENT_TYPE_INVOICE
          description: The document type. Valid values are "DOCUMENT_TYPE_INVOICE", "DOCUMENT_TYPE_CREDIT_NOTE", "DOCUMENT_TYPE_DEBIT_NOTE", or "DOCUMENT_TYPE_RECEIPT".
          example: DOCUMENT_TYPE_INVOICE
        document_status:
          type: string
          default: DOCUMENT_STATUS_PAID
          description: The document status. Valid values are "DOCUMENT_STATUS_PENDING", "DOCUMENT_STATUS_VALIDATED", "DOCUMENT_STATUS_OVERDUE_PAYMENT", "DOCUMENT_STATUS_PAID", or "DOCUMENT_STATUS_CANCELLED".
          example: DOCUMENT_STATUS_PAID
        supplier:
          type: string
          description: Supplier or service provider for the entry.
          maxLength: 50
          example: ABC Towing
        description:
          type: string
          description: Brief summary or description of the transaction.
          example: Service description
        quantity:
          type: number
          description: Quantity of items or services.
          example: 1
        price:
          type: number
          description: Unit price of the item or service.
          example: 100
        net_value:
          type: number
          description: Net value before tax.
          example: 100
        tax_rate:
          type: number
          minimum: 0
          maximum: 1
          description: Tax rate for the transaction (e.g., 0.2 for 20%).
          example: 0.15
        total_value:
          type: number
          description: Total value including tax.
          example: 115
        driver:
          type: string
          description: Driver associated with the entry.
          example: John Doe
        registration:
          $ref: '#/components/schemas/registration'
        vehicle_deleted:
          type: boolean
          example: false
          description: Indicates if the vehicle associated with the fine has been deleted.
        ct_latitude:
          type:
            - number
            - 'null'
          example: -34.123456
          description: Latitude coordinate of the vehicle at the time closest to the fine transaction.
        ct_longitude:
          type:
            - number
            - 'null'
          example: 18.123456
          description: Longitude coordinate of the vehicle at the time closest to the fine transaction.
        ct_odometer:
          type:
            - number
            - 'null'
          example: 15000
          description: Odometer reading of the vehicle closest to the time of the fine transaction.
        general_ledger_code:
          type:
            - number
            - 'null'
          example: 54321
          description: Unique code for categorizing the transaction in the general ledger.
        discount:
          type:
            - number
            - 'null'
          example: 0.35
          description: Discount amount applied to the transaction.
        fine_validation_status:
          type: string
          example: FINE_VALIDATION_HIGH_RISK
          description: Status indicating the outcome of the fine validation process.
        infringement_date:
          $ref: '#/components/schemas/date'
          description: Date and time of the fine issuance.
        infringement_location:
          type: string
          example: Church and Main Road crossing
          description: Location of the infringement.
        infringement_number:
          type: string
          example: QXY367480
          description: Infringement reference number.
    mifleet-fine:
      type: object
      properties:
        infringement_date:
          $ref: '#/components/schemas/date'
          description: Date and time of the fine issuance.
        infringement_location:
          type: string
          example: Church and Main Road crossing
          description: Location of the infringement.
        infringement_number:
          type: string
          example: QXY367480
          description: Infringement reference number.
    mifleet-contract-fuel-card-response:
      type: object
      properties:
        id:
          type: integer
          example: 67890
          description: Unique identifier for the fuel card contract.
        supplier:
          type: string
          example: Fuel Card Company
          description: Name of the supplier or entity providing value or service.
        registration:
          $ref: '#/components/schemas/registration'
        vehicle_deleted:
          type: boolean
          example: false
          description: Indicates whether the associated vehicle is deleted or not.
        net_value:
          type:
            - number
            - 'null'
          example: 100
          description: Net value of the contract.
        tax_rate:
          type:
            - number
            - 'null'
          example: 0.2
          description: Tax rate for the contract.
        total_value:
          type:
            - number
            - 'null'
          example: 120
          description: Total value after taxes.
        general_ledger_code:
          type: integer
          example: 12345
          description: Code used for categorizing this transaction in the general ledger.
        contract_status:
          type: string
          example: CONTRACT_STATUS_ACTIVE
          default: CONTRACT_STATUS_CREATED
          description: Current status of the contract, e.g., created, active, or concluded.
        contract_date:
          $ref: '#/components/schemas/date'
          description: The date of the contract.
        contract_start_date:
          $ref: '#/components/schemas/date'
          description: The date the contract is effective.
        contract_end_date:
          $ref: '#/components/schemas/date'
          description: The date of conclusion of the contract.
        notes:
          type: string
          example: This is a sample note for the fuel card contract.
          description: Notes on the contract, detailing the nature of products/services.
        odometer:
          type: integer
          example: 15000
          description: Odometer reading at the time of contract initiation.
        payment_term:
          type: string
          maxLength: 100
          example: NET_30
          description: The term (in days) of payments for the contract. Importantly, an integer needs to be present in the string as per example.
        payment_method:
          type: string
          maxLength: 100
          example: CREDIT_CARD
          description: The method of payment associated to the contract.
        card_number:
          type: string
          maxLength: 100
          example: '0987654321'
          description: The card number associated with the contract.
        plafond:
          type:
            - array
            - 'null'
          description: An optional array of plafonds involved with the contract.
          items:
            type: object
            properties:
              period:
                type: string
                description: The plafond period.
                example: PERIOD_TYPE_MONTHLY
              amount:
                type: number
                example: 500
                description: The plafond amount value.
              start_date:
                $ref: '#/components/schemas/date'
                description: The date the plafond is effective.
              end_date:
                $ref: '#/components/schemas/date'
                description: The date of conclusion of the plafond.
    mifleet-contract-fuel-card:
      type: object
      properties:
        contract_status:
          type: string
          enum:
            - CONTRACT_STATUS_CREATED
            - CONTRACT_STATUS_ACTIVE
            - CONTRACT_STATUS_SUSPENDED
            - CONTRACT_STATUS_CONCLUDED
            - CONTRACT_STATUS_CANCELLED
          example: CONTRACT_STATUS_ACTIVE
          default: CONTRACT_STATUS_CREATED
          description: Current status of the contract, e.g., created, active, or concluded.
        contract_date:
          $ref: '#/components/schemas/date'
          description: The date of the contract.
        contract_start_date:
          $ref: '#/components/schemas/date'
          description: The date the contract is effective.
        contract_end_date:
          $ref: '#/components/schemas/date'
          description: The date of conclusion of the contract.
        notes:
          type: string
          example: This is a sample note for the fuel card contract.
          description: Notes on the contract, detailing the nature of products/services.
        odometer:
          type: integer
          example: 15000
          description: Odometer reading at the time of contract initiation.
    mifleet-contract-payment-card:
      type: object
      properties:
        payment_term:
          type: string
          maxLength: 100
          example: NET_30
          description: The term (in days) of payments for the contract. Importantly, an integer needs to be present in the string as per example.
        payment_method:
          type: string
          maxLength: 100
          example: CREDIT_CARD
          description: The method of payment associated to the contract.
        card_number:
          type: string
          maxLength: 100
          example: '0987654321'
          description: The card number associated with the contract.
        plafond:
          type:
            - array
            - 'null'
          description: An optional array of plafonds involved with the contract.
          items:
            type: object
            required:
              - period
              - amount
            properties:
              period:
                type: string
                enum:
                  - PERIOD_TYPE_YEARLY
                  - PERIOD_TYPE_MONTHLY
                  - PERIOD_TYPE_WEEKLY
                  - PERIOD_TYPE_DAILY
                description: The plafond period.
                example: PERIOD_TYPE_MONTHLY
              amount:
                type: number
                example: 500
                description: The plafond amount value.
              start_date:
                $ref: '#/components/schemas/date'
                description: The date the plafond is effective.
              end_date:
                $ref: '#/components/schemas/date'
                description: The date of conclusion of the plafond.
    mifleet-contract-insurance-response:
      type: object
      properties:
        id:
          type: integer
          example: 67890
          description: Unique identifier for each contract, aiding in tracking and referencing.
        vehicle_deleted:
          type: boolean
          example: false
          description: Indicates whether the associated vehicle is deleted or not.
        contract_status:
          type: string
          example: CONTRACT_STATUS_ACTIVE
          default: CONTRACT_STATUS_CREATED
          description: Current status of the contract, e.g., created, active, or concluded.
        contract_date:
          $ref: '#/components/schemas/date'
          description: The date of the contract.
        contract_start_date:
          $ref: '#/components/schemas/date'
          description: The date the contract is effective.
        contract_end_date:
          $ref: '#/components/schemas/date'
          description: The date of conclusion of the contract.
        notes:
          type: string
          example: This is a sample note for the fuel card contract.
          description: Notes on the contract, detailing the nature of products/services.
        registration:
          $ref: '#/components/schemas/registration'
        odometer:
          type: integer
          example: 15000
          description: Odometer reading at the time of contract initiation.
        supplier:
          type: string
          description: Supplier or service provider for the entry.
          maxLength: 50
          example: ABC Towing
        net_value:
          type: number
          description: Net value before tax.
          example: 100
        tax_rate:
          type: number
          description: Tax rate applied.
          example: 0.15
        total_value:
          type: number
          description: Total value including tax.
          example: 115
        general_ledger_code:
          type: integer
          example: 12345
          description: Code used for categorizing this transaction in the general ledger.
        payment_term:
          type: string
          maxLength: 100
          example: NET_30
          description: The term (in days) of payments for the contract. Importantly, an integer needs to be present in the string as per example.
        payment_method:
          type: string
          maxLength: 100
          example: CREDIT_CARD
          description: The method of payment associated to the contract.
        insurance_type:
          type: string
          maxLength: 50
          example: FULL_COVERAGE
          description: The type of insurance associated with the contract.
        policy_number:
          type: string
          description: The insurance policy number for the contract.
          example: INS-123456789
        franchise_percentage:
          type: number
          description: Any value assigned to the franchise as a percentage.
          example: 10
        franchise_value:
          type: number
          description: Any value assigned to the franchise as a flat value.
          example: 500
        insurance_conditions:
          type: array
          description: An optional array of conditions involved with the contract.
          items:
            type: object
            required:
              - condition
            properties:
              condition:
                type: string
                example: EXCESS_WINDSHIELD_COVERAGE
                description: The condition associated to the contract.
    mifleet-contract-insurance:
      type: object
      properties:
        contract_status:
          type: string
          enum:
            - CONTRACT_STATUS_CREATED
            - CONTRACT_STATUS_ACTIVE
            - CONTRACT_STATUS_SUSPENDED
            - CONTRACT_STATUS_CONCLUDED
            - CONTRACT_STATUS_CANCELLED
          example: CONTRACT_STATUS_ACTIVE
          default: CONTRACT_STATUS_CREATED
          description: Current status of the contract, e.g., created, active, or concluded.
        contract_date:
          $ref: '#/components/schemas/date'
          description: The date of the contract.
        contract_start_date:
          $ref: '#/components/schemas/date'
          description: The date the contract is effective.
        contract_end_date:
          $ref: '#/components/schemas/date'
          description: The date of conclusion of the contract.
        notes:
          type: string
          example: This is a sample note for the fuel card contract.
          description: Notes on the contract, detailing the nature of products/services.
        registration:
          $ref: '#/components/schemas/registration'
        odometer:
          type: integer
          example: 15000
          description: Odometer reading at the time of contract initiation.
        supplier:
          type: string
          description: Supplier or service provider for the entry.
          maxLength: 50
          example: ABC Towing
        net_value:
          type: number
          description: Net value before tax.
          example: 100
        tax_rate:
          type: number
          description: Tax rate applied.
          example: 0.15
        total_value:
          type: number
          description: Total value including tax.
          example: 115
        general_ledger_code:
          type: integer
          example: 12345
          description: Code used for categorizing this transaction in the general ledger.
        payment_term:
          type: string
          maxLength: 100
          example: NET_30
          description: The term (in days) of payments for the contract. Importantly, an integer needs to be present in the string as per example.
        payment_method:
          type: string
          maxLength: 100
          example: CREDIT_CARD
          description: The method of payment associated to the contract.
        insurance_type:
          type: string
          maxLength: 50
          example: FULL_COVERAGE
          description: The type of insurance associated with the contract.
        policy_number:
          type: string
          description: The insurance policy number for the contract.
          example: INS-123456789
        franchise_percentage:
          type: number
          description: Any value assigned to the franchise as a percentage.
          example: 10
        franchise_value:
          type: number
          description: Any value assigned to the franchise as a flat value.
          example: 500
        insurance_conditions:
          type: array
          description: An optional array of conditions involved with the contract.
          items:
            type: object
            required:
              - condition
            properties:
              condition:
                type: string
                example: EXCESS_WINDSHIELD_COVERAGE
                description: The condition associated to the contract.
    mifleet-insurance-response:
      type: object
      properties:
        id:
          type: integer
          example: 12345
          description: Unique identifier for each insurance entry, aiding in tracking and referencing.
        vehicle_deleted:
          type: boolean
          example: false
          description: Indicates whether the associated vehicle is deleted or not.
        document_number:
          type: string
          default: CONCEPT-XXXXXX
          description: Unique reference number for the transaction document.
          example: ACCIDENT-123456
        document_type:
          type: string
          default: DOCUMENT_TYPE_INVOICE
          description: The document type. Valid values are "DOCUMENT_TYPE_INVOICE", "DOCUMENT_TYPE_CREDIT_NOTE", "DOCUMENT_TYPE_DEBIT_NOTE", or "DOCUMENT_TYPE_RECEIPT".
          example: DOCUMENT_TYPE_INVOICE
        document_status:
          type: string
          default: DOCUMENT_STATUS_PAID
          description: The document status. Valid values are "DOCUMENT_STATUS_PENDING", "DOCUMENT_STATUS_VALIDATED", "DOCUMENT_STATUS_OVERDUE_PAYMENT", "DOCUMENT_STATUS_PAID", or "DOCUMENT_STATUS_CANCELLED".
          example: DOCUMENT_STATUS_PAID
        supplier:
          type: string
          description: Supplier or service provider for the entry.
          maxLength: 50
          example: ABC Towing
        description:
          type: string
          description: Brief summary or description of the transaction.
          example: Service description
        quantity:
          type: number
          description: Quantity of items or services.
          example: 1
        price:
          type: number
          description: Unit price of the item or service.
          example: 100
        net_value:
          type: number
          description: Net value before tax.
          example: 100
        tax_rate:
          type: number
          minimum: 0
          maximum: 1
          description: Tax rate for the transaction (e.g., 0.2 for 20%).
          example: 0.15
        total_value:
          type: number
          description: Total value including tax.
          example: 115
        discount:
          type: number
          description: Discount applied to the insurance entry.
          example: 5
        registration:
          $ref: '#/components/schemas/registration'
        general_ledger_code:
          type: integer
          example: 12345
          description: Code used for categorizing this transaction in the general ledger.
        insurance_date:
          $ref: '#/components/schemas/date'
          description: The date of the insurance transaction.
    mifleet-leasing-cost-response:
      type: object
      properties:
        id:
          type: integer
          example: 12345
          description: Unique identifier for each leasing cost entry, aiding in tracking and referencing.
        vehicle_deleted:
          type: boolean
          example: false
          description: Indicates whether the associated vehicle is deleted or not.
        document_number:
          type: string
          default: CONCEPT-XXXXXX
          description: Unique reference number for the transaction document.
          example: ACCIDENT-123456
        document_type:
          type: string
          default: DOCUMENT_TYPE_INVOICE
          description: The document type. Valid values are "DOCUMENT_TYPE_INVOICE", "DOCUMENT_TYPE_CREDIT_NOTE", "DOCUMENT_TYPE_DEBIT_NOTE", or "DOCUMENT_TYPE_RECEIPT".
          example: DOCUMENT_TYPE_INVOICE
        document_status:
          type: string
          default: DOCUMENT_STATUS_PAID
          description: The document status. Valid values are "DOCUMENT_STATUS_PENDING", "DOCUMENT_STATUS_VALIDATED", "DOCUMENT_STATUS_OVERDUE_PAYMENT", "DOCUMENT_STATUS_PAID", or "DOCUMENT_STATUS_CANCELLED".
          example: DOCUMENT_STATUS_PAID
        supplier:
          type: string
          description: Supplier or service provider for the entry.
          maxLength: 50
          example: ABC Towing
        description:
          type: string
          description: Brief summary or description of the transaction.
          example: Service description
        quantity:
          type: number
          description: Quantity of items or services.
          example: 1
        price:
          type: number
          description: Unit price of the item or service.
          example: 100
        net_value:
          type: number
          description: Net value before tax.
          example: 100
        tax_rate:
          type: number
          minimum: 0
          maximum: 1
          description: Tax rate for the transaction (e.g., 0.2 for 20%).
          example: 0.15
        total_value:
          type: number
          description: Total value including tax.
          example: 115
        discount:
          type: number
          description: Discount applied to the insurance entry.
          example: 5
        registration:
          $ref: '#/components/schemas/registration'
        general_ledger_code:
          type: integer
          example: 12345
          description: Code used for categorizing this transaction in the general ledger.
        leasing_cost_date:
          $ref: '#/components/schemas/date'
          description: The date of the leasing cost transaction.
        leasing_cost_type:
          type: string
          example: Trailer Lease
          description: The type of leasing cost incurred.
    mifleet-oil-response:
      type: object
      properties:
        id:
          type: integer
          example: 12345
          description: Unique identifier for the oil entry.
        document_number:
          type: string
          default: CONCEPT-XXXXXX
          description: Unique reference number for the transaction document.
          example: ACCIDENT-123456
        document_type:
          type: string
          default: DOCUMENT_TYPE_INVOICE
          description: The document type. Valid values are "DOCUMENT_TYPE_INVOICE", "DOCUMENT_TYPE_CREDIT_NOTE", "DOCUMENT_TYPE_DEBIT_NOTE", or "DOCUMENT_TYPE_RECEIPT".
          example: DOCUMENT_TYPE_INVOICE
        document_status:
          type: string
          default: DOCUMENT_STATUS_PAID
          description: The document status. Valid values are "DOCUMENT_STATUS_PENDING", "DOCUMENT_STATUS_VALIDATED", "DOCUMENT_STATUS_OVERDUE_PAYMENT", "DOCUMENT_STATUS_PAID", or "DOCUMENT_STATUS_CANCELLED".
          example: DOCUMENT_STATUS_PAID
        supplier:
          type: string
          description: Supplier or service provider for the entry.
          maxLength: 50
          example: ABC Towing
        description:
          type: string
          description: Brief summary or description of the transaction.
          example: Service description
        quantity:
          type: number
          description: Quantity of items or services.
          example: 1
        price:
          type: number
          description: Unit price of the item or service.
          example: 100
        net_value:
          type: number
          description: Net value before tax.
          example: 100
        tax_rate:
          type: number
          minimum: 0
          maximum: 1
          description: Tax rate for the transaction (e.g., 0.2 for 20%).
          example: 0.15
        total_value:
          type: number
          description: Total value including tax.
          example: 115
        registration:
          $ref: '#/components/schemas/registration'
        vehicle_deleted:
          type: boolean
          example: false
          description: Indicates if the vehicle associated with this entry has been deleted.
        general_ledger_code:
          type:
            - number
            - 'null'
          example: 54321
          description: Unique code for categorizing the transaction in the general ledger.
        discount:
          type:
            - number
            - 'null'
          example: 0.35
          description: Discount amount applied to the transaction.
        fill_in_date:
          $ref: '#/components/schemas/date'
          description: Date and time of the oil fill-in transaction.
        oil_type:
          type: string
          example: Motor Oil
          description: The type of oil used in the transaction.
    mifleet-oil:
      type: object
      properties:
        fill_in_date:
          $ref: '#/components/schemas/date'
          description: Date and time of the oil fill-in transaction.
        oil_type:
          type: string
          example: Motor Oil
          description: The type of oil used in the transaction.
    mifleet-purchase-response:
      type: object
      properties:
        id:
          type: integer
          example: 12345
          description: Unique identifier for the purchase entry.
        document_number:
          type: string
          default: CONCEPT-XXXXXX
          description: Unique reference number for the transaction document.
          example: ACCIDENT-123456
        document_type:
          type: string
          default: DOCUMENT_TYPE_INVOICE
          description: The document type. Valid values are "DOCUMENT_TYPE_INVOICE", "DOCUMENT_TYPE_CREDIT_NOTE", "DOCUMENT_TYPE_DEBIT_NOTE", or "DOCUMENT_TYPE_RECEIPT".
          example: DOCUMENT_TYPE_INVOICE
        document_status:
          type: string
          default: DOCUMENT_STATUS_PAID
          description: The document status. Valid values are "DOCUMENT_STATUS_PENDING", "DOCUMENT_STATUS_VALIDATED", "DOCUMENT_STATUS_OVERDUE_PAYMENT", "DOCUMENT_STATUS_PAID", or "DOCUMENT_STATUS_CANCELLED".
          example: DOCUMENT_STATUS_PAID
        supplier:
          type: string
          description: Supplier or service provider for the entry.
          maxLength: 50
          example: ABC Towing
        description:
          type: string
          description: Brief summary or description of the transaction.
          example: Service description
        quantity:
          type: number
          description: Quantity of items or services.
          example: 1
        price:
          type: number
          description: Unit price of the item or service.
          example: 100
        net_value:
          type: number
          description: Net value before tax.
          example: 100
        tax_rate:
          type: number
          minimum: 0
          maximum: 1
          description: Tax rate for the transaction (e.g., 0.2 for 20%).
          example: 0.15
        total_value:
          type: number
          description: Total value including tax.
          example: 115
        registration:
          $ref: '#/components/schemas/registration'
        vehicle_deleted:
          type: boolean
          example: false
          description: Indicates if the vehicle associated with the registration has been deleted.
        general_ledger_code:
          type:
            - number
            - 'null'
          example: 54321
          description: Unique code for categorizing the transaction in the general ledger.
        discount:
          type:
            - number
            - 'null'
          example: 0.35
          description: Discount amount applied to the transaction.
        registration_date:
          $ref: '#/components/schemas/date'
          description: Date and time of the purchase registration.
        odometer_at_purchase:
          type: integer
          example: 15000
          description: The odometer value of the vehicle at the time of purchase.
        accessories_price:
          type: number
          example: 2500.75
          description: The value of accessories or add-ons as part of the transaction.
        administration_tax:
          type: number
          example: 150
          description: The value of administration tax as part of the transaction.
        registration_tax:
          type: number
          example: 300
          description: The value of registration tax as part of the transaction.
        depreciation_tax:
          type: number
          example: 200
          description: The value of depreciation tax as part of the transaction.
        residual_value:
          type: number
          example: 5000
          description: The value of residual value of the transaction.
        estimated_lifetime:
          type: integer
          example: 120
          description: The estimated lifetime/term of the transaction.
    mifleet-purchase:
      type: object
      properties:
        registration_date:
          $ref: '#/components/schemas/date'
          description: Date and time of the purchase registration.
        odometer_at_purchase:
          type: integer
          example: 15000
          description: The odometer value of the vehicle at the time of purchase.
        accessories_price:
          type: number
          example: 2500.75
          description: The value of accessories or add-ons as part of the transaction.
        administration_tax:
          type: number
          example: 150
          description: The value of administration tax as part of the transaction.
        registration_tax:
          type: number
          example: 300
          description: The value of registration tax as part of the transaction.
        depreciation_tax:
          type: number
          example: 200
          description: The value of depreciation tax as part of the transaction.
        residual_value:
          type: number
          example: 5000
          description: The value of residual value of the transaction.
        estimated_lifetime:
          type: integer
          example: 120
          description: The estimated lifetime/term of the transaction.
    mifleet-rental-cost-response:
      type: object
      properties:
        id:
          type: integer
          example: 12345
          description: Unique identifier for the rental cost entry.
        document_number:
          type: string
          default: CONCEPT-XXXXXX
          description: Unique reference number for the transaction document.
          example: ACCIDENT-123456
        document_type:
          type: string
          default: DOCUMENT_TYPE_INVOICE
          description: The document type. Valid values are "DOCUMENT_TYPE_INVOICE", "DOCUMENT_TYPE_CREDIT_NOTE", "DOCUMENT_TYPE_DEBIT_NOTE", or "DOCUMENT_TYPE_RECEIPT".
          example: DOCUMENT_TYPE_INVOICE
        document_status:
          type: string
          default: DOCUMENT_STATUS_PAID
          description: The document status. Valid values are "DOCUMENT_STATUS_PENDING", "DOCUMENT_STATUS_VALIDATED", "DOCUMENT_STATUS_OVERDUE_PAYMENT", "DOCUMENT_STATUS_PAID", or "DOCUMENT_STATUS_CANCELLED".
          example: DOCUMENT_STATUS_PAID
        supplier:
          type: string
          description: Supplier or service provider for the entry.
          maxLength: 50
          example: ABC Towing
        description:
          type: string
          description: Brief summary or description of the transaction.
          example: Service description
        quantity:
          type: number
          description: Quantity of items or services.
          example: 1
        price:
          type: number
          description: Unit price of the item or service.
          example: 100
        net_value:
          type: number
          description: Net value before tax.
          example: 100
        tax_rate:
          type: number
          minimum: 0
          maximum: 1
          description: Tax rate for the transaction (e.g., 0.2 for 20%).
          example: 0.15
        total_value:
          type: number
          description: Total value including tax.
          example: 115
        registration:
          $ref: '#/components/schemas/registration'
        vehicle_deleted:
          type: boolean
          example: false
          description: Indicates if the vehicle associated with the registration has been deleted.
        general_ledger_code:
          type:
            - number
            - 'null'
          example: 54321
          description: Unique code for categorizing the transaction in the general ledger.
        discount:
          type:
            - number
            - 'null'
          example: 0.35
          description: Discount amount applied to the transaction.
        rental_cost_date:
          $ref: '#/components/schemas/date'
          description: Date and time of the rental cost transaction.
        rental_cost_type:
          type: string
          example: Short-term rental
          description: Type of rental cost (e.g., short-term rental, long-term rental).
    mifleet-rental-cost:
      type: object
      properties:
        rental_cost_date:
          $ref: '#/components/schemas/date'
          description: Date and time of the rental cost transaction.
        rental_cost_type:
          type: string
          example: Short-term rental
          description: Type of rental cost (e.g., short-term rental, long-term rental).
    mifleet-tax-response:
      type: object
      properties:
        id:
          type: integer
          example: 12345
          description: Unique identifier for the tax entry.
        document_number:
          type: string
          default: CONCEPT-XXXXXX
          description: Unique reference number for the transaction document.
          example: ACCIDENT-123456
        document_type:
          type: string
          default: DOCUMENT_TYPE_INVOICE
          description: The document type. Valid values are "DOCUMENT_TYPE_INVOICE", "DOCUMENT_TYPE_CREDIT_NOTE", "DOCUMENT_TYPE_DEBIT_NOTE", or "DOCUMENT_TYPE_RECEIPT".
          example: DOCUMENT_TYPE_INVOICE
        document_status:
          type: string
          default: DOCUMENT_STATUS_PAID
          description: The document status. Valid values are "DOCUMENT_STATUS_PENDING", "DOCUMENT_STATUS_VALIDATED", "DOCUMENT_STATUS_OVERDUE_PAYMENT", "DOCUMENT_STATUS_PAID", or "DOCUMENT_STATUS_CANCELLED".
          example: DOCUMENT_STATUS_PAID
        supplier:
          type: string
          description: Supplier or service provider for the entry.
          maxLength: 50
          example: ABC Towing
        description:
          type: string
          description: Brief summary or description of the transaction.
          example: Service description
        quantity:
          type: number
          description: Quantity of items or services.
          example: 1
        price:
          type: number
          description: Unit price of the item or service.
          example: 100
        net_value:
          type: number
          description: Net value before tax.
          example: 100
        tax_rate:
          type: number
          minimum: 0
          maximum: 1
          description: Tax rate for the transaction (e.g., 0.2 for 20%).
          example: 0.15
        total_value:
          type: number
          description: Total value including tax.
          example: 115
        registration:
          $ref: '#/components/schemas/registration'
        vehicle_deleted:
          type: boolean
          example: false
          description: Indicates if the vehicle associated with the entry has been deleted.
        general_ledger_code:
          type:
            - number
            - 'null'
          example: 54321
          description: Unique code for categorizing the transaction in the general ledger.
        discount:
          type:
            - number
            - 'null'
          example: 0.35
          description: Discount amount applied to the transaction.
        begin_date:
          $ref: '#/components/schemas/date'
          description: The start date of the tax transaction period.
        expiration_date:
          $ref: '#/components/schemas/date'
          description: The end date of the tax transaction period.
    mifleet-tax:
      type: object
      properties:
        begin_date:
          $ref: '#/components/schemas/date'
          description: The start date of the tax transaction period.
        expiration_date:
          $ref: '#/components/schemas/date'
          description: The end date of the tax transaction period.
    mifleet-tyre-response:
      type: object
      properties:
        id:
          type: integer
          example: 12345
          description: Unique identifier for the tyre entry.
        document_number:
          type: string
          default: CONCEPT-XXXXXX
          description: Unique reference number for the transaction document.
          example: ACCIDENT-123456
        document_type:
          type: string
          default: DOCUMENT_TYPE_INVOICE
          description: The document type. Valid values are "DOCUMENT_TYPE_INVOICE", "DOCUMENT_TYPE_CREDIT_NOTE", "DOCUMENT_TYPE_DEBIT_NOTE", or "DOCUMENT_TYPE_RECEIPT".
          example: DOCUMENT_TYPE_INVOICE
        document_status:
          type: string
          default: DOCUMENT_STATUS_PAID
          description: The document status. Valid values are "DOCUMENT_STATUS_PENDING", "DOCUMENT_STATUS_VALIDATED", "DOCUMENT_STATUS_OVERDUE_PAYMENT", "DOCUMENT_STATUS_PAID", or "DOCUMENT_STATUS_CANCELLED".
          example: DOCUMENT_STATUS_PAID
        supplier:
          type: string
          description: Supplier or service provider for the entry.
          maxLength: 50
          example: ABC Towing
        description:
          type: string
          description: Brief summary or description of the transaction.
          example: Service description
        quantity:
          type: number
          description: Quantity of items or services.
          example: 1
        price:
          type: number
          description: Unit price of the item or service.
          example: 100
        net_value:
          type: number
          description: Net value before tax.
          example: 100
        tax_rate:
          type: number
          minimum: 0
          maximum: 1
          description: Tax rate for the transaction (e.g., 0.2 for 20%).
          example: 0.15
        total_value:
          type: number
          description: Total value including tax.
          example: 115
        driver:
          type: string
          description: Driver associated with the entry.
          example: John Doe
        registration:
          $ref: '#/components/schemas/registration'
        vehicle_deleted:
          type: boolean
          example: false
          description: Indicates if the vehicle associated with the entry has been deleted.
        discount:
          type:
            - number
            - 'null'
          example: 0.35
          description: Discount amount applied to the transaction.
        general_ledger_code:
          type:
            - number
            - 'null'
          example: 54321
          description: Unique code for categorizing the transaction in the general ledger.
        tyre_date:
          $ref: '#/components/schemas/date'
          description: Date and time of the transaction.
        tyre_operation:
          type: string
          example: Tyre Rotation
          description: Operation performed in this transaction.
        odometer:
          type: integer
          example: 101001
          description: The vehicle odometer value at the time of the transaction.
        tyres:
          type: array
          description: An optional array of each tyre specifically impacted by this transaction.
          items:
            type: object
            properties:
              location:
                type: string
                example: Front-Left
                description: The location on the vehicle of this specific tyre.
              brand:
                type: string
                example: Bestyear
                description: The brand of the tyre.
              size:
                type: string
                example: 17 inch
                description: The size of the tyre, for instance 17 inch.
              code:
                type: string
                example: 255/55 R16 105V
                description: The tyre specification code, for instance 255/55 R16 105V.
    mifleet-vehicle-license-response:
      type: object
      properties:
        id:
          type: integer
          example: 78901
          description: Unique identifier for each transaction, aiding in tracking and referencing.
        document_number:
          type: string
          default: CONCEPT-XXXXXX
          description: Unique reference number for the transaction document.
          example: ACCIDENT-123456
        document_type:
          type: string
          default: DOCUMENT_TYPE_INVOICE
          description: The document type. Valid values are "DOCUMENT_TYPE_INVOICE", "DOCUMENT_TYPE_CREDIT_NOTE", "DOCUMENT_TYPE_DEBIT_NOTE", or "DOCUMENT_TYPE_RECEIPT".
          example: DOCUMENT_TYPE_INVOICE
        document_status:
          type: string
          default: DOCUMENT_STATUS_PAID
          description: The document status. Valid values are "DOCUMENT_STATUS_PENDING", "DOCUMENT_STATUS_VALIDATED", "DOCUMENT_STATUS_OVERDUE_PAYMENT", "DOCUMENT_STATUS_PAID", or "DOCUMENT_STATUS_CANCELLED".
          example: DOCUMENT_STATUS_PAID
        supplier:
          type: string
          description: Supplier or service provider for the entry.
          maxLength: 50
          example: ABC Towing
        description:
          type: string
          description: Brief summary or description of the transaction.
          example: Service description
        quantity:
          type: number
          description: Quantity of items or services.
          example: 1
        price:
          type: number
          description: Unit price of the item or service.
          example: 100
        net_value:
          type: number
          description: Net value before tax.
          example: 100
        tax_rate:
          type: number
          minimum: 0
          maximum: 1
          description: Tax rate for the transaction (e.g., 0.2 for 20%).
          example: 0.15
        total_value:
          type: number
          description: Total value including tax.
          example: 115
        registration:
          $ref: '#/components/schemas/registration'
        vehicle_deleted:
          type:
            - boolean
            - 'null'
          example: true
          description: Indicates whether the associated vehicle is deleted or not
        discount:
          type:
            - number
            - 'null'
          example: 0.35
          description: Discount amount applied to the transaction.
        general_ledger_code:
          type:
            - integer
            - 'null'
          example: 54321
          description: Code used for categorizing this transaction in the general ledger.
        vehicle_license_type:
          type: string
          example: Trailer License
          description: The type of license for this transaction.
          maxLength: 50
        begin_odometer:
          type:
            - integer
            - 'null'
          example: 100000
          description: The start odometer of the license period.
        end_odometer:
          type:
            - integer
            - 'null'
          example: 120000
          description: The end odometer of the license period.
        begin_date:
          $ref: '#/components/schemas/date'
          description: The start date of the license period.
        expiration_date:
          $ref: '#/components/schemas/date'
          description: The end date of the license period.
    date-only:
      type: string
      description: Date only, without time
      example: '2023-01-01'
    vehicle-event-base:
      type: object
      properties:
        event_id:
          type: integer
          description: The event id
          example: 123456
        vehicle_id:
          $ref: '#/components/schemas/vehicle-id'
        registration:
          $ref: '#/components/schemas/registration'
        chassis_number:
          $ref: '#/components/schemas/chassis-number'
        terminal_event_type_id:
          type: integer
          description: The event type id
          example: 2
        event_description:
          type: string
          description: The event description
          example: IGNITION_ON
          enum:
            - ACTION_DETECTION
            - ADC_0_DOWN
            - ADC_0_UP
            - ADC_1_DOWN
            - ADC_1_UP
            - ADC_2_DOWN
            - ADC_2_UP
            - BATT_LOW
            - BUTTON_BLUE
            - BUTTON_GREEN
            - BUTTON_RED
            - CAMERA_BUTTON
            - CAMERA_COVERED
            - CAMERA_STATUS
            - CHARGE_ENDS
            - CHARGE_STARTS
            - D_BIT1
            - D_BIT2
            - D_BIT3
            - D_BIT4
            - D_BIT5
            - D_BIT6
            - D_BIT7
            - D_BIT8
            - D_BYTE1
            - D_BYTE2
            - D_BYTE3
            - D_BYTE4
            - DISTRACTION_DETECTED
            - DOOR_1_CLOSE
            - DOOR_1_OPEN
            - DOOR_2_CLOSE
            - DOOR_2_OPEN
            - DOOR_3_CLOSE
            - DOOR_3_OPEN
            - DOOR_4_CLOSE
            - DOOR_4_OPEN
            - EYE_CLOSED_DETECTED
            - FACEMASK
            - FACE_RECOGNITION
            - FARE_ENDS
            - FARE_STARTS
            - FATIGUE_DETECTED
            - FORWARD_COLLISION_WARNING
            - GEAR_CHANGE
            - GPS_LOCK
            - GPS_LOST
            - HANDBRAKE_OFF
            - HANDBRAKE_ON
            - HARSH_ACCELERATION
            - HARSH_BRAKING
            - HARSH_CORNERING
            - HAZARD_OFF
            - HAZARD_ON
            - HEADWAY_MONITORING_WARNING
            - IDLING_CONTINUE
            - IDLING_END
            - IDLING_START
            - IGNITION_OFF
            - IGNITION_ON
            - INDICATOR_LEFT_OFF
            - INDICATOR_LEFT_ON
            - INDICATOR_RIGHT_OFF
            - INDICATOR_RIGHT_ON
            - LANE_DEPARTURE_WARNING
            - LICENSE_PLATE_RECOGNITION
            - LIGHTS_OFF
            - LIGHTS_ON
            - LINE_CROSS
            - LIVE_CLIP
            - MOBILE_EYE_DELTA
            - MOTION_END
            - MOTION_START
            - MULTI_OBJECT
            - NO_SEATBELT_DETECTED
            - OVERREV_END
            - OVERREV_START
            - PANIC_EVENT
            - PASSENGER_DETECTED
            - PEDESTRIAN_COLLISION_WARNING
            - PERIODIC_EVENT
            - PHONE_DETECTED
            - POWER_OFF
            - POWER_ON
            - REVERSE_OFF
            - REVERSE_ON
            - SAFETY_HELMET_DETECTION
            - SEATBELT_DRIVER_OFF
            - SEATBELT_DRIVER_ON
            - SEATBELT_PASSENGER_OFF
            - SEATBELT_PASSENGER_ON
            - SHOCK
            - SHORT_DISTANCE_WARNING
            - SMOKING_DETECTED
            - SOCIAL_DISTANCING
            - SPEEDING_END
            - SPEEDING_START
            - TEMPERATURE_1
            - TEMPERATURE_2
            - TEMPERATURE_3
            - TEMPERATURE_4
            - URBAN_FORWARD_COLLISION_WARNING
            - VEHICLE_LOCKED
            - VEHICLE_UNLOCKED
            - YAWNING_DETECTED
            - PAN_UP
            - PAN_DOWN
            - J1939 DTC Error
        longitude:
          type:
            - number
            - 'null'
          description: The longitude of the event
          example: 103.889653
        latitude:
          type:
            - number
            - 'null'
          description: The latitude of the event
          example: 1.320227
        linear_g:
          type:
            - number
            - 'null'
          description: The linear G force of the event
          example: 0
        lateral_g:
          type:
            - number
            - 'null'
          description: The lateral G force of the event
          example: 0
        altitude:
          type:
            - integer
            - 'null'
          description: The vehicle's altitude, in meters
          example: 152
        odometer:
          type:
            - integer
            - 'null'
          description: The vehicle's odometer, in meters.
          example: 1000
        clock:
          type:
            - integer
            - 'null'
          description: The vehicle's clock reading, in minutes. The clock value is the total time of engine ON since the Cartrack tracker was first installed.
          example: 100500
        bearing:
          type:
            - integer
            - 'null'
          description: The vehicle's bearing (degree 0-360)
          example: 100
        ignition:
          type: boolean
          description: The ignition status
          example: true
        speed:
          type:
            - integer
            - 'null'
          description: The speed of the vehicle's in km/h
          example: 60
        road_speed:
          type:
            - integer
            - 'null'
          description: The speed limit of the road where the vehicle is, in km/h
          example: 70
        rpm:
          type:
            - integer
            - 'null'
          description: The vehicle's revolution per minute
          example: 764
        road_speeding:
          type:
            - boolean
            - 'null'
          description: The state if the vehicle's speed exceeded the road speed, in km/h
          example: true
        temp1:
          type:
            - number
            - 'null'
          description: The vehicle's temperature sensor 1
          example: 0
        temp2:
          type:
            - number
            - 'null'
          description: The vehicle's temperature sensor 2
          example: 0
        temp3:
          type:
            - number
            - 'null'
          description: The vehicle's temperature sensor 3
          example: 0
        temp4:
          type:
            - number
            - 'null'
          description: The vehicle's temperature sensor 4
          example: 0
        analog_0:
          type:
            - integer
            - 'null'
          description: The vehicle's analog-to-digital converter signal (channel 0)
          example: 0
        analog_1:
          type:
            - integer
            - 'null'
          description: The vehicle's analog-to-digital converter signal (channel 1)
          example: 0
        analog_2:
          type:
            - integer
            - 'null'
          description: The vehicle's analog-to-digital converter signal (channel 2)
          example: 0
        adc0:
          type:
            - number
            - 'null'
          description: The vehicle's analog-to-digital converter signal (channel 0) expressed in voltage
          example: 0
        adc1:
          type:
            - number
            - 'null'
          description: The vehicle's analog-to-digital converter signal (channel 1) expressed in voltage
          example: 0
        adc2:
          type:
            - number
            - 'null'
          description: The vehicle's analog-to-digital converter signal (channel 2) expressed in voltage
          example: 0
        position_description_id:
          type: integer
          description: The position description id
          example: 123456789
        position_description:
          type:
            - string
            - 'null'
          description: The position description of where the vehicle is
          example: Tanjong Pagar, Singapore
        input_state:
          type:
            - integer
            - 'null'
          description: The vehicle's first input state. A summation of can bus bit event in decimal place
          example: 1601
        input_state2:
          type:
            - integer
            - 'null'
          description: The vehicle's second input state. A summation of can bus bit event in decimal place
          example: -2147483648
        input_state3:
          type:
            - integer
            - 'null'
          description: The vehicle's third input state. A summation of can bus bit event in decimal place
          example: -1
        output_state:
          type:
            - number
            - 'null'
          description: The vehicle's output state value
          example: 0
        vext:
          type: number
          description: The vehicle's external battery voltage
          example: 4.04
        vgsm:
          type: number
          description: The vgsm represents the voltage of the Cartrack tracker's internal backup battery. If the tracker does not have a backup battery connected, it will return 0 (0V).
          example: 4.13
        dynamic1:
          type:
            - integer
            - 'null'
          description: The vehicle's first dynamic value. A range of values that can be set from the can bus data, without a placeholder
          example: 1
        dynamic2:
          type:
            - integer
            - 'null'
          description: The vehicle's second dynamic value. A range of values that can be set from the can bus data, without a placeholder
        dynamic3:
          type:
            - integer
            - 'null'
          description: The vehicle's third dynamic value. A range of values that can be set from the can bus data, without a placeholder
        dynamic4:
          type:
            - integer
            - 'null'
          description: The vehicle's fourth dynamic value. A range of values that can be set from the can bus data, without a placeholder
        battery_percentage_left:
          type:
            - integer
            - 'null'
          description: The vehicle's battery percentage left. A value in percentage for electric vehicles
          example: 100
        event_ts:
          $ref: '#/components/schemas/timestamp'
          description: The event date and time
          example: '2022-01-28 16:48:03+02'
        received_ts:
          $ref: '#/components/schemas/timestamp'
          description: The received date and time
          example: '2022-01-28 16:48:03+02'
        z_accel:
          type:
            - number
            - 'null'
          description: 'Z-Axis: This axis represents depth or forward/backward movements, corresponding to forward and backward or inward and outward movements.'
          example: 0.09
        y_accel:
          type:
            - number
            - 'null'
          description: 'Y-Axis: This axis represents vertical movements, corresponding to up and down directions.'
          example: 0.02
        x_accel:
          type:
            - number
            - 'null'
          description: 'X-Axis: This axis represents horizontal movements, corresponding to left and right directions.'
          example: 0.02
        gps_fix_type:
          type:
            - integer
            - 'null'
          description: 'GPS fix type: <ul> <li>0 indicates no satellite fix.</li> <li>2 indicates an insufficient number of satellites.</li> <li>3 indicates good satellite coverage.</li> </ul>'
          example: 4.04
        unit_temp:
          type:
            - number
            - 'null'
          description: The vehicle's unit temperature
          example: 36.5
        water_temp:
          type:
            - number
            - 'null'
          description: The vehicle's water temperature
          example: 90
        oil_temp:
          type:
            - number
            - 'null'
          description: The vehicle's oil temperature
          example: 85
        oil_pressure:
          type:
            - number
            - 'null'
          description: The vehicle's oil pressure
          example: 30
        terminal_id:
          $ref: '#/components/schemas/terminal-id'
        user_id:
          $ref: '#/components/schemas/id'
          description: The user ID
          example: 111101
        driver_id:
          oneOf:
            - $ref: '#/components/schemas/uuid'
            - type: 'null'
          description: The driver's uuid
          example: 98547217-d5b7-11ec-b1fb-a4bf016cd6b2
  parameters:
    page:
      name: page
      in: query
      required: false
      description: The current page
      schema:
        $ref: '#/components/schemas/page'
    limit:
      name: limit
      in: query
      required: false
      description: The number of items to display per page
      schema:
        $ref: '#/components/schemas/limit'
    id-uuid:
      name: filter[id]
      in: query
      required: false
      description: Optional filter to retrieve by identification number.
      schema:
        $ref: '#/components/schemas/uuid'
    name:
      name: filter[name]
      in: query
      required: false
      description: Optional filter to retrieve by name.
      schema:
        type: string
        example: This is an API alert for Gofence 0724
    date_from:
      name: filter[date_from]
      in: query
      required: false
      description: 'Start date and time for filtering breakdown entries. Only entries recorded on or after this date will be included. Format: YYYY-MM-DD HH:MM:SS.'
      schema:
        $ref: '#/components/schemas/date'
    date_to:
      name: filter[date_to]
      in: query
      required: false
      description: 'End date and time for filtering breakdown entries. Only entries recorded on or before this date will be included. Format: YYYY-MM-DD HH:MM:SS.'
      schema:
        $ref: '#/components/schemas/date'
    registration:
      name: filter[registration]
      in: query
      required: false
      description: Filter by vehicle registration.
      schema:
        $ref: '#/components/schemas/registration'
    contact_type:
      name: filter[contact_type]
      in: query
      description: Filter by contact type
      required: false
      schema:
        type: string
        enum:
          - E-Mail Message
          - Short Message Service
          - RSS Feed
        example: E-Mail Message
    alert_type:
      name: filter[alert_type]
      in: query
      description: Filter alert trigger description
      required: false
      schema:
        type: string
        example: IGNITION_ON_OFF
    status:
      name: filter[status]
      in: query
      description: Filter by alert status
      required: false
      schema:
        type: string
        example: Email sent
    notification_contact:
      name: filter[notification_contact]
      in: query
      description: Filter alert by notification contact
      required: false
      schema:
        type: string
        example: mark.steven@example.com
    vehicle_id:
      name: filter[vehicle_id]
      in: query
      required: false
      description: Optional filter to retrieve by vehicle ID.
      schema:
        type: integer
        description: Filter by vehicle ID
        example: 12345
    company_name:
      name: filter[company_name]
      in: query
      required: false
      description: Filter by company name, case insensitive, can be partial match
      schema:
        type: string
        example: Toyota
    chassis_number:
      name: filter[chassis_number]
      in: query
      required: false
      description: Filter by chassis number, case insensitive, can be partial match
      schema:
        $ref: '#/components/schemas/chassis-number'
    is_active:
      name: filter[is_active]
      in: query
      required: false
      description: Filter by status. True for active, false for inactive.
      schema:
        type: boolean
        example: true
    start_timestamp:
      name: start_timestamp
      in: query
      required: true
      description: Start date and time to retrieve events from.
      schema:
        $ref: '#/components/schemas/date'
        example: '2022-01-01 00:00:00'
    end_timestamp:
      name: end_timestamp
      in: query
      required: true
      description: End date and time to retrieve events up to. The lookup period has a <strong>maximum of 31 days</strong>.
      schema:
        $ref: '#/components/schemas/date'
        example: '2022-01-01 23:59:59'
    job_id:
      name: filter[job_id]
      in: query
      required: false
      description: Optional filter to retrieve jobs by their unique ID.
      schema:
        $ref: '#/components/schemas/job-id'
    order_id:
      name: filter[order_id]
      in: query
      required: false
      description: Optional filter to retrieve jobs by associated order ID.
      schema:
        $ref: '#/components/schemas/order-id'
    schedule_type_id:
      name: filter[schedule_type_id]
      in: query
      required: false
      description: Optional filter to retrieve jobs based on schedule type (1 = ASAP, 2 = Scheduled, 3 = Unscheduled).
      schema:
        type: integer
        description: Filter by schedule type ID.
        example: 2
    job_status_id:
      name: filter[job_status_id]
      in: query
      required: false
      description: Optional filter to retrieve jobs by their status (2 = Assign Later, 3 = Rejected/Failed, 4 = Assigned, 5 = Completed).
      schema:
        type: integer
        enum:
          - 2
          - 3
          - 4
          - 5
        description: Filter by job status ID.
        example: 3
    driver_id:
      name: filter[driver_id]
      in: query
      required: false
      description: Filter by driver id (exact match).
      schema:
        type: string
        example: 02870802-xxxx-42ed-xxxx-c999df353f42
    first_name:
      name: filter[first_name]
      in: query
      required: false
      description: Filter by first name (partial match).
      schema:
        type: string
        example: Mark
    last_name:
      name: filter[last_name]
      in: query
      required: false
      description: Filter by last name (partial match).
      schema:
        type: string
        example: Steven
    email:
      name: filter[email]
      in: query
      required: false
      description: Filter by email (partial match).
      schema:
        type: string
        example: mark.steven@hotmail.com
    id_number:
      name: filter[id_number]
      in: query
      required: false
      description: Filter by ID number (partial match).
      schema:
        type: string
        example: '123456'
    phone_number:
      name: filter[phone_number]
      in: query
      required: false
      description: Filter by phone number (partial match).
      schema:
        type: string
        example: '08001234'
    gender:
      name: filter[gender]
      in: query
      required: false
      description: Filter by gender (exact match).
      schema:
        type: string
        enum:
          - Male
          - Female
        example: Male
    license_number:
      name: filter[license_number]
      in: query
      required: false
      description: Filter by license number (partial match).
      schema:
        type: string
        example: ABC123
    license_issued_country:
      name: filter[license_issued_country]
      in: query
      required: false
      description: Filter license by the issuing country (exact match).
      schema:
        type: string
        example: SG
    license_driver_restrictions:
      name: filter[license_driver_restrictions]
      in: query
      required: false
      description: Filter by driver restriction (partial match).
      schema:
        type: string
        example: Weekdays only
    license_points:
      name: filter[license_points]
      in: query
      required: false
      description: Filter by license points (exact match).
      schema:
        type: integer
        example: 10
    license_first_issue_date:
      name: filter[license_first_issue_date]
      in: query
      required: false
      description: Filter by license first issue date (exact match).
      schema:
        type: string
        format: date
        example: '2022-01-12'
    license_valid_start:
      name: filter[license_valid_start]
      in: query
      required: false
      description: Filter by license start date (exact match).
      schema:
        type: string
        example: '2022-01-13'
    license_valid_end:
      name: filter[license_valid_end]
      in: query
      required: false
      description: Filter license end date (exact match).
      schema:
        type: string
        example: '2035-01-01'
    driver_status:
      name: filter[status]
      in: query
      required: false
      description: Filter by driver status (exact match).
      schema:
        type: string
        enum:
          - Active
          - Inactive
        example: Active
    employee_number:
      name: filter[employee_number]
      in: query
      required: false
      description: Filter by employee number (exact match).
      schema:
        type: string
        example: '123456'
    active_from:
      name: filter[active_from]
      in: query
      required: false
      description: Filter by driver active start date. Must be in the format of YYYY-MM-DD HH:MM:SS
      schema:
        $ref: '#/components/schemas/date'
        example: '2025-07-21 10:31:30'
    active_to:
      name: filter[active_to]
      in: query
      required: false
      description: Filter by driver active end date. Must be in the format of YYYY-MM-DD HH:MM:SS
      schema:
        $ref: '#/components/schemas/date'
        example: '2025-07-21 10:31:30'
    filter_group_id:
      name: filter[group_id]
      in: query
      required: false
      description: The geofence group ID
      schema:
        type: integer
      example: 1010
    filter_geofence_id:
      name: filter[geofence_id]
      in: query
      required: false
      description: Filter groups that contains a geofence ID, an exact match
      schema:
        $ref: '#/components/schemas/uuid'
    filter_group_name:
      name: filter[name]
      in: query
      description: Filter by group name, case insensitive, can be partial match
      required: false
      schema:
        type: string
      example: Office building geofences
    filter_subuser_id:
      name: filter[subuser_id]
      in: query
      description: Filter by sub-user ID
      required: false
      schema:
        $ref: '#/components/schemas/uuid'
    id-int:
      name: filter[id]
      in: query
      required: false
      description: Optional filter to retrieve by identification number.
      schema:
        type: integer
        description: Filter by a specific cleaning entry ID.
        example: 67890
    filter_group_description:
      name: filter[description]
      in: query
      description: Filter by group description, case insensitive, can be partial match
      required: false
      schema:
        type: string
      example: All active geofences
    page_without_validation:
      name: page
      in: query
      required: false
      description: The current page
      schema:
        type: integer
        description: Page number for pagination.
        example: 1
        default: 1
    limit_without_validation:
      name: limit
      in: query
      required: false
      description: The number of items to display per page
      schema:
        type: integer
        description: Number of items per page
        example: 15
        default: 10
    vehicle_filters:
      name: filter[vehicle_id]
      in: query
      description: Filter by vehicle ID
      required: false
      schema:
        type: integer
      example: 12345
    registration_filter:
      name: filter[registration]
      in: query
      description: Filter vehicle registration, case insensitive, can be partial match
      required: false
      schema:
        type: string
      example: GRG123
    manufacturer_filter:
      name: filter[manufacturer]
      in: query
      description: Filter by vehicle make, case insensitive, can be partial match
      required: false
      schema:
        type: string
      example: Toyota
    model_year_filter:
      name: filter[model_year]
      in: query
      description: Filter vehicle model year
      required: false
      schema:
        type: integer
        minimum: 1925
        maximum: 2026
      example: 2025
    colour_filter:
      name: filter[colour]
      in: query
      description: Filter by vehicle colour, case insensitive, can be partial match
      required: false
      schema:
        type: string
      example: red
    chassis_number_filter:
      name: filter[chassis_number]
      in: query
      description: Filter by chassis number, case insensitive, can be partial match
      required: false
      schema:
        type: string
      example: RGJ123
    date_filter:
      name: filter[date]
      in: query
      description: This will filter results for the given date
      required: false
      schema:
        $ref: '#/components/schemas/date-only'
      example: '2022-01-01'
    start_timestamp_filter:
      name: start_timestamp
      in: query
      description: Returns data within the specified time range
      required: true
      schema:
        type: string
        format: date-time
      example: '2022-01-01 00:00:00'
    end_timestamp_filter:
      name: end_timestamp
      in: query
      description: Returns data within the specified time range
      required: true
      schema:
        type: string
        format: date-time
      example: '2022-01-01 23:59:59'
    update_ts_from:
      name: filter[update_ts_from]
      in: query
      description: The date filter in range to get audit logs. The date format is "YYYY-MM-DD H:i:s".
      required: false
      schema:
        $ref: '#/components/schemas/date'
      example: '2022-05-05 00:00:00'
    update_ts_to:
      name: filter[update_ts_to]
      in: query
      description: The latest date to retrieve audit logs. The date format is "YYYY-MM-DD H:i:s".
      required: false
      schema:
        $ref: '#/components/schemas/date'
      example: '2022-05-05 23:59:59'
    start_date:
      name: start_date
      in: query
      description: The start date to filter records. The date format is "YYYY-MM-DD HH:mm:ss".
      required: false
      schema:
        $ref: '#/components/schemas/date'
      example: '2022-05-01 00:00:00'
    end_date:
      name: end_date
      in: query
      description: The end date to filter records. The date format is "YYYY-MM-DD HH:mm:ss".
      required: false
      schema:
        $ref: '#/components/schemas/date'
      example: '2022-05-01 23:59:59'
