OfficeGest
Workshop/Reports/Inspection alerts

Inspection alerts

Returns the vehicles whose next inspection falls between now and the end of the window. This is the only alert list with a lower bound: inspections already overdue are NOT returned. Vehicles without an owner are excluded, mirroring the inner join of the legacy query.

GET
/workshop/reports/inspection-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.

Response Body

curl -X GET "https://og-tenant1.test:8003/api/v2/workshop/reports/inspection-alerts?days=0"
{
  "data": [
    {
      "vehicle_ref": "string",
      "brand": "string",
      "model": "string",
      "owner": {},
      "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"
  }
}