Community
Confirming defect resolve vs. DVIR resolve independence, and behavior on double-resolving a DVIR
17 hours ago by Brandon Pangle
I'm building an n8n integration between Samsara and Fleetio that closes DVIR defects (PATCH /fleet/defects/{id}) as work orders complete, and separately resolves the parent DVIR (PATCH /fleet/dvirs/{id}) once no open defects remain on it.
Two things I want to confirm before this goes into production:
- Does resolving the last open defect on a DVIR automatically flip the DVIR's safetyStatus to resolved? Based on the DVIR guide and the Resolve a Defect help article, our understanding is defect status and DVIR status are tracked independently, and resolving all defects does not automatically resolve the DVIR — a separate action/API call is required. Can you confirm this is correct and current behavior?
- What happens if PATCH /fleet/dvirs/{id} is called with isResolved: true on a DVIR whose safetyStatus is already resolved? Is this a no-op that returns 200, or does it return an error? We want our workflow to handle this gracefully in case of a race condition (e.g., a manual resolution in the dashboard happens right before our automated call fires).