Skip to main content

Complete an inspection (CompleteInspection)

POST 

/inspections/:inspectionId/completions

Completes an OPEN inspection, once and for good. Every REQUIRED item needs a result first (409 required-item-pending). The outcome is FAILED when any required item failed, PASSED otherwise. A FAILED inspection places a hold on the trailer in the SAME transaction, with the reason of its most severe failed item (the template item says which: SECURITY, SEAL_BROKEN, DAMAGED, NOT_FOUND or QUALITY, the default), unless the trailer already carries a hold; releasing it stays the existing human action (POST /trailers/{trailerId}/hold-releases), and a re-inspection can then be opened. conditionGrade is an optional record of the equipment, never the verdict. Raises InspectionCompleted and, for a FAILED inspection, InspectionFailed (and TrailerHeld when it held the trailer). Completing again is 409 inspection-closed.

Request​

Responses​

The completed inspection, PASSED or FAILED.

Response Headers
    Idempotency-Replayed

    Present, with the value true, only when the answer is a replay of the stored answer of an earlier request with the same Idempotency-Key (a success or a refusal that cannot change; a refusal the same request could pass later is never stored).