Repository navigation
Example Requests
morad1998 edited this page Oct 17, 2026
·
1 revision
This page contains representative API request and response examples used throughout the Quality Inspection System.
The examples are simplified for documentation purposes and focus on illustrating how business documents flow through the application.
GET /api/cards/1001{
"cardId": 1001,
"workOrder": "WO-10001",
"status": "OPEN",
"inspector": "INSPECTOR",
"measurements": [
{
"measurementId": 1,
"name": "Pressure",
"value": 120
}
],
"checklist": [
{
"checkId": 1,
"description": "Visual Inspection",
"result": "PASS"
}
]
}GET /api/cards[
{
"cardId": 1001,
"status": "OPEN"
},
{
"cardId": 1002,
"status": "CLOSED"
}
]PUT /api/cards/1001{
"status": "IN_PROGRESS"
}{
"message": "Inspection card updated successfully"
}POST /api/cards/1001/close{
"cardId": 1001,
"status": "CLOSED"
}GET /api/cards/1001/measurements[
{
"measurementId": 1,
"name": "Pressure",
"value": 120
}
]GET /api/cards/1001/findings[
{
"findingId": 1,
"severity": "MEDIUM",
"description": "Cosmetic defect"
}
]POST /api/ai/explain-card{
"cardId": 1001
}{
"summary": "The inspection card represents a completed quality inspection with all mandatory checks successfully passed."
}POST /api/ai/work-order-report{
"workOrder": "WO-10001"
}{
"report": "Work order inspection summary generated successfully."
}POST /api/ai/statistics{
"period": "monthly"
}{
"totalInspections": 150,
"passed": 140,
"failed": 10,
"passRate": 93.3
}GET /api/cards/99999{
"error": "Inspection card not found"
}PUT /api/cards/1001{
"error": "Resource has been modified by another user"
}HTTP Status:
412 Precondition Failed
The API follows several principles:
- Business-oriented endpoints
- JSON document exchange
- Optimistic locking
- Consistent error handling
- AI integration
- Minimal transformation logic
The API works naturally with JSON Duality Views and document-centric business entities.