openapi: 3.0.3 info: title: 'WorxSafety API Documentation' description: 'WorxSafety API for managing inductees, contractors, assets, projects, inductions, documents, and more.' version: 1.0.0 servers: - url: 'https://app.worxsafety.com.au' tags: - name: Inductees description: "\nAPIs for managing inductees (workers/employees).\n\nInductees are individual workers registered in the system. Use these endpoints\nto list, create, update, and manage worker records." - name: Contractors description: "\nAPIs for managing contractor companies and their workers.\n\nContractors are external companies that provide workers to your organization.\nUse these endpoints to list contractors, view their workers, and manage contractor relationships." - name: Assets description: "\nAPIs for managing assets (plant, equipment, vehicles).\n\nAssets include machinery, vehicles, tools, and other equipment that require tracking,\nmaintenance records, and compliance documentation." - name: Projects description: "\nAPIs for managing projects (work sites/locations).\n\nProjects represent physical work locations including address, contacts,\nand associated workers/contractors." - name: 'Project Events' description: "\nAPIs for managing project site events and activity tracking.\n\nTrack site sign-ins, sign-outs, and other project-related events." - name: 'Inductions & Training' description: "\nAPIs for managing inductions, training programs, and site-specific inductions.\n\nTrack completion status, expiry dates, and enrollment records for safety training\nand induction programs." - name: Documents description: "\nAPIs for managing documents and compliance records.\n\nTrack document expiry, validity status, and ownership across workers, assets,\nprojects, and contractor companies." - name: Issues description: "\nAPIs for managing safety, quality, and operational issues.\n\nIssues can be related to workers, assets, projects, or contractor companies.\nTrack acknowledgment, actions, and resolution of workplace issues." - name: Subscriptions description: "\nAPIs for managing webhook subscriptions.\n\nSubscribe to events and receive webhook notifications when data changes occur." - name: Registers description: "\nAPIs for managing registers (Risk Registers, WHS Registers, etc.).\n\nRegisters are configurable data tables that can be used for tracking various\ntypes of information including Company Risk Registers, Operational WHS Risk Registers,\nand other compliance data." components: securitySchemes: default: type: http scheme: bearer description: " All endpoints require a Bearer token for authentication.\n\n To obtain an API token:\n 1. Log in to your WorxSafety dashboard\n 2. Navigate to Settings > API Tokens\n 3. Click Generate API Token\n 4. Select the required abilities/permissions for your integration\n\n Required Header:\n Authorization: Bearer {YOUR_API_TOKEN}\n\n Each token has specific abilities that determine which endpoints it can access (e.g., user-read, asset-create, sites-read)." security: - default: [] paths: /api/inductee/index: get: summary: 'List all direct inductees' operationId: listAllDirectInductees description: 'Returns all direct inductees (workers not associated with a contractor) for your client.' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Inductees /api/inductee/index/all: get: summary: 'List all inductees' operationId: listAllInductees description: 'Returns all inductees (both direct and contractor-associated).' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Inductees /api/inductee/index/inactive: get: summary: 'List inactive inductees' operationId: listInactiveInductees description: 'Returns all inactive inductees.' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Inductees /api/inductee/index/subcontracted: get: summary: 'List subcontracted inductees' operationId: listSubcontractedInductees description: 'Returns all inductees associated with contractors.' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Inductees /api/inductee/index/approved: get: summary: 'List approved inductees' operationId: listApprovedInductees description: 'Returns all approved inductees.' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Inductees /api/inductee/index/revoked: get: summary: 'List revoked inductees' operationId: listRevokedInductees description: 'Returns all revoked/unapproved inductees.' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Inductees /api/inductee/recent: get: summary: 'Get most recent inductee' operationId: getMostRecentInductee description: 'Returns the most recently created inductee.' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Inductees '/api/inductee/search/{search}': get: summary: 'Search inductees' operationId: searchInductees description: 'Search for inductees by name, email, or ID.' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Inductees parameters: - in: path name: search description: 'Search term (name, email, or ID).' example: john required: true schema: type: string '/api/inductee/show/{id}': get: summary: 'Get inductee details' operationId: getInducteeDetails description: 'Returns detailed information for a specific inductee.' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Inductees parameters: - in: path name: id description: 'The user ID of the inductee.' example: 123 required: true schema: type: integer /api/inductee/test: get: summary: 'Test endpoint' operationId: testEndpoint description: 'Returns sample inductee data for testing API integration.' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Inductees '/api/inductee/inductions/{id}': get: summary: 'Get inductee inductions' operationId: getInducteeInductions description: 'Returns all induction records for a specific inductee.' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Inductees parameters: - in: path name: id description: 'The user ID of the inductee.' example: 123 required: true schema: type: integer '/api/inductee/training/{id}': get: summary: 'Get inductee training' operationId: getInducteeTraining description: 'Returns all training records for a specific inductee.' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Inductees parameters: - in: path name: id description: 'The user ID of the inductee.' example: 123 required: true schema: type: integer '/api/inductee/documents/{id}': get: summary: 'Get inductee documents' operationId: getInducteeDocuments description: 'Returns all documents for a specific inductee.' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Inductees parameters: - in: path name: id description: 'The user ID of the inductee.' example: 123 required: true schema: type: integer '/api/inductee/issues/{id}': get: summary: 'Get inductee issues' operationId: getInducteeIssues description: 'Returns all issues related to a specific inductee.' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Inductees parameters: - in: path name: id description: 'The user ID of the inductee.' example: 123 required: true schema: type: integer /api/inductee/create: post: summary: 'Create inductee' operationId: createInductee description: 'Create a new inductee record.' parameters: [] responses: { } tags: - Inductees requestBody: required: true content: application/json: schema: type: object properties: name: type: string description: "The inductee's full name." example: 'John Smith' email: type: string description: "The inductee's email address." example: john@example.com active: type: integer description: 'Account status (0 or 1).' example: 1 approved: type: integer description: 'Approval status (0 or 1).' example: 1 role: type: string description: 'Role type (user or admin).' example: user phone: type: string description: 'Phone number.' example: '0244556677' mobile: type: string description: 'Mobile number.' example: '0412345678' emergencyContact: type: string description: 'Emergency contact name.' example: 'Jane Smith' emergencyPhone: type: string description: 'Emergency contact phone.' example: '0498765432' workType: type: integer description: 'Work type ID.' example: 1 residency: type: string description: 'Residency status.' example: architecto residencyDetails: type: string description: 'Residency details/timezone.' example: architecto residencyExpiry: type: string description: 'Residency expiry date (Y-m-d format).' example: architecto dob: type: string description: 'Date of birth.' example: '1990-01-15' required: - name - email - active - approved - role - phone - mobile - emergencyContact - emergencyPhone - dob '/api/inductee/update/{id}': put: summary: 'Update inductee' operationId: updateInductee description: "Update an existing inductee's information." parameters: [] responses: { } tags: - Inductees requestBody: required: false content: application/json: schema: type: object properties: name: type: string description: "The inductee's full name." example: architecto email: type: string description: "The inductee's email address." example: gbailey@example.net active: type: integer description: 'Account status (0 or 1).' example: 16 approved: type: integer description: 'Approval status (0 or 1).' example: 16 role: type: string description: 'Role type (user or admin).' example: architecto revokeReason: type: string description: 'Reason for revoking approval.' example: architecto phone: type: string description: 'Phone number.' example: architecto mobile: type: string description: 'Mobile number.' example: architecto emergencyContact: type: string description: 'Emergency contact name.' example: architecto emergencyPhone: type: string description: 'Emergency contact phone.' example: architecto workType: type: integer description: 'Work type ID.' example: 16 residency: type: string description: 'Must match the regex /^\S(?:.*\S)?$/.' example: S residencyDetails: type: string description: 'Must be a valid time zone, such as Africa/Accra.' example: America/Bahia_Banderas residencyExpiry: type: string description: 'Must be a valid date in the format Y-m-d.' example: '2026-01-29' dob: type: string description: 'Date of birth (Y-m-d format).' example: architecto parameters: - in: path name: id description: 'The user ID of the inductee.' example: 123 required: true schema: type: integer '/api/inductee/disable/{id}': put: summary: 'Disable inductee' operationId: disableInductee description: 'Disable/revoke an inductee account.' parameters: [] responses: { } tags: - Inductees parameters: - in: path name: id description: 'The user ID of the inductee.' example: 123 required: true schema: type: integer /api/contractor/index: get: summary: 'List all contractors' operationId: listAllContractors description: 'Returns all contractor companies associated with your client.' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Contractors /api/contractor/index/approved: get: summary: 'List approved contractors' operationId: listApprovedContractors description: 'Returns all approved contractor companies.' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Contractors /api/contractor/index/revoked: get: summary: 'List revoked contractors' operationId: listRevokedContractors description: 'Returns all revoked/unapproved contractor companies.' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Contractors /api/contractor/abn: post: summary: 'Get contractor by ABN' operationId: getContractorByABN description: 'Find a contractor company by their ABN (Australian Business Number).' parameters: [] responses: { } tags: - Contractors requestBody: required: true content: application/json: schema: type: object properties: abn: type: string description: "The contractor's ABN." example: '12345678901' required: - abn '/api/contractor/show/{id}': get: summary: 'Get contractor details' operationId: getContractorDetails description: 'Returns detailed information for a specific contractor company.' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Contractors parameters: - in: path name: id description: 'The contractor ID.' example: 456 required: true schema: type: integer '/api/contractor/show/{id}/inductee': get: summary: "Get contractor's inductees" operationId: getContractorsInductees description: 'Returns all workers/inductees for a specific contractor company.' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Contractors parameters: - in: path name: id description: 'The contractor ID.' example: 456 required: true schema: type: integer /api/contractor/search: get: summary: 'Search contractors' operationId: searchContractors description: "Search for contractor companies by name or email.\nName search uses partial matching (e.g., \"MGN\" finds \"MGN Projects Pty Ltd\").\nEmail search uses exact matching." parameters: - in: query name: search description: 'The search term. Searches contractor name (partial match) or email (exact match).' example: 'MGN Projects' required: true schema: type: string description: 'The search term. Searches contractor name (partial match) or email (exact match).' example: 'MGN Projects' responses: 200: description: '' content: application/json: schema: type: object example: count: 1 data: - id: 14 name: 'MGN Projects Pty Ltd' email: glen@mgnprojects.com.au active: 1 properties: count: type: integer example: 1 data: type: array example: - id: 14 name: 'MGN Projects Pty Ltd' email: glen@mgnprojects.com.au active: 1 items: type: object properties: id: type: integer example: 14 name: type: string example: 'MGN Projects Pty Ltd' email: type: string example: glen@mgnprojects.com.au active: type: integer example: 1 tags: - Contractors /api/asset/index: get: summary: 'List all assets' operationId: listAllAssets description: 'Returns all assets for your client.' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Assets '/api/asset/search/{search}': get: summary: 'Search assets' operationId: searchAssets description: 'Search for assets by make, model, or ID.' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Assets parameters: - in: path name: search description: 'Search term.' example: toyota required: true schema: type: string '/api/asset/show/{id}': get: summary: 'Get asset details' operationId: getAssetDetails description: 'Returns detailed information for a specific asset.' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Assets parameters: - in: path name: id description: 'The asset ID.' example: 123 required: true schema: type: integer /api/asset/test: get: summary: 'Test endpoint' operationId: testEndpoint description: 'Returns sample asset data for testing API integration.' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Assets /api/asset/recent: get: summary: 'Get most recent asset' operationId: getMostRecentAsset description: 'Returns the most recently created asset.' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Assets '/api/asset/documents/{id}': get: summary: 'Get asset documents' operationId: getAssetDocuments description: 'Returns all documents for a specific asset.' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Assets parameters: - in: path name: id description: 'The asset ID.' example: 123 required: true schema: type: integer '/api/asset/prestarts/{id}': get: summary: 'Get asset prestarts' operationId: getAssetPrestarts description: 'Returns prestart check records for a specific asset.' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Assets parameters: - in: path name: id description: 'The asset ID.' example: 123 required: true schema: type: integer '/api/asset/maintenance/{id}': get: summary: 'Get asset service records' operationId: getAssetServiceRecords description: 'Returns maintenance/service records for a specific asset.' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Assets parameters: - in: path name: id description: 'The asset ID.' example: 123 required: true schema: type: integer /api/asset/create: post: summary: 'Create asset' operationId: createAsset description: 'Create a new asset record.' parameters: [] responses: { } tags: - Assets requestBody: required: true content: application/json: schema: type: object properties: make: type: string description: 'The asset make/manufacturer.' example: Toyota model: type: string description: 'The asset model.' example: Hilux serialNumber: type: string description: 'Serial number.' example: architecto registration: type: string description: 'Registration number.' example: architecto location: type: string description: 'Asset location.' example: architecto approver: type: integer description: 'Approver account ID.' example: 16 meterType: type: string description: 'Meter type (HRS, KM, MI, or N/A).' example: KM serviceInterval: type: integer description: 'Service interval value.' example: 16 serviceIntervalRead: type: integer description: 'Service interval reading.' example: 16 serviceDueRead: type: integer description: 'Service due reading.' example: 16 required: - make - model - meterType /api/asset/item/create: post: summary: 'Create asset service item' operationId: createAssetServiceItem description: 'Add a service item to an existing asset.' parameters: [] responses: { } tags: - Assets requestBody: required: true content: application/json: schema: type: object properties: assetId: type: integer description: 'The asset ID.' example: 123 itemName: type: string description: 'Service item name.' example: 'Oil Filter' meterType: type: string description: 'Meter type (HRS, KM, MI, or N/A).' example: KM meterReading: type: integer description: 'Current meter reading.' example: 50000 serviceInterval: type: integer description: 'Service interval.' example: 10000 nextInterval: type: integer description: 'Next service interval.' example: 60000 serviceFrequency: type: integer description: 'Service frequency.' example: 12 nextFrequency: type: string description: 'Next service date (Y-m-d).' example: '2024-12-01' required: - assetId - itemName - meterType - meterReading - serviceInterval - nextInterval - serviceFrequency - nextFrequency '/api/asset/item/update/{id}': put: summary: 'Update asset service item' operationId: updateAssetServiceItem description: 'Update an existing asset service item.' parameters: [] responses: { } tags: - Assets requestBody: required: false content: application/json: schema: type: object properties: itemName: type: string description: 'Must match the regex /^\S(?:.*\S)?$/.' example: S meterType: type: string description: '' example: KM enum: - HRS - KM - MI - N/A meterReading: type: integer description: '' example: 16 serviceInterval: type: integer description: '' example: 16 nextInterval: type: integer description: '' example: 16 serviceFrequency: type: integer description: '' example: 16 parameters: - in: path name: id description: 'The service item ID.' example: 456 required: true schema: type: integer '/api/asset/update/{id}': put: summary: 'Update asset' operationId: updateAsset description: "Update an existing asset's information." parameters: [] responses: { } tags: - Assets requestBody: required: false content: application/json: schema: type: object properties: make: type: string description: 'Must match the regex /^\S(?:.*\S)?$/.' example: S model: type: string description: 'Must match the regex /^\S(?:.*\S)?$/.' example: S serialNumber: type: string description: 'Must match the regex /^\S(?:.*\S)?$/.' example: S registration: type: string description: 'Must match the regex /^\S(?:.*\S)?$/.' example: S location: type: string description: 'Must match the regex /^\S(?:.*\S)?$/.' example: S approver: type: integer description: '' example: 16 meterType: type: string description: '' example: HRS enum: - HRS - KM - MI - N/A meterRead: type: integer description: '' example: 16 serviceInterval: type: integer description: '' example: 16 serviceIntervalRead: type: integer description: '' example: 16 serviceDueRead: type: integer description: '' example: 16 parameters: - in: path name: id description: 'The asset ID.' example: 123 required: true schema: type: integer '/api/asset/disable/{id}': put: summary: 'Delete asset' operationId: deleteAsset description: 'Delete an asset record.' parameters: [] responses: { } tags: - Assets parameters: - in: path name: id description: 'The asset ID.' example: 123 required: true schema: type: integer /api/project/index: get: summary: 'List all projects' operationId: listAllProjects description: 'Returns all projects for your client.' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Projects '/api/project/search/{search}': get: summary: 'Search projects' operationId: searchProjects description: 'Search for projects by name or ID.' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Projects parameters: - in: path name: search description: 'Search term.' example: construction required: true schema: type: string /api/project/recent: get: summary: 'Get most recent project' operationId: getMostRecentProject description: 'Returns the most recently created project.' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Projects '/api/project/show/{id}': get: summary: 'Get project details' operationId: getProjectDetails description: 'Returns detailed information for a specific project.' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Projects parameters: - in: path name: id description: 'The project ID.' example: 123 required: true schema: type: integer /api/project/swms/pdf/recent: get: summary: 'Get recent SWMS PDF' operationId: getRecentSWMSPDF description: 'Returns a download URL for the most recent approved SWMS PDF.' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Projects /api/project/form_submission/pdf/recent: get: summary: 'Get recent form submission PDF' operationId: getRecentFormSubmissionPDF description: 'Returns a download URL for the most recent form submission PDF.' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Projects /api/project/create: post: summary: 'Create project' operationId: createProject description: 'Create a new project/work site.' parameters: [] responses: { } tags: - Projects requestBody: required: true content: application/json: schema: type: object properties: name: type: string description: 'Project name.' example: 'Main Street Construction' street: type: string description: 'Street address.' example: '123 Main Street' suburb: type: string description: Suburb. example: Sydney state: type: string description: 'Australian state (NSW, VIC, QLD, WA, SA, TAS, NT).' example: NSW phone: type: string description: 'Contact phone.' example: '0244556677' manager: type: string description: 'Site manager name.' example: 'John Smith' contractors: type: string description: 'Comma-separated contractor IDs.' example: '1,2,3' nullable: true required: - name - street - suburb - state - phone - manager '/api/project/update/{id}': put: summary: 'Update project' operationId: updateProject description: "Update an existing project's information." parameters: [] responses: { } tags: - Projects requestBody: required: false content: application/json: schema: type: object properties: name: type: string description: 'Must not be greater than 255 characters.' example: b nullable: true street: type: string description: '' example: architecto nullable: true suburb: type: string description: 'Must not be greater than 255 characters.' example: 'n' nullable: true state: type: string description: 'Must not be greater than 255 characters.' example: g nullable: true phone: type: string description: 'Must not be greater than 255 characters.' example: z nullable: true manager: type: string description: 'Must not be greater than 255 characters.' example: m nullable: true contractors: type: string description: '' example: architecto nullable: true parameters: - in: path name: id description: 'The project ID.' example: 123 required: true schema: type: integer /api/project_events/all: get: summary: 'List all project events' operationId: listAllProjectEvents description: 'Returns all project events across all projects for your client.' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - 'Project Events' '/api/project_events/show/{id}': get: summary: 'Get project events' operationId: getProjectEvents description: 'Returns all events for a specific project.' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - 'Project Events' parameters: - in: path name: id description: 'The project ID.' example: 123 required: true schema: type: integer /api/project_events/search: post: summary: 'Remove the specified resource from storage.' operationId: removeTheSpecifiedResourceFromStorage description: '' parameters: [] responses: { } tags: - 'Project Events' /api/induction/index: get: summary: 'List all inductions' operationId: listAllInductions description: 'Returns all induction programs for your client.' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - 'Inductions & Training' /api/training/index: get: summary: 'List all training programs' operationId: listAllTrainingPrograms description: 'Returns all training programs for your client.' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - 'Inductions & Training' /api/site_induction/index: get: summary: 'List site inductions' operationId: listSiteInductions description: 'Returns all site-specific induction programs for your client.' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - 'Inductions & Training' /api/induction/recent: get: summary: 'Get most recent induction' operationId: getMostRecentInduction description: 'Returns the most recently created induction.' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - 'Inductions & Training' /api/training/recent: get: summary: 'Get most recent training' operationId: getMostRecentTraining description: 'Returns the most recently created training program.' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - 'Inductions & Training' '/api/induction/records/{id}': get: summary: 'Get induction records' operationId: getInductionRecords description: 'Returns all records for a specific induction program.' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - 'Inductions & Training' parameters: - in: path name: id description: 'The induction ID.' example: 123 required: true schema: type: integer '/api/training/records/{id}': get: summary: 'Get training records' operationId: getTrainingRecords description: 'Returns all records for a specific training program.' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - 'Inductions & Training' parameters: - in: path name: id description: 'The training/induction ID.' example: 123 required: true schema: type: integer '/api/site_induction/records/{id}': get: summary: 'Get site induction records' operationId: getSiteInductionRecords description: 'Returns all records for a specific site induction program.' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - 'Inductions & Training' parameters: - in: path name: id description: 'The site induction ID.' example: 123 required: true schema: type: integer /api/documents/index: get: summary: 'List all documents' operationId: listAllDocuments description: 'Returns all documents with expiry dates for your client.' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Documents /api/documents/index/valid: get: summary: 'List valid documents' operationId: listValidDocuments description: 'Returns all documents that are currently valid (not expired or expiring soon).' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Documents /api/documents/index/expired: get: summary: 'List expired documents' operationId: listExpiredDocuments description: 'Returns all documents that have already expired.' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Documents /api/documents/index/expiring: get: summary: 'List expiring documents' operationId: listExpiringDocuments description: 'Returns all documents expiring within the next 10 days.' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Documents /api/issue/index: get: summary: 'List all issues' operationId: listAllIssues description: 'Returns all issues for your client.' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Issues /api/issue/recent: get: summary: 'Get most recent issue' operationId: getMostRecentIssue description: 'Returns the most recently created issue.' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Issues '/api/issue/search/{search}': get: summary: 'Search issues' operationId: searchIssues description: 'Search for issues by description or ID.' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Issues parameters: - in: path name: search description: 'Search term.' example: safety required: true schema: type: string '/api/issue/show/{id}': get: summary: 'Get issue details' operationId: getIssueDetails description: 'Returns detailed information for a specific issue.' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Issues parameters: - in: path name: id description: 'The issue ID.' example: 123 required: true schema: type: integer /api/issue/test: get: summary: 'Test endpoint' operationId: testEndpoint description: 'Returns sample issue data for testing API integration.' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Issues /api/issue/create: post: summary: 'Create issue' operationId: createIssue description: 'Create a new issue record.' parameters: [] responses: { } tags: - Issues requestBody: required: true content: application/json: schema: type: object properties: ownerId: type: integer description: 'The owner/assignee account ID.' example: 123 issueType: type: string description: 'Issue type (Safety, Quality, Environmental, Operational, Uncategorised).' example: Safety relationType: type: string description: 'Related entity type (Project, Asset, Worker, ContractorCompany).' example: Project relationId: type: integer description: 'Related entity ID.' example: 456 description: type: string description: 'Issue description.' example: 'Fire extinguisher needs inspection' dueDate: type: string description: 'Due date (Y-m-d format).' example: '2024-12-31' priority: type: string description: 'Priority level (High, Medium, Low).' example: High required: - ownerId - issueType - relationType - relationId - description - priority /api/subscription/index: get: summary: 'List all subscriptions' operationId: listAllSubscriptions description: 'Returns all webhook subscriptions for your API token.' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Subscriptions /api/subscription/create: post: summary: 'Create subscription' operationId: createSubscription description: 'Create a new webhook subscription.' parameters: [] responses: { } tags: - Subscriptions requestBody: required: true content: application/json: schema: type: object properties: hookUrl: type: string description: 'The webhook URL to receive notifications.' example: 'https://example.com/webhook' event: type: string description: 'The event type to subscribe to.' example: inductee.created required: - hookUrl - event /api/subscription/delete: post: summary: 'Delete subscription' operationId: deleteSubscription description: 'Delete a webhook subscription by URL.' parameters: [] responses: { } tags: - Subscriptions requestBody: required: true content: application/json: schema: type: object properties: hookUrl: type: string description: 'The webhook URL to unsubscribe.' example: 'https://example.com/webhook' required: - hookUrl /api/register/index: get: summary: 'List all registers' operationId: listAllRegisters description: 'Returns all registers for your client, including Company Risk Register and Operational WHS Risk Register.' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Registers '/api/register/search/{search}': get: summary: 'Search registers' operationId: searchRegisters description: 'Search for registers by name.' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Registers parameters: - in: path name: search description: 'Search term.' example: Risk required: true schema: type: string /api/register/recent: get: summary: 'Get most recent register' operationId: getMostRecentRegister description: 'Returns the most recently created register for your client.' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Registers /api/register/entry/recent: get: summary: 'Get most recent register entry' operationId: getMostRecentRegisterEntry description: 'Returns the most recently created register entry across all registers for your client.' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Registers '/api/register/show/{id}': get: summary: 'Get register details' operationId: getRegisterDetails description: 'Returns detailed information for a specific register including its column definitions.' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Registers parameters: - in: path name: id description: 'The register ID.' example: 1 required: true schema: type: integer '/api/register/entries/{id}': get: summary: 'Get register entries' operationId: getRegisterEntries description: 'Returns all entries for a specific register. This is the data stored in the register.' parameters: - in: query name: page description: 'Page number for pagination.' example: 1 required: false schema: type: integer description: 'Page number for pagination.' example: 1 - in: query name: perPage description: 'Number of entries per page (max 100).' example: 50 required: false schema: type: integer description: 'Number of entries per page (max 100).' example: 50 responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Registers parameters: - in: path name: id description: 'The register ID.' example: 1 required: true schema: type: integer '/api/register/{registerId}/entry/{entryId}': get: summary: 'Get single entry' operationId: getSingleEntry description: 'Returns a single register entry by ID.' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Registers parameters: - in: path name: registerId description: 'The register ID.' example: 1 required: true schema: type: integer - in: path name: entryId description: 'The entry ID.' example: 123 required: true schema: type: integer '/api/register/{registerId}/entry/{entryId}/files': get: summary: 'Get entry files' operationId: getEntryFiles description: 'Returns all files attached to a specific register entry row.' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Registers parameters: - in: path name: registerId description: 'The register ID.' example: 1 required: true schema: type: integer - in: path name: entryId description: 'The entry ID.' example: 123 required: true schema: type: integer '/api/register/{registerId}/document/{documentId}/download': get: summary: 'Download entry file' operationId: downloadEntryFile description: 'Download a file from a register entry using only register and document IDs.' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Registers parameters: - in: path name: registerId description: 'The register ID.' example: 1 required: true schema: type: integer - in: path name: documentId description: 'The document ID.' example: 456 required: true schema: type: integer '/api/register/{registerId}/document/{documentId}/download_url': get: summary: 'Get entry file download URL' operationId: getEntryFileDownloadURL description: "Returns a temporary download URL for a file from a register entry.\nThe URL is valid for 2 hours." parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Registers parameters: - in: path name: registerId description: 'The register ID.' example: 1 required: true schema: type: integer - in: path name: documentId description: 'The document ID.' example: 456 required: true schema: type: integer