List inspections, fetch a single inspection by ID, and import inspections from external systems using the same API key (Bearer or Basic) as other APIs (e.g. Sites, Employee Sync). All operations are scoped to your organization.
| Method | Path | Description |
|---|---|---|
GET | /api/inspections | List inspections — summary only (metadata, template, inspector, site, asset). Optional: includeAnswers=true adds answer data (no images). Use for dashboards or to pick an ID. |
GET | /api/inspections/{id} | Get one full inspection by ID — all metadata, all answers, and images as base64 in answers[].images. Use when you need every detail for a single inspection. |
POST | /api/inspections | Import an inspection (templateId, conductedBy, answers; validates conditional logic) |
List inspections returns a summary of each inspection (IDs, template, inspector, site, asset, status, dates). It does not include embedded images, so the response stays small and fast. Use it for tables, filters, and to get inspection IDs. With includeAnswers=true you get answer text/numbers/options per inspection, but still no images.
Get inspection by ID returns full details for that one inspection: same metadata plus every answer and images as base64 in answers[].images (imgBlobSrc, optional imgDimension). Use this when you need everything for a single inspection (e.g. detail view, export, or sync).
All endpoints require the same API key (Bearer token or Basic auth) you use for Employee Sync, Sites, and other v1 APIs. See Authentication for how to obtain and use credentials.
Returns a summary of inspections for your organization (one object per inspection with metadata, template, inspector, site, asset). It does not include embedded images so the payload stays small. Use this for listing tables, dashboards, or when you only need to pick an inspection ID. Optional filters: templateId, status, siteId, assetId. Set includeAnswers=true to include answer data (text, numbers, options) in each inspection — still no images. limit (default 50, max 100) and offset control pagination. For full details and base64 images of a single inspection, use Get an inspection below.
GET /api/inspections
Authorization: Bearer <your_token>
# Optional query params: templateId, status, siteId, assetId, limit (default 50), offset, includeAnswers=true
GET /api/inspections?limit=20&includeAnswers=trueHTTP/1.1 200 OK
Content-Type: application/json
{
"inspections": [
{
"id": "ins_123",
"inspectionNumber": "INS-2025-0001",
"templateId": "tpl_abc",
"templateVersion": 1,
"assetId": "ast_456",
"assetName": "Pump Unit A",
"siteId": "site_789",
"conductedBy": "usr_xyz",
"organizationId": "org_1",
"startedAt": "2025-02-14T09:00:00.000Z",
"completedAt": "2025-02-14T09:15:00.000Z",
"createdAt": "2025-02-14T09:00:00.000Z",
"updatedAt": "2025-02-14T09:15:00.000Z",
"status": "COMPLETED",
"template": { "id": "tpl_abc", "title": "Daily Pump Check", "type": "ASSET" },
"inspector": { "id": "usr_xyz", "name": "Jane Doe", "email": "jane@example.com" },
"site": { "id": "site_789", "name": "Warehouse North", "code": "WH-N" },
"asset": { "id": "ast_456", "name": "Pump Unit A", "code": "PUMP-01" }
}
],
"pagination": { "total": 42, "limit": 20, "offset": 0, "hasMore": true }
}Each item in inspections is a summary (no answers unless includeAnswers=true). List responses never include embedded images; use Get inspection by ID for that.
Returns full details for a single inspection by ID: all metadata, template, inspector, site, asset, and all answers with images as base64 in answers[].images (each item has imgBlobSrc — a data URL — and optional imgDimension). Use this when you need every detail for one inspection (e.g. detail view or export). Responds with 404 if the inspection does not exist or belongs to another organization.
GET /api/inspections/{inspectionId}
Authorization: Bearer <your_token>HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "ins_123",
"inspectionNumber": "INS-2025-0001",
"templateId": "tpl_abc",
"templateVersion": 1,
"assetId": "ast_456",
"assetName": "Pump Unit A",
"siteId": "site_789",
"conductedBy": "usr_xyz",
"organizationId": "org_1",
"startedAt": "2025-02-14T09:00:00.000Z",
"completedAt": "2025-02-14T09:15:00.000Z",
"status": "COMPLETED",
"template": { "id": "tpl_abc", "title": "Daily Pump Check", "type": "ASSET" },
"inspector": { "id": "usr_xyz", "name": "Jane Doe", "email": "jane@example.com" },
"site": { "id": "site_789", "name": "Warehouse North", "code": "WH-N" },
"asset": { "id": "ast_456", "name": "Pump Unit A", "code": "PUMP-01" },
"answers": [
{
"id": "ans_1",
"questionId": "q_1",
"answerText": "Pass",
"answerNumber": null,
"answerBoolean": null,
"answerDate": null,
"answerJson": null,
"responseOptionId": "opt_1",
"question": { "id": "q_1", "text": "Visual condition" },
"images": []
},
{
"id": "ans_2",
"questionId": "q_2",
"answerText": null,
"responseOptionId": "opt_photo",
"question": { "id": "q_2", "text": "Photo evidence" },
"images": [
{
"imgBlobSrc": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUg...",
"imgDimension": "300x400"
}
]
}
]
}Creates an inspection and its answers in one request. Use this to import inspections from external systems or bulk-load completed audits. templateId must be a published template in your organization. conductedBy must be a user ID that belongs to your organization. For AUDIT templates, siteId is required; for ASSET templates you can optionally pass assetId and assetName. status defaults to COMPLETED; you can set IN_PROGRESS if importing a draft.
Each item in answers must have questionId and at least one of: answerText, answerNumber, answerBoolean, answerDate (ISO string), answerJson, responseOptionId, templateOptionId, unitId, unitCategory. When the selected option requires a note, include note (string); it is stored with the answer. When the option requires a photo, include media (array of base64 strings or data URLs, e.g. data:image/jpeg;base64,...); images are uploaded and linked to the answer.
Validation (question rules): Answers are validated against the template's conditional logic. Do not send an answer for a question that is hidden by rules (e.g. "If Q1 = A then show Q2" — if Q1 is not A, omit Q2). All visible required questions must have an answer. Invalid payloads return 400 with an error and details array.
IDs you need: Call GET /api/templates with the same API key to list templates (returns id, title, type, status, etc.). Use a template's id as templateId, a user in your org as conductedBy, and question IDs from that template for each answers[].questionId. For AUDIT templates, include siteId.
POST /api/inspections
Authorization: Bearer <your_token>
Content-Type: application/json
{
"templateId": "tpl_abc",
"conductedBy": "usr_xyz",
"siteId": "site_789",
"status": "COMPLETED",
"answers": [
{ "questionId": "q_1", "answerText": "Pass" },
{ "questionId": "q_2", "answerNumber": 42 },
{ "questionId": "q_3", "answerBoolean": true, "note": "Inspector comment when option requires note." },
{ "questionId": "q_4", "responseOptionId": "opt_photo", "media": ["data:image/jpeg;base64,/9j/4AAQ..."] }
]
}HTTP/1.1 201 Created
Content-Type: application/json
{
"id": "ins_new_123",
"inspectionNumber": "INS-2025-0042",
"message": "Inspection imported successfully"
}HTTP/1.1 400 Bad Request
Content-Type: application/json
{
"error": "Validation failed",
"details": [
"Question 'Condition follow-up' should not be shown based on conditional logic (parent answer does not trigger it), but an answer was provided.",
"Question 'Safety check' is required but no answer was provided."
]
}Same as other v1 APIs (per API key). See Error Handling for details.
401 — Missing or invalid API key. 404 — Inspection or template not found. 429 — Rate limit exceeded. 400 — Validation failed (e.g. invalid payload or conditional logic violation); response includes details array with messages.