OfficeGest
Workshop/Reports/Maintenance plan alerts

Maintenance plan alerts

Returns the maintenance plans that are still pending and already due: either the plan counter is within km_tolerance of the current vehicle reading, or the plan limit date falls inside the window, or the plan has no limit date at all. Plans without a limit date are listed last.

GET
/workshop/reports/maintenance-plan-alerts
AuthorizationBearer <token>

In: header

Query Parameters

days?integer

Size of the look-ahead window, in days from now. Defaults to 30, the value the legacy dashboard widget uses.

km_tolerance?integer

Counter margin added to the current vehicle reading when deciding whether a plan is due. Defaults to 10000, the value the legacy dashboard widget uses.

Response Body

curl -X GET "https://og-tenant1.test:8003/api/v2/workshop/reports/maintenance-plan-alerts?days=0&km_tolerance=0"
{
  "data": [
    {
      "plan_id": 0,
      "vehicle_ref": "string",
      "limit_reading": 0,
      "current_reading": 0,
      "services": "string",
      "service_count": 0,
      "due_date": "string"
    }
  ]
}
{
  "data": {
    "code": "VALIDATION_FAILED",
    "message": "The given data was invalid.",
    "errors": {
      "email": [
        "The email field is required."
      ]
    }
  },
  "meta": {
    "trace_id": "9f86d081884c7d659a2feaa0c55ad01568f3a1c2b4d5e"
  }
}
{
  "data": {
    "code": "VALIDATION_FAILED",
    "message": "The given data was invalid.",
    "errors": {
      "email": [
        "The email field is required."
      ]
    }
  },
  "meta": {
    "trace_id": "9f86d081884c7d659a2feaa0c55ad01568f3a1c2b4d5e"
  }
}
{
  "data": {
    "code": "VALIDATION_FAILED",
    "message": "The given data was invalid.",
    "errors": {
      "email": [
        "The email field is required."
      ]
    }
  },
  "meta": {
    "trace_id": "9f86d081884c7d659a2feaa0c55ad01568f3a1c2b4d5e"
  }
}
{
  "data": {
    "code": "VALIDATION_FAILED",
    "message": "The given data was invalid.",
    "errors": {
      "email": [
        "The email field is required."
      ]
    }
  },
  "meta": {
    "trace_id": "9f86d081884c7d659a2feaa0c55ad01568f3a1c2b4d5e"
  }
}