{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/safetyculture/json-schema/safetyculture-s12-assets-v1-list-assets-maintenance-details-request-schema.json",
  "title": "ListAssetsMaintenanceDetailsRequest",
  "description": "The parameters for `ListAssetsMaintenanceDetails`",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/safetyculture-assets-api-openapi.yml#/components/schemas/s12.assets.v1.ListAssetsMaintenanceDetailsRequest",
  "type": "object",
  "properties": {
    "page_token": {
      "type": "string",
      "description": "OPTIONAL. The value of next_page_token from a previous response. If\nspecified, the API will return the next batch of results following the\nprevious list assets maintenance details request."
    },
    "page_size": {
      "type": "integer",
      "format": "int32",
      "description": "OPTIONAL. The number of assets to return. By default, each request\nreturns 50 assets maintenance details. You can specify a\npage_size value between 1 to 100."
    },
    "filter": {
      "description": "OPTIONAL. The array of filters to apply in your request. You can\napply multiple filters in a single request.",
      "allOf": [
        {
          "$ref": "#/$defs/s12.assets.v1.AssetMaintenanceDetailsFilter"
        }
      ]
    },
    "order_by": {
      "description": "OPTIONAL. The sorting order for the assets maintenance details in the response.\nBy default, details are sorted by asset code in ascending order.",
      "allOf": [
        {
          "$ref": "#/$defs/s12.assets.v1.AssetMaintenanceDetailsOrderBy"
        }
      ]
    },
    "search": {
      "type": "string",
      "description": "OPTIONAL. The key words to search for in your request"
    },
    "use_plan_unit": {
      "type": "boolean",
      "description": "OPTIONAL. Specifies whether to return unit values using the maintenance plan's unit system.\nIf false or unset, values will default to the user's preferred unit system (as configured in their profile settings)"
    }
  },
  "$defs": {
    "s12.assets.v1.AssetMaintenanceDetailsFilter": {
      "type": "object",
      "properties": {
        "site_ids": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The unique identifier of the assigned site to filter by."
        },
        "asset_ids": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The unique identifier of the asset to filter by."
        },
        "program_ids": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The unique identifier of the maintenance program to filter by."
        },
        "plan_ids": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The unique identifier of the maintenance plan to filter by."
        },
        "type_ids": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The unique identifier of the asset type to filter by."
        },
        "service_statuses": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/s12.assets.v1.AssetServiceStatus"
          },
          "description": "The statuses for the maintenance service associated with assets to filter by."
        }
      },
      "description": "Describes the filter options for the list assets maintenance details endpoint."
    },
    "s12.assets.v1.AssetMaintenanceDetailsOrderBy": {
      "type": "object",
      "properties": {
        "sort_field": {
          "description": "The field to sort by.",
          "allOf": [
            {
              "$ref": "#/$defs/s12.assets.v1.AssetMaintenanceDetailsOrderBy.SortField"
            }
          ]
        },
        "sort_direction": {
          "description": "The order to sort by.",
          "allOf": [
            {
              "$ref": "#/$defs/s12.common.SortDirection"
            }
          ]
        }
      },
      "description": "Describes the sorting options for the list assets maintenance details endpoint.\nBy default, details are sorted by asset code in ascending order."
    },
    "s12.assets.v1.AssetMaintenanceDetailsOrderBy.SortField": {
      "type": "string",
      "enum": [
        "SORT_FIELD_UNSPECIFIED",
        "SORT_FIELD_ASSET_CODE",
        "SORT_FIELD_NEXT_SERVICE_ODOMETER_VALUE",
        "SORT_FIELD_NEXT_SERVICE_RUNTIME_VALUE",
        "SORT_FIELD_DUE_IN_ODOMETER_VALUE",
        "SORT_FIELD_DUE_IN_RUNTIME_VALUE",
        "SORT_FIELD_DUE_IN_TIME_VALUE"
      ],
      "default": "SORT_FIELD_UNSPECIFIED",
      "description": "Defaults to SORT_FIELD_ASSET_CODE.\n\n - SORT_FIELD_UNSPECIFIED: The sort field is unspecified.\n - SORT_FIELD_ASSET_CODE: Sort assets maintenance details by `asset_code`.\n - SORT_FIELD_NEXT_SERVICE_ODOMETER_VALUE: Sort assets maintenance details by `next_service_odometer_value`.\n - SORT_FIELD_NEXT_SERVICE_RUNTIME_VALUE: Sort assets maintenance details by `next_service_runtime_value`.\n - SORT_FIELD_DUE_IN_ODOMETER_VALUE: Sort assets maintenance details by `due_in_odometer_value`.\n - SORT_FIELD_DUE_IN_RUNTIME_VALUE: Sort assets maintenance details by `due_in_runtime_value`.\n - SORT_FIELD_DUE_IN_TIME_VALUE: Sort assets maintenance details by `due_in_time_value`."
    },
    "s12.assets.v1.AssetServiceStatus": {
      "type": "string",
      "enum": [
        "ASSET_SERVICE_STATUS_UNSPECIFIED",
        "ASSET_SERVICE_STATUS_OVERDUE",
        "ASSET_SERVICE_STATUS_DUE_SOON",
        "ASSET_SERVICE_STATUS_SCHEDULED",
        "ASSET_SERVICE_STATUS_DATA_MISSING"
      ],
      "default": "ASSET_SERVICE_STATUS_UNSPECIFIED",
      "description": "AssetServiceStatus enumerates possible values for maintenance_plan_service_status.\n\n - ASSET_SERVICE_STATUS_UNSPECIFIED: ASSET_SERVICE_STATUS_UNSPECIFIED is an unknown asset service status.\n - ASSET_SERVICE_STATUS_OVERDUE: ASSET_SERVICE_STATUS_OVERDUE is asset service status that is overdue.\n - ASSET_SERVICE_STATUS_DUE_SOON: ASSET_SERVICE_STATUS_DUE_SOON is asset service status that is duesoon.\n - ASSET_SERVICE_STATUS_SCHEDULED: ASSET_SERVICE_STATUS_SCHEDULED is asset service status that is scheduled.\n - ASSET_SERVICE_STATUS_DATA_MISSING: ASSET_SERVICE_STATUS_DATA_MISSING is asset service status that is data\nmissing."
    },
    "s12.common.SortDirection": {
      "type": "string",
      "enum": [
        "SORT_DIRECTION_UNSPECIFIED",
        "SORT_DIRECTION_ASC",
        "SORT_DIRECTION_DESC"
      ],
      "default": "SORT_DIRECTION_UNSPECIFIED",
      "title": "Common set of sorting directions as used by lists"
    }
  }
}