{
  "info": {
    "description": "**[\u2192 View Changelog](/v1/changelog)** \u00b7 Release notes and version history.",
    "title": "Clue Public API",
    "version": "v1.9.0"
  },
  "components": {
    "securitySchemes": {
      "BasicAuth": {
        "type": "http",
        "scheme": "basic",
        "description": "Basic Authentication using username and password"
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "description": "Error code"
          },
          "status": {
            "type": "string",
            "description": "Error name"
          },
          "message": {
            "type": "string",
            "description": "Error message"
          },
          "errors": {
            "type": "object",
            "description": "Errors",
            "additionalProperties": {}
          }
        }
      },
      "PaginationMetadata": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer"
          },
          "total_pages": {
            "type": "integer"
          },
          "first_page": {
            "type": "integer"
          },
          "last_page": {
            "type": "integer"
          },
          "page": {
            "type": "integer"
          },
          "previous_page": {
            "type": "integer"
          },
          "next_page": {
            "type": "integer"
          }
        }
      },
      "Asset": {
        "type": "object",
        "properties": {
          "@url": {
            "type": "string",
            "description": "URL to single asset endpoint"
          },
          "EquipmentID": {
            "type": "string",
            "description": "Equipment ID"
          },
          "MakeCode": {
            "type": "string",
            "description": "Manufacturer code"
          },
          "SerialNumber": {
            "type": "string",
            "description": "Serial number"
          },
          "AssetID": {
            "type": "string",
            "description": "Asset alias"
          },
          "Model": {
            "type": "string",
            "description": "Equipment model"
          }
        }
      },
      "UOMValue": {
        "type": "object",
        "properties": {
          "@uom": {
            "type": "string",
            "description": "Unit of measure"
          },
          "Value": {
            "description": "Value",
            "nullable": true
          }
        }
      },
      "FleetRecord": {
        "type": "object",
        "properties": {
          "Asset": {
            "$ref": "#/components/schemas/Asset"
          },
          "EquipmentID": {
            "type": "string",
            "description": "Equipment ID"
          },
          "Latitude": {
            "type": "number",
            "description": "Last known latitude",
            "nullable": true
          },
          "Longitude": {
            "type": "number",
            "description": "Last known longitude",
            "nullable": true
          },
          "LastLocationUTC": {
            "type": "string",
            "format": "date-time",
            "description": "Last location timestamp",
            "nullable": true
          },
          "Address": {
            "type": "string",
            "description": "Last known address",
            "nullable": true
          },
          "LastReportedUTC": {
            "type": "string",
            "format": "date-time",
            "description": "Last reported timestamp",
            "nullable": true
          },
          "FuelPercentRemaining": {
            "type": "number",
            "description": "Fuel percentage remaining",
            "nullable": true
          },
          "Mileage": {
            "description": "Mileage information",
            "allOf": [
              {
                "$ref": "#/components/schemas/UOMValue"
              }
            ]
          },
          "Speed": {
            "description": "Speed information",
            "allOf": [
              {
                "$ref": "#/components/schemas/UOMValue"
              }
            ]
          },
          "RuntimeHours": {
            "description": "Runtime hours",
            "allOf": [
              {
                "$ref": "#/components/schemas/UOMValue"
              }
            ]
          },
          "LifetimeFuelConsumed": {
            "description": "Lifetime fuel consumed",
            "allOf": [
              {
                "$ref": "#/components/schemas/UOMValue"
              }
            ]
          },
          "Altitude": {
            "description": "Altitude information",
            "allOf": [
              {
                "$ref": "#/components/schemas/UOMValue"
              }
            ]
          },
          "LastKnownStatus": {
            "type": "string",
            "description": "Last known status",
            "nullable": true
          }
        }
      },
      "FleetSummaryRecords": {
        "type": "object",
        "properties": {
          "FleetSummaryRecord": {
            "type": "array",
            "description": "List of fleet records",
            "items": {
              "$ref": "#/components/schemas/FleetRecord"
            }
          }
        }
      },
      "FleetSummary": {
        "type": "object",
        "properties": {
          "FleetSummaryRecords": {
            "$ref": "#/components/schemas/FleetSummaryRecords"
          },
          "IsLastPage": {
            "type": "boolean",
            "description": "Whether this is the last page"
          }
        }
      },
      "Navigation": {
        "type": "object",
        "properties": {
          "self": {
            "type": "string",
            "description": "Current page URL"
          },
          "prev": {
            "type": "string",
            "description": "Previous page URL",
            "nullable": true
          },
          "next": {
            "type": "string",
            "description": "Next page URL",
            "nullable": true
          },
          "last": {
            "type": "string",
            "description": "Last page URL"
          }
        }
      },
      "FleetPageResponse": {
        "type": "object",
        "properties": {
          "FleetSummary": {
            "$ref": "#/components/schemas/FleetSummary"
          },
          "nav": {
            "description": "Navigation links",
            "allOf": [
              {
                "$ref": "#/components/schemas/Navigation"
              }
            ]
          },
          "total_count": {
            "type": "integer",
            "description": "Total number of records"
          },
          "page_count": {
            "type": "integer",
            "description": "Number of records in this page"
          },
          "page_size": {
            "type": "integer",
            "description": "Page size"
          },
          "page_number": {
            "type": "integer",
            "description": "Current page number"
          }
        }
      },
      "FleetSummaryRecordsSingle": {
        "type": "object",
        "properties": {
          "FleetSummaryRecord": {
            "description": "Single fleet record object",
            "allOf": [
              {
                "$ref": "#/components/schemas/FleetRecord"
              }
            ]
          }
        }
      },
      "FleetSummarySingle": {
        "type": "object",
        "properties": {
          "FleetSummaryRecords": {
            "$ref": "#/components/schemas/FleetSummaryRecordsSingle"
          },
          "IsLastPage": {
            "type": "boolean",
            "description": "Whether this is the last page"
          }
        }
      },
      "FleetSingleResponse": {
        "type": "object",
        "properties": {
          "FleetSummary": {
            "$ref": "#/components/schemas/FleetSummarySingle"
          },
          "nav": {
            "description": "Navigation links",
            "anyOf": [
              {
                "$ref": "#/components/schemas/Navigation"
              },
              {
                "type": "object",
                "nullable": true
              }
            ]
          },
          "total_count": {
            "type": "integer",
            "description": "Total number of records",
            "nullable": true
          },
          "page_count": {
            "type": "integer",
            "description": "Number of records in this page",
            "nullable": true
          },
          "page_size": {
            "type": "integer",
            "description": "Page size",
            "nullable": true
          },
          "page_number": {
            "type": "integer",
            "description": "Current page number",
            "nullable": true
          }
        }
      },
      "AssetTag": {
        "type": "object",
        "properties": {
          "tagName": {
            "type": "string",
            "description": "Name of the tag"
          }
        }
      },
      "Asset1": {
        "type": "object",
        "properties": {
          "idEquipment": {
            "type": "integer",
            "description": "The id of the equipment record."
          },
          "name": {
            "type": "string",
            "description": "Equipment name."
          },
          "serialNumber": {
            "type": "string",
            "description": "Serial number of the equipment."
          },
          "make": {
            "type": "string",
            "description": "Manufacturer."
          },
          "model": {
            "type": "string",
            "description": "Model."
          },
          "year": {
            "type": "string",
            "description": "Year of manufacturing.",
            "nullable": true
          },
          "assetTypeCategory": {
            "type": "string",
            "description": "Asset type category, using Clue's classification.",
            "nullable": true
          },
          "assetType": {
            "type": "string",
            "description": "Asset type, using Clue's classification.",
            "nullable": true
          },
          "productClass": {
            "type": "string",
            "description": "Product class, customer specific.",
            "nullable": true
          },
          "createdUTC": {
            "type": "string",
            "format": "date-time",
            "description": "Date the record was created."
          },
          "lastUpdatedUTC": {
            "type": "string",
            "format": "date-time",
            "description": "Last update to equipment record."
          },
          "hourMeter": {
            "description": "Latest known engine hour meter.",
            "nullable": true
          },
          "hourMeterUTC": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of latest known engine hour meter.",
            "nullable": true
          },
          "odometer": {
            "description": "Latest known odometer reading.",
            "nullable": true
          },
          "odometerUTC": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of latest known odometer reading.",
            "nullable": true
          },
          "odometerUOM": {
            "type": "string",
            "description": "Units of measure for odometer.",
            "nullable": true
          },
          "fuelType": {
            "type": "string",
            "description": "Type of fuel.",
            "nullable": true
          },
          "fuelTankLevel": {
            "description": "Latest known fuel tank level.",
            "nullable": true
          },
          "equipmentNote": {
            "type": "string",
            "description": "Customizable notes about the equipment.",
            "nullable": true
          },
          "lastSeenLong": {
            "description": "Longitude of last known GPS location.",
            "nullable": true
          },
          "lastSeenLat": {
            "description": "Latitude of last known GPS location.",
            "nullable": true
          },
          "lastSeenUTC": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of last known GPS location.",
            "nullable": true
          },
          "linkedUser": {
            "type": "integer",
            "description": "The id of the user linked to this asset.",
            "nullable": true
          },
          "inspectionIssues": {
            "type": "integer",
            "description": "Number of open inspection issues.",
            "nullable": true
          },
          "workOrders": {
            "type": "integer",
            "description": "Number of currently open work orders."
          },
          "faultCodes": {
            "type": "integer",
            "description": "Number of open fault codes."
          },
          "connectivity": {
            "type": "string",
            "description": "Type of connectivity [Telematics, GPS Tracker, Not Connected]."
          },
          "suborganization": {
            "type": "string",
            "description": "Name of division/region.",
            "nullable": true
          },
          "department": {
            "type": "string",
            "description": "Name of organization department.",
            "nullable": true
          },
          "idProject": {
            "type": "integer",
            "description": "The id of the currently assigned project.",
            "nullable": true
          },
          "idProjectShop": {
            "type": "integer",
            "description": "The id of assigned project shop record.",
            "nullable": true
          },
          "ownership": {
            "type": "string",
            "description": "Ownership type e.g. Owned, Rented, Leased.",
            "nullable": true
          },
          "clueSubscription": {
            "type": "string",
            "description": "Status of Clue subscription (active, deactivated).",
            "nullable": true
          },
          "idEquipmentPrimary": {
            "type": "integer",
            "description": "The id of the primary equipment record for de-duplicated equipment.",
            "nullable": true
          },
          "operationalStatus": {
            "type": "string",
            "description": "Operational status of the equipment.",
            "nullable": true
          },
          "tags": {
            "type": "array",
            "description": "Asset filtering tags.",
            "items": {
              "$ref": "#/components/schemas/AssetTag"
            }
          }
        }
      },
      "AssetResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Success status"
          },
          "message": {
            "type": "string",
            "description": "The message of the API response"
          },
          "data": {
            "type": "array",
            "description": "List of assets",
            "items": {
              "$ref": "#/components/schemas/Asset1"
            }
          },
          "total": {
            "type": "integer",
            "description": "The total number of items"
          }
        }
      },
      "EquipmentProperty": {
        "type": "object",
        "properties": {
          "propertyId": {
            "type": "integer",
            "description": "Equipment property ID"
          },
          "field": {
            "type": "string",
            "description": "Property field identifier",
            "nullable": true
          },
          "units": {
            "type": "string",
            "description": "Property measuring units",
            "nullable": true
          },
          "equipmentPropertyKey": {
            "type": "string",
            "description": "Localized property key",
            "nullable": true
          },
          "equipmentPropertyValue": {
            "type": "string",
            "description": "Property value",
            "nullable": true
          },
          "updatedUTC": {
            "type": "string",
            "description": "Timestamp of last update to property",
            "nullable": true
          }
        }
      },
      "EquipmentPropertiesResponse": {
        "type": "object",
        "properties": {
          "idEquipment": {
            "type": "integer",
            "description": "The id of the equipment record"
          },
          "name": {
            "type": "string",
            "description": "Equipment name",
            "nullable": true
          },
          "equipmentProperties": {
            "type": "array",
            "description": "Array of equipment properties for this asset",
            "items": {
              "$ref": "#/components/schemas/EquipmentProperty"
            }
          }
        }
      },
      "PMResetHistory": {
        "type": "object",
        "properties": {
          "timeResetUTC": {
            "type": "string",
            "description": "UTC timestamp when PM was reset",
            "nullable": true
          },
          "intervalUsageAtReset": {
            "description": "Usage value at time of reset",
            "nullable": true
          },
          "cumulativeUsageAtReset": {
            "description": "Cumulative usage at time of reset",
            "nullable": true
          },
          "userReset": {
            "type": "integer",
            "description": "ID of user who performed the reset",
            "nullable": true
          }
        }
      },
      "PMItem": {
        "type": "object",
        "properties": {
          "pmItemName": {
            "type": "string",
            "description": "Name of PM item interval",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "Current status e.g. Good Standing, Upcoming, Overdue",
            "nullable": true
          },
          "intervalType": {
            "type": "string",
            "description": "Type of interval (ENGINE_HOUR, MILEAGE, CALENDAR, MULTI_INTERVAL_TYPE)",
            "nullable": true
          },
          "currentUsage": {
            "description": "Current usage level",
            "nullable": true
          },
          "serviceInterval": {
            "description": "Next interval value",
            "nullable": true
          },
          "pmPlan": {
            "type": "string",
            "description": "Name of the PM plan this item belongs to",
            "nullable": true
          },
          "pmResetHistory": {
            "type": "array",
            "description": "History of PM reset for this PM Item",
            "items": {
              "$ref": "#/components/schemas/PMResetHistory"
            }
          }
        }
      },
      "PMHistoryData": {
        "type": "object",
        "properties": {
          "idEquipment": {
            "type": "integer",
            "description": "The id of the equipment record (Equipment.id_equipment)"
          },
          "name": {
            "type": "string",
            "description": "Equipment name (Equipment.equipment_alias)",
            "nullable": true
          },
          "pmItems": {
            "type": "array",
            "description": "Array of PM items for this asset with nested reset history",
            "items": {
              "$ref": "#/components/schemas/PMItem"
            }
          }
        }
      },
      "PMHistoryResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Success status"
          },
          "message": {
            "type": "string",
            "description": "The message of the API response"
          },
          "data": {
            "description": "PM history data with equipment info, PM items, and reset history",
            "anyOf": [
              {
                "$ref": "#/components/schemas/PMHistoryData"
              },
              {
                "type": "object",
                "nullable": true
              }
            ]
          }
        }
      },
      "PMItemStatus": {
        "type": "object",
        "properties": {
          "pmItemName": {
            "type": "string",
            "description": "Name of PM item interval",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "Current status e.g. Good Standing, Upcoming, Overdue",
            "nullable": true
          },
          "intervalType": {
            "type": "string",
            "description": "Type of interval (ENGINE_HOUR, MILEAGE, CALENDAR, MULTI_INTERVAL_TYPE)",
            "nullable": true
          },
          "currentUsage": {
            "description": "Current usage level",
            "nullable": true
          },
          "serviceInterval": {
            "description": "Next interval value",
            "nullable": true
          },
          "pmPlan": {
            "type": "string",
            "description": "Name of the PM plan this item belongs to",
            "nullable": true
          }
        }
      },
      "PMStatusData": {
        "type": "object",
        "properties": {
          "idEquipment": {
            "type": "integer",
            "description": "The id of the equipment record (Equipment.id_equipment)"
          },
          "name": {
            "type": "string",
            "description": "Equipment name (Equipment.equipment_alias)",
            "nullable": true
          },
          "pmItems": {
            "type": "array",
            "description": "Array of PM items for an asset with current status",
            "items": {
              "$ref": "#/components/schemas/PMItemStatus"
            }
          }
        }
      },
      "AssetPMStatusResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Success status"
          },
          "message": {
            "type": "string",
            "description": "The message of the API response"
          },
          "data": {
            "type": "array",
            "description": "Assets with current PM status data",
            "items": {
              "$ref": "#/components/schemas/PMStatusData"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "description": "List of errors if any occurred",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "total": {
            "type": "integer",
            "description": "The total number of items (equipment count if group_by_asset is true. item count if group_by_asset is false)"
          }
        }
      },
      "FuelReport": {
        "type": "object",
        "properties": {
          "assetName": {
            "type": "string",
            "description": "Name of the asset"
          },
          "idUser": {
            "type": "integer",
            "description": "ID of the user reporting fuel"
          },
          "timestampUTC": {
            "type": "string",
            "format": "date-time",
            "description": "UTC timestamp when fuel was added"
          },
          "longitude": {
            "type": "number",
            "description": "Longitude coordinate (optional)",
            "nullable": true
          },
          "latitude": {
            "type": "number",
            "description": "Latitude coordinate (optional)",
            "nullable": true
          },
          "fuelFilled": {
            "type": "number",
            "description": "Amount of fuel filled"
          },
          "uom": {
            "type": "string",
            "description": "Unit of fuel measurement (e.g., gallons, liters)"
          },
          "fuelType": {
            "type": "string",
            "description": "Type of fuel (optional)",
            "nullable": true
          }
        },
        "required": [
          "assetName",
          "fuelFilled",
          "idUser",
          "timestampUTC",
          "uom"
        ]
      },
      "FuelReportRequest": {
        "type": "object",
        "properties": {
          "fuelReports": {
            "type": "array",
            "description": "Array of fuel reports",
            "items": {
              "$ref": "#/components/schemas/FuelReport"
            }
          }
        },
        "required": [
          "fuelReports"
        ]
      },
      "FuelReportResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Success status"
          },
          "message": {
            "type": "string",
            "description": "Response message"
          },
          "processed": {
            "type": "integer",
            "description": "Number of fuel reports processed"
          },
          "errors": {
            "type": "array",
            "description": "List of errors if any occurred",
            "items": {
              "type": "string"
            },
            "nullable": true
          }
        }
      },
      "AssetCreate": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "description": "Equipment name / alias (required, max 100 chars)"
          },
          "serialNumber": {
            "type": "string",
            "default": null,
            "maxLength": 200,
            "description": "Serial number of the equipment",
            "nullable": true
          },
          "make": {
            "type": "string",
            "default": null,
            "maxLength": 100,
            "description": "Manufacturer / OEM name",
            "nullable": true
          },
          "model": {
            "type": "string",
            "default": null,
            "maxLength": 100,
            "description": "Model name",
            "nullable": true
          },
          "year": {
            "type": "integer",
            "default": null,
            "description": "Year of manufacturing",
            "nullable": true
          },
          "equipmentStatus": {
            "type": "string",
            "default": "ACTIVE",
            "enum": [
              "ACTIVE",
              "DEACTIVATED"
            ],
            "description": "Equipment status (default: ACTIVE)"
          },
          "ownership": {
            "type": "string",
            "default": "OWNED",
            "enum": [
              "OWNED",
              "RENTED",
              "LEASED"
            ],
            "description": "Ownership type (default: OWNED)"
          },
          "fuelType": {
            "type": "string",
            "default": null,
            "enum": [
              "Gasoline",
              "GAS - On Highway",
              "GAS - Off Highway",
              "Diesel",
              "Diesel - On Highway",
              "Diesel - Off Highway",
              "Other",
              "PluginHybrid",
              "FlexFuel",
              "CompressedNaturalGas",
              "DIESEL & GAS OFF HIGHWAY",
              "ELECTRIC",
              "FUEL",
              "HYBRID",
              "LPG",
              "NOT FUELED",
              null
            ],
            "description": "Type of fuel",
            "nullable": true
          },
          "equipmentNote": {
            "type": "string",
            "default": null,
            "maxLength": 3000,
            "description": "Notes about the equipment (max 3000 chars)",
            "nullable": true
          },
          "productClass": {
            "type": "string",
            "default": null,
            "maxLength": 50,
            "description": "Product class code",
            "nullable": true
          }
        },
        "required": [
          "name"
        ]
      },
      "AssetCreateResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Success status"
          },
          "message": {
            "type": "string",
            "description": "Response message"
          },
          "data": {
            "type": "object",
            "description": "Created asset data",
            "additionalProperties": {}
          }
        }
      },
      "AssetUpdate": {
        "type": "object",
        "properties": {
          "lastSeenLat": {
            "type": "number",
            "default": null,
            "description": "Latitude of last known GPS location",
            "nullable": true
          },
          "lastSeenLong": {
            "type": "number",
            "default": null,
            "description": "Longitude of last known GPS location",
            "nullable": true
          },
          "equipmentStatus": {
            "type": "string",
            "default": null,
            "enum": [
              "ACTIVE",
              "DEACTIVATED",
              null
            ],
            "description": "Equipment status",
            "nullable": true
          },
          "equipmentNote": {
            "type": "string",
            "default": null,
            "maxLength": 3000,
            "description": "Notes about the equipment (max 3000 chars)",
            "nullable": true
          }
        }
      },
      "AssetUpdateResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Success status"
          },
          "message": {
            "type": "string",
            "description": "Response message"
          },
          "data": {
            "type": "object",
            "description": "Updated asset data",
            "additionalProperties": {},
            "nullable": true
          }
        }
      },
      "ClockEvents": {
        "type": "object",
        "properties": {
          "idClockEvent": {
            "type": "integer",
            "description": "The id of the clock event"
          },
          "startUTC": {
            "type": "string",
            "description": "Clock start timestamp",
            "nullable": true
          },
          "clockSeconds": {
            "type": "integer",
            "description": "Duration in seconds",
            "nullable": true
          },
          "lastClockEvent": {
            "type": "string",
            "description": "Last event (clock out, break, clock in)",
            "nullable": true
          },
          "lastClockEventUTC": {
            "type": "string",
            "description": "Timestamp of last clock event",
            "nullable": true
          }
        }
      },
      "Timecard": {
        "type": "object",
        "properties": {
          "idTimecard": {
            "type": "integer",
            "description": "The id of the timecard"
          },
          "idEquipment": {
            "type": "integer",
            "description": "The id of the equipment record",
            "nullable": true
          },
          "assetName": {
            "type": "string",
            "description": "Equipment name",
            "nullable": true
          },
          "idWorkOrder": {
            "type": "integer",
            "description": "The id of the work order",
            "nullable": true
          },
          "idWorkOrderTask": {
            "type": "integer",
            "description": "The id of the work order task",
            "nullable": true
          },
          "idUser": {
            "type": "integer",
            "description": "The id of the user",
            "nullable": true
          },
          "idProject": {
            "type": "integer",
            "description": "The id of the project",
            "nullable": true
          },
          "idProjectShop": {
            "type": "integer",
            "description": "The id of the project shop",
            "nullable": true
          },
          "timecardMinutes": {
            "type": "integer",
            "description": "Number of minutes in the time entry",
            "nullable": true
          },
          "createdUTC": {
            "type": "string",
            "description": "When timecard was entered",
            "nullable": true
          },
          "lastUpdatedUTC": {
            "type": "string",
            "description": "When timecard was last updated",
            "nullable": true
          },
          "timecardDate": {
            "type": "string",
            "description": "Calendar date of timecard (local time)",
            "nullable": true
          },
          "objectType": {
            "type": "string",
            "description": "Type of timecard (WO, PerDiem, Project)",
            "nullable": true
          },
          "typeCode": {
            "type": "string",
            "description": "Type code (regular time, double time)",
            "nullable": true
          },
          "payClass": {
            "type": "string",
            "description": "Pay class of the timecard (per-line class, else the user's primary pay class)",
            "nullable": true
          },
          "costCode": {
            "type": "string",
            "description": "Cost code of the timecard",
            "nullable": true
          },
          "projectPhaseCode": {
            "type": "string",
            "description": "Phase code of the timecard",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "Status (pending, approved, declined, clocked in)",
            "nullable": true
          },
          "approvedByIdUser": {
            "type": "integer",
            "description": "ID of user who approved",
            "nullable": true
          },
          "approvedUTC": {
            "type": "string",
            "description": "Timestamp of approval",
            "nullable": true
          },
          "declinedByIdUser": {
            "type": "integer",
            "description": "ID of user who declined",
            "nullable": true
          },
          "declinedUTC": {
            "type": "string",
            "description": "Timestamp of decline",
            "nullable": true
          },
          "declinedReason": {
            "type": "string",
            "description": "Reason for decline",
            "nullable": true
          },
          "isExported": {
            "type": "boolean",
            "description": "Export status (true = exported)",
            "nullable": true
          },
          "cost": {
            "type": "number",
            "description": "Labor cost of the timecard, as shown in the app",
            "nullable": true
          },
          "currencyCode": {
            "type": "string",
            "description": "Currency of timecard cost",
            "nullable": true
          },
          "notes": {
            "type": "string",
            "description": "Notes associated with the timecard",
            "nullable": true
          },
          "clockEvents": {
            "description": "Associated clock events",
            "anyOf": [
              {
                "$ref": "#/components/schemas/ClockEvents"
              },
              {
                "type": "object",
                "nullable": true
              }
            ]
          }
        }
      },
      "TimecardResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "message": {
            "type": "string",
            "description": "Message associated with the response"
          },
          "data": {
            "type": "array",
            "description": "List of timecard records",
            "items": {
              "$ref": "#/components/schemas/Timecard"
            },
            "nullable": true
          },
          "total": {
            "type": "integer",
            "description": "Total number of timecard records"
          }
        }
      },
      "UserSubOrganization": {
        "type": "object",
        "properties": {
          "idSuborganization": {
            "type": "integer",
            "description": "Sub-organization ID, the value POST /users takes"
          },
          "name": {
            "type": "string",
            "description": "Sub-organization name"
          }
        }
      },
      "User": {
        "type": "object",
        "properties": {
          "idUser": {
            "type": "integer",
            "description": "User ID"
          },
          "firstName": {
            "type": "string",
            "description": "First name"
          },
          "lastName": {
            "type": "string",
            "description": "Last name"
          },
          "phoneNumber": {
            "type": "string",
            "description": "Phone number"
          },
          "jobTitle": {
            "type": "string",
            "description": "Job title"
          },
          "permissionProfile": {
            "type": "string",
            "description": "Permission profile"
          },
          "userCode": {
            "type": "string",
            "description": "User code"
          },
          "userStatus": {
            "type": "string",
            "description": "User status"
          },
          "payClass": {
            "type": "string",
            "description": "Primary pay class (sent as `union` on POST /users)",
            "nullable": true
          },
          "createdUTC": {
            "type": "string",
            "description": "Created UTC"
          },
          "email": {
            "type": "string",
            "description": "Email"
          },
          "unionCode": {
            "type": "string",
            "description": "Union code"
          },
          "suborganizations": {
            "type": "array",
            "description": "Sub-organizations the user is assigned to (CLUE-63956)",
            "items": {
              "$ref": "#/components/schemas/UserSubOrganization"
            }
          },
          "tags": {
            "type": "array",
            "description": "Asset tags of the user. [\"ALL\"] = all assets (CLUE-63956)",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "UsersPageResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Success"
          },
          "message": {
            "type": "string",
            "description": "Message"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/User"
            },
            "nullable": true
          },
          "total": {
            "type": "integer",
            "description": "Total number of users"
          }
        }
      },
      "UserSync": {
        "type": "object",
        "properties": {
          "phoneNumber": {
            "type": "integer",
            "description": "User ID"
          },
          "userCode": {
            "type": "string",
            "description": "User code"
          },
          "firstName": {
            "type": "string",
            "description": "First name"
          },
          "lastName": {
            "type": "string",
            "description": "Job title"
          },
          "email": {
            "type": "string",
            "description": "Email"
          },
          "jobTitle": {
            "type": "string",
            "description": "Last name"
          },
          "roleName": {
            "type": "string",
            "description": "Role name. Defaults to standard-all-projects for a new user.",
            "nullable": true
          },
          "union": {
            "type": "string",
            "maxLength": 50,
            "description": "Pay class"
          },
          "userStatus": {
            "type": "string",
            "default": "ACTIVE",
            "description": "User status"
          },
          "idSuborganizations": {
            "type": "array",
            "description": "IDs of the sub-organizations the user is assigned to (Affiliated Organization). Omit or send null to keep the current value; [] removes all.",
            "items": {
              "type": "integer"
            },
            "nullable": true
          },
          "tags": {
            "type": "array",
            "description": "Asset tags that control which assets the user sees. [\"ALL\"] = all assets. Omit or send null to keep the current value; [] removes all.",
            "items": {
              "type": "string",
              "maxLength": 255
            },
            "nullable": true
          }
        },
        "required": [
          "email",
          "firstName",
          "phoneNumber"
        ]
      },
      "UserSyncResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Success"
          },
          "message": {
            "type": "string",
            "description": "Message"
          },
          "data": {
            "type": "string",
            "description": "Data summary",
            "nullable": true
          },
          "total": {
            "type": "integer",
            "description": "Total number of users synced"
          }
        }
      },
      "ProjectPhase": {
        "type": "object",
        "properties": {
          "phaseCode": {
            "type": "string",
            "description": "Code of phase",
            "nullable": true
          },
          "projectCode": {
            "type": "string",
            "description": "Code of project",
            "nullable": true
          },
          "phaseDescription": {
            "type": "string",
            "description": "Description of phase",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "Status (active or inactive) of phase",
            "nullable": true
          }
        }
      },
      "Project": {
        "type": "object",
        "properties": {
          "idProject": {
            "type": "integer",
            "description": "The id of the project"
          },
          "name": {
            "type": "string",
            "description": "Name of project"
          },
          "code": {
            "type": "string",
            "description": "Code of project",
            "nullable": true
          },
          "type": {
            "type": "string",
            "description": "Type of project (e.g., Project, JV, Shop, Yard)",
            "nullable": true
          },
          "class": {
            "type": "string",
            "description": "Class of project, user-defined",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "Status of project (active or closed)"
          },
          "description": {
            "type": "string",
            "description": "Description about project",
            "nullable": true
          },
          "createdUTC": {
            "type": "string",
            "description": "Timestamp when project was created",
            "format": "iso",
            "nullable": true
          },
          "lastUpdatedUTC": {
            "type": "string",
            "description": "Timestamp when project was last updated",
            "format": "iso",
            "nullable": true
          },
          "street": {
            "type": "string",
            "description": "Address information of project",
            "nullable": true
          },
          "city": {
            "type": "string",
            "description": "Address information of project",
            "nullable": true
          },
          "state": {
            "type": "string",
            "description": "Address information of project",
            "nullable": true
          },
          "zipCode": {
            "type": "string",
            "description": "Address information of project",
            "nullable": true
          },
          "country": {
            "type": "string",
            "description": "Address information of project",
            "nullable": true
          },
          "longitude": {
            "type": "number",
            "description": "Longitude of project center",
            "nullable": true
          },
          "latitude": {
            "type": "number",
            "description": "Latitude of project center",
            "nullable": true
          },
          "subOrganization": {
            "type": "string",
            "description": "Name of division, region or organizational hierarchy",
            "nullable": true
          },
          "hasGeofence": {
            "type": "boolean",
            "description": "The project has a primary geofence",
            "nullable": true
          },
          "projectPhases": {
            "type": "array",
            "description": "Array of project phases",
            "items": {
              "$ref": "#/components/schemas/ProjectPhase"
            },
            "nullable": true
          }
        },
        "required": [
          "idProject",
          "name",
          "status"
        ]
      },
      "ProjectsResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Success status"
          },
          "message": {
            "type": "string",
            "description": "Message"
          },
          "data": {
            "type": "array",
            "description": "List of projects",
            "items": {
              "$ref": "#/components/schemas/Project"
            },
            "nullable": true
          },
          "total": {
            "type": "integer",
            "description": "Total count of projects matching the filters"
          }
        },
        "required": [
          "message",
          "success",
          "total"
        ]
      },
      "ProjectSync": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "description": "Name of the project"
          },
          "description": {
            "type": "string",
            "description": "Description of the project",
            "nullable": true
          },
          "status": {
            "type": "string",
            "enum": [
              "ACTIVE",
              "CLOSED",
              "DELETED"
            ],
            "description": "Status of the project (e.g., ACTIVE, CLOSED, DELETED)"
          },
          "divisionCode": {
            "type": "string",
            "description": "Division code associated with the project",
            "nullable": true
          },
          "streetName": {
            "type": "string",
            "description": "Street name of the project location",
            "nullable": true
          },
          "city": {
            "type": "string",
            "description": "City of the project location",
            "nullable": true
          },
          "state": {
            "type": "string",
            "description": "State of the project location",
            "nullable": true
          },
          "zipCode": {
            "type": "string",
            "description": "ZIP code of the project location",
            "nullable": true
          },
          "type": {
            "type": "string",
            "description": "Type of the project",
            "nullable": true
          },
          "projectClass": {
            "type": "string",
            "description": "Class of the project",
            "nullable": true
          }
        },
        "required": [
          "name",
          "status"
        ]
      },
      "ProjectSyncResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Success"
          },
          "message": {
            "type": "string",
            "description": "Message"
          },
          "data": {
            "type": "string",
            "description": "Data summary",
            "nullable": true
          },
          "total": {
            "type": "integer",
            "description": "Total number of projects synced"
          }
        }
      },
      "ProjectPhaseSync": {
        "type": "object",
        "properties": {
          "phaseCode": {
            "type": "string",
            "description": "Code of phase",
            "nullable": true
          },
          "projectCode": {
            "type": "string",
            "description": "Code of project",
            "nullable": true
          },
          "phaseDescription": {
            "type": "string",
            "description": "Description of phase",
            "nullable": true
          },
          "status": {
            "type": "string",
            "enum": [
              "ACTIVE",
              "INACTIVE",
              "DELETED",
              "COMPLETED",
              "DISCONTINUED",
              null
            ],
            "description": "Status (ACTIVE, INACTIVE, DELETED, COMPLETED, DISCONTINUED) of phase",
            "nullable": true
          }
        },
        "required": [
          "phaseCode",
          "projectCode"
        ]
      },
      "WorkOrderReference": {
        "type": "object",
        "properties": {
          "idWorkOrder": {
            "type": "integer",
            "description": "The id of the work order",
            "nullable": true
          }
        }
      },
      "InspectionIssue": {
        "type": "object",
        "properties": {
          "idInspectionIssue": {
            "type": "integer",
            "description": "The id of the inspection issue"
          },
          "inspectionItem": {
            "type": "string",
            "description": "Description of inspection item",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "Status (open, closed, has_workorder)",
            "nullable": true
          },
          "passFailStatus": {
            "type": "string",
            "description": "Pass/fail status (pass, fail)",
            "nullable": true
          },
          "severity": {
            "type": "string",
            "description": "Severity level",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Description of the issue",
            "nullable": true
          },
          "createdUTC": {
            "type": "string",
            "description": "When the issue was created",
            "nullable": true
          },
          "acknowledgedByUser": {
            "type": "integer",
            "description": "ID of user who acknowledged",
            "nullable": true
          },
          "acknowledgedComment": {
            "type": "string",
            "description": "Comment on acknowledgment",
            "nullable": true
          },
          "acknowledgedUTC": {
            "type": "string",
            "description": "When the issue was acknowledged",
            "nullable": true
          },
          "resolvedByUser": {
            "type": "integer",
            "description": "ID of user who resolved",
            "nullable": true
          },
          "resolvedComment": {
            "type": "string",
            "description": "Resolution comment",
            "nullable": true
          },
          "resolvedUTC": {
            "type": "string",
            "description": "When the issue was resolved",
            "nullable": true
          },
          "inspectionIssueWorkOrder": {
            "type": "array",
            "description": "Array of linked work orders",
            "items": {
              "$ref": "#/components/schemas/WorkOrderReference"
            }
          }
        }
      },
      "InspectionReport": {
        "type": "object",
        "properties": {
          "idInspection": {
            "type": "integer",
            "description": "The id of the inspection report"
          },
          "idEquipment": {
            "type": "integer",
            "description": "The id of the equipment record"
          },
          "assetName": {
            "type": "string",
            "description": "Equipment name",
            "nullable": true
          },
          "idProject": {
            "type": "integer",
            "description": "The id of the project",
            "nullable": true
          },
          "idUser": {
            "type": "integer",
            "description": "The id of the user who created the inspection",
            "nullable": true
          },
          "inspectionTemplateName": {
            "type": "string",
            "description": "Name of the inspection template used",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "Status of the inspection report (open, closed)",
            "nullable": true
          },
          "uploadedUTC": {
            "type": "string",
            "description": "Timestamp when the inspection was uploaded",
            "nullable": true
          },
          "createdUTC": {
            "type": "string",
            "description": "Timestamp when the inspection was created",
            "nullable": true
          },
          "lastUpdatedUTC": {
            "type": "string",
            "description": "Timestamp when the inspection was last updated",
            "nullable": true
          },
          "comment": {
            "type": "string",
            "description": "Comment attached to the inspection",
            "nullable": true
          },
          "hourMeterEntered": {
            "type": "integer",
            "description": "Engine hour meter reading",
            "nullable": true
          },
          "odometerEntered": {
            "type": "integer",
            "description": "Odometer reading",
            "nullable": true
          },
          "odometerUOM": {
            "type": "string",
            "description": "Units of measure for odometer",
            "nullable": true
          },
          "longitude": {
            "type": "number",
            "description": "Longitude of GPS location",
            "nullable": true
          },
          "latitude": {
            "type": "number",
            "description": "Latitude of GPS location",
            "nullable": true
          },
          "fuelFilled": {
            "type": "number",
            "description": "Quantity of fuel filled",
            "nullable": true
          },
          "fuelFilledUOM": {
            "type": "string",
            "description": "Unit of measure for fuel filled",
            "nullable": true
          },
          "inspectionStartUTC": {
            "type": "string",
            "description": "When the inspection was started",
            "nullable": true
          },
          "inspectionEndUTC": {
            "type": "string",
            "description": "When the inspection was submitted",
            "nullable": true
          },
          "inspectionIssues": {
            "type": "array",
            "description": "Array of inspection issues",
            "items": {
              "$ref": "#/components/schemas/InspectionIssue"
            }
          }
        }
      },
      "InspectionResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "message": {
            "type": "string",
            "description": "Message"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InspectionReport"
            },
            "nullable": true
          },
          "total": {
            "type": "integer",
            "description": "Total count of inspections"
          }
        }
      },
      "Delivery": {
        "type": "object",
        "properties": {
          "idDelivery": {
            "type": "integer",
            "description": "The delivery ID"
          },
          "status": {
            "type": "string",
            "description": "Delivery status"
          },
          "pickupLocationIdVendor": {
            "type": "integer",
            "description": "Pickup vendor ID",
            "nullable": true
          },
          "pickupLocationIdProjectShop": {
            "type": "integer",
            "description": "Pickup project shop ID",
            "nullable": true
          },
          "pickupTimeLocal": {
            "type": "string",
            "description": "Pickup time (org timezone)",
            "nullable": true
          },
          "pickupInstruction": {
            "type": "string",
            "description": "Pickup instructions",
            "nullable": true
          },
          "deliveryInstruction": {
            "type": "string",
            "description": "Delivery instructions",
            "nullable": true
          },
          "deliverToIdProject": {
            "type": "integer",
            "description": "Delivery project ID",
            "nullable": true
          },
          "pickupByIdUser": {
            "type": "integer",
            "description": "User who picked up",
            "nullable": true
          },
          "pickupTimeUTC": {
            "type": "string",
            "description": "Pickup timestamp",
            "nullable": true
          },
          "deliveredByIdUser": {
            "type": "integer",
            "description": "User who delivered",
            "nullable": true
          },
          "deliveredTimeUTC": {
            "type": "string",
            "description": "Delivery timestamp",
            "nullable": true
          },
          "cancelledByIdUser": {
            "type": "integer",
            "description": "User who cancelled",
            "nullable": true
          },
          "cancelledTimeUTC": {
            "type": "string",
            "description": "Cancellation timestamp",
            "nullable": true
          },
          "confirmationNotes": {
            "type": "string",
            "description": "Delivery confirmation notes",
            "nullable": true
          }
        }
      },
      "Assignment": {
        "type": "object",
        "properties": {
          "idAssetAssignment": {
            "type": "integer",
            "description": "Asset assignment ID",
            "nullable": true
          },
          "idPeopleAssignment": {
            "type": "integer",
            "description": "People assignment ID",
            "nullable": true
          },
          "idEquipmentAssigned": {
            "type": "integer",
            "description": "Assigned equipment ID",
            "nullable": true
          },
          "idUserAssigned": {
            "type": "integer",
            "description": "Assigned user ID",
            "nullable": true
          },
          "dateFrom": {
            "type": "string",
            "description": "Assignment start date",
            "nullable": true
          },
          "dateTo": {
            "type": "string",
            "description": "Assignment end date",
            "nullable": true
          },
          "eta": {
            "type": "string",
            "description": "Estimated delivery time (org timezone)",
            "nullable": true
          },
          "assignedByIdUser": {
            "type": "integer",
            "description": "ID of user who made assignment",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "Assignment status",
            "nullable": true
          },
          "notes": {
            "type": "string",
            "description": "Assignment notes",
            "nullable": true
          },
          "idVendor": {
            "type": "integer",
            "description": "Transporting vendor ID",
            "nullable": true
          },
          "idEquipmentTruck": {
            "type": "integer",
            "description": "Transport truck ID",
            "nullable": true
          },
          "idUserDriver": {
            "type": "integer",
            "description": "Driver user ID",
            "nullable": true
          },
          "isMoveByForeperson": {
            "type": "integer",
            "description": "Foreman transport flag",
            "nullable": true
          },
          "idUserDispatching": {
            "type": "integer",
            "description": "Self-dispatching user ID",
            "nullable": true
          },
          "createdUTC": {
            "type": "string",
            "description": "Assignment creation timestamp",
            "nullable": true
          },
          "idProjectMoveFrom": {
            "type": "integer",
            "description": "Source project ID",
            "nullable": true
          },
          "idProjectMoveTo": {
            "type": "integer",
            "description": "Destination project ID",
            "nullable": true
          },
          "idVendorMoveFrom": {
            "type": "integer",
            "description": "Source vendor ID",
            "nullable": true
          },
          "idVendorMoveTo": {
            "type": "integer",
            "description": "Destination vendor ID",
            "nullable": true
          },
          "idAssetAssignmentParent": {
            "type": "integer",
            "description": "Parent asset assignment ID",
            "nullable": true
          },
          "idPeopleAssignmentParent": {
            "type": "integer",
            "description": "Parent people assignment ID",
            "nullable": true
          },
          "deliveries": {
            "type": "array",
            "description": "Array of deliveries",
            "items": {
              "$ref": "#/components/schemas/Delivery"
            },
            "nullable": true
          }
        }
      },
      "DispatchRequest": {
        "type": "object",
        "properties": {
          "idDispatchRequest": {
            "type": "integer",
            "description": "The id of the request"
          },
          "resourceType": {
            "type": "string",
            "description": "Type of resource (asset, people, material_truck)"
          },
          "idProject": {
            "type": "integer",
            "description": "The id of the project",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "Request status",
            "nullable": true
          },
          "deliveryDate": {
            "type": "string",
            "description": "Requested delivery date (org timezone)",
            "nullable": true
          },
          "deliveryTime": {
            "type": "string",
            "description": "Requested delivery time (org timezone)",
            "nullable": true
          },
          "noEarlierThan": {
            "type": "string",
            "description": "Earliest delivery date (org timezone)",
            "nullable": true
          },
          "noLaterThan": {
            "type": "string",
            "description": "Latest delivery date (org timezone)",
            "nullable": true
          },
          "returnDuration": {
            "type": "integer",
            "description": "Duration until resource return",
            "nullable": true
          },
          "returnDurationUOM": {
            "type": "string",
            "description": "Duration units (days, weeks, months)",
            "nullable": true
          },
          "quantityRequested": {
            "type": "integer",
            "description": "Quantity of resource requested",
            "nullable": true
          },
          "notes": {
            "type": "string",
            "description": "Notes about the request",
            "nullable": true
          },
          "assetType": {
            "type": "string",
            "description": "Asset type (for asset requests)",
            "nullable": true
          },
          "productClass": {
            "type": "string",
            "description": "Product class (for asset requests)",
            "nullable": true
          },
          "jobTitle": {
            "type": "string",
            "description": "Job title (for people requests)",
            "nullable": true
          },
          "payClass": {
            "type": "string",
            "description": "Pay class code (for people requests)",
            "nullable": true
          },
          "idUser": {
            "type": "integer",
            "description": "User ID (for people requests)",
            "nullable": true
          },
          "requestedByIdUser": {
            "type": "integer",
            "description": "ID of user who submitted request",
            "nullable": true
          },
          "createdUTC": {
            "type": "string",
            "description": "Request creation timestamp",
            "nullable": true
          },
          "assignments": {
            "type": "array",
            "description": "Array of resource assignments",
            "items": {
              "$ref": "#/components/schemas/Assignment"
            },
            "nullable": true
          }
        }
      },
      "DispatchRequestsResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Success flag"
          },
          "message": {
            "type": "string",
            "description": "Message"
          },
          "data": {
            "type": "array",
            "description": "Array of dispatch requests",
            "items": {
              "$ref": "#/components/schemas/DispatchRequest"
            },
            "nullable": true
          },
          "total": {
            "type": "integer",
            "description": "Total number of dispatch requests"
          }
        }
      },
      "WorkOrderAssignee": {
        "type": "object",
        "properties": {
          "assignedByUser": {
            "type": "integer",
            "description": "The id of the user who assigned someone",
            "nullable": true
          },
          "assignedToUser": {
            "type": "integer",
            "description": "The id of the user who was assigned",
            "nullable": true
          },
          "createdUTC": {
            "type": "string",
            "description": "Timestamp when the user was assigned",
            "nullable": true
          }
        }
      },
      "WorkOrderTask": {
        "type": "object",
        "properties": {
          "idWorkOrderTask": {
            "type": "integer",
            "description": "The id of the work order task",
            "nullable": true
          },
          "woTaskNumber": {
            "type": "string",
            "description": "Ordinal number of task",
            "nullable": true
          },
          "woTaskDescription": {
            "type": "string",
            "description": "Description of the task",
            "nullable": true
          },
          "createdUTC": {
            "type": "string",
            "description": "Timestamp of work order task creation",
            "nullable": true
          },
          "createdByUser": {
            "type": "integer",
            "description": "The id of the user who created the task",
            "nullable": true
          },
          "mechanic": {
            "type": "integer",
            "description": "The id of the mechanic who is assigned to the task",
            "nullable": true
          },
          "partsCost": {
            "description": "Total cost of parts on this task",
            "nullable": true
          },
          "timecardsMinutes": {
            "description": "Total timecard length in minutes for this task",
            "nullable": true
          },
          "laborCost": {
            "description": "Total timecard labor cost for this task (excludes DELETED_BY_USER)",
            "nullable": true
          },
          "currencyCode": {
            "type": "string",
            "description": "ISO currency code associated with the task labor cost",
            "nullable": true
          },
          "woTaskCostCode": {
            "type": "string",
            "description": "Cost code",
            "nullable": true
          },
          "woTaskStatus": {
            "type": "string",
            "description": "Task status",
            "nullable": true
          }
        }
      },
      "WorkOrderComponent": {
        "type": "object",
        "properties": {
          "component": {
            "type": "string",
            "description": "Component name",
            "nullable": true
          },
          "componentCode": {
            "type": "string",
            "description": "Component code",
            "nullable": true
          },
          "children": {
            "type": "array",
            "description": "Child components in the hierarchy",
            "items": {
              "$ref": "#/components/schemas/WorkOrderComponent"
            },
            "nullable": true
          }
        }
      },
      "WorkOrderPartOrder": {
        "type": "object",
        "properties": {
          "idPartOrder": {
            "type": "integer",
            "nullable": true
          },
          "idPart": {
            "type": "integer",
            "description": "The id of the part (joins to /v1/parts)",
            "nullable": true
          },
          "idWorkOrder": {
            "type": "integer",
            "nullable": true
          },
          "idWorkOrderTask": {
            "type": "integer",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "Status of the part order: REQUIRED, REQUESTED, ORDERING, ORDERED, SCHEDULING, SCHEDULED, NOTIFIED, BACK_ORDERED, IN_TRANSIT, DELIVERY_BY_VENDOR, DELIVERED, RECEIVED, PICKED_UP, USED, QUOTE_REQUESTED, QUOTED",
            "nullable": true
          },
          "itemName": {
            "type": "string",
            "nullable": true
          },
          "partNotes": {
            "type": "string",
            "nullable": true
          },
          "partOrderNotes": {
            "type": "string",
            "nullable": true
          },
          "unitCost": {
            "nullable": true
          },
          "quantity": {
            "type": "integer",
            "nullable": true
          },
          "uom": {
            "type": "string",
            "nullable": true
          },
          "totalCost": {
            "nullable": true
          },
          "currencyCode": {
            "type": "string",
            "nullable": true
          },
          "poNumber": {
            "type": "string",
            "nullable": true
          },
          "documentNumber": {
            "type": "string",
            "nullable": true
          },
          "costCode": {
            "type": "string",
            "nullable": true
          },
          "idVendor": {
            "type": "integer",
            "nullable": true
          },
          "isDeliveredByVendor": {
            "type": "integer",
            "nullable": true
          },
          "isFulfilledFromInventory": {
            "type": "integer",
            "description": "1 if the line was pulled from a Clue inventory location, 0 if ordered from a vendor",
            "nullable": true
          },
          "idInventoryLocation": {
            "type": "integer",
            "description": "The id of the inventory location the part was pulled from (null when isFulfilledFromInventory = 0)",
            "nullable": true
          },
          "inventoryLocationName": {
            "type": "string",
            "description": "Name of the inventory location (null when isFulfilledFromInventory = 0)",
            "nullable": true
          },
          "deliveryScheduleLocalDatetime": {
            "type": "string",
            "nullable": true
          },
          "deliverySchedulePickupLocalDatetime": {
            "type": "string",
            "nullable": true
          },
          "createdUTC": {
            "type": "string",
            "nullable": true
          },
          "lastUpdatedUTC": {
            "type": "string",
            "nullable": true
          },
          "orderedUTC": {
            "type": "string",
            "description": "Timestamp when the part was marked ordered",
            "nullable": true
          },
          "deliveredUTC": {
            "type": "string",
            "description": "Timestamp when the part was marked delivered",
            "nullable": true
          },
          "usedUTC": {
            "type": "string",
            "description": "Timestamp when the part transitioned to USED on the work order",
            "nullable": true
          }
        }
      },
      "WorkOrder": {
        "type": "object",
        "properties": {
          "idWorkOrder": {
            "type": "integer",
            "description": "The id of the work order"
          },
          "workOrderNumber": {
            "type": "string",
            "description": "User defined work order number",
            "nullable": true
          },
          "idEquipment": {
            "type": "integer",
            "description": "The id of the equipment record",
            "nullable": true
          },
          "assetName": {
            "type": "string",
            "description": "Equipment name",
            "nullable": true
          },
          "idProject": {
            "type": "integer",
            "description": "The id of the currently assigned project",
            "nullable": true
          },
          "idProjectShop": {
            "type": "integer",
            "description": "The id of the project shop",
            "nullable": true
          },
          "title": {
            "type": "string",
            "description": "Title of work order",
            "nullable": true
          },
          "type": {
            "type": "string",
            "description": "Type of work order",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Description of work order",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "Status of work order",
            "nullable": true
          },
          "engineHoursAtCompletion": {
            "description": "Engine hours at completion of work order",
            "nullable": true
          },
          "odometerAtCompletion": {
            "description": "Odometer at completion of work order",
            "nullable": true
          },
          "odometerUOM": {
            "type": "string",
            "description": "Units of measure for odometer",
            "nullable": true
          },
          "dueDate": {
            "type": "string",
            "description": "Due date for completion",
            "nullable": true
          },
          "createdUTC": {
            "type": "string",
            "description": "Timestamp of creation of work order",
            "nullable": true
          },
          "lastUpdatedUTC": {
            "type": "string",
            "description": "The timestamp when the work order, or any of its timecards, part orders or invoices, was last updated.",
            "nullable": true
          },
          "workOrderAssignees": {
            "type": "array",
            "description": "Array of work order assignee objects",
            "items": {
              "$ref": "#/components/schemas/WorkOrderAssignee"
            }
          },
          "workOrderTasks": {
            "type": "array",
            "description": "Array of work order task objects",
            "items": {
              "$ref": "#/components/schemas/WorkOrderTask"
            }
          },
          "components": {
            "type": "array",
            "description": "Array of work order component objects in tree structure",
            "items": {
              "$ref": "#/components/schemas/WorkOrderComponent"
            },
            "nullable": true
          },
          "totalPartsCost": {
            "description": "Sum of PartOrder.total_cost for the work order (excludes DELETED_BY_USER / CANCELLED). Always numeric, never null."
          },
          "totalLaborCost": {
            "description": "Sum of Timecard.cost for the work order (excludes DELETED_BY_USER). Always numeric, never null."
          },
          "totalLaborMinutes": {
            "description": "Sum of Timecard.timecard_minutes for the work order (excludes DELETED_BY_USER). Always numeric, never null."
          },
          "totalInvoicesCost": {
            "description": "Sum of WorkOrderInvoice.cost for the work order (only SUBMITTED). Always numeric, never null."
          },
          "totalCost": {
            "description": "totalPartsCost + totalLaborCost + totalInvoicesCost"
          },
          "currencyCode": {
            "type": "string",
            "description": "Organization default ISO currency code applied to all WO-level cost rollups."
          },
          "workOrderParts": {
            "type": "array",
            "description": "Array of work order part line items (excludes statuses CANCELLED and DELETED_BY_USER)",
            "items": {
              "$ref": "#/components/schemas/WorkOrderPartOrder"
            },
            "nullable": true
          }
        }
      },
      "WorkOrderResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Success status"
          },
          "message": {
            "type": "string",
            "description": "The message of the API response"
          },
          "data": {
            "type": "array",
            "description": "List of work orders",
            "items": {
              "$ref": "#/components/schemas/WorkOrder"
            }
          },
          "total": {
            "type": "integer",
            "description": "The total number of items"
          }
        }
      },
      "WorkOrderPartOrdersResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "message": {
            "type": "string"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkOrderPartOrder"
            }
          },
          "total": {
            "type": "integer"
          }
        }
      },
      "WorkOrderInvoiceAttachment": {
        "type": "object",
        "properties": {
          "idAttachment": {
            "type": "integer",
            "nullable": true
          },
          "url": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "WorkOrderInvoiceLaborLine": {
        "type": "object",
        "properties": {
          "idWoExternalLabor": {
            "type": "integer",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "hours": {
            "nullable": true
          },
          "rate": {
            "nullable": true
          },
          "totalCost": {
            "nullable": true
          },
          "costCode": {
            "type": "string",
            "nullable": true
          },
          "date": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "WorkOrderInvoicePartLine": {
        "type": "object",
        "properties": {
          "idWoExternalPart": {
            "type": "integer",
            "nullable": true
          },
          "partNumber": {
            "type": "string",
            "nullable": true
          },
          "partName": {
            "type": "string",
            "nullable": true
          },
          "quantity": {
            "nullable": true
          },
          "uom": {
            "type": "string",
            "nullable": true
          },
          "unitCost": {
            "nullable": true
          },
          "totalCost": {
            "nullable": true
          },
          "costCode": {
            "type": "string",
            "nullable": true
          },
          "partsNotes": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "WorkOrderInvoiceAdditionalCost": {
        "type": "object",
        "properties": {
          "idWoAdditionalCost": {
            "type": "integer",
            "nullable": true
          },
          "category": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "amount": {
            "nullable": true
          },
          "costCode": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "WorkOrderInvoice": {
        "type": "object",
        "properties": {
          "idWorkOrderInvoice": {
            "type": "integer",
            "nullable": true
          },
          "idWorkOrder": {
            "type": "integer",
            "nullable": true
          },
          "invoiceNumber": {
            "type": "string",
            "nullable": true
          },
          "idVendor": {
            "type": "integer",
            "nullable": true
          },
          "vendorName": {
            "type": "string",
            "nullable": true
          },
          "cost": {
            "nullable": true
          },
          "currencyCode": {
            "type": "string",
            "nullable": true
          },
          "costCode": {
            "type": "string",
            "nullable": true
          },
          "notes": {
            "type": "string",
            "nullable": true
          },
          "invoiceDate": {
            "type": "string",
            "nullable": true
          },
          "createdUTC": {
            "type": "string",
            "nullable": true
          },
          "lastUpdatedUTC": {
            "type": "string",
            "nullable": true
          },
          "attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkOrderInvoiceAttachment"
            }
          },
          "externalLabor": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkOrderInvoiceLaborLine"
            }
          },
          "externalParts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkOrderInvoicePartLine"
            }
          },
          "additionalCosts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkOrderInvoiceAdditionalCost"
            }
          }
        }
      },
      "WorkOrderInvoicesResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "message": {
            "type": "string"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkOrderInvoice"
            }
          },
          "total": {
            "type": "integer"
          }
        }
      },
      "AssociatedWorkOrder": {
        "type": "object",
        "properties": {
          "idWorkOrder": {
            "type": "integer",
            "description": "Internal ID of work order associated with fault code"
          }
        }
      },
      "FaultCode": {
        "type": "object",
        "properties": {
          "idError": {
            "type": "integer",
            "description": "Internal ID of fault code"
          },
          "createdUTC": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of fault code time"
          },
          "codeIdentifier": {
            "type": "string",
            "description": "Code provided by OEM",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Description provided by OEM",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "Status of fault code (open or dismissed)",
            "nullable": true
          },
          "severity": {
            "type": "integer",
            "description": "Standardized severity level of fault code (1 low to 3 high)",
            "nullable": true
          },
          "longitude": {
            "type": "number",
            "description": "Longitude coordinate",
            "nullable": true
          },
          "latitude": {
            "type": "number",
            "description": "Latitude coordinate",
            "nullable": true
          },
          "spn": {
            "type": "integer",
            "description": "Caterpillar specific fault code data",
            "nullable": true
          },
          "fmi": {
            "type": "integer",
            "description": "Caterpillar specific fault code data",
            "nullable": true
          },
          "cid": {
            "type": "integer",
            "description": "Caterpillar specific fault code data",
            "nullable": true
          },
          "eid": {
            "type": "integer",
            "description": "Caterpillar specific fault code data",
            "nullable": true
          },
          "mid": {
            "type": "integer",
            "description": "Caterpillar specific fault code data",
            "nullable": true
          },
          "dismissedByUser": {
            "type": "integer",
            "description": "Identifier of user who dismissed fault code",
            "nullable": true
          },
          "dismissedUTC": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when fault code was dismissed",
            "nullable": true
          },
          "associatedWorkOrder": {
            "type": "array",
            "description": "List of work orders associated with this fault code",
            "items": {
              "$ref": "#/components/schemas/AssociatedWorkOrder"
            },
            "nullable": true
          }
        }
      },
      "EquipmentFaultCodes": {
        "type": "object",
        "properties": {
          "idEquipment": {
            "type": "integer",
            "description": "The ID of the equipment record"
          },
          "assetName": {
            "type": "string",
            "description": "Equipment name"
          },
          "faultCodes": {
            "type": "array",
            "description": "Array of fault code objects for this equipment",
            "items": {
              "$ref": "#/components/schemas/FaultCode"
            }
          }
        }
      },
      "FaultCodesResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Success status"
          },
          "message": {
            "type": "string",
            "description": "The message of the API response"
          },
          "data": {
            "type": "array",
            "description": "List of equipment with their fault codes",
            "items": {
              "$ref": "#/components/schemas/EquipmentFaultCodes"
            }
          },
          "total": {
            "type": "integer",
            "description": "The total number of fault codes"
          }
        }
      },
      "Vendor": {
        "type": "object",
        "properties": {
          "idVendor": {
            "type": "integer",
            "description": "The unique identifier of the vendor"
          },
          "name": {
            "type": "string",
            "description": "Vendor name"
          },
          "code": {
            "type": "string",
            "description": "Vendor code",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "Vendor status (Active, Deactivated)",
            "nullable": true
          },
          "vendorType": {
            "type": "string",
            "description": "Type of vendor",
            "nullable": true
          },
          "street": {
            "type": "string",
            "description": "Street address",
            "nullable": true
          },
          "city": {
            "type": "string",
            "description": "City",
            "nullable": true
          },
          "state": {
            "type": "string",
            "description": "State/Province",
            "nullable": true
          },
          "zipCode": {
            "type": "string",
            "description": "ZIP/Postal code",
            "nullable": true
          },
          "country": {
            "type": "string",
            "description": "Country",
            "nullable": true
          },
          "email": {
            "type": "string",
            "description": "Contact email",
            "nullable": true
          },
          "phone": {
            "type": "string",
            "description": "Main phone number",
            "nullable": true
          },
          "servicePhone": {
            "type": "string",
            "description": "Service department phone",
            "nullable": true
          },
          "createdUTC": {
            "type": "string",
            "description": "Creation timestamp",
            "format": "iso",
            "nullable": true
          }
        },
        "required": [
          "idVendor",
          "name"
        ]
      },
      "VendorsResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Success"
          },
          "message": {
            "type": "string",
            "description": "Message"
          },
          "data": {
            "type": "array",
            "description": "List of vendors",
            "items": {
              "$ref": "#/components/schemas/Vendor"
            },
            "nullable": true
          },
          "total": {
            "type": "integer",
            "description": "Total number of users"
          }
        }
      },
      "RentalCalculation": {
        "type": "object",
        "properties": {
          "year": {
            "type": "integer",
            "description": "The year for this calculation"
          },
          "month": {
            "type": "integer",
            "description": "The month for this calculation"
          },
          "cost": {
            "type": "number",
            "description": "The cost per time period",
            "nullable": true
          },
          "currency": {
            "type": "string",
            "description": "Currency used",
            "nullable": true
          },
          "details": {
            "type": "string",
            "description": "The internal calculation algorithm for this period",
            "nullable": true
          }
        }
      },
      "RentalEquipment": {
        "type": "object",
        "properties": {
          "idEquipment": {
            "type": "integer",
            "description": "The ID of the equipment record linked to this rental",
            "nullable": true
          },
          "contractGroup": {
            "type": "integer",
            "description": "Number of contract group",
            "nullable": true
          },
          "po": {
            "type": "string",
            "description": "The PO details for this equipment",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "The status of the rental equipment (CANCELLED, DELETED, DRAFT, DUPLICATED, OFF_RENT, ON_RENT, PAST_DUE, PURCHASED, REQUESTED, RETURN_REQUESTED, TO_REVIEW, UPCOMING_DUE)",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "The description of the equipment rented",
            "nullable": true
          },
          "model": {
            "type": "string",
            "description": "The model of the asset",
            "nullable": true
          },
          "serialNumber": {
            "type": "string",
            "description": "The serial number provided by the vendor",
            "nullable": true
          },
          "startDate": {
            "type": "string",
            "format": "date",
            "description": "The start date of the rental",
            "nullable": true
          },
          "projectEndDate": {
            "type": "string",
            "format": "date",
            "description": "The projected end date of the rental",
            "nullable": true
          },
          "endDate": {
            "type": "string",
            "format": "date",
            "description": "The actual end date",
            "nullable": true
          },
          "idVendor": {
            "type": "integer",
            "description": "The id of the vendor",
            "nullable": true
          },
          "notes": {
            "type": "string",
            "description": "Notes for this rental equipment",
            "nullable": true
          },
          "quantity": {
            "type": "integer",
            "description": "Quantity required",
            "nullable": true
          },
          "dailyRentalRate": {
            "type": "number",
            "description": "The daily rental rate",
            "nullable": true
          },
          "weeklyRentalRate": {
            "type": "number",
            "description": "The weekly rental rate",
            "nullable": true
          },
          "monthlyRentalRate": {
            "type": "number",
            "description": "The monthly rental rate",
            "nullable": true
          },
          "currencyCode": {
            "type": "string",
            "description": "ISO 4217 currency code applied to dailyRentalRate, weeklyRentalRate, and monthlyRentalRate. Sourced from the stored rental_rate_currency, falling back to the organization's currency.",
            "nullable": true
          },
          "createdUTC": {
            "type": "string",
            "format": "date-time",
            "description": "The timestamp when the record was created",
            "nullable": true
          },
          "lastUpdatedUTC": {
            "type": "string",
            "format": "date-time",
            "description": "The timestamp when the record was last updated",
            "nullable": true
          },
          "createdByUser": {
            "type": "integer",
            "description": "The id of the user who created this record",
            "nullable": true
          },
          "rentalCalculation": {
            "type": "array",
            "description": "Array of the cost calculations of this rental equipment",
            "items": {
              "$ref": "#/components/schemas/RentalCalculation"
            },
            "nullable": true
          }
        }
      },
      "RentalContract": {
        "type": "object",
        "properties": {
          "idRentalContract": {
            "type": "integer",
            "description": "The id of the rental contract object"
          },
          "po": {
            "type": "string",
            "description": "The PO details",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "The status of the rental contract (CANCELLED, DELETED, DRAFT, DUPLICATED, OFF_RENT, ON_RENT, PAST_DUE, PURCHASED, REQUESTED, RETURN_REQUESTED, TO_REVIEW, UPCOMING_DUE)",
            "nullable": true
          },
          "notes": {
            "type": "string",
            "description": "Notes field",
            "nullable": true
          },
          "contractNumber": {
            "type": "string",
            "description": "Contract number provided",
            "nullable": true
          },
          "createdUTC": {
            "type": "string",
            "format": "date-time",
            "description": "The timestamp when the record was created",
            "nullable": true
          },
          "rentalEquipment": {
            "type": "array",
            "description": "Array of the rental equipment assigned to the rental contract",
            "items": {
              "$ref": "#/components/schemas/RentalEquipment"
            },
            "nullable": true
          }
        }
      },
      "RentalContractsResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Success status"
          },
          "message": {
            "type": "string",
            "description": "The message of the API response"
          },
          "data": {
            "type": "array",
            "description": "Array of rental contract objects",
            "items": {
              "$ref": "#/components/schemas/RentalContract"
            }
          },
          "total": {
            "type": "integer",
            "description": "The total number of rental contracts"
          }
        }
      },
      "PartOrderUpdateRequest": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "description": "New status of the order. Must be a status configured for your organization in PartOrderStatus (defaults + any org-specific rows). On unknown status the API returns 400 with the allowed list."
          },
          "partOrderNotes": {
            "type": "string",
            "default": "",
            "description": "Notes about the order",
            "nullable": true
          },
          "isDeliveredByVendor": {
            "type": "integer",
            "enum": [
              0,
              1
            ],
            "description": "1 if delivered by vendor, 0 if not"
          },
          "deliveryScheduleLocalDatetime": {
            "type": "string",
            "format": "date-time",
            "default": null,
            "description": "Scheduled delivery time (local timezone)",
            "nullable": true
          },
          "deliverySchedulePickupLocalDatetime": {
            "type": "string",
            "format": "date-time",
            "default": null,
            "description": "Scheduled pickup time (local timezone)",
            "nullable": true
          },
          "unitCost": {
            "type": "number",
            "description": "Unit cost of the part"
          },
          "quantity": {
            "type": "integer",
            "description": "Quantity of parts"
          },
          "uom": {
            "type": "string",
            "description": "Unit of measure"
          },
          "totalCost": {
            "type": "number",
            "description": "Total cost (unitCost \u00d7 quantity)"
          },
          "currencyCode": {
            "type": "string",
            "description": "Currency code"
          },
          "poNumber": {
            "type": "string",
            "default": "",
            "description": "Purchase order number",
            "nullable": true
          },
          "documentNumber": {
            "type": "string",
            "default": "",
            "description": "Vendor document number",
            "nullable": true
          },
          "itemName": {
            "type": "string",
            "description": "Name/description of the part"
          },
          "partNotes": {
            "type": "string",
            "default": "",
            "description": "Additional notes about the part",
            "nullable": true
          }
        },
        "required": [
          "currencyCode",
          "isDeliveredByVendor",
          "itemName",
          "quantity",
          "status",
          "totalCost",
          "unitCost",
          "uom"
        ]
      },
      "PartOrderResponse": {
        "type": "object",
        "properties": {
          "urgencyCode": {
            "type": "string",
            "description": "Urgency option code (only when set)",
            "nullable": true
          },
          "urgencyLabel": {
            "type": "string",
            "description": "Urgency label in en-us (only when set)",
            "nullable": true
          },
          "idPartOrder": {
            "type": "integer",
            "description": "The ID of the parts order"
          },
          "status": {
            "type": "string",
            "description": "Current status of the order"
          },
          "partOrderNotes": {
            "type": "string",
            "description": "Notes about the order",
            "nullable": true
          },
          "isDeliveredByVendor": {
            "type": "integer",
            "description": "1 if delivered by vendor, 0 if not"
          },
          "deliveryScheduleLocalDatetime": {
            "type": "string",
            "format": "date-time",
            "description": "Scheduled delivery time (local timezone)",
            "nullable": true
          },
          "deliverySchedulePickupLocalDatetime": {
            "type": "string",
            "format": "date-time",
            "description": "Scheduled pickup time (local timezone)",
            "nullable": true
          },
          "unitCost": {
            "type": "number",
            "description": "Unit cost of the part"
          },
          "quantity": {
            "type": "integer",
            "description": "Quantity of parts"
          },
          "uom": {
            "type": "string",
            "description": "Unit of measure"
          },
          "totalCost": {
            "type": "number",
            "description": "Total cost (unitCost \u00d7 quantity)"
          },
          "currencyCode": {
            "type": "string",
            "description": "Currency code"
          },
          "poNumber": {
            "type": "string",
            "description": "Purchase order number",
            "nullable": true
          },
          "documentNumber": {
            "type": "string",
            "description": "Vendor document number",
            "nullable": true
          },
          "itemName": {
            "type": "string",
            "description": "Name/description of the part"
          },
          "partNotes": {
            "type": "string",
            "description": "Additional notes about the part",
            "nullable": true
          }
        }
      },
      "PartOrderUpdateResponse": {
        "type": "object",
        "properties": {
          "partOrder": {
            "description": "Updated part order data",
            "allOf": [
              {
                "$ref": "#/components/schemas/PartOrderResponse"
              }
            ]
          }
        }
      },
      "PartOrderCreateRequest": {
        "type": "object",
        "properties": {
          "idPart": {
            "type": "integer",
            "description": "Part.id_part within caller's organization."
          },
          "quantity": {
            "type": "integer",
            "minimum": 1
          },
          "uom": {
            "type": "string",
            "description": "Unit of measure."
          },
          "unitCost": {
            "type": "number",
            "minimum": 0.0
          },
          "totalCost": {
            "type": "number",
            "minimum": 0.0
          },
          "currencyCode": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "description": "Initial status. Must be configured for your organization in PartOrderStatus."
          },
          "idWo": {
            "type": "integer",
            "default": null,
            "nullable": true
          },
          "idEquipment": {
            "type": "integer",
            "default": null,
            "description": "Equipment.id_equipment (NOT the OEM tag varchar).",
            "nullable": true
          },
          "idProject": {
            "type": "integer",
            "default": null,
            "nullable": true
          },
          "idInventoryLocation": {
            "type": "integer",
            "default": null,
            "description": "Inventory location (Project.id_project, type='Shop'). Only effects stock movement when Part.is_stock_item=1.",
            "nullable": true
          },
          "idVendor": {
            "type": "integer",
            "default": null,
            "nullable": true
          },
          "isForBreakdown": {
            "type": "integer",
            "default": 0,
            "enum": [
              0,
              1,
              null
            ],
            "nullable": true
          },
          "urgencyCode": {
            "type": "string",
            "default": null,
            "description": "Urgency option code configured for your organization (for example NDA). Optional; 400 when not an active option.",
            "nullable": true
          },
          "isDeliveredByVendor": {
            "type": "integer",
            "default": 0,
            "enum": [
              0,
              1,
              null
            ],
            "nullable": true
          },
          "deliverToIdProject": {
            "type": "integer",
            "default": null,
            "nullable": true
          },
          "expectedDeliveryDatetimeLocal": {
            "type": "string",
            "format": "date-time",
            "default": null,
            "nullable": true
          },
          "deliveryScheduleLocalDatetime": {
            "type": "string",
            "format": "date-time",
            "default": null,
            "nullable": true
          },
          "deliverySchedulePickupLocalDatetime": {
            "type": "string",
            "format": "date-time",
            "default": null,
            "nullable": true
          },
          "poNumber": {
            "type": "string",
            "default": null,
            "nullable": true
          },
          "documentNumber": {
            "type": "string",
            "default": null,
            "nullable": true
          },
          "costCode": {
            "type": "string",
            "default": null,
            "nullable": true
          },
          "itemName": {
            "type": "string",
            "default": null,
            "description": "If null, defaults to Part.parts_description.",
            "nullable": true
          },
          "partOrderNotes": {
            "type": "string",
            "default": null,
            "nullable": true
          },
          "partNotes": {
            "type": "string",
            "default": null,
            "nullable": true
          },
          "partRequestNotes": {
            "type": "string",
            "default": null,
            "nullable": true
          },
          "orderPickupInstruction": {
            "type": "string",
            "default": null,
            "nullable": true
          },
          "idPmItem": {
            "type": "integer",
            "default": null,
            "nullable": true
          },
          "idWoTask": {
            "type": "integer",
            "default": null,
            "nullable": true
          }
        },
        "required": [
          "currencyCode",
          "idPart",
          "quantity",
          "status",
          "totalCost",
          "unitCost",
          "uom"
        ]
      },
      "PartOrderCreatedData": {
        "type": "object",
        "properties": {
          "urgencyCode": {
            "type": "string",
            "description": "Urgency option code (only when set)",
            "nullable": true
          },
          "urgencyLabel": {
            "type": "string",
            "description": "Urgency label in en-us (only when set)",
            "nullable": true
          },
          "idPartOrder": {
            "type": "integer",
            "description": "The ID of the parts order"
          },
          "status": {
            "type": "string",
            "description": "Current status of the order"
          },
          "partOrderNotes": {
            "type": "string",
            "description": "Notes about the order",
            "nullable": true
          },
          "isDeliveredByVendor": {
            "type": "integer",
            "description": "1 if delivered by vendor, 0 if not"
          },
          "deliveryScheduleLocalDatetime": {
            "type": "string",
            "format": "date-time",
            "description": "Scheduled delivery time (local timezone)",
            "nullable": true
          },
          "deliverySchedulePickupLocalDatetime": {
            "type": "string",
            "format": "date-time",
            "description": "Scheduled pickup time (local timezone)",
            "nullable": true
          },
          "unitCost": {
            "type": "number",
            "description": "Unit cost of the part"
          },
          "quantity": {
            "type": "integer",
            "description": "Quantity of parts"
          },
          "uom": {
            "type": "string",
            "description": "Unit of measure"
          },
          "totalCost": {
            "type": "number",
            "description": "Total cost (unitCost \u00d7 quantity)"
          },
          "currencyCode": {
            "type": "string",
            "description": "Currency code"
          },
          "poNumber": {
            "type": "string",
            "description": "Purchase order number",
            "nullable": true
          },
          "documentNumber": {
            "type": "string",
            "description": "Vendor document number",
            "nullable": true
          },
          "itemName": {
            "type": "string",
            "description": "Name/description of the part"
          },
          "partNotes": {
            "type": "string",
            "description": "Additional notes about the part",
            "nullable": true
          },
          "idPart": {
            "type": "integer",
            "nullable": true
          },
          "idWo": {
            "type": "integer",
            "nullable": true
          },
          "idEquipment": {
            "type": "integer",
            "nullable": true
          },
          "idProject": {
            "type": "integer",
            "nullable": true
          },
          "idInventoryLocation": {
            "type": "integer",
            "nullable": true
          },
          "idVendor": {
            "type": "integer",
            "nullable": true
          }
        }
      },
      "PartOrderCreateResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "message": {
            "type": "string"
          },
          "data": {
            "anyOf": [
              {
                "type": "object",
                "nullable": true
              },
              {
                "$ref": "#/components/schemas/PartOrderCreatedData"
              }
            ]
          }
        }
      },
      "DailyCalculation": {
        "type": "object",
        "properties": {
          "idEquipment": {
            "type": "integer",
            "description": "The id of the equipment record."
          },
          "assetName": {
            "type": "string",
            "description": "Equipment name.",
            "nullable": true
          },
          "date": {
            "type": "string",
            "format": "date",
            "description": "Date of the daily calculation record."
          },
          "idProject": {
            "type": "integer",
            "description": "The id of the project.",
            "nullable": true
          },
          "multiDays": {
            "type": "boolean",
            "description": "Whether this is a multi-day record.",
            "nullable": true
          },
          "operatingHours": {
            "type": "number",
            "description": "Total operating hours for the day.",
            "nullable": true
          },
          "idleHours": {
            "type": "number",
            "description": "Total idle hours for the day.",
            "nullable": true
          },
          "idleRate": {
            "type": "number",
            "description": "Idle rate percentage.",
            "nullable": true
          },
          "utilizationRate": {
            "type": "number",
            "description": "Utilization rate percentage.",
            "nullable": true
          },
          "engineHoursAtStart": {
            "type": "number",
            "description": "Engine hours at start of day.",
            "nullable": true
          },
          "engineHoursAtEnd": {
            "type": "number",
            "description": "Engine hours at end of day.",
            "nullable": true
          },
          "odometerAtStart": {
            "type": "number",
            "description": "Odometer reading at start of day.",
            "nullable": true
          },
          "odometerAtEnd": {
            "type": "number",
            "description": "Odometer reading at end of day.",
            "nullable": true
          },
          "odometerUnits": {
            "type": "string",
            "description": "Units for odometer (miles, km).",
            "nullable": true
          },
          "fuelUsed": {
            "type": "number",
            "description": "Fuel consumed during the day.",
            "nullable": true
          },
          "fuelUsedUnits": {
            "type": "string",
            "description": "Units for fuel used.",
            "nullable": true
          },
          "fuelFilled": {
            "type": "number",
            "description": "Fuel filled during the day.",
            "nullable": true
          },
          "fuelFilledUnits": {
            "type": "string",
            "description": "Units for fuel filled.",
            "nullable": true
          },
          "idleFuelUsed": {
            "type": "number",
            "description": "Fuel consumed during idle.",
            "nullable": true
          },
          "idleFuelUsedUnits": {
            "type": "string",
            "description": "Units for idle fuel used.",
            "nullable": true
          },
          "emissions": {
            "type": "number",
            "description": "CO2 emissions.",
            "nullable": true
          },
          "emissionsUnits": {
            "type": "string",
            "description": "Units for emissions.",
            "nullable": true
          }
        }
      },
      "DailyCalculationResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Success status"
          },
          "message": {
            "type": "string",
            "description": "The message of the API response"
          },
          "data": {
            "type": "array",
            "description": "List of daily calculation records",
            "items": {
              "$ref": "#/components/schemas/DailyCalculation"
            }
          },
          "total": {
            "type": "integer",
            "description": "The total number of records"
          }
        }
      },
      "PartStockByLocation": {
        "type": "object",
        "properties": {
          "idInventoryLocation": {
            "type": "integer",
            "description": "Inventory location ID (Project.id_project where type='Shop').",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Inventory location name.",
            "nullable": true
          },
          "qtyOnHand": {
            "type": "number",
            "nullable": true
          },
          "qtyReserved": {
            "type": "number",
            "nullable": true
          },
          "qtyOnOrder": {
            "type": "number",
            "nullable": true
          },
          "qtyInTransit": {
            "type": "number",
            "nullable": true
          },
          "reorderPoint": {
            "type": "integer",
            "nullable": true
          },
          "inventoryLevel": {
            "type": "string",
            "description": "in_stock | low_stock | out_of_stock",
            "nullable": true
          },
          "aisle": {
            "type": "string",
            "nullable": true
          },
          "row": {
            "type": "string",
            "nullable": true
          },
          "bin": {
            "type": "string",
            "nullable": true
          },
          "latestUnitCost": {
            "type": "number",
            "nullable": true
          },
          "stdPrice": {
            "type": "number",
            "nullable": true
          },
          "stdCost": {
            "type": "number",
            "nullable": true
          },
          "avgCost": {
            "type": "number",
            "nullable": true
          },
          "trackInventory": {
            "type": "integer",
            "nullable": true
          },
          "qtyLastUpdatedUTC": {
            "type": "string",
            "description": "Last quantity change at this location.",
            "nullable": true
          }
        }
      },
      "Part": {
        "type": "object",
        "properties": {
          "idPart": {
            "type": "integer"
          },
          "partsNumber": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "manufacturer": {
            "type": "string",
            "nullable": true
          },
          "manufacturerPartsNumber": {
            "type": "string",
            "nullable": true
          },
          "category": {
            "type": "string",
            "nullable": true
          },
          "partsClassId": {
            "type": "integer",
            "nullable": true
          },
          "uom": {
            "type": "string",
            "nullable": true
          },
          "unitCost": {
            "type": "number",
            "nullable": true
          },
          "photoUrl": {
            "type": "string",
            "nullable": true
          },
          "isStockItem": {
            "type": "integer",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "lastUpdatedUTC": {
            "type": "string",
            "description": "Latest qty_last_updated_utc across this part's locations.",
            "nullable": true
          },
          "stockByLocation": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PartStockByLocation"
            },
            "nullable": true
          }
        },
        "required": [
          "idPart"
        ]
      },
      "PartsResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "message": {
            "type": "string"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Part"
            },
            "nullable": true
          },
          "total": {
            "type": "integer",
            "nullable": true
          }
        }
      },
      "InventoryLocation": {
        "type": "object",
        "properties": {
          "idInventoryLocation": {
            "type": "integer"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "streetName": {
            "type": "string",
            "nullable": true
          },
          "city": {
            "type": "string",
            "nullable": true
          },
          "state": {
            "type": "string",
            "nullable": true
          },
          "country": {
            "type": "string",
            "nullable": true
          },
          "zoneName": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "lastUpdatedUTC": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "idInventoryLocation"
        ]
      },
      "InventoryLocationsResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "message": {
            "type": "string"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InventoryLocation"
            },
            "nullable": true
          },
          "total": {
            "type": "integer",
            "nullable": true
          }
        }
      },
      "PartLocationCreate": {
        "type": "object",
        "properties": {
          "idInventoryLocation": {
            "type": "integer",
            "description": "Inventory location ID (a shop/dealership) to stock the part at. Must be one of the idInventoryLocation values from GET /inventoryLocations."
          },
          "aisle": {
            "type": "string",
            "default": null,
            "maxLength": 50,
            "description": "Bin address: aisle (max 50 chars).",
            "nullable": true
          },
          "row": {
            "type": "string",
            "default": null,
            "maxLength": 50,
            "description": "Bin address: row (max 50 chars).",
            "nullable": true
          },
          "bin": {
            "type": "string",
            "default": null,
            "maxLength": 50,
            "description": "Bin address: bin (max 50 chars).",
            "nullable": true
          },
          "quantity": {
            "type": "integer",
            "default": 0,
            "description": "On-hand quantity at this location (default 0).",
            "nullable": true
          },
          "reorderPoint": {
            "type": "integer",
            "default": null,
            "description": "Reorder point. Required when trackInventory is true.",
            "nullable": true
          },
          "trackInventory": {
            "type": "boolean",
            "default": false,
            "description": "Whether to track inventory levels for this location (default false).",
            "nullable": true
          },
          "auditFrequency": {
            "type": "string",
            "default": null,
            "enum": [
              "MONTHLY",
              "2-MONTHS",
              "3-MONTHS",
              "4-MONTHS",
              "5-MONTHS",
              "6-MONTHS",
              "YEARLY",
              null
            ],
            "description": "Audit cadence: one of MONTHLY, 2-MONTHS, 3-MONTHS, 4-MONTHS, 5-MONTHS, 6-MONTHS, YEARLY.",
            "nullable": true
          }
        },
        "required": [
          "idInventoryLocation"
        ]
      },
      "PartCreate": {
        "type": "object",
        "properties": {
          "partsDescription": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "description": "Part description (required, max 100 chars)."
          },
          "partsNumber": {
            "type": "string",
            "default": null,
            "maxLength": 50,
            "description": "Customer part number (max 50 chars, Latin characters only). Used for de-duplication within the org.",
            "nullable": true
          },
          "manufacturer": {
            "type": "string",
            "default": null,
            "maxLength": 100,
            "description": "Manufacturer name (max 100 chars).",
            "nullable": true
          },
          "manufacturerPartsNumber": {
            "type": "string",
            "default": null,
            "maxLength": 100,
            "description": "Manufacturer part number (max 100 chars).",
            "nullable": true
          },
          "category": {
            "type": "string",
            "default": null,
            "maxLength": 100,
            "description": "Part category (max 100 chars).",
            "nullable": true
          },
          "measuringUnits": {
            "type": "string",
            "default": null,
            "maxLength": 15,
            "description": "Unit of measure, e.g. EACH, BOX (max 15 chars).",
            "nullable": true
          },
          "partsPhotoUrl": {
            "type": "string",
            "default": null,
            "maxLength": 200,
            "description": "URL to a part photo (max 200 chars).",
            "nullable": true
          },
          "partsNotes": {
            "type": "string",
            "default": null,
            "description": "Free-text notes.",
            "nullable": true
          },
          "unitCost": {
            "type": "number",
            "default": null,
            "description": "Catalog unit cost.",
            "nullable": true
          },
          "isStockItem": {
            "type": "boolean",
            "default": null,
            "description": "Whether the part is stock-managed. If true, at least one location is required.",
            "nullable": true
          },
          "partsClass": {
            "type": "integer",
            "default": null,
            "description": "Parts class ID.",
            "nullable": true
          },
          "idSuborganization": {
            "type": "integer",
            "default": null,
            "description": "Optional sub-organization ID to scope the part to.",
            "nullable": true
          },
          "locations": {
            "type": "array",
            "default": null,
            "description": "Optional stock locations to create for the part in the same call.",
            "items": {
              "$ref": "#/components/schemas/PartLocationCreate"
            },
            "nullable": true
          }
        },
        "required": [
          "partsDescription"
        ]
      },
      "PartCreateResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "message": {
            "type": "string"
          },
          "data": {
            "type": "object",
            "description": "Created part: idPart plus the submitted fields and locations.",
            "additionalProperties": {},
            "nullable": true
          }
        }
      },
      "PartLocationCreateResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "message": {
            "type": "string"
          },
          "data": {
            "type": "object",
            "description": "The part with its idPart and the newly added location.",
            "additionalProperties": {},
            "nullable": true
          }
        }
      },
      "_InvoiceHeaderOut": {
        "type": "object",
        "properties": {
          "idWoInvoice": {
            "type": "integer"
          },
          "idWo": {
            "type": "integer"
          },
          "vendorName": {
            "type": "string",
            "nullable": true
          },
          "invoiceNumber": {
            "type": "string",
            "nullable": true
          },
          "invoiceDate": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "cost": {
            "type": "number"
          },
          "status": {
            "type": "string"
          }
        }
      },
      "_LaborOut": {
        "type": "object",
        "properties": {
          "idWoExternalLabor": {
            "type": "integer"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "hours": {
            "type": "number",
            "nullable": true
          },
          "rate": {
            "type": "number",
            "nullable": true
          },
          "totalCost": {
            "type": "number",
            "nullable": true
          },
          "costCode": {
            "type": "string",
            "nullable": true
          },
          "date": {
            "type": "string",
            "format": "date",
            "nullable": true
          }
        }
      },
      "_PartOut": {
        "type": "object",
        "properties": {
          "idWoExternalPart": {
            "type": "integer"
          },
          "partNumber": {
            "type": "string",
            "nullable": true
          },
          "partName": {
            "type": "string",
            "nullable": true
          },
          "quantity": {
            "type": "number",
            "nullable": true
          },
          "uom": {
            "type": "string",
            "nullable": true
          },
          "unitCost": {
            "type": "number",
            "nullable": true
          },
          "totalCost": {
            "type": "number",
            "nullable": true
          },
          "costCode": {
            "type": "string",
            "nullable": true
          },
          "partsNotes": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "_AdditionalCostOut": {
        "type": "object",
        "properties": {
          "idWoAdditionalCost": {
            "type": "integer"
          },
          "category": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "amount": {
            "type": "number"
          },
          "costCode": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "_AttachmentOut": {
        "type": "object",
        "properties": {
          "idAttachment": {
            "type": "integer"
          },
          "fileId": {
            "type": "integer",
            "nullable": true
          },
          "url": {
            "type": "string",
            "description": "Presigned view URL (time-limited).",
            "nullable": true
          }
        }
      },
      "_InvoiceData": {
        "type": "object",
        "properties": {
          "invoice": {
            "$ref": "#/components/schemas/_InvoiceHeaderOut"
          },
          "externalLabor": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/_LaborOut"
            }
          },
          "externalParts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/_PartOut"
            }
          },
          "additionalCosts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/_AdditionalCostOut"
            }
          },
          "attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/_AttachmentOut"
            }
          },
          "idempotencyReplayed": {
            "type": "boolean",
            "description": "True if this response is a replay of a prior call with the same Idempotency-Key."
          }
        }
      },
      "WoInvoiceCreateResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "message": {
            "type": "string"
          },
          "data": {
            "anyOf": [
              {
                "type": "object",
                "nullable": true
              },
              {
                "$ref": "#/components/schemas/_InvoiceData"
              }
            ]
          }
        }
      },
      "MeterReadingRow": {
        "type": "object",
        "properties": {
          "assetName": {
            "type": "string",
            "description": "Customer-facing asset name"
          },
          "engineHours": {
            "type": "number",
            "description": "Engine hours reading",
            "nullable": true
          },
          "odometer": {
            "type": "number",
            "description": "Odometer reading",
            "nullable": true
          },
          "odometerUnit": {
            "type": "string",
            "description": "Required when odometer is sent. One of: kilometer, meter, mile",
            "nullable": true
          },
          "readingTimestamp": {
            "type": "string",
            "description": "ISO-8601, with an explicit UTC offset when available. Never named timestampUTC -- see spec review 2026-09-23.",
            "nullable": true
          },
          "idempotencyKey": {
            "type": "string",
            "description": "Caller-supplied unique key. Re-sending the same key returns the prior outcome.",
            "nullable": true
          },
          "readingStatus": {
            "type": "string",
            "description": "Omit or 'VALID' for a normal reading. 'REJECTED' reports a reading the caller's own source distrusts (not captured, a typo, an implausible jump) without writing any meter value -- 'reason' is then required.",
            "nullable": true
          },
          "reason": {
            "type": "string",
            "description": "Required when readingStatus is REJECTED.",
            "nullable": true
          }
        },
        "required": [
          "assetName"
        ]
      },
      "MeterReadingBatchRequest": {
        "type": "object",
        "properties": {
          "readings": {
            "type": "array",
            "description": "Array of meter/odometer readings, one per asset submission",
            "items": {
              "$ref": "#/components/schemas/MeterReadingRow"
            }
          }
        },
        "required": [
          "readings"
        ]
      },
      "MeterOutcome": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "description": "ACCEPTED or REJECTED, for this meter alone. DUPLICATE means the exact value submitted for this meter was already stored at this asset+timestamp -- it was not re-written, but did not block the OTHER meter in the row from being accepted (CLUE-54952)."
          },
          "reason": {
            "type": "string",
            "description": "Why this meter was rejected.",
            "nullable": true
          },
          "historyRecorded": {
            "type": "boolean",
            "description": "Whether the reading was written to the asset's meter history. A rejected reading never moves the asset's current value, but a regression is still kept in history; only a zero reading or an impossible jump is not."
          }
        }
      },
      "MeterReadingMeterResults": {
        "type": "object",
        "properties": {
          "engineHours": {
            "anyOf": [
              {
                "type": "object",
                "nullable": true
              },
              {
                "$ref": "#/components/schemas/MeterOutcome"
              }
            ]
          },
          "odometer": {
            "anyOf": [
              {
                "type": "object",
                "nullable": true
              },
              {
                "$ref": "#/components/schemas/MeterOutcome"
              }
            ]
          }
        }
      },
      "MeterReadingRowResult": {
        "type": "object",
        "properties": {
          "assetName": {
            "type": "string"
          },
          "idempotencyKey": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "ACCEPTED, PARTIALLY_ACCEPTED (one meter accepted or duplicate, the other rejected or newly accepted -- see meters), REJECTED, DUPLICATE (every meter in the row was already stored with the same value), RECORDED_ABSENT, or ERROR (a malformed row, an unresolved/ambiguous asset, or a write that failed to persist -- never reported as ACCEPTED)."
          },
          "reason": {
            "type": "string",
            "description": "Rejection reason; comma-separated when both meters were rejected.",
            "nullable": true
          },
          "error": {
            "type": "string",
            "nullable": true
          },
          "meters": {
            "description": "Per-meter outcome, one entry per meter sent in the row. Present when the readings were judged.",
            "anyOf": [
              {
                "$ref": "#/components/schemas/MeterReadingMeterResults"
              },
              {
                "type": "object",
                "nullable": true
              }
            ]
          }
        }
      },
      "MeterReadingBatchResponse": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MeterReadingRowResult"
            }
          }
        }
      },
      "GeofenceFeatureCollection": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "FeatureCollection"
            ],
            "description": "Must be 'FeatureCollection'."
          },
          "features": {
            "type": "array",
            "description": "Up to 1000 GeoJSON Features. Each feature: geometry Polygon or MultiPolygon (WGS84 [longitude, latitude]); properties.externalId (required, your stable geofence id -- the upsert key); properties.jobNumber (optional, matched to the project code/job number); properties.name (required); properties.description; properties.status (ACTIVE or INACTIVE, default ACTIVE). ArcGIS export aliases 'Global ID', 'Project Number', 'Geofence Name', 'Project Name' and 'Status' are also accepted.",
            "items": {}
          }
        },
        "required": [
          "features",
          "type"
        ]
      },
      "GeofenceSummary": {
        "type": "object",
        "properties": {
          "features": {
            "type": "integer",
            "description": "Number of features received."
          },
          "created": {
            "type": "integer"
          },
          "updated": {
            "type": "integer"
          },
          "unchanged": {
            "type": "integer"
          },
          "deactivated": {
            "type": "integer"
          },
          "skipped": {
            "type": "integer"
          },
          "failed": {
            "type": "integer"
          }
        }
      },
      "GeofenceFeatureResult": {
        "type": "object",
        "properties": {
          "featureIndex": {
            "type": "integer",
            "description": "0-based position of the feature in the request."
          },
          "externalId": {
            "type": "string",
            "description": "The geofence's externalId. MultiPolygon parts are stored as one geofence each, with '#1', '#2', ... appended.",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "CREATED, UPDATED, UNCHANGED, DEACTIVATED (set INACTIVE: the feature's status is not ACTIVE, or a MultiPolygon part no longer present), SKIPPED (status not ACTIVE and nothing to deactivate), or FAILED (nothing written; see error)."
          },
          "idGeofence": {
            "type": "integer",
            "nullable": true
          },
          "idProject": {
            "type": "integer",
            "description": "Project the geofence is linked to, or null when no job number matched.",
            "nullable": true
          },
          "jobNumber": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "error": {
            "type": "string",
            "nullable": true
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          }
        }
      },
      "GeofenceUpsertData": {
        "type": "object",
        "properties": {
          "summary": {
            "$ref": "#/components/schemas/GeofenceSummary"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GeofenceFeatureResult"
            }
          },
          "unmatchedJobNumbers": {
            "type": "array",
            "description": "Job numbers that matched no project. Those geofences were still created, unlinked.",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "GeofenceUpsertResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "message": {
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/GeofenceUpsertData"
          }
        }
      },
      "Geofence": {
        "type": "object",
        "properties": {
          "idGeofence": {
            "type": "integer"
          },
          "externalId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string"
          },
          "idProject": {
            "type": "integer",
            "nullable": true
          },
          "projectCode": {
            "type": "string",
            "nullable": true
          },
          "projectName": {
            "type": "string",
            "nullable": true
          },
          "createdAtUtc": {
            "type": "string",
            "nullable": true
          },
          "geometry": {
            "description": "GeoJSON Polygon, [longitude, latitude].",
            "nullable": true
          }
        }
      },
      "GeofencesResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "message": {
            "type": "string"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Geofence"
            }
          },
          "total": {
            "type": "integer"
          }
        }
      }
    },
    "responses": {
      "UNPROCESSABLE_ENTITY": {
        "description": "Unprocessable Entity",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "DEFAULT_ERROR": {
        "description": "Default error response",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    }
  },
  "security": [
    {
      "BasicAuth": []
    }
  ],
  "servers": [
    {
      "url": "/v1"
    }
  ],
  "externalDocs": {
    "url": "/v1/changelog",
    "description": "Changelog"
  },
  "paths": {
    "/Fleet/page/{page_number}": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "page_size",
            "description": "Number of items per page (1-500)",
            "schema": {
              "type": "integer",
              "default": 100,
              "minimum": 1,
              "maximum": 500
            },
            "required": false
          },
          {
            "in": "query",
            "name": "filter",
            "description": "A search term to filter equipment by alias",
            "schema": {
              "type": "string",
              "default": null,
              "nullable": true
            },
            "required": false
          }
        ],
        "responses": {
          "422": {
            "$ref": "#/components/responses/UNPROCESSABLE_ENTITY"
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FleetPageResponse"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/DEFAULT_ERROR"
          }
        },
        "tags": [
          "fleet"
        ],
        "security": [
          {
            "BasicAuth": []
          }
        ]
      },
      "parameters": [
        {
          "in": "path",
          "name": "page_number",
          "required": true,
          "schema": {
            "type": "integer",
            "minimum": 0
          }
        }
      ]
    },
    "/Fleet/single/{asset_id}": {
      "get": {
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FleetSingleResponse"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/DEFAULT_ERROR"
          }
        },
        "tags": [
          "fleet"
        ],
        "security": [
          {
            "BasicAuth": []
          }
        ]
      },
      "parameters": [
        {
          "in": "path",
          "name": "asset_id",
          "required": true,
          "schema": {
            "type": "string",
            "minLength": 1
          }
        }
      ]
    },
    "/Fleet": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "filter",
            "description": "A search term to filter equipment by alias",
            "schema": {
              "type": "string",
              "default": null,
              "nullable": true
            },
            "required": false
          },
          {
            "in": "query",
            "name": "page_number",
            "description": "Page number",
            "schema": {
              "type": "integer",
              "default": 1,
              "minimum": 1
            },
            "required": false
          },
          {
            "in": "query",
            "name": "page_size",
            "description": "Number of items per page (1-500)",
            "schema": {
              "type": "integer",
              "default": 100,
              "minimum": 1,
              "maximum": 500
            },
            "required": false
          }
        ],
        "responses": {
          "422": {
            "$ref": "#/components/responses/UNPROCESSABLE_ENTITY"
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FleetPageResponse"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/DEFAULT_ERROR"
          }
        },
        "tags": [
          "fleet"
        ],
        "security": [
          {
            "BasicAuth": []
          }
        ]
      }
    },
    "/assets": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "id_equipment",
            "description": "A filter on the data based on this comma-separated list of Equipment IDs.",
            "schema": {
              "type": "string",
              "nullable": true
            },
            "required": false
          },
          {
            "in": "query",
            "name": "start_time_utc",
            "description": "A filter based on Equipment.last_updated_utc (UTC).",
            "schema": {
              "type": "string",
              "nullable": true
            },
            "required": false
          },
          {
            "in": "query",
            "name": "end_time_utc",
            "description": "A filter based on Equipment.last_updated_utc (UTC).",
            "schema": {
              "type": "string",
              "nullable": true
            },
            "required": false
          },
          {
            "in": "query",
            "name": "page_number",
            "description": "Page number for pagination (default: 1).",
            "schema": {
              "type": "integer",
              "default": 1,
              "minimum": 1,
              "nullable": true
            },
            "required": false
          },
          {
            "in": "query",
            "name": "page_size",
            "description": "Number of items per page (default: 100, max: 1000).",
            "schema": {
              "type": "integer",
              "default": 100,
              "minimum": 1,
              "maximum": 1000,
              "nullable": true
            },
            "required": false
          }
        ],
        "responses": {
          "422": {
            "$ref": "#/components/responses/UNPROCESSABLE_ENTITY"
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AssetResponse"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/DEFAULT_ERROR"
          }
        },
        "tags": [
          "assets"
        ],
        "summary": "List of all assets",
        "description": "Returns a list of equipment assets with optional filters and pagination.\n\nQuery parameters:\n- id_equipment (optional): Comma-separated list of Equipment IDs to include.\n- start_time_utc (optional): Only include assets updated at or after this UTC timestamp.\n- end_time_utc (optional): Only include assets updated at or before this UTC timestamp.\n- page_number (optional): Page number for pagination (default: 1).\n- page_size (optional): Number of items per page (default: 100, max: 1000).\n\nResponse:\n- Array of assets as JSON objects with the fields defined below.\n- idEquipment(int): The id of the equipment record.\n- name(string): Equipment name.\n- serialNumber(string): Serial number of the equipment.\n- make(string): Manufacturer.\n- model(string): Model.\n- year(string): Year of manufacturing.\n- assetTypeCategory(string): Asset type category, using Clue's classification.\n- assetType(string): Asset type, using Clue's classification.\n- productClass(string): Product class, customer specific.\n- createdUTC(datetime): Date the record was created.\n- lastUpdatedUTC(datetime): Last update to equipment record.\n- hourMeter(string): Latest known engine hour meter.\n- hourMeterUTC(datetime): Timestamp of latest known engine hour meter.\n- odometer(string): Latest known odometer reading.\n- odometerUTC(datetime): Timestamp of latest known odometer reading.\n- odometerUOM(string): Units of measure for odometer.\n- fuelType(string): Type of fuel.\n- fuelTankLevel(string): Latest known fuel tank level.\n- equipmentNote(string): Customizable notes about the equipment.\n- lastSeenLong(string): Longitude of last known GPS location.\n- lastSeenLat(string): Latitutde of last known GPS location.\n- lastSeenUTC(string): Timestamp of last known known GPS location.\n- linkedUser(int): The id of the user linked to this asset.\n- inspectionIssues(int): number of open inspection issues.\n- workOrders(int): Number of currently open work orders.\n- faultCodes(int): number of open fault codes.\n- connectivity(string): Type of connectivity [telematics, GPS, none].\n- suborganization(string): Name of division, region or organizational hiererchy.\n- department(string): Name of organization department in matrix organizations.\n- idProject(int): The id of the currently assigned project.\n- idProjectShop(int): The id of assigned project shop record.\n- ownership(string): Ownership type e.g. Owned, Rented, Leased.\n- clueSubscription(string): Status of Clue subscription (active, deactivated).\n- idEquipmentPrimary(int): The id of the primary equipment record for de-duplicated equipment.\n- operationalStatus(string): Operational status of the equipment.\n- tags(object array): Asset filtering tags\ntagName(string): Tag name\n",
        "security": [
          {
            "BasicAuth": []
          }
        ]
      },
      "post": {
        "responses": {
          "422": {
            "$ref": "#/components/responses/UNPROCESSABLE_ENTITY"
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AssetCreateResponse"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/DEFAULT_ERROR"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AssetCreate"
              }
            }
          }
        },
        "tags": [
          "assets"
        ],
        "summary": "Create a new asset",
        "description": "Creates a new equipment asset for the authenticated user's organization.\n\nRequest body:\n- name (string, required): Equipment name / alias (max 100 chars).\n- serialNumber (string, optional): Serial number.\n- make (string, optional): Manufacturer / OEM name.\n- model (string, optional): Model name.\n- year (integer, optional): Year of manufacturing (1900-2100).\n- equipmentStatus (string, optional): ACTIVE or DEACTIVATED (default: ACTIVE).\n- ownership (string, optional): OWNED, RENTED, or LEASED (default: OWNED).\n- fuelType (string, optional): Fuel type enum value.\n- equipmentNote (string, optional): Notes (max 3000 chars).\n- productClass (string, optional): Product class code.\n\nResponse:\n- success (boolean): Success status.\n- message (string): Response message.\n- data (object): Created asset with idEquipment, equipmentID, and submitted fields.\n",
        "security": [
          {
            "BasicAuth": []
          }
        ]
      }
    },
    "/assets/{id_equipment}/properties": {
      "get": {
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EquipmentPropertiesResponse"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/DEFAULT_ERROR"
          }
        },
        "tags": [
          "assets"
        ],
        "summary": "Get equipment properties for an asset",
        "description": "Returns equipment properties for a specific asset.\n\nPath parameters:\n- id_equipment (required): The Equipment ID of the asset.\n\nResponse:\n- Equipment properties object with the following structure:\n  - idEquipment: The id of the equipment record\n  - name: Equipment name\n  - equipmentProperties: Array of equipment properties for this asset\n    - propertyId: Equipment property ID\n    - field: Property field identifier\n    - units: Property measuring units\n    - equipmentPropertyKey: Localized property key\n    - equipmentPropertyValue: Property value\n    - updatedUTC: Timestamp of last update to property (top-level)\n",
        "security": [
          {
            "BasicAuth": []
          }
        ]
      },
      "parameters": [
        {
          "in": "path",
          "name": "id_equipment",
          "required": true,
          "schema": {
            "type": "integer",
            "minimum": 0
          }
        }
      ]
    },
    "/assets/{id_equipment}/pm_history": {
      "get": {
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PMHistoryResponse"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/DEFAULT_ERROR"
          }
        },
        "tags": [
          "assets"
        ],
        "summary": "Get PM items with status and reset history for an asset",
        "description": "Returns PM (Preventive Maintenance) items and reset history for a specific asset.\n\nPath parameters:\n- id_equipment (required): The Equipment ID of the asset.\n\nResponse:\n- Object containing equipment information and PM data with the following structure:\n  - idEquipment(int): The id of the equipment record (Equipment.id_equipment)\n  - name(string): Equipment name (Equipment.equipment_alias)\n  - pmItems(object array): Array of PM items for this asset with:\n    - pmItemName(string): Name of PM item interval\n    - status(string): Current status e.g. Good Standing, Upcoming, Overdue\n    - intervalType(string): Type of interval (ENGINE_HOUR, MILEAGE, CALENDAR, MULTI_INTERVAL_TYPE)\n    - currentUsage(decimal): Current usage level\n    - serviceInterval(decimal): Next interval value\n    - pmPlan(string): Name of the PM plan this item belongs to\n    - pmResetHistory(object array): Array of PM reset history entries for this specific PM item with:\n      - timeResetUTC(datetime): UTC timestamp when PM was reset\n      - intervalUsageAtReset(decimal): Usage value at time of reset\n      - cumulativeUsageAtReset(decimal): Cumulative usage at time of reset\n      - userReset(int): ID of user who performed the reset\n\nNote: Only includes PM items with status='ACTIVE'. Each PM item includes its own reset history nested within.\n",
        "security": [
          {
            "BasicAuth": []
          }
        ]
      },
      "parameters": [
        {
          "in": "path",
          "name": "id_equipment",
          "required": true,
          "schema": {
            "type": "integer",
            "minimum": 0
          }
        }
      ]
    },
    "/assets/asset/pm_history": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "by_current_status",
            "description": "A filter on the data based on this comma-separated list of current Pm statuses. (Receives OVERDUE, UPCOMING, GOOD_STANDING)",
            "schema": {
              "type": "string",
              "nullable": true
            },
            "required": false
          },
          {
            "in": "query",
            "name": "group_by_asset",
            "description": "Determines if the response is grouped by equipment with multiple or single Pm Items in pmItem object  (default: false)",
            "schema": {
              "type": "boolean",
              "default": false,
              "nullable": true
            },
            "required": false
          },
          {
            "in": "query",
            "name": "page_number",
            "description": "Page number for pagination (default: 1).",
            "schema": {
              "type": "integer",
              "default": 1,
              "minimum": 1,
              "nullable": true
            },
            "required": false
          },
          {
            "in": "query",
            "name": "page_size",
            "description": "Number of items per page (default: 100, max: 1000).",
            "schema": {
              "type": "integer",
              "default": 100,
              "minimum": 1,
              "maximum": 1000,
              "nullable": true
            },
            "required": false
          }
        ],
        "responses": {
          "422": {
            "$ref": "#/components/responses/UNPROCESSABLE_ENTITY"
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AssetPMStatusResponse"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/DEFAULT_ERROR"
          }
        },
        "tags": [
          "assets"
        ],
        "summary": "Get Assets PM items with status",
        "description": "Returns PM (Preventive Maintenance) items with current status all assets.\n\nQuery parameters:\n- by_current_status (optional): Comma-separated list of statuses. Only include assets with items with status specified (OVERDUE, UPCOMING, GOOD_STANDING)\n- group_by_asset (optional): If true, groups the resulting pm items by asset with multiple items in pmItems array per asset. If false, no grouping, single item in pmItems array. \n\nResponse:\n- Array of assets as JSON objects with equipment name and PM data with the following structure:\n  - idEquipment(int): The id of the equipment record (Equipment.id_equipment)\n  - name(string): Equipment name (Equipment.equipment_alias)\n  - pmItems(object array): Array of PM items for this asset with:\n    - pmItemName(string): Name of PM item interval\n    - status(string): Current status e.g. Good Standing, Upcoming, Overdue\n    - intervalType(string): Type of interval (ENGINE_HOUR, MILEAGE, CALENDAR, MULTI_INTERVAL_TYPE)\n    - currentUsage(decimal): Current usage level\n    - serviceInterval(decimal): Next interval value\n    - pmPlan(string): Name of the PM plan this item belongs to\n",
        "security": [
          {
            "BasicAuth": []
          }
        ]
      }
    },
    "/assets/fuel_report": {
      "post": {
        "responses": {
          "422": {
            "$ref": "#/components/responses/UNPROCESSABLE_ENTITY"
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FuelReportResponse"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/DEFAULT_ERROR"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FuelReportRequest"
              }
            }
          }
        },
        "tags": [
          "assets"
        ],
        "summary": "Submit fuel reports for assets",
        "description": "Submit an array of fuel reports for assets.\n\nRequest body:\n- fuelReports (required): Array of fuel report objects\n\nEach fuel report object contains:\n- assetName (string, required): Name of the asset\n- idUser (int, required): ID of the user reporting fuel\n- timestampUTC (datetime, required): UTC timestamp when fuel was added\n- longitude (decimal, optional): Longitude coordinate\n- latitude (decimal, optional): Latitude coordinate  \n- fuelFilled (decimal, required): Amount of fuel filled\n- fuelUnit (string, required): Unit of fuel measurement (e.g., gallons, liters)\n- fuelType (string, optional): Type of fuel\n\nResponse:\n- success (boolean): Success status\n- message (string): Response message\n- processed (int): Number of fuel reports processed\n- errors (array, optional): List of errors if any occurred\n",
        "security": [
          {
            "BasicAuth": []
          }
        ]
      }
    },
    "/assets/{id_equipment}": {
      "patch": {
        "responses": {
          "422": {
            "$ref": "#/components/responses/UNPROCESSABLE_ENTITY"
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AssetUpdateResponse"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/DEFAULT_ERROR"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AssetUpdate"
              }
            }
          }
        },
        "tags": [
          "assets"
        ],
        "summary": "Update an asset",
        "description": "Updates fields on an existing equipment asset.\n\nPath parameters:\n- id_equipment (required): The Equipment ID of the asset.\n\nRequest body (all optional, but at least one required):\n- lastSeenLat (number): Latitude (-90 to 90). Must be paired with lastSeenLong.\n- lastSeenLong (number): Longitude (-180 to 180). Must be paired with lastSeenLat.\n- equipmentStatus (string): ACTIVE or DEACTIVATED.\n- equipmentNote (string): Notes (max 3000 chars).\n\nResponse:\n- success (boolean): Success status.\n- message (string): Response message.\n- data (object): Updated fields.\n",
        "security": [
          {
            "BasicAuth": []
          }
        ]
      },
      "parameters": [
        {
          "in": "path",
          "name": "id_equipment",
          "required": true,
          "schema": {
            "type": "integer",
            "minimum": 0
          }
        }
      ]
    },
    "/timecards": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "id_user",
            "description": "Comma-separated list of user IDs to filter by",
            "schema": {
              "type": "string",
              "default": null,
              "nullable": true
            },
            "required": false
          },
          {
            "in": "query",
            "name": "id_work_order",
            "description": "Comma-separated list of work order IDs to filter by",
            "schema": {
              "type": "string",
              "default": null,
              "nullable": true
            },
            "required": false
          },
          {
            "in": "query",
            "name": "status",
            "description": "Comma-separated list of timecard statuses (PENDING, DECLINED, APPROVED, REVIEWED, CLOCKED_IN, REVIEWED_1, REVIEWED_2)",
            "schema": {
              "type": "string",
              "default": null,
              "nullable": true
            },
            "required": false
          },
          {
            "in": "query",
            "name": "start_time_utc",
            "description": "Filter timecards updated after this UTC timestamp (ISO 8601 format)",
            "schema": {
              "type": "string",
              "format": "date-time",
              "default": null,
              "nullable": true
            },
            "required": false
          },
          {
            "in": "query",
            "name": "end_time_utc",
            "description": "Filter timecards updated before this UTC timestamp (ISO 8601 format)",
            "schema": {
              "type": "string",
              "format": "date-time",
              "default": null,
              "nullable": true
            },
            "required": false
          },
          {
            "in": "query",
            "name": "page_number",
            "description": "Page number",
            "schema": {
              "type": "integer",
              "default": 1,
              "minimum": 1,
              "nullable": true
            },
            "required": false
          },
          {
            "in": "query",
            "name": "page_size",
            "description": "Page size",
            "schema": {
              "type": "integer",
              "default": 100,
              "minimum": 1,
              "maximum": 1000,
              "nullable": true
            },
            "required": false
          }
        ],
        "responses": {
          "422": {
            "$ref": "#/components/responses/UNPROCESSABLE_ENTITY"
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimecardResponse"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/DEFAULT_ERROR"
          }
        },
        "tags": [
          "timecards"
        ],
        "summary": "Get All Timecards",
        "description": "Retrieves a paginated list of timecard records with comprehensive filtering capabilities.\n\nQuery parameters:\n- start_time_utc (optional): Filter timecards created/modified after this UTC timestamp (ISO 8601 format)\n- end_time_utc (optional): Filter timecards created/modified before this UTC timestamp (ISO 8601 format)\n- id_user (optional): Filter by specific user ID\n- id_work_order (optional): Filter by specific work order ID\n- status (optional): Filter by timecard status\n- page_number (optional): Page number for pagination (default: 1)\n- page_size (optional): Number of timecards per page (default: 100, max: 1000)\n\nResponse:\n- Paginated list of timecard records with detailed information\n- Each timecard includes:\n  - Basic timecard details (ID, user, work order, dates, hours)\n  - Time tracking information (start/end times, break times, overtime)\n  - Status and approval information\n  - Associated project and task details\n  - Labor cost and billing information\n- Response includes pagination metadata (total count, page info)\n\nStatus values:\n- Common statuses include: DRAFT, SUBMITTED, APPROVED, REJECTED, PROCESSED\n\nAuthentication:\n- Requires valid Basic Authentication\n- Users can only access timecards within their own organization\n- Additional filtering may apply based on user permissions\n\nTime filtering:\n- If only start_time_utc is provided, returns timecards from that time onwards\n- If both start_time_utc and end_time_utc are provided, returns timecards within that time range\n- Times should be in ISO 8601 format (e.g., \"2023-12-01T08:00:00Z\")\n",
        "security": [
          {
            "BasicAuth": []
          }
        ]
      }
    },
    "/users": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "page_size",
            "description": "Number of items per page (1-1000)",
            "schema": {
              "type": "integer",
              "default": 100,
              "minimum": 1,
              "maximum": 1000,
              "nullable": true
            },
            "required": false
          },
          {
            "in": "query",
            "name": "page_number",
            "description": "Page number",
            "schema": {
              "type": "integer",
              "default": 1,
              "minimum": 1,
              "nullable": true
            },
            "required": false
          }
        ],
        "responses": {
          "422": {
            "$ref": "#/components/responses/UNPROCESSABLE_ENTITY"
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UsersPageResponse"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/DEFAULT_ERROR"
          }
        },
        "tags": [
          "user"
        ],
        "summary": "Get All Users",
        "description": "Retrieves a paginated list of users within the authenticated user's organization.\n\nQuery parameters:\n- page_number (optional): Page number for pagination (default: 1)\n- page_size (optional): Number of users per page (default: 100, max: 100)\n\nResponse:\n- Paginated list of users with basic user information\n- suborganizations: sub-organizations of each user, as {idSuborganization, name}\n- tags: asset tags of each user; [\"ALL\"] = all assets, [] = no tags\n- Each user record includes user ID, name, email, and organizational details\n- Response includes pagination metadata (total count, page info)\n\nAuthentication:\n- Requires valid Basic Authentication\n- Users can only access users within their own organization\n",
        "security": [
          {
            "BasicAuth": []
          }
        ]
      },
      "post": {
        "responses": {
          "422": {
            "$ref": "#/components/responses/UNPROCESSABLE_ENTITY"
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserSyncResponse"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/DEFAULT_ERROR"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/UserSync"
                }
              }
            }
          }
        },
        "tags": [
          "user"
        ],
        "summary": "Sync Users",
        "description": "Synchronizes user data from an external system into the application.\n\nRequest Body:\n    - A list of user objects to be synchronized. Each user object should contain:\n    - phoneNumber (required): Unique identifier for the user\n    - firstName (required): User's first name\n    - email (required): User's email address\n    - userCode (optional): User code\n    - lastName (optional): User's last name\n    - jobTitle (optional): User's job title\n    - roleName (optional): Role assigned to the user. A Clue staff role cannot be assigned (422).\n    - union (optional): Pay class of the user\n    - userStatus (optional): Status of the user. When omitted it is ACTIVE, so a sync that omits it\n      reactivates a deactivated user. Send it on every user your system has deactivated.\n    - idSuborganizations (optional): array of sub-organization IDs the user is assigned to (Affiliated\n      Organization). GET /users shows each user's suborganizations with their IDs.\n    - tags (optional): array of asset tag names that control which assets the user sees. [\"ALL\"] = all assets.\n      With no tags the user sees only assets that have no tag.\n\n    New and existing users:\n    - A new user is created as PENDING with an invitation. The user becomes ACTIVE when they accept\n      the invitation in the Clue app.\n    - For an existing user, an omitted lastName or union keeps its current value (userStatus is the\n      exception, see above). Send \"union\": \"\" to clear the pay class.\n    - roleName, jobTitle and userCode of an existing user follow your system: role updates are on\n      for every organization unless Clue support turned them off for yours (then these three are\n      set only when a user is created). With role updates on:\n      - they change when the request sends them, and every role change is recorded;\n      - a jobTitle that is not in Clue's list keeps the current title;\n      - a userCode that another user already holds is refused with 422, and nothing is saved.\n\n    Rules for idSuborganizations and tags:\n    - Omitted or null: the user's current value does not change.\n    - An array replaces the user's current value. [] removes all sub-organizations, or all tags.\n    - Values must already exist in your organization; the API never creates a sub-organization or a tag.\n      Tag names match regardless of upper/lower case and surrounding spaces. Deleted sub-organizations do not match.\n    - \"ALL\" (or \"*\") together with other tags gives the user all assets. \"NONE\" and empty strings are ignored.\n    - Every user in the request is validated before anything is written. Any unknown value rejects the\n      whole request with 422 and nothing is saved; the message names each phoneNumber and its unknown values.\n    - Valid tags are the tags your organization already uses (on assets, on projects, or on users).\n    - When sent, these values overwrite what an admin set in the web app.\n    - Warning: users whose role only sees assigned sub-organizations see nothing after idSuborganizations: [].\n      Omit the field (or send null) when your system has no value for it.\n\nResponse:\n    - Summary of the synchronization process including counts of created, updated, and deactivated users.\nAuthentication:\n    - Requires valid Basic Authentication\n",
        "security": [
          {
            "BasicAuth": []
          }
        ]
      }
    },
    "/projects": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "start_time_utc",
            "description": "A filter on the data based on updatedUTC time (ISO 8601 format)",
            "schema": {
              "type": "string",
              "format": "date-time",
              "default": null,
              "nullable": true
            },
            "required": false
          },
          {
            "in": "query",
            "name": "end_time_utc",
            "description": "A filter on the data based on updatedUTC time (ISO 8601 format)",
            "schema": {
              "type": "string",
              "format": "date-time",
              "default": null,
              "nullable": true
            },
            "required": false
          },
          {
            "in": "query",
            "name": "page_number",
            "description": "Page number for pagination",
            "schema": {
              "type": "integer",
              "default": 1,
              "minimum": 1,
              "nullable": true
            },
            "required": false
          },
          {
            "in": "query",
            "name": "page_size",
            "description": "Page size for pagination",
            "schema": {
              "type": "integer",
              "default": 100,
              "minimum": 1,
              "maximum": 1000,
              "nullable": true
            },
            "required": false
          }
        ],
        "responses": {
          "422": {
            "$ref": "#/components/responses/UNPROCESSABLE_ENTITY"
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectsResponse"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/DEFAULT_ERROR"
          }
        },
        "tags": [
          "projects"
        ],
        "summary": "Get All Projects",
        "description": "Retrieves a paginated list of projects within the authenticated user's organization with optional time-based filtering.\n\nQuery parameters:\n- start_time_utc (optional): Filter projects created/modified after this UTC timestamp (ISO 8601 format)\n- end_time_utc (optional): Filter projects created/modified before this UTC timestamp (ISO 8601 format)\n- page_number (optional): Page number for pagination (default: 1)\n- page_size (optional): Number of projects per page (default: 100, max: 100)\n\nResponse:\n- Paginated list of projects with detailed project information\n- Each project includes:\n  - Basic project details (ID, name, description, status, dates)\n  - Location and site information\n  - Project manager and team assignments\n  - Budget and financial information\n  - Custom fields and attributes\n- Response includes pagination metadata (total count, page info)\n\nAuthentication:\n- Requires valid Basic Authentication\n- Users can only access projects within their own organization\n\nTime filtering:\n- If only start_time_utc is provided, returns projects from that time onwards\n- If both start_time_utc and end_time_utc are provided, returns projects within that time range\n- Times should be in ISO 8601 format (e.g., \"2023-12-01T10:00:00Z\")\n",
        "security": [
          {
            "BasicAuth": []
          }
        ]
      },
      "post": {
        "responses": {
          "422": {
            "$ref": "#/components/responses/UNPROCESSABLE_ENTITY"
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectSyncResponse"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/DEFAULT_ERROR"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ProjectSync"
                }
              }
            }
          }
        },
        "tags": [
          "projects"
        ],
        "summary": "Sync Projects",
        "description": "Synchronizes project data from an external system into the application.\nRequest Body:\n    - name: Name of the project\n    - description: Description of the project\n    - status: Status of the project (e.g., ACTIVE, INACTIVE)\n    - divisionCode: Division code associated with the project\n    - streetName: Street name of the project location\n    - city: City of the project location\n    - state: State of the project location\n    - zipCode: ZIP code of the project location\n    - type: Type of the project\n    - projectClass: Class of the project\n",
        "security": [
          {
            "BasicAuth": []
          }
        ]
      }
    },
    "/phase_projects": {
      "post": {
        "responses": {
          "422": {
            "$ref": "#/components/responses/UNPROCESSABLE_ENTITY"
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectSyncResponse"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/DEFAULT_ERROR"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ProjectPhaseSync"
                }
              }
            }
          }
        },
        "tags": [
          "projects"
        ],
        "summary": "Get Projects by Phase Codes",
        "description": "Retrieves projects associated with the specified phase codes within the authenticated user's organization.\nRequest Body:\n    - phaseCode: Code of the project phase\n    - projectCode: Code of the project related to the phase\n    - phaseDescription: Description of the project phase\n    - status: Status of the project phase (e.g., active or inactive)\n",
        "security": [
          {
            "BasicAuth": []
          }
        ]
      }
    },
    "/inspections": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "id_equipment",
            "description": "Comma-separated list of equipment IDs to filter by",
            "schema": {
              "type": "string",
              "default": null,
              "nullable": true
            },
            "required": false
          },
          {
            "in": "query",
            "name": "start_time_utc",
            "description": "Filter inspections updated after this UTC timestamp (ISO 8601 format)",
            "schema": {
              "type": "string",
              "format": "date-time",
              "default": null,
              "nullable": true
            },
            "required": false
          },
          {
            "in": "query",
            "name": "end_time_utc",
            "description": "Filter inspections updated before this UTC timestamp (ISO 8601 format)",
            "schema": {
              "type": "string",
              "format": "date-time",
              "default": null,
              "nullable": true
            },
            "required": false
          },
          {
            "in": "query",
            "name": "only_open_issues",
            "description": "If true, only returns inspections with open issues",
            "schema": {
              "type": "boolean",
              "default": false,
              "nullable": true
            },
            "required": false
          },
          {
            "in": "query",
            "name": "page_number",
            "description": "Page number",
            "schema": {
              "type": "integer",
              "default": 1,
              "minimum": 1,
              "nullable": true
            },
            "required": false
          },
          {
            "in": "query",
            "name": "page_size",
            "description": "Page size",
            "schema": {
              "type": "integer",
              "default": 100,
              "minimum": 1,
              "maximum": 1000,
              "nullable": true
            },
            "required": false
          }
        ],
        "responses": {
          "422": {
            "$ref": "#/components/responses/UNPROCESSABLE_ENTITY"
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InspectionResponse"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/DEFAULT_ERROR"
          }
        },
        "tags": [
          "inspection"
        ],
        "summary": "Get All Inspections",
        "description": "Retrieves a paginated list of equipment inspection records with comprehensive filtering capabilities.\n\nQuery parameters:\n- start_time_utc (optional): Filter inspections created/performed after this UTC timestamp (ISO 8601 format)\n- end_time_utc (optional): Filter inspections created/performed before this UTC timestamp (ISO 8601 format)\n- id_equipment (optional): Filter by specific equipment/asset ID\n- only_open_issues (optional): When true, returns only inspections with unresolved issues (default: false)\n- page_number (optional): Page number for pagination (default: 1)\n- page_size (optional): Number of inspections per page (default: 100, max: 100)\n\nResponse:\n- Paginated list of inspection records with detailed information\n- Each inspection includes:\n  - Basic inspection details (ID, equipment, inspector, dates, type)\n  - Inspection checklist items and results\n  - Issue identification and severity levels\n  - Photos and documentation attachments\n  - Follow-up actions and resolution status\n  - Compliance and regulatory information\n- Response includes pagination metadata (total count, page info)\n\nInspection Types:\n- Common types include: DAILY, WEEKLY, MONTHLY, ANNUAL, PRE_USE, POST_USE, MAINTENANCE\n\nIssue Severity Levels:\n- CRITICAL: Immediate action required, equipment unsafe for use\n- HIGH: Significant issue requiring prompt attention\n- MEDIUM: Moderate issue that should be addressed soon\n- LOW: Minor issue for future maintenance consideration\n\nAuthentication:\n- Requires valid Basic Authentication\n- Users can only access inspections within their own organization\n- Response content may be filtered based on user permissions and language preferences\n\nTime filtering:\n- If only start_time_utc is provided, returns inspections from that time onwards\n- If both start_time_utc and end_time_utc are provided, returns inspections within that time range\n- Times should be in ISO 8601 format (e.g., \"2023-12-01T07:00:00Z\")\n",
        "security": [
          {
            "BasicAuth": []
          }
        ]
      }
    },
    "/dispatchrequests": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "start_time_request_utc",
            "description": "Filter requests created after this UTC timestamp (ISO 8601 format)",
            "schema": {
              "type": "string",
              "format": "date-time",
              "default": null,
              "nullable": true
            },
            "required": false
          },
          {
            "in": "query",
            "name": "end_time_request_utc",
            "description": "Filter requests created before this UTC timestamp (ISO 8601 format)",
            "schema": {
              "type": "string",
              "format": "date-time",
              "default": null,
              "nullable": true
            },
            "required": false
          },
          {
            "in": "query",
            "name": "resource_type",
            "description": "Filter by resource type (asset, people, material_truck)",
            "schema": {
              "type": "string",
              "default": null,
              "nullable": true
            },
            "required": false
          },
          {
            "in": "query",
            "name": "page_number",
            "description": "Page number for pagination",
            "schema": {
              "type": "integer",
              "default": 1,
              "minimum": 1,
              "nullable": true
            },
            "required": false
          },
          {
            "in": "query",
            "name": "page_size",
            "description": "Page size for pagination",
            "schema": {
              "type": "integer",
              "default": 100,
              "minimum": 1,
              "maximum": 1000,
              "nullable": true
            },
            "required": false
          }
        ],
        "responses": {
          "422": {
            "$ref": "#/components/responses/UNPROCESSABLE_ENTITY"
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DispatchRequestsResponse"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/DEFAULT_ERROR"
          }
        },
        "tags": [
          "dispatch"
        ],
        "summary": "Get All Dispatch Requests",
        "description": "Retrieves a list of dispatch request records with optional filtering capabilities.\n\nQuery parameters:\n- start_time_request_utc (optional): Filter requests created after this UTC timestamp (ISO 8601 format)\n- end_time_request_utc (optional): Filter requests created before this UTC timestamp (ISO 8601 format)  \n- resource_type (optional): Filter by resource type (asset, people, material_truck)\n\nResponse:\n- Array of dispatch requests with nested assignments and deliveries\n- Each dispatch request includes:\n  - Basic request information (ID, resource type, project, status, dates, etc.)\n  - Asset type and product class information (for asset requests)\n  - Job title and pay class information (for people requests)\n  - Array of assignments with delivery information\n  \nStatus values:\n- Request Status: EXPIRED, CANCELLED, DRAFT, OPEN, FULFILLED, REQUESTED\n- Assignment Status: EXPIRED, CANCELLED, SCHEDULED, OPEN, CONFIRMED, IN_PROGRESS, COMPLETED, NOTIFIED, REQUESTED\n- Delivery Status: CANCELLED, SCHEDULED, DELIVERED, PICKED_UP, NOTIFIED\n",
        "security": [
          {
            "BasicAuth": []
          }
        ]
      }
    },
    "/workorders": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "id_equipment",
            "description": "Comma-separated list of Equipment IDs to filter by (e.g., '123,456,789')",
            "schema": {
              "type": "string",
              "nullable": true
            },
            "required": false
          },
          {
            "in": "query",
            "name": "work_order_number",
            "description": "Filter by exact Work Order Number (the user-defined work order number, not the internal id)",
            "schema": {
              "type": "string",
              "nullable": true
            },
            "required": false
          },
          {
            "in": "query",
            "name": "start_time_utc",
            "description": "Filter by lastUpdatedUTC (includes timecard, part order and invoice changes) - start date (ISO 8601 format, e.g., '2023-12-01T07:00:00Z')",
            "schema": {
              "type": "string",
              "nullable": true
            },
            "required": false
          },
          {
            "in": "query",
            "name": "end_time_utc",
            "description": "Filter by lastUpdatedUTC (includes timecard, part order and invoice changes) - end date (ISO 8601 format, e.g., '2023-12-01T23:59:59Z')",
            "schema": {
              "type": "string",
              "nullable": true
            },
            "required": false
          },
          {
            "in": "query",
            "name": "page_number",
            "description": "Page number to return",
            "schema": {
              "type": "integer",
              "default": 1,
              "minimum": 1,
              "nullable": true
            },
            "required": false
          },
          {
            "in": "query",
            "name": "page_size",
            "description": "Page size to return (max 1000)",
            "schema": {
              "type": "integer",
              "default": 100,
              "minimum": 1,
              "maximum": 1000,
              "nullable": true
            },
            "required": false
          }
        ],
        "responses": {
          "422": {
            "$ref": "#/components/responses/UNPROCESSABLE_ENTITY"
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkOrderResponse"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/DEFAULT_ERROR"
          }
        },
        "tags": [
          "workorders"
        ],
        "summary": "List of all work orders",
        "description": "Returns work orders with optional filters and pagination.\n\nQuery parameters:\n- id_equipment (optional): Comma-separated list of Equipment IDs to include.\n- work_order_number (optional): Exact Work Order Number to filter by. Combines with other filters using AND semantics.\n- start_time_utc (optional): Only include assets updated at or after this UTC timestamp.\n- end_time_utc (optional): Only include assets updated at or before this UTC timestamp.\n- page_number (optional): Page number for pagination (default: 1).\n- page_size (optional): Number of items per page (default: 100, max: 1000).\n\nResponse:\nArray of work orders as JSON objects with the fields defined below.\n- idWorkOrder (int): The id of the work order.\n- workOrderNumber (string): User defined work order number.\n- idEquipment (int): The id of the equipment record.\n- assetName (string): Equipment name.\n- idProject (int): The id of the currently assigned project.\n- idProjectShop (int): The id of the project shop.\n- title (string): Title of work order.\n- type (string): Type of work order.\n- description (string): Description of work order.\n- status (string): Status of work order.\n- engineHoursAtCompletion (decimal): Engine hours at completion of work order.\n- odometerAtCompletion (decimal): Odometer at completion of work order.\n- odometerUOM (string): Units of measure for odometer.\n- dueDate (date): Due date for completion.\n- createdUTC (datetime): Timestamp of creation of work order.\n- workOrderAssignees (objectArray): Array of work order assignee objects as JSON objects with the fields defined below.\n    - assignedByUser (int): The id of the user who assigned someone.\n    - assignedToUser (int): The id of the user who was assigned.\n    - createdUTC (datetime): Timestamp when the user was assigned.\n- workOrderTasks (objectArray): Array of work order task objects as JSON objects with the fields defined below.\n    - idWorkOrderTask (int): The id of the work order task.\n    - woTaskNumber (string): Ordinal number of task.\n    - woTaskDescription (string): Description of the task.\n    - createdUTC (time): Timestamp of work order task creation.\n    - createdByUser (string): The id of the user who created the task.\n    - mechanic (string): The if of the mechanic who is assigned to the task.\n    - partsCost (decimal): Total cost of parts on this task.\n    - timecardsMinutes (decimal): Total timecard length in minutes for this task.\n    - laborCost (decimal): Total timecard labor cost for this task (excludes DELETED_BY_USER).\n    - currencyCode (string): ISO currency code associated with the task labor cost.\n    - woTaskCostCode (string): Cost code\n    - woTaskStatus (string)\n- totalPartsCost (decimal): Sum of all part order costs for the work order (excludes DELETED_BY_USER / CANCELLED). Always numeric.\n- totalLaborCost (decimal): Sum of all timecard costs for the work order (excludes DELETED_BY_USER). Always numeric.\n- totalLaborMinutes (decimal): Sum of all timecard minutes for the work order (excludes DELETED_BY_USER). Always numeric.\n- totalInvoicesCost (decimal): Sum of all submitted vendor invoice costs attached to the work order. Always numeric.\n- totalCost (decimal): totalPartsCost + totalLaborCost + totalInvoicesCost.\n- currencyCode (string): Organization default ISO currency code applied to all WO-level cost rollups.\n- workOrderParts (objectArray): Array of part line items on the work order. Excludes statuses CANCELLED and DELETED_BY_USER. Same shape as the single-WO GET /workorders/{id_wo}/parts endpoint.\n    - idPartOrder (int): Stable id of the part order line.\n    - idPart (int): The id of the part (joins to /v1/parts).\n    - idWorkOrder (int): Parent work order id.\n    - idWorkOrderTask (int): The id of the work order task this part belongs to (nullable).\n    - status (string): One of REQUIRED, REQUESTED, ORDERING, ORDERED, SCHEDULING, SCHEDULED, NOTIFIED, BACK_ORDERED, IN_TRANSIT, DELIVERY_BY_VENDOR, DELIVERED, RECEIVED, PICKED_UP, USED, QUOTE_REQUESTED, QUOTED.\n    - itemName (string): Name/description of the part.\n    - quantity (int) / uom (string) / unitCost (decimal) / totalCost (decimal) / currencyCode (string).\n    - isFulfilledFromInventory (int): 1 if pulled from a Clue inventory location, 0 if ordered from a vendor.\n    - idInventoryLocation (int): Inventory location id when isFulfilledFromInventory = 1 (nullable).\n    - inventoryLocationName (string): Inventory location name (nullable).\n    - isDeliveredByVendor (int): 1 if delivered by vendor, 0 if not.\n    - idVendor (int): Vendor id when isFulfilledFromInventory = 0 (nullable).\n    - poNumber (string) / documentNumber (string) / costCode (string) / partOrderNotes (string) / partNotes (string).\n    - createdUTC, lastUpdatedUTC, orderedUTC, deliveredUTC, usedUTC (datetime): Lifecycle timestamps (usedUTC populated only when status = USED).\n    ",
        "security": [
          {
            "BasicAuth": []
          }
        ]
      }
    },
    "/workorders/{id_wo}/parts": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "page_number",
            "description": "Page number to return",
            "schema": {
              "type": "integer",
              "default": 1,
              "minimum": 1,
              "nullable": true
            },
            "required": false
          },
          {
            "in": "query",
            "name": "page_size",
            "description": "Page size to return (max 1000)",
            "schema": {
              "type": "integer",
              "default": 100,
              "minimum": 1,
              "maximum": 1000,
              "nullable": true
            },
            "required": false
          }
        ],
        "responses": {
          "422": {
            "$ref": "#/components/responses/UNPROCESSABLE_ENTITY"
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkOrderPartOrdersResponse"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/DEFAULT_ERROR"
          }
        },
        "tags": [
          "workorders"
        ],
        "summary": "List part orders for a work order",
        "description": "Returns the line-level part orders attached to a single work order.\n\nPath parameters:\n- id_wo (integer, required): The id of the work order.\n\nQuery parameters:\n- page_number (optional): Page number for pagination (default: 1).\n- page_size (optional): Number of items per page (default: 100, max: 1000).\n\nResponse:\nReturns 404 if the work order does not exist or does not belong to the authenticated organization.\nExcludes part orders in DELETED_BY_USER status. CANCELLED rows are included for audit; consumers can filter on the returned `status` field.\n",
        "security": [
          {
            "BasicAuth": []
          }
        ]
      },
      "parameters": [
        {
          "in": "path",
          "name": "id_wo",
          "required": true,
          "schema": {
            "type": "integer",
            "minimum": 0
          }
        }
      ]
    },
    "/workorders/{id_wo}/invoices": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "page_number",
            "description": "Page number to return",
            "schema": {
              "type": "integer",
              "default": 1,
              "minimum": 1,
              "nullable": true
            },
            "required": false
          },
          {
            "in": "query",
            "name": "page_size",
            "description": "Page size to return (max 1000)",
            "schema": {
              "type": "integer",
              "default": 100,
              "minimum": 1,
              "maximum": 1000,
              "nullable": true
            },
            "required": false
          }
        ],
        "responses": {
          "422": {
            "$ref": "#/components/responses/UNPROCESSABLE_ENTITY"
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkOrderInvoicesResponse"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/DEFAULT_ERROR"
          }
        },
        "tags": [
          "workorders"
        ],
        "summary": "List vendor invoices for a work order",
        "description": "Returns the vendor invoices captured against a single work order, with their attachment URLs.\n\nPath parameters:\n- id_wo (integer, required): The id of the work order.\n\nQuery parameters:\n- page_number (optional): Page number for pagination (default: 1).\n- page_size (optional): Number of items per page (default: 100, max: 1000).\n\nResponse fields (per invoice):\n- idWorkOrderInvoice (int)\n- idWorkOrder (int)\n- invoiceNumber (string)\n- idVendor (int), vendorName (string)\n- cost (decimal), currencyCode (string)\n- costCode (string), notes (string), invoiceDate (date)\n- createdUTC, lastUpdatedUTC\n- attachments (objectArray): { idAttachment, url }\n\nOnly invoices in SUBMITTED status are returned. Returns 404 if the work order does not exist or does not belong to the authenticated organization.\n",
        "security": [
          {
            "BasicAuth": []
          }
        ]
      },
      "parameters": [
        {
          "in": "path",
          "name": "id_wo",
          "required": true,
          "schema": {
            "type": "integer",
            "minimum": 0
          }
        }
      ]
    },
    "/faultcodes": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "id_equipment",
            "description": "Comma-separated list of equipment IDs to filter by (e.g., '123,456,789')",
            "schema": {
              "type": "string",
              "nullable": true
            },
            "required": false
          },
          {
            "in": "query",
            "name": "start_time_utc",
            "description": "Filter fault codes created after this UTC datetime (ISO 8601 format, e.g., '2023-12-01T07:00:00Z' or '2023-12-01')",
            "schema": {
              "type": "string",
              "nullable": true
            },
            "required": false
          },
          {
            "in": "query",
            "name": "end_time_utc",
            "description": "Filter fault codes created before this UTC datetime (ISO 8601 format, e.g., '2023-12-01T23:59:59Z' or '2023-12-01')",
            "schema": {
              "type": "string",
              "nullable": true
            },
            "required": false
          },
          {
            "in": "query",
            "name": "page_size",
            "description": "Number of items per page (default 100, max 1000)",
            "schema": {
              "type": "integer",
              "default": 100,
              "minimum": 1,
              "maximum": 1000,
              "nullable": true
            },
            "required": false
          },
          {
            "in": "query",
            "name": "page_number",
            "description": "Page number to retrieve (default 1)",
            "schema": {
              "type": "integer",
              "default": 1,
              "minimum": 1,
              "nullable": true
            },
            "required": false
          }
        ],
        "responses": {
          "422": {
            "$ref": "#/components/responses/UNPROCESSABLE_ENTITY"
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FaultCodesResponse"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/DEFAULT_ERROR"
          }
        },
        "tags": [
          "faultcodes"
        ],
        "summary": "Get fault codes grouped by equipment",
        "description": "Returns fault codes grouped by equipment with optional filtering.\n    \n**Query Parameters:**\n- **id_equipment** (optional): Comma-separated list of equipment IDs to filter by\n- **start_time_utc** (optional): Filter fault codes created after this UTC datetime\n- **end_time_utc** (optional): Filter fault codes created before this UTC datetime  \n- **page_number** (optional): Page number to return (default 1)\n- **page_size** (optional): Page size to return (default 100, max 1000)\n\n**Response Format:**\nReturns equipment objects with their associated fault codes:\n- **idEquipment**: The ID of the equipment record\n- **assetName**: Equipment name\n- **faultCodes**: Array of fault code objects with:\n  - idError: Internal ID of fault code\n  - createdUTC: Timestamp of fault code time\n  - codeIdentifier: Code provided by OEM\n  - description: Description provided by OEM\n  - status: Status of fault code (open or dismissed)\n  - severity: Standardized severity level (1 low to 3 high)\n  - longitude/latitude: GPS coordinates\n  - spn, fmi, cid, eid, mid: Caterpillar specific fault code data\n  - dismissedByUser: ID of user who dismissed fault code\n  - dismissedUTC: Timestamp when fault code was dismissed\n  - associatedWorkOrder: List of work order IDs associated with fault code\n",
        "security": [
          {
            "BasicAuth": []
          }
        ]
      }
    },
    "/vendors": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "page_number",
            "description": "Page number for pagination",
            "schema": {
              "type": "integer",
              "default": 1,
              "minimum": 1,
              "nullable": true
            },
            "required": false
          },
          {
            "in": "query",
            "name": "page_size",
            "description": "Page size for pagination",
            "schema": {
              "type": "integer",
              "default": 100,
              "minimum": 1,
              "maximum": 1000,
              "nullable": true
            },
            "required": false
          }
        ],
        "responses": {
          "422": {
            "$ref": "#/components/responses/UNPROCESSABLE_ENTITY"
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VendorsResponse"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/DEFAULT_ERROR"
          }
        },
        "tags": [
          "vendors"
        ],
        "summary": "Get All Vendors",
        "description": "Retrieves a paginated list of vendors within the authenticated user's organization.\n\nQuery parameters:\n- page_number (optional): Page number for pagination (default: 1)\n- page_size (optional): Number of vendors per page (default: 100, max: 1000)\n\nResponse:\n- Paginated list of vendors with detailed vendor information\n- Each vendor includes:\n  - Basic vendor details (ID, name, code, status)\n  - Vendor type information (filtered by id_language='en-us')\n  - Contact information (email, phone, service phone)\n  - Address information (street, city, state, zip code, country)\n  - Creation timestamp\n- Response includes pagination metadata (total count, page info)\n\nAuthentication:\n- Requires valid Basic Authentication\n- Users can only access vendors within their own organization\n\nVendor Types:\n- Vendor types are retrieved from the VendorType table where id_language= user language\n- Common types include: Equipment Rental, Parts Supplier, Service Provider, Material Supplier, Subcontractor, Other\n",
        "security": [
          {
            "BasicAuth": []
          }
        ]
      }
    },
    "/rentalcontracts": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "id_rental_contracts",
            "description": "Comma-separated list of rental contract IDs to filter by (e.g., '123,456,789')",
            "schema": {
              "type": "string",
              "nullable": true
            },
            "required": false
          },
          {
            "in": "query",
            "name": "start_time_request_utc",
            "description": "Filter rental contracts created after this UTC datetime (ISO 8601 format, e.g., '2023-12-01T07:00:00Z' or '2023-12-01')",
            "schema": {
              "type": "string",
              "nullable": true
            },
            "required": false
          },
          {
            "in": "query",
            "name": "end_time_request_utc",
            "description": "Filter rental contracts created before this UTC datetime (ISO 8601 format, e.g., '2023-12-01T23:59:59Z' or '2023-12-01')",
            "schema": {
              "type": "string",
              "nullable": true
            },
            "required": false
          },
          {
            "in": "query",
            "name": "page_size",
            "description": "Number of items per page (default 100, max 1000)",
            "schema": {
              "type": "integer",
              "default": 100,
              "minimum": 1,
              "maximum": 1000,
              "nullable": true
            },
            "required": false
          },
          {
            "in": "query",
            "name": "page_number",
            "description": "Page number to retrieve (default 1)",
            "schema": {
              "type": "integer",
              "default": 1,
              "minimum": 1,
              "nullable": true
            },
            "required": false
          }
        ],
        "responses": {
          "422": {
            "$ref": "#/components/responses/UNPROCESSABLE_ENTITY"
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RentalContractsResponse"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/DEFAULT_ERROR"
          }
        },
        "tags": [
          "rentalcontracts"
        ],
        "summary": "Get rental contracts with equipment and calculations",
        "description": "Returns all rental contracts with their associated equipment and cost calculations.\n    \n**Query Parameters:**\n- **id_rental_contracts** (optional): Comma-separated list of rental contract IDs to filter by\n- **start_time_request_utc** (optional): Filter contracts created after this UTC datetime\n- **end_time_request_utc** (optional): Filter contracts created before this UTC datetime  \n- **page_number** (optional): Page number to return (default 1)\n- **page_size** (optional): Page size to return (default 100, max 1000)\n\n**Response Format:**\nReturns rental contract objects with nested equipment and calculations:\n- **idRentalContract**: The ID of the rental contract object\n- **po**: The PO details\n- **status**: Status of the rental contract (CANCELLED, DELETED, DRAFT, etc.)\n- **notes**: Notes field\n- **contractNumber**: Contract number provided\n- **createdUTC**: Timestamp when the record was created\n- **rentalEquipment**: Array of rental equipment objects with:\n  - idEquipment: Equipment ID linked to this rental\n  - contractGroup: Number of contract group\n  - po: PO details for this equipment\n  - status: Status of the rental equipment\n  - description: Description of the equipment rented\n  - model: Model of the asset\n  - serialNumber: Serial number provided by vendor\n  - startDate: Start date of the rental\n  - projectEndDate: Projected end date of the rental\n  - endDate: Actual end date\n  - idVendor: ID of the vendor\n  - notes: Notes for this rental equipment\n  - quantity: Quantity required\n  - dailyRentalRate: Daily rental rate\n  - weeklyRentalRate: Weekly rental rate\n  - monthlyRentalRate: Monthly rental rate\n  - createdUTC: Timestamp when record was created\n  - lastUpdatedUTC: Timestamp when record was last updated\n  - createdByUser: ID of user who created this record\n  - rentalCalculation: Array of cost calculations with:\n    - year: Year for this calculation\n    - month: Month for this calculation\n    - cost: Cost per time period\n    - currency: Currency used\n    - details: Internal calculation algorithm for this period\n",
        "security": [
          {
            "BasicAuth": []
          }
        ]
      }
    },
    "/partOrder/{id_part_order}": {
      "patch": {
        "responses": {
          "422": {
            "$ref": "#/components/responses/UNPROCESSABLE_ENTITY"
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartOrderUpdateResponse"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/DEFAULT_ERROR"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PartOrderUpdateRequest"
              }
            }
          }
        },
        "tags": [
          "partOrder"
        ],
        "summary": "Update Part Order Status",
        "description": "Updates the status and other details of a specific parts order.\n\nPath Parameters:\n- id_part_order (integer, required): The ID of the parts order to update\n\nRequest Body Fields:\n- status (string, required): New status of the order. Must be a status configured for your organization in PartOrderStatus \u2014 defaults plus any org-specific rows. Common values: ORDERED, ORDERING, SCHEDULED, SCHEDULING, DELIVERED, DELIVERY_BY_VENDOR, CANCELLED, BACK_ORDERED, PICKED_UP, QUOTE_REQUESTED, QUOTED, USED, RECEIVED, IN_TRANSIT. On an unknown status the API returns 400 with the allowed list. The inventory bucket engine handles the resulting on-hand / on-order / issued movement automatically.\n- partOrderNotes (string, optional): Notes about the order\n- isDeliveredByVendor (integer, required): 1 if delivered by vendor, 0 if not\n- deliveryScheduleLocalDatetime (string, optional): Scheduled delivery time (local timezone)\n- deliverySchedulePickupLocalDatetime (string, optional): Scheduled pickup time (local timezone)\n- unitCost (number, required): Unit cost of the part\n- quantity (number, required): Quantity of parts\n- uom (string, required): Unit of measure\n- totalCost (number, required): Total cost (unitCost \u00d7 quantity)\n- currencyCode (string, required): Currency code\n- poNumber (string, optional): Purchase order number\n- documentNumber (string, optional): Vendor document number\n- itemName (string, required): Name/description of the part\n- partNotes (string, optional): Additional notes about the part\n\nResponse:\n- Returns the updated part order with all current field values\n\nError Responses:\n- 400 Bad Request: Invalid input data\n- 404 Not Found: Part order not found\n- 500 Internal Server Error: Server error during update\n\nNotes:\n- All field changes are logged with timestamps and user information for complete audit trail\n- Required fields must be provided in the request body\n- All monetary values should be provided with exactly 2 decimal places\n",
        "security": [
          {
            "BasicAuth": []
          }
        ]
      },
      "parameters": [
        {
          "in": "path",
          "name": "id_part_order",
          "required": true,
          "schema": {
            "type": "integer",
            "minimum": 0
          }
        }
      ]
    },
    "/partOrder": {
      "post": {
        "responses": {
          "422": {
            "$ref": "#/components/responses/UNPROCESSABLE_ENTITY"
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartOrderCreateResponse"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/DEFAULT_ERROR"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PartOrderCreateRequest"
              }
            }
          }
        },
        "tags": [
          "partOrder"
        ],
        "summary": "Create a Part Order",
        "description": "Creates a new part order linked to exactly one of: a work order,\nan asset (equipment), or a project.\n\nRequest Body Fields (camelCase):\n- idPart (integer, required): The internal Part ID within the caller's organization.\n- quantity (integer, required, >0)\n- uom (string, required): Unit of measure.\n- unitCost, totalCost (number, required)\n- currencyCode (string, required)\n- status (string, required): Must be a status configured for your organization in\n  PartOrderStatus (defaults + any org-specific rows). Common values: REQUESTED,\n  REQUIRED, ORDERED, ORDERING, SCHEDULED, SCHEDULING, DELIVERED, DELIVERY_BY_VENDOR,\n  CANCELLED, BACK_ORDERED, PICKED_UP, QUOTE_REQUESTED, QUOTED, IN_TRANSIT, USED,\n  RECEIVED. On an unknown status the API returns 400 with the allowed list.\n\nLinkage \u2014 EXACTLY ONE required:\n- idWo (integer): Link to a Work Order.\n- idEquipment (integer): Link to an Asset (Equipment.id_equipment).\n- idProject (integer): Link to a Project.\n\nOptional fields:\n- idInventoryLocation (integer): The shop where stock is held / order ships to.\n  Only triggers inventory movement when Part.is_stock_item=1.\n- idVendor, isForBreakdown, isDeliveredByVendor\n- urgencyCode (string): An urgency option configured for your organization (for\n  example NDA). 400 when it is not an active option. Returned as urgencyCode /\n  urgencyLabel only when the order has one.\n- deliverToIdProject\n- expectedDeliveryDatetimeLocal, deliveryScheduleLocalDatetime, deliverySchedulePickupLocalDatetime\n- poNumber, documentNumber, costCode, itemName\n- partOrderNotes, partNotes, partRequestNotes, orderPickupInstruction\n- idPmItem, idWoTask\n\nInventory side effects (only when Part.is_stock_item=1 AND idInventoryLocation given):\n- Creates a PartsInventory stub row if one doesn't exist for (idPart, idInventoryLocation).\n- Applies bucket movement per InventoryBucketTransition rules:\n  REQUESTED \u2192 qty_reserved+, ORDERED \u2192 qty_on_order+, IN_TRANSIT \u2192 qty_in_transit+,\n  DELIVERED \u2192 qty_on_hand+, etc.\n- Logs one PartsInventoryMovement row per affected bucket.\n- Bumps PartsInventory.qty_last_updated_utc so the change surfaces on GET /parts deltas.\n\nError Responses:\n- 400: Validation error (missing required, multiple link types provided, bad values).\n- 404: idPart / idWo / idEquipment / idProject / idInventoryLocation / idVendor not found in your org.\n- 500: Insert failure.\n\nAuthentication: Basic Auth. Org-scoped automatically.\n",
        "security": [
          {
            "BasicAuth": []
          }
        ]
      }
    },
    "/dailycalculations": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "id_equipment",
            "description": "Filter by comma-separated list of Equipment IDs.",
            "schema": {
              "type": "string",
              "nullable": true
            },
            "required": false
          },
          {
            "in": "query",
            "name": "start_date",
            "description": "Start date filter (YYYY-MM-DD). Defaults to 7 days ago.",
            "schema": {
              "type": "string",
              "nullable": true
            },
            "required": false
          },
          {
            "in": "query",
            "name": "end_date",
            "description": "End date filter (YYYY-MM-DD). Defaults to today. Max range: 90 days.",
            "schema": {
              "type": "string",
              "nullable": true
            },
            "required": false
          },
          {
            "in": "query",
            "name": "min_operating_hours",
            "description": "Filter records with at least this many operating hours.",
            "schema": {
              "type": "number",
              "nullable": true
            },
            "required": false
          },
          {
            "in": "query",
            "name": "exclude_multi_days",
            "description": "If true, excludes multi-day records. Default: false.",
            "schema": {
              "type": "boolean",
              "default": false,
              "nullable": true
            },
            "required": false
          },
          {
            "in": "query",
            "name": "page_number",
            "description": "Page number for pagination (default: 1).",
            "schema": {
              "type": "integer",
              "default": 1,
              "minimum": 1,
              "nullable": true
            },
            "required": false
          },
          {
            "in": "query",
            "name": "page_size",
            "description": "Number of records per page (default: 100, max: 1000).",
            "schema": {
              "type": "integer",
              "default": 100,
              "minimum": 1,
              "maximum": 1000,
              "nullable": true
            },
            "required": false
          }
        ],
        "responses": {
          "422": {
            "$ref": "#/components/responses/UNPROCESSABLE_ENTITY"
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DailyCalculationResponse"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/DEFAULT_ERROR"
          }
        },
        "tags": [
          "dailycalculations"
        ],
        "summary": "Get daily calculation records",
        "description": "Returns daily calculation records for equipment with optional filters and pagination.\n\nQuery parameters:\n- idEquipment (optional): Comma-separated list of Equipment IDs to filter by.\n- startDate (optional): Start date filter (YYYY-MM-DD). Defaults to 7 days ago.\n- endDate (optional): End date filter (YYYY-MM-DD). Defaults to today. Maximum date range is 90 days.\n- minOperatingHours (optional): Filter records with at least this many operating hours.\n- excludeMultiDays (optional): If true, excludes multi-day records. Default: false.\n- page_number (optional): Page number for pagination (default: 1).\n- page_size (optional): Number of records per page (default: 100, max: 1000).\n\nResponse:\n- Array of daily calculation records with the following fields:\n- idEquipment (int): The id of the equipment record.\n- assetName (string): Equipment name.\n- date (date): Date of the daily calculation record.\n- idProject (int): The id of the project.\n- multiDays (boolean): Whether this is a multi-day record.\n- operatingHours (decimal): Total operating hours for the day.\n- idleHours (decimal): Total idle hours for the day.\n- idleRate (decimal): Idle rate percentage.\n- utilizationRate (decimal): Utilization rate percentage.\n- engineHoursAtStart (decimal): Engine hours at start of day.\n- engineHoursAtEnd (decimal): Engine hours at end of day.\n- odometerAtStart (decimal): Odometer reading at start of day.\n- odometerAtEnd (decimal): Odometer reading at end of day.\n- odometerUnits (string): Units for odometer (miles, km).\n- fuelUsed (decimal): Fuel consumed during the day.\n- fuelUsedUnits (string): Units for fuel used.\n- fuelFilled (decimal): Fuel filled during the day.\n- fuelFilledUnits (string): Units for fuel filled.\n- idleFuelUsed (decimal): Fuel consumed during idle.\n- idleFuelUsedUnits (string): Units for idle fuel used.\n- emissions (decimal): CO2 emissions.\n- emissionsUnits (string): Units for emissions.\n",
        "security": [
          {
            "BasicAuth": []
          }
        ]
      }
    },
    "/parts": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "start_time_utc",
            "description": "Filter to parts whose stock at any location was last updated at or after this UTC timestamp (PartsInventory.qty_last_updated_utc). Use for delta pulls.",
            "schema": {
              "type": "string",
              "nullable": true
            },
            "required": false
          },
          {
            "in": "query",
            "name": "end_time_utc",
            "description": "Filter to stock changes at or before this UTC timestamp.",
            "schema": {
              "type": "string",
              "nullable": true
            },
            "required": false
          },
          {
            "in": "query",
            "name": "is_stock_item",
            "description": "Default 1: only stock-managed parts. Pass 0 to include one-off parts.",
            "schema": {
              "type": "integer",
              "default": 1,
              "enum": [
                0,
                1,
                null
              ],
              "nullable": true
            },
            "required": false
          },
          {
            "in": "query",
            "name": "status",
            "description": "Part.status filter. Default: ACTIVE.",
            "schema": {
              "type": "string",
              "default": "ACTIVE",
              "nullable": true
            },
            "required": false
          },
          {
            "in": "query",
            "name": "search",
            "description": "Substring match on parts_number, parts_description, manufacturer_parts_number.",
            "schema": {
              "type": "string",
              "nullable": true
            },
            "required": false
          },
          {
            "in": "query",
            "name": "id_part",
            "description": "Comma-separated list of id_part values to include.",
            "schema": {
              "type": "string",
              "nullable": true
            },
            "required": false
          },
          {
            "in": "query",
            "name": "page_number",
            "description": "Pagination page (1-indexed).",
            "schema": {
              "type": "integer",
              "default": 1,
              "minimum": 1,
              "nullable": true
            },
            "required": false
          },
          {
            "in": "query",
            "name": "page_size",
            "description": "Items per page (max 1000).",
            "schema": {
              "type": "integer",
              "default": 100,
              "minimum": 1,
              "maximum": 1000,
              "nullable": true
            },
            "required": false
          }
        ],
        "responses": {
          "422": {
            "$ref": "#/components/responses/UNPROCESSABLE_ENTITY"
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartsResponse"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/DEFAULT_ERROR"
          }
        },
        "tags": [
          "inventory"
        ],
        "summary": "List parts with stock-per-location",
        "description": "Returns paginated parts in the caller's organization, each\nincluding the part metadata and an array of stock levels at every inventory\nlocation where the part is tracked.\n\nQuery parameters:\n- start_time_utc (optional): Delta filter \u2014 returns parts whose stock at any\n  location changed at or after this UTC timestamp (PartsInventory.qty_last_updated_utc).\n  Note: Part metadata edits (description, manufacturer, etc.) do NOT trigger\n  this delta. For metadata sync, do a full pull without start_time_utc.\n- end_time_utc (optional): Delta filter upper bound.\n- is_stock_item (optional, default 1): Pass 0 to include non-stock one-off parts.\n- status (optional, default ACTIVE): Filter by Part.status.\n- search (optional): Substring match on parts_number, description, manufacturer_parts_number.\n- id_part (optional): Comma-separated list of id_part values.\n- page_number (optional, default 1)\n- page_size (optional, default 100, max 1000)\n\nResponse fields:\n- idPart: Internal part ID.\n- partsNumber: Customer part number.\n- description, manufacturer, manufacturerPartsNumber, category, partsClassId.\n- uom: Unit of measure.\n- unitCost: Catalog unit cost (no currency on Part \u2014 use stockByLocation.latestUnitCost\n  for the location-specific most recent cost).\n- isStockItem, status.\n- lastUpdatedUTC: Newest qty_last_updated_utc across this part's locations.\n- stockByLocation: Array of stock rows. Each row:\n  - idInventoryLocation, name\n  - qtyOnHand, qtyReserved, qtyOnOrder, qtyInTransit\n  - reorderPoint, inventoryLevel\n  - aisle, row, bin\n  - latestUnitCost, stdPrice, stdCost, avgCost\n  - trackInventory\n  - qtyLastUpdatedUTC\n\nAuthentication: Basic Auth. Org-scoped automatically.\n",
        "security": [
          {
            "BasicAuth": []
          }
        ]
      },
      "post": {
        "responses": {
          "422": {
            "$ref": "#/components/responses/UNPROCESSABLE_ENTITY"
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartCreateResponse"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/DEFAULT_ERROR"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PartCreate"
              }
            }
          }
        },
        "tags": [
          "inventory"
        ],
        "summary": "Create a part (optionally with stock locations)",
        "description": "Creates a catalog part in the caller's organization, optionally\nstocking it at one or more inventory locations in the same request.\n\nRequest body:\n- partsDescription (string, required): Part description.\n- partsNumber (string, optional): Customer part number (max 50 chars, Latin\n  characters only). De-duplicated per org.\n- manufacturer, manufacturerPartsNumber, category, measuringUnits, partsPhotoUrl,\n  partsNotes (string, optional).\n- unitCost (number, optional): Catalog unit cost.\n- isStockItem (boolean, optional): If true, at least one location is required.\n- partsClass (integer, optional): Parts class ID.\n- idSuborganization (integer, optional): Sub-organization to scope the part to.\n- locations (array, optional): Stock locations to create. Each location:\n  - idInventoryLocation (integer, required): A shop/dealership from GET /inventoryLocations.\n  - aisle, row, bin (string, optional): Bin address.\n  - quantity (integer, optional, default 0): On-hand quantity.\n  - reorderPoint (integer, optional): Required when trackInventory is true.\n  - trackInventory (boolean, optional, default false).\n  - auditFrequency (string, optional): MONTHLY, 2-MONTHS, 3-MONTHS, 4-MONTHS,\n    5-MONTHS, 6-MONTHS, or YEARLY.\n\nDe-duplication: partsNumber is unique per organization. If an active part\nwith the same partsNumber already exists, no new part is created: the existing\npart is returned unchanged and stocked at any supplied location it is not yet\nstocked at (locations it already has are left unchanged), so repeating a request\nis safe. If the partsNumber belongs to an inactive part, the request fails with\n409.\n\nEvery write is atomic: if a location cannot be created, no part is created.\nA new part and its locations get the organization's currency; locations added\nto an existing part get that part's currency.\n\nResponse:\n- success (boolean), message (string).\n- data (object): The part with idPart, its fields, unitCostCurrency and its\n  locations.\n\nErrors:\n- 400: partsClass, idSuborganization or an idInventoryLocation is not valid\n  (and active) in your organization; reorderPoint missing while trackInventory\n  is true; isStockItem is true without locations; an idInventoryLocation is\n  repeated.\n- 409: partsNumber belongs to an inactive part, or the part has an inactive\n  stock row at a supplied location.\n- 422: Request body failed schema validation (e.g. missing partsDescription, a\n  field exceeds its max length, or partsNumber has non-Latin characters).\n\nAuthentication: Basic Auth. Org-scoped automatically.\n",
        "security": [
          {
            "BasicAuth": []
          }
        ]
      }
    },
    "/inventoryLocations": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "start_time_utc",
            "description": "Filter on Project.last_updated_at_utc.",
            "schema": {
              "type": "string",
              "nullable": true
            },
            "required": false
          },
          {
            "in": "query",
            "name": "end_time_utc",
            "schema": {
              "type": "string",
              "nullable": true
            },
            "required": false
          },
          {
            "in": "query",
            "name": "page_number",
            "schema": {
              "type": "integer",
              "default": 1,
              "minimum": 1,
              "nullable": true
            },
            "required": false
          },
          {
            "in": "query",
            "name": "page_size",
            "schema": {
              "type": "integer",
              "default": 100,
              "minimum": 1,
              "maximum": 1000,
              "nullable": true
            },
            "required": false
          }
        ],
        "responses": {
          "422": {
            "$ref": "#/components/responses/UNPROCESSABLE_ENTITY"
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InventoryLocationsResponse"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/DEFAULT_ERROR"
          }
        },
        "tags": [
          "inventory"
        ],
        "summary": "List inventory locations (shops)",
        "description": "Returns the inventory locations (a.k.a. shops) in the\ncaller's organization. Use these idInventoryLocation values to scope POST /partOrder.\n\nQuery parameters:\n- start_time_utc (optional): Delta filter on Project.last_updated_at_utc.\n- end_time_utc (optional).\n- page_number, page_size (pagination).\n\nResponse fields per location:\n- idInventoryLocation, name\n- streetName, city, state, country, zoneName\n- status\n- lastUpdatedUTC\n\nAuthentication: Basic Auth. Org-scoped automatically.\n",
        "security": [
          {
            "BasicAuth": []
          }
        ]
      }
    },
    "/parts/{id_part}/locations": {
      "post": {
        "responses": {
          "422": {
            "$ref": "#/components/responses/UNPROCESSABLE_ENTITY"
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartLocationCreateResponse"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/DEFAULT_ERROR"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PartLocationCreate"
              }
            }
          }
        },
        "tags": [
          "inventory"
        ],
        "summary": "Add a stock location to a part",
        "description": "Adds a single stock location (a \"part location\") to an existing\npart in the caller's organization.\n\nPath parameters:\n- id_part (required): The idPart of the part to stock.\n\nRequest body:\n- idInventoryLocation (integer, required): A shop/dealership from GET /inventoryLocations.\n- aisle, row, bin (string, optional): Bin address.\n- quantity (integer, optional, default 0): On-hand quantity.\n- reorderPoint (integer, optional): Required when trackInventory is true.\n- trackInventory (boolean, optional, default false).\n- auditFrequency (string, optional): MONTHLY, 2-MONTHS, 3-MONTHS, 4-MONTHS,\n  5-MONTHS, 6-MONTHS, or YEARLY.\n\nResponse:\n- success (boolean), message (string).\n- data (object): The idPart and the newly created location.\n\nErrors:\n- 400: idInventoryLocation is not an active shop/dealership in your organization,\n  or reorderPoint is missing while trackInventory is true.\n- 404: Part not found (or not active) in your organization.\n- 409: The part is already stocked at this inventory location.\n\nAuthentication: Basic Auth. Org-scoped automatically.\n",
        "security": [
          {
            "BasicAuth": []
          }
        ]
      },
      "parameters": [
        {
          "in": "path",
          "name": "id_part",
          "required": true,
          "schema": {
            "type": "integer",
            "minimum": 0
          }
        }
      ]
    },
    "/workOrderInvoice": {
      "post": {
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WoInvoiceCreateResponse"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/DEFAULT_ERROR"
          }
        },
        "tags": [
          "woInvoice"
        ],
        "summary": "Create a vendor invoice on a work order",
        "description": "Persists a vendor invoice in one HTTP call across the existing four tables:\n\n- `WorkOrderInvoice` (header \u2014 vendor, invoice number, date, grand total)\n- `WorkOrderExternalLabor` (one row per labor line)\n- `WorkOrderExternalPart` (one row per parts line)\n- `WorkOrderAdditionalCost` (one row per tax / shipping / delivery / rental / other)\n\nEvery row is stamped with `source='api'` so reports can distinguish API-pushed\ninvoices from manually entered or AI-parsed ones. `created_by_id_user` is the\nuser that your API account acts as.\n\n## Request shape\n\n`Content-Type: multipart/form-data` with two parts:\n\n- `payload` (required, string) \u2014 JSON-encoded invoice data with these fields:\n    - `idWo` (int, required) \u2014 `WorkOrder.id_wo` in your organization.\n    - `invoiceMeta` (object, required):\n        - `vendorName` (string, required)\n        - `invoiceNumber` (string, optional)\n        - `invoiceDate` (date `YYYY-MM-DD`, optional)\n        - `total` (number, required) \u2014 grand total including all line items.\n        - `currencyCode` (string, optional) \u2014 ISO currency code.\n    - `externalLabor` (array, optional) \u2014 labor lines.\n    - `externalParts` (array, optional) \u2014 parts lines.\n    - `additionalCosts` (array, optional) \u2014 `{category, description, amount, costCode}`. `category` must be one of `delivery`, `tax`, `shipping`, `rental`, `other`.\n- `file` (optional, file) \u2014 PDF / JPEG / PNG / etc. Maximum 5 MB. Allowed content types: `application/pdf`, `image/jpeg`, `image/png`, `image/webp`, `image/gif`, `image/heic`, `image/heif`, `image/avif`, `text/plain`, `text/markdown`, `application/msword`, `application/vnd.openxmlformats-officedocument.wordprocessingml.document`, `video/mp4`.\n\nAt least one of `externalLabor` / `externalParts` / `additionalCosts` must be non-empty.\n\n## Idempotency\n\nSend the `Idempotency-Key` HTTP header (any caller-generated string, max 64 chars) to make retries safe. On retry with the same key in the same org, the previously created invoice is returned (with `data.idempotencyReplayed = true`) instead of creating a duplicate.\n\n## Errors\n\n- 400 \u2014 validation failed (bad category, missing required, all line arrays empty, bad file type, file too large)\n- 404 \u2014 `idWo` not found in your organization\n- 422 \u2014 `payload` JSON failed schema validation\n- 500 \u2014 insert / S3 failure (header rolls back; partial children are soft-deleted)\n\n## Example (Python)\n\n```python\nimport json, requests\nfiles = {\n    \"payload\": (None, json.dumps({\n        \"idWo\": 123456789,\n        \"invoiceMeta\": {\"vendorName\": \"Acme Filters\", \"total\": 70.00,\n                        \"invoiceNumber\": \"INV-42\", \"invoiceDate\": \"2026-06-30\",\n                        \"currencyCode\": \"USD\"},\n        \"externalParts\": [],\n        \"additionalCosts\": [\n            {\"category\": \"tax\", \"description\": \"Sales tax 8%\", \"amount\": 8.00},\n            {\"category\": \"shipping\", \"description\": \"Freight\",  \"amount\": 12.00},\n        ],\n    }), \"application/json\"),\n    \"file\": (\"invoice.pdf\", open(\"invoice.pdf\", \"rb\"), \"application/pdf\"),\n}\nr = requests.post(\"https://public.getclue.com/v1/workOrderInvoice\",\n                  files=files, auth=(api_user, api_pass),\n                  headers={\"Idempotency-Key\": \"gearflow-inv-42\"})\n```\n\nAuthentication: Basic Auth. Org bound to your token.\n",
        "security": [
          {
            "BasicAuth": []
          }
        ]
      }
    },
    "/assets/meter_readings": {
      "post": {
        "responses": {
          "422": {
            "$ref": "#/components/responses/UNPROCESSABLE_ENTITY"
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeterReadingBatchResponse"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/DEFAULT_ERROR"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MeterReadingBatchRequest"
              }
            }
          }
        },
        "tags": [
          "meter_readings"
        ],
        "summary": "Submit meter and odometer readings",
        "description": "Submit a batch of meter/odometer readings for assets in the caller's organization.\n\nCLUE-46839: readings become part of the asset's meter history exactly like a\nmanually-entered reading, and feed preventive maintenance and utilization the\nsame way. Source-conflict handling reuses the platform's engine-hours outlier\nguard (ported from clue-fleet-instance's EngineHoursGuard, CLUE-50277) rather\nthan a source-priority rule: a reading is judged against the asset's own last\naccepted value, so telematics-equipped assets are protected without needing to\nknow a telematics feed exists.\n\nRequest body:\n- readings (required): array of reading objects, each with assetName plus at\n  least one of engineHours / odometer (odometerUnit required alongside\n  odometer), an optional readingTimestamp (ISO-8601 with an explicit UTC\n  offset; falls back to the organization's timezone when naive), an optional\n  idempotencyKey, and an optional readingStatus ('REJECTED' reports a reading\n  the caller's own source distrusts without writing a value; 'reason' is then\n  required).\n\nResponse:\n- results: one entry per submitted row, in order, each carrying its own\n  assetName/idempotencyKey plus status (ACCEPTED, PARTIALLY_ACCEPTED, REJECTED,\n  DUPLICATE, RECORDED_ABSENT, or ERROR), where applicable reason/error, and a\n  per-meter breakdown in meters. Engine hours and odometer are judged\n  independently. A row that fails is never reported as accepted, and one bad row\n  never fails the batch.\n- DUPLICATE means every meter in the row (same asset, same reading timestamp,\n  and -- for a keyless resend colliding on history -- the same value) was\n  already recorded; no new write happened, safe to treat as success. A\n  REJECTED meter with reason 'conflicting_reading_same_timestamp' means a\n  DIFFERENT reading already exists for that asset, meter, and timestamp --\n  the submitted value was NOT stored; this is reported rather than treated\n  as a duplicate. A resend that repeats one already-stored meter while adding\n  the other is never reported as a whole-row DUPLICATE: the repeated meter is\n  reported DUPLICATE within 'meters' (see meters.<name>.status) while the new\n  meter is independently accepted or rejected, and the row's own status is\n  PARTIALLY_ACCEPTED or ACCEPTED accordingly (CLUE-54952).\n",
        "security": [
          {
            "BasicAuth": []
          }
        ]
      }
    },
    "/geofences": {
      "post": {
        "responses": {
          "422": {
            "$ref": "#/components/responses/UNPROCESSABLE_ENTITY"
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GeofenceUpsertResponse"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/DEFAULT_ERROR"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GeofenceFeatureCollection"
              },
              "example": {
                "type": "FeatureCollection",
                "features": [
                  {
                    "type": "Feature",
                    "properties": {
                      "externalId": "8F3A1C2E-5B7D-4E9A-A1B2-0C3D4E5F6A7B",
                      "jobNumber": "1326111",
                      "name": "Main St Bridge - Laydown Yard",
                      "description": "North laydown yard",
                      "status": "ACTIVE"
                    },
                    "geometry": {
                      "type": "Polygon",
                      "coordinates": [
                        [
                          [
                            -94.5821,
                            39.0997
                          ],
                          [
                            -94.579,
                            39.0997
                          ],
                          [
                            -94.579,
                            39.1021
                          ],
                          [
                            -94.5821,
                            39.1021
                          ],
                          [
                            -94.5821,
                            39.0997
                          ]
                        ]
                      ]
                    }
                  }
                ]
              }
            }
          }
        },
        "tags": [
          "geofences"
        ],
        "summary": "Create or update geofences from GeoJSON",
        "description": "Load geofences from a GeoJSON FeatureCollection (RFC 7946, WGS84 [longitude, latitude])\ninto the authenticated organization, each linked to the project whose job number matches.\n\nEach feature:\n- geometry: Polygon or MultiPolygon. Only the outer boundary is stored; holes are ignored and\n  reported as a warning. A MultiPolygon is stored as one geofence per part, with '#1', '#2', ...\n  appended to its externalId.\n- properties.externalId (required): your stable id for the geofence. Sending the same externalId\n  again updates that geofence instead of creating a new one.\n- properties.jobNumber (optional): matched to the project's job number / code in your organization,\n  ignoring surrounding spaces and trailing dots ('1326111' matches '1326111.'). If several projects\n  match, an ACTIVE one is preferred. An unknown job number still creates the geofence, unlinked, and\n  is listed in unmatchedJobNumbers.\n- properties.name (required, max 50 characters, longer names are cut), properties.description\n  (max 100 characters).\n- properties.status: ACTIVE (default) loads the feature. Any other value (INACTIVE, DRAFT, ...) is\n  not loaded; if the externalId was loaded before, that geofence is set INACTIVE.\n\nArcGIS export field names are accepted as-is: 'Global ID' (braces removed) for externalId,\n'Project Number' for jobNumber, 'Geofence Name' then 'Project Name' for name, 'Status' for status.\n\nBehavior:\n- At most 1000 features per request.\n- Re-sending the same collection changes nothing (every result is UNCHANGED).\n- Only geofences created through this endpoint are ever updated or deactivated. Geofences drawn in\n  the Clue web app or imported from a KML/KMZ file are never touched.\n- One invalid feature never fails the request: it is reported with status FAILED and the rest load.\n\nImportant: if your organization assigns equipment to projects automatically from geofences, an ACTIVE\ngeofence linked to a project moves equipment inside it onto that project. Check shapes before pushing.\n\nResponse: per-feature results (CREATED, UPDATED, UNCHANGED, DEACTIVATED, SKIPPED, FAILED), totals,\nand the job numbers that matched no project.\n",
        "security": [
          {
            "BasicAuth": []
          }
        ]
      },
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "status",
            "description": "Optional filter: ACTIVE or INACTIVE.",
            "schema": {
              "type": "string",
              "enum": [
                "ACTIVE",
                "INACTIVE"
              ]
            },
            "required": false
          },
          {
            "in": "query",
            "name": "page_number",
            "schema": {
              "type": "integer",
              "default": 1,
              "minimum": 1
            },
            "required": false
          },
          {
            "in": "query",
            "name": "page_size",
            "schema": {
              "type": "integer",
              "default": 100,
              "minimum": 1,
              "maximum": 500
            },
            "required": false
          }
        ],
        "responses": {
          "422": {
            "$ref": "#/components/responses/UNPROCESSABLE_ENTITY"
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GeofencesResponse"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/DEFAULT_ERROR"
          }
        },
        "tags": [
          "geofences"
        ],
        "summary": "List geofences created through the API",
        "description": "Lists the geofences in the authenticated organization that were created through\nPOST /geofences, so you can reconcile them with your own system. Geofences drawn in the Clue web app\nare not included.\n\nQuery parameters:\n- status (optional): ACTIVE or INACTIVE\n- page_number (optional, default 1), page_size (optional, default 100, max 500)\n\nEach geofence includes its externalId, name, status, linked project (id, code, name) and geometry\nas a GeoJSON Polygon.\n",
        "security": [
          {
            "BasicAuth": []
          }
        ]
      }
    }
  },
  "tags": [
    {
      "name": "fleet",
      "description": "Fleet operations"
    },
    {
      "name": "errors",
      "description": "Error handlers"
    },
    {
      "name": "assets",
      "description": ""
    },
    {
      "name": "timecards",
      "description": "Timecard operations"
    },
    {
      "name": "user",
      "description": "User operations"
    },
    {
      "name": "projects",
      "description": "Project operations"
    },
    {
      "name": "inspection",
      "description": "Inspection operations"
    },
    {
      "name": "dispatch",
      "description": ""
    },
    {
      "name": "workorders",
      "description": "Work Order operations"
    },
    {
      "name": "faultcodes",
      "description": "Fault Code operations"
    },
    {
      "name": "vendors",
      "description": "Vendor operations"
    },
    {
      "name": "rentalcontracts",
      "description": "Rental Contract operations"
    },
    {
      "name": "partOrder",
      "description": ""
    },
    {
      "name": "dailycalculations",
      "description": ""
    },
    {
      "name": "inventory",
      "description": "Inventory: parts (with stock per location) and inventory locations."
    },
    {
      "name": "woInvoice",
      "description": "Create vendor invoices on a work order (header + labor/parts lines + tax/shipping/delivery + optional attachment)."
    },
    {
      "name": "meter_readings",
      "description": "Partner meter/odometer reading ingestion"
    },
    {
      "name": "geofences",
      "description": "Geofence operations"
    }
  ],
  "openapi": "3.0.2"
}