The API

The SnapInspect 3 API is a RESTful interface, allowing you to programmtically update and access much of your data on the platform. It provides URLs for accessing resources and uses HTTP to receive commands and return responses.

Authentication Endpoint

https://my.snapinspect.com/integration/SnapInspectConnect

Exchange Token Endpoint

https://my.snapinspect.com/integration/ExchangeToken

API Endpoint

https://api-v3.snapinspect.com/

1. Personal Access Token

Personal Access Tokens are a useful mechanism for accessing the API in scenarios where OAuth would be considered overkill, such as access from the command line and personal scripts or applications, or direct integration.

Personal Access Tokens should be used similarly to OAuth access tokens when accessing the API, passing them in the Authorization header:

curl -H "Authorization: Bearer ACCESS_TOKEN" https://api-v3.snapinspect.com/user

You can request your Personal Access Token by email support@snapinspect.com along with the Webhook callback URL (optional).

Note: Remember to keep your tokens secret; treat them just like passwords! They act on your behalf when interacting with the API. Don’t hardcode them into your programs; instead, opt to use them as environment variables.

WebHook Security

WebHook is an easy way to get push notifications. A webhook is like an inverted API endpoint where you define a call back URL to which we will POST information as things happen to your SnapInspect account.

WebHook Events

WebHook Payload Examples

Create Inspection

{ "sType": "Create_Inspection", "iInspectionID": 1388563, "iCompanyID": 6847 }


Update Inspection Status

{ "sType": "Update_Inspection_Status", "iInspectionID": 1388563, "iCompanyID": 6847, "sStatus": "sample status" }


Create Review

{ "sType": "Create_Review", "iInsReviewID": 1388563, "iInspectionID": 1234, "iCompanyID": 6847 }


Review Signed

{ "sType": "Review_Signed", "iInsReviewID": 1388563, "iInspectionID": 1234, "iCompanyID": 6847 }


Create Task

{ "sType": "Create_Task", "iTaskID": 1388563, "iCompanyID": 6847 }

Note: there is a 3 min delay with the create Task Webhook


Update Task Status

{ "sType": "Update_Task_Status", "iTaskID": 1388563, "sStatus": "new status", "iCompanyID": 6847 }


Create Schedule

{ "iScheduleID": 432565, "iScheduleID_Prev": 432564, "sType": "Create_Schedule" }

Note: When a Inspector is updated on a schedule, this will create a new schedule and delete the the previous one. The iScheduleID_Prev points to the schedule ID of the previous schedule.


Update Schedule

{ "iScheduleID": 432561, "sType": "Update_Schedule" }

Note: Applicable for updating the Inspection Date, Inspection Type, or Notes, if updating the Inspector, this will create a new Schedule and call the Create Schedule Webhook.


Complete Schedule

{ "iScheduleID": 432561, "sType": "Complete_Schedule", "iScheduleID_Recur": 432570 }

Note: When a recurring schedule exists, it acts as a template for generating individual schedules. The system does not modify this recurring schedule directly when an inspection is completed. Instead, it creates a new schedule specifically for that instance of the inspection.

iScheduleID_Recur: represents the original recurring schedule. This is the schedule that repeats over time.

iScheduleID: is a newly generated schedule that was created specifically for this completed inspection.

The system marks this new schedule as completed, rather than marking the original recurring schedule. This means that whenever an inspection is completed for a recurring schedule, a separate schedule is created and marked as completed while still linking back to the original recurring schedule using iScheduleID_Recur.


Delete Schedule

{ "iScheduleID": 432556, "sType": "Delete_Schedule" }


Important Notes

Note: Please return code 200 to confirm receipt of the webhook message. If a webhook fails to deliver its message, we will retry up to three times within the next 10 minutes. If all attempts fail, the message will be removed.