Skip to main content

DELETE /v1/inspections/

Permanently delete an inspection and all associated data including images, reports, and analysis results.
Caution: This action is irreversible. Deleted inspections cannot be recovered.

Request

curl -X DELETE "https://api.steerai.autos/v1/inspections/insp_1234567890abcdef" \
  -H "Authorization: Bearer YOUR_API_KEY"

Path Parameters

ParameterTypeRequiredDescription
inspection_idstringYesThe unique inspection identifier

Response

{
  "status": "success",
  "data": {
    "inspection_id": "insp_1234567890abcdef",
    "deleted": true,
    "deleted_at": "2024-01-15T10:45:00Z"
  },
  "meta": {
    "request_id": "req_abcd1234567890ef"
  }
}

Response Fields

FieldTypeDescription
inspection_idstringID of the deleted inspection
deletedbooleanConfirmation of deletion
deleted_atstringISO 8601 timestamp of deletion

Error Responses

404 Not Found

{
  "status": "error",
  "error": {
    "code": "INSPECTION_NOT_FOUND",
    "message": "Inspection not found or already deleted",
    "type": "not_found_error"
  }
}

403 Forbidden

{
  "status": "error",
  "error": {
    "code": "INSUFFICIENT_PERMISSIONS",
    "message": "You don't have permission to delete this inspection",
    "type": "authorization_error"
  }
}

409 Conflict

{
  "status": "error",
  "error": {
    "code": "INSPECTION_IN_USE",
    "message": "Cannot delete inspection that is referenced in active contracts",
    "type": "conflict_error"
  }
}

Deletion Policy

• Inspection record and metadata • All uploaded images • Analysis results and reports • Generated PDFs and documents • Associated damage records
• Deleted data is permanently removed after 30 days • Audit logs are retained for compliance • Anonymized analytics data may be retained • Backup systems purged within 90 days
• Vehicle record is NOT deleted • Associated pricing data is preserved • CRM records remain intact • References updated to show “deleted inspection”

Bulk Delete

To delete multiple inspections, use the bulk endpoint:
curl -X POST "https://api.steerai.autos/v1/inspections/bulk-delete" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "inspection_ids": [
      "insp_1234567890abcdef",
      "insp_fedcba0987654321",
      "insp_abcd1234efgh5678"
    ]
  }'
Response:
{
  "status": "success",
  "data": {
    "deleted_count": 3,
    "failed_count": 0,
    "deleted_ids": [
      "insp_1234567890abcdef",
      "insp_fedcba0987654321",
      "insp_abcd1234efgh5678"
    ]
  }
}

Best Practices

Recommendation: Instead of deleting inspections, consider archiving them. This preserves historical data while removing them from active views.
# Archive instead of delete
curl -X PATCH "https://api.steerai.autos/v1/inspections/insp_1234567890abcdef" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"archived": true}'