The iAuditor API allows you to automate workflows, gain insights across your entire organization, and push data into business applications. API access is gained with a Premium plan, you can view the pricing plans here. This getting started guide will provide all the technical information required for a smooth API set up.
Request | Response |
GET https://api.safetyculture.io | {
“message”: “Public API service”, “version”: “thepub/1.0.0” } |
To perform requests that require an authenticated user, a valid access token is required. To generate an access token:
Request | Response | |
URL | POST https://api.safetyculture.io/auth | {
“access_token”: “37588b3e5564ed3c9516b91e5b96252a91383f82da9d2b600646568865510451”, “token_type”: “Bearer” } |
Headers | Content-Type: application/x-www-form-urlencoded | |
Body | [email protected]&password=secret&grant_type=password |
You can also generate an API token by navigating to the iAuditor web app and following these steps:
This is an authenticated request so pass the API access token in the ”Authorization” request header as shown below.
NB: Leave an empty space between “Bearer” and the access token
Request | Response | |
URL | GET https://api.safetyculture.io/audits/search | {
“count”: 246, “total”: 246, “audits”: [ { “audit_id”: “audit_21DE83E67306468DBF999B256A39BEBB”, “modified_at”: “2016-08-18T03:32:12.588Z”, “template_id”: “template_b043f583f34642f4b446f46eeb5405dd” }, { “audit_id”: “audit_DCEEE1035DE84539A2AEBD1C3C476ACC”, “modified_at”: “2016-08-18T04:03:35.362Z”, “template_id”: “template_DC2EBB92275C41A38BD80A6309542F6A” }, …]} |
Headers | Content-Type: application/json
Authorization: Bearer 37588b3e5564ed3c9516b91e5b96252a91383f82da9d2b600646568865510451 |
To export the data of an audit:
Request | Response | |
URL | GET https://api.safetyculture.io/audits/audit_a96522feaf7b440caac1d6c7d74171f2 | {
“template_id”: “template_b043f583f34642f4b446f46eeb5405dd”, “audit_id”: “audit_21DE83E67306468DBF999B256A39BEBB”, “archived”: false, “created_at”: “2016-08-18T03:31:36.227Z”, “modified_at”: “2016-08-18T03:32:12.588Z” … more audit properties … } |
Headers | Content-Type: application/json
Authorization: Bearer 37588b3e5564ed3c9516b91e5b96252a91383f82da9d2b600646568865510451 |
Step | Request | Response |
Request a report to be generated | POST https://api.safetyculture.io/audits/audit_a96522feaf7b440caac1d6c7d74171f2/export?format=pdf
Content-Type: application/json Authorization: Bearer 37588b3e5564ed3c9516b91e5b96252a91383f82da9d2b600646568865510451 |
{ “id”: “94a427d1-1bd1-4f76-b3a5-4c5de1c75a3f” } |
Poll after (recommended 30) seconds to check for completion | GET https://api.safetyculture.io/exports/audit_01ca38a821504cda885736cccbb9ba40/exports/94a427d1-1bd1-4f76-b3a5-4c5de1c75a3f
Content-Type: application/json Authorization: Bearer 37588b3e5564ed3c9516b91e5b96252a91383f82da9d2b600646568865510451 |
{ “status”: “SUCCESS”, “href”: “https://api.safetyculture.io/audits/audit_01ca38a821504cda885736cccbb9ba40/exports/94a427d1-1bd1-4f76-b3a5-4c5de1c75a3f/Daily%20Inspection%20-%20000012%20-%202016.02.04-20.31.47%2B0000.pdf”, “filename”: “Daily Inspection – 000012 – 2016.02.04-20.31.47+0000.pdf” } |
Download PDF report | GET “https://api.safetyculture.io/audits/audit_01ca38a821504cda885736cccbb9ba40/exports/94a427d1-1bd1-4f76-b3a5-4c5de1c75a3f/Daily%20Inspection%20-%20000012%20-%202016.02.04-20.31.47%2B0000.pdf”
Content-Type: application/pdf Authorization: Bearer 37588b3e5564ed3c9516b91e5b96252a91383f82da9d2b600646568865510451 |
The PDF file contents |
Search for recently modified audits
and more
Yes, we have an open source Javascript and Python SDK which includes a handy bulk data exporter tool
https://github.com/SafetyCulture/safetyculture-sdk-python
https://github.com/SafetyCulture/safetyculture-js
We also provide a Swagger spec file from which you can auto-generate SDKs in a number of programming languages
https://api.safetyculture.io/docs/swagger