Auditform API

This is a brief explanation of how to use the API..

Authentication

The API uses digest authentication. You will be asked for a username and password before you can retrieve any data
from the system. This is the same username and password you use to log into the Auditform website,:

API

The base URL is:

https://auditform.com/api/index.php/

You can list all audits you have access to by appending the following to the base URL:

audits/getallaudits/

To list a specific audit you will need to know the reference number (??? in the example below). You can retrieve it with the following URL:

audits/getaudit/refno/???/

Completed Audits

To retrieve a list of all completed audits you have access to you can use the below URL (This can take quite a while if you don't specify a date range and is limited to 500 audits).

audits/getcompletedaudit/

You can filter the list to only show completed audits by adding the following to the URL:

published/1/

You can filter the list to only audits that are not completed by adding the following to the URL:

unpublished/1/

To retrieve completed audits you have access to, you will need to know the audit reference number. The below URL will show you an audit from the demo account.

audits/getcompletedaudit/refno/32479/

You can also see the answers against this audit if you have specified a reference number by adding the following to the URL:

N.B. you need to specify a reference number to include the answers. includeanswers/1/

You can also see the compliances against the answers if you have specified a reference number by adding the following to the URL:

N.B. you need to specify a reference number to include the compliances. includecompliance/1/

To show archived audits in the results you can add the following to the URL:

showarchived/1/

Date Ranges

To specify a date range you can add the following onto the end of the URL:

audits/getcompletedaudit/fromdate/2024-10-26/todate/2024-11-26

You can change the date search method to search audits that have had an activity against them within a date range. This includes any compliance changes or comments added.

searchlastupdate/1/

Text Searching

You can filter results by audit name. If you only know part of the name then it will search on the partial name (replace ??? with the search criteria). :

auditnametxt/???/

You can filter results by location name. If you only know part of the name then it will search on the partial name (replace ??? with the search criteria). :

locationnametxt/???/

You can filter results by user. If you only know part of the name then it will search on the partial name (replace ??? with the search criteria). :

usersearchtxt/???/

Output Format

You can switch the output format from XML to either json, csv, html, serialized or php (php gives you a formatted array) (replace ??? with the format required):

format/???/

Customer Details

To get all customers details for your franchise, use the following below. The details returned include the ID of each customer and their organisation name.

customers/getcustomerdetails/

You can order the data returned by specifying "id" OR "organisation". Replace ??? with either of these options, else it will be sort by id as default.

orderby/???

Audit Section Scores

To get the section scores for a given audit, use the following below. The returned data is in XML format, and details the same score information found on the PDF.

audits/getauditsectionscores/refno/???

Diary

Planned audits can be retrieved by using the URL below. The information returned is the same as that found on the diary.

diary/getplannedaudits/startdate/2024-11-26/enddate/2024-12-26