### Create Review Webhook Payload (JSON) Source: https://www.snapinspect.com/content/swagger2 An example JSON payload for the 'Create_Review' webhook event. This payload provides information about a newly created review, including its ID, the associated inspection ID, and company ID. ```json { "sType": "Create_Review", "iInsReviewID": 1388563, "iInspectionID": 1234, "iCompanyID": 6847 } ``` -------------------------------- ### User Authentication - GET /user Source: https://www.snapinspect.com/content/swagger2 Retrieves user information using a Personal Access Token. This endpoint demonstrates how to authenticate API requests by passing a Bearer token in the Authorization header. ```APIDOC ## GET /user ### Description Retrieves the authenticated user's details. This is a common endpoint to verify authentication and get basic user information. ### Method GET ### Endpoint https://api-v3.snapinspect.com/user ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```bash curl -H "Authorization: Bearer ACCESS_TOKEN" https://api-v3.snapinspect.com/user ``` ### Response #### Success Response (200) - **user_id** (integer) - The unique identifier for the user. - **username** (string) - The username of the authenticated user. - **email** (string) - The email address of the user. #### Response Example ```json { "user_id": 12345, "username": "john_doe", "email": "john.doe@example.com" } ``` ``` -------------------------------- ### Review Signed Webhook Payload (JSON) Source: https://www.snapinspect.com/content/swagger2 An example JSON payload for the 'Review_Signed' webhook event. This payload indicates that a review has been signed and includes relevant IDs for the review, inspection, and company. ```json { "sType": "Review_Signed", "iInsReviewID": 1388563, "iInspectionID": 1234, "iCompanyID": 6847 } ``` -------------------------------- ### Create Inspection Webhook Payload (JSON) Source: https://www.snapinspect.com/content/swagger2 An example JSON payload for the 'Create_Inspection' webhook event. This payload contains details about the newly created inspection, including its ID and the associated company ID. ```json { "sType": "Create_Inspection", "iInspectionID": 1388563, "iCompanyID": 6847 } ``` -------------------------------- ### Create Task Webhook Payload (JSON) Source: https://www.snapinspect.com/content/swagger2 An example JSON payload for the 'Create_Task' webhook event. This payload contains details about a newly created task, including its ID and the associated company ID. Note the potential 3-minute delay for this webhook. ```json { "sType": "Create_Task", "iTaskID": 1388563, "iCompanyID": 6847 } ``` -------------------------------- ### Create Schedule Webhook Payload (JSON) Source: https://www.snapinspect.com/content/swagger2 An example JSON payload for the 'Create_Schedule' webhook event. This payload indicates the creation of a new schedule and includes the new schedule ID and the ID of the previous schedule if applicable (e.g., when an inspector is updated). ```json { "iScheduleID": 432565, "iScheduleID_Prev": 432564, "sType": "Create_Schedule" } ``` -------------------------------- ### Update Inspection Status Webhook Payload (JSON) Source: https://www.snapinspect.com/content/swagger2 An example JSON payload for the 'Update_Inspection_Status' webhook event. This payload includes the inspection ID, company ID, and the new status of the inspection. ```json { "sType": "Update_Inspection_Status", "iInspectionID": 1388563, "iCompanyID": 6847, "sStatus": "sample status" } ``` -------------------------------- ### Delete Schedule Webhook Payload (JSON) Source: https://www.snapinspect.com/content/swagger2 An example JSON payload for the 'Delete_Schedule' webhook event. This payload includes the ID of the schedule that has been deleted. ```json { "iScheduleID": 432556, "sType": "Delete_Schedule" } ``` -------------------------------- ### Update Task Status Webhook Payload (JSON) Source: https://www.snapinspect.com/content/swagger2 An example JSON payload for the 'Update_Task_Status' webhook event. This payload includes the task ID, company ID, and the updated status of the task. ```json { "sType": "Update_Task_Status", "iTaskID": 1388563, "sStatus": "new status", "iCompanyID": 6847 } ``` -------------------------------- ### Complete Schedule Webhook Payload (JSON) Source: https://www.snapinspect.com/content/swagger2 An example JSON payload for the 'Complete_Schedule' webhook event. This payload signifies the completion of a schedule, including the specific schedule ID and a reference to the recurring schedule ID if applicable. ```json { "iScheduleID": 432561, "sType": "Complete_Schedule", "iScheduleID_Recur": 432570 } ``` -------------------------------- ### Update Schedule Webhook Payload (JSON) Source: https://www.snapinspect.com/content/swagger2 An example JSON payload for the 'Update_Schedule' webhook event. This payload identifies the schedule being updated and its type. Applicable for changes to inspection date, type, or notes. Updating the inspector triggers a new schedule creation. ```json { "iScheduleID": 432561, "sType": "Update_Schedule" } ``` -------------------------------- ### Folders API Source: https://www.snapinspect.com/content/swagger2 Endpoints for managing folders, including retrieving, creating, updating, and deleting folders, as well as managing assets within folders. ```APIDOC ## GET /folders ### Description Get folders for the company, filter based on given parameters. ### Method GET ### Endpoint /folders ### Parameters #### Query Parameters - **param1** (type) - Optional - Description ### Response #### Success Response (200) - **field1** (type) - Description #### Response Example { "example": "response body" } ## POST /folders ### Description Save a folder. ### Method POST ### Endpoint /folders ### Parameters #### Request Body - **field1** (type) - Required - Description ### Request Example { "example": "request body" } ### Response #### Success Response (200) - **field1** (type) - Description #### Response Example { "example": "response body" } ## GET /folders/{folder_id} ### Description Get a single folder for given ID. ### Method GET ### Endpoint /folders/{folder_id} ### Parameters #### Path Parameters - **folder_id** (string) - Required - The ID of the folder. ### Response #### Success Response (200) - **field1** (type) - Description #### Response Example { "example": "response body" } ## PUT /folders/{folder_id} ### Description Update a folder with given ID. ### Method PUT ### Endpoint /folders/{folder_id} ### Parameters #### Path Parameters - **folder_id** (string) - Required - The ID of the folder to update. #### Request Body - **field1** (type) - Required - Description ### Request Example { "example": "request body" } ### Response #### Success Response (200) - **field1** (type) - Description #### Response Example { "example": "response body" } ## DELETE /folders/{folder_id} ### Description Delete a folder. ### Method DELETE ### Endpoint /folders/{folder_id} ### Parameters #### Path Parameters - **folder_id** (string) - Required - The ID of the folder to delete. ### Response #### Success Response (200) - **field1** (type) - Description #### Response Example { "example": "response body" } ## DELETE /folders/{folder_id}/asset ### Description Delete the assets under the folder. ### Method DELETE ### Endpoint /folders/{folder_id}/asset ### Parameters #### Path Parameters - **folder_id** (string) - Required - The ID of the folder. ### Response #### Success Response (200) - **field1** (type) - Description #### Response Example { "example": "response body" } ## PUT /folders/{folder_id}/asset ### Description Attach assets to the given folder. ### Method PUT ### Endpoint /folders/{folder_id}/asset ### Parameters #### Path Parameters - **folder_id** (string) - Required - The ID of the folder. #### Request Body - **field1** (type) - Required - Description ### Request Example { "example": "request body" } ### Response #### Success Response (200) - **field1** (type) - Description #### Response Example { "example": "response body" } ``` -------------------------------- ### Users API Source: https://www.snapinspect.com/content/swagger2 Endpoints for managing users, including retrieving all users, creating new users, and updating or deleting individual user accounts. ```APIDOC ## GET /users ### Description All users. ### Method GET ### Endpoint /users ### Response #### Success Response (200) - **field1** (type) - Description #### Response Example { "example": "response body" } ## POST /users ### Description Create user. ### Method POST ### Endpoint /users ### Parameters #### Request Body - **field1** (type) - Required - Description ### Request Example { "example": "request body" } ### Response #### Success Response (200) - **field1** (type) - Description #### Response Example { "example": "response body" } ## GET /users/{user_id} ### Description Get a single user. ### Method GET ### Endpoint /users/{user_id} ### Parameters #### Path Parameters - **user_id** (string) - Required - The ID of the user. ### Response #### Success Response (200) - **field1** (type) - Description #### Response Example { "example": "response body" } ## PUT /users/{user_id} ### Description Update user. ### Method PUT ### Endpoint /users/{user_id} ### Parameters #### Path Parameters - **user_id** (string) - Required - The ID of the user to update. #### Request Body - **field1** (type) - Required - Description ### Request Example { "example": "request body" } ### Response #### Success Response (200) - **field1** (type) - Description #### Response Example { "example": "response body" } ## DELETE /users/{user_id} ### Description Delete user. ### Method DELETE ### Endpoint /users/{user_id} ### Parameters #### Path Parameters - **user_id** (string) - Required - The ID of the user to delete. ### Response #### Success Response (200) - **field1** (type) - Description #### Response Example { "example": "response body" } ## PUT /users/{user_id}/folder ### Description Update user folder access. ### Method PUT ### Endpoint /users/{user_id}/folder ### Parameters #### Path Parameters - **user_id** (string) - Required - The ID of the user. #### Request Body - **field1** (type) - Required - Description ### Request Example { "example": "request body" } ### Response #### Success Response (200) - **field1** (type) - Description #### Response Example { "example": "response body" } ## DELETE /users/{user_id}/folder ### Description Delete user folder access. ### Method DELETE ### Endpoint /users/{user_id}/folder ### Parameters #### Path Parameters - **user_id** (string) - Required - The ID of the user. ### Response #### Success Response (200) - **field1** (type) - Description #### Response Example { "example": "response body" } ``` -------------------------------- ### Access API with Personal Access Token (curl) Source: https://www.snapinspect.com/content/swagger2 Demonstrates how to authenticate API requests using a Personal Access Token by including it in the Authorization header. This method is suitable for command-line scripts and direct integrations. ```bash curl -H "Authorization: Bearer ACCESS_TOKEN" https://api-v3.snapinspect.com/user ``` -------------------------------- ### Assets API Source: https://www.snapinspect.com/content/swagger2 Endpoints for managing assets, including retrieving, creating, updating, and deleting assets, as well as managing their associated contacts, inspections, and schedules. ```APIDOC ## GET /assets ### Description Get assets for the company, filter based on given parameters. ### Method GET ### Endpoint /assets ### Parameters #### Query Parameters - **param1** (type) - Optional - Description ### Response #### Success Response (200) - **field1** (type) - Description #### Response Example { "example": "response body" } ## POST /assets ### Description Save an asset. ### Method POST ### Endpoint /assets ### Parameters #### Request Body - **field1** (type) - Required - Description ### Request Example { "example": "request body" } ### Response #### Success Response (200) - **field1** (type) - Description #### Response Example { "example": "response body" } ## GET /assets/{asset_id}/contacts ### Description Get contacts for given asset. ### Method GET ### Endpoint /assets/{asset_id}/contacts ### Parameters #### Path Parameters - **asset_id** (string) - Required - The ID of the asset. ### Response #### Success Response (200) - **field1** (type) - Description #### Response Example { "example": "response body" } ## GET /assets/{asset_id}/inspections ### Description Get inspections for given asset. ### Method GET ### Endpoint /assets/{asset_id}/inspections ### Parameters #### Path Parameters - **asset_id** (string) - Required - The ID of the asset. ### Response #### Success Response (200) - **field1** (type) - Description #### Response Example { "example": "response body" } ## GET /assets/{asset_id}/schedules ### Description Get schedules for given asset ID. ### Method GET ### Endpoint /assets/{asset_id}/schedules ### Parameters #### Path Parameters - **asset_id** (string) - Required - The ID of the asset. ### Response #### Success Response (200) - **field1** (type) - Description #### Response Example { "example": "response body" } ## PUT /assets/{asset_id}/archive ### Description Archive an asset with given ID. ### Method PUT ### Endpoint /assets/{asset_id}/archive ### Parameters #### Path Parameters - **asset_id** (string) - Required - The ID of the asset to archive. ### Response #### Success Response (200) - **field1** (type) - Description #### Response Example { "example": "response body" } ## GET /assets/{asset_id} ### Description Get a single asset for given ID. ### Method GET ### Endpoint /assets/{asset_id} ### Parameters #### Path Parameters - **asset_id** (string) - Required - The ID of the asset. ### Response #### Success Response (200) - **field1** (type) - Description #### Response Example { "example": "response body" } ## DELETE /assets/{asset_id} ### Description Delete an asset. ### Method DELETE ### Endpoint /assets/{asset_id} ### Parameters #### Path Parameters - **asset_id** (string) - Required - The ID of the asset to delete. ### Response #### Success Response (200) - **field1** (type) - Description #### Response Example { "example": "response body" } ## PUT /assets/{asset_id} ### Description Update an asset with given ID. ### Method PUT ### Endpoint /assets/{asset_id} ### Parameters #### Path Parameters - **asset_id** (string) - Required - The ID of the asset to update. #### Request Body - **field1** (type) - Required - Description ### Request Example { "example": "request body" } ### Response #### Success Response (200) - **field1** (type) - Description #### Response Example { "example": "response body" } ``` -------------------------------- ### Tasks API Source: https://www.snapinspect.com/content/swagger2 Endpoints for managing tasks, including retrieving all tasks, specific task details, and updating task status or completion. ```APIDOC ## GET /tasks ### Description All tasks. ### Method GET ### Endpoint /tasks ### Response #### Success Response (200) - **field1** (type) - Description #### Response Example { "example": "response body" } ## GET /tasks/{task_id} ### Description Get a single task record. ### Method GET ### Endpoint /tasks/{task_id} ### Parameters #### Path Parameters - **task_id** (string) - Required - The ID of the task. ### Response #### Success Response (200) - **field1** (type) - Description #### Response Example { "example": "response body" } ## PUT /tasks/status/{task_id} ### Description Update Task Status. ### Method PUT ### Endpoint /tasks/status/{task_id} ### Parameters #### Path Parameters - **task_id** (string) - Required - The ID of the task. #### Request Body - **field1** (type) - Required - Description ### Request Example { "example": "request body" } ### Response #### Success Response (200) - **field1** (type) - Description #### Response Example { "example": "response body" } ## PUT /tasks/complete/{task_id} ### Description Complete / Re‑open Task. ### Method PUT ### Endpoint /tasks/complete/{task_id} ### Parameters #### Path Parameters - **task_id** (string) - Required - The ID of the task. #### Request Body - **field1** (type) - Required - Description ### Request Example { "example": "request body" } ### Response #### Success Response (200) - **field1** (type) - Description #### Response Example { "example": "response body" } ``` -------------------------------- ### Schedules API Source: https://www.snapinspect.com/content/swagger2 Endpoints for managing schedules, including retrieving all schedules, creating new schedules, requesting inspections, and managing individual schedule details. ```APIDOC ## GET /schedules ### Description Get all schedules. ### Method GET ### Endpoint /schedules ### Response #### Success Response (200) - **field1** (type) - Description #### Response Example { "example": "response body" } ## POST /schedules ### Description Save a schedule. ### Method POST ### Endpoint /schedules ### Parameters #### Request Body - **field1** (type) - Required - Description ### Request Example { "example": "request body" } ### Response #### Success Response (200) - **field1** (type) - Description #### Response Example { "example": "response body" } ## POST /schedules/requestinspection ### Description Request Inspection. ### Method POST ### Endpoint /schedules/requestinspection ### Parameters #### Request Body - **field1** (type) - Required - Description ### Request Example { "example": "request body" } ### Response #### Success Response (200) - **field1** (type) - Description #### Response Example { "example": "response body" } ## GET /schedules/{schedule_id} ### Description Get a single schedule. ### Method GET ### Endpoint /schedules/{schedule_id} ### Parameters #### Path Parameters - **schedule_id** (string) - Required - The ID of the schedule. ### Response #### Success Response (200) - **field1** (type) - Description #### Response Example { "example": "response body" } ## DELETE /schedules/{schedule_id} ### Description Delete a schedule. ### Method DELETE ### Endpoint /schedules/{schedule_id} ### Parameters #### Path Parameters - **schedule_id** (string) - Required - The ID of the schedule to delete. ### Response #### Success Response (200) - **field1** (type) - Description #### Response Example { "example": "response body" } ``` -------------------------------- ### Common API Source: https://www.snapinspect.com/content/swagger2 Endpoints for retrieving common data such as status lists and user roles. ```APIDOC ## GET /common/status ### Description Get status list by type. ### Method GET ### Endpoint /common/status ### Parameters #### Query Parameters - **type** (string) - Required - The type of status to retrieve. ### Response #### Success Response (200) - **field1** (type) - Description #### Response Example { "example": "response body" } ## GET /common/role ### Description Get all user roles. ### Method GET ### Endpoint /common/role ### Response #### Success Response (200) - **field1** (type) - Description #### Response Example { "example": "response body" } ``` -------------------------------- ### Inspections API Source: https://www.snapinspect.com/content/swagger2 Endpoints for managing inspections, including retrieving all inspections, specific inspection details, items, reviews, and for updating or deleting inspections. ```APIDOC ## GET /inspections ### Description Get all inspections. ### Method GET ### Endpoint /inspections ### Response #### Success Response (200) - **field1** (type) - Description #### Response Example { "example": "response body" } ## GET /inspections/{inspection_id}/items ### Description Items of a single inspection. ### Method GET ### Endpoint /inspections/{inspection_id}/items ### Parameters #### Path Parameters - **inspection_id** (string) - Required - The ID of the inspection. ### Response #### Success Response (200) - **field1** (type) - Description #### Response Example { "example": "response body" } ## POST /inspections/{inspection_id}/review ### Description Inspection Review. ### Method POST ### Endpoint /inspections/{inspection_id}/review ### Parameters #### Path Parameters - **inspection_id** (string) - Required - The ID of the inspection. #### Request Body - **field1** (type) - Required - Description ### Request Example { "example": "request body" } ### Response #### Success Response (200) - **field1** (type) - Description #### Response Example { "example": "response body" } ## GET /inspections/{inspection_id} ### Description Get single inspection. ### Method GET ### Endpoint /inspections/{inspection_id} ### Parameters #### Path Parameters - **inspection_id** (string) - Required - The ID of the inspection. ### Response #### Success Response (200) - **field1** (type) - Description #### Response Example { "example": "response body" } ## DELETE /inspections/{inspection_id} ### Description Delete an inspection. ### Method DELETE ### Endpoint /inspections/{inspection_id} ### Parameters #### Path Parameters - **inspection_id** (string) - Required - The ID of the inspection to delete. ### Response #### Success Response (200) - **field1** (type) - Description #### Response Example { "example": "response body" } ## PUT /inspections/{inspection_id} ### Description Update an inspection. ### Method PUT ### Endpoint /inspections/{inspection_id} ### Parameters #### Path Parameters - **inspection_id** (string) - Required - The ID of the inspection to update. #### Request Body - **field1** (type) - Required - Description ### Request Example { "example": "request body" } ### Response #### Success Response (200) - **field1** (type) - Description #### Response Example { "example": "response body" } ``` -------------------------------- ### Webhook Events Source: https://www.snapinspect.com/content/swagger2 Information about available webhook events that can be configured to receive push notifications for various actions within SnapInspect. ```APIDOC ## Webhook Events Webhooks allow you to receive real-time notifications when specific events occur in your SnapInspect account. You can configure a callback URL to which SnapInspect will POST event data. ### Available Events - **Create Inspection:** Triggered when a new inspection is created. - **Update Inspection Status:** Triggered when the status of an inspection is updated. - **Create Review:** Triggered when a new review is created. - **Review Signed:** Triggered when a review is signed. - **Create Task:** Triggered when a new task is created. - **Update Task Status:** Triggered when the status of a task is updated. - **Create Schedule:** Triggered when a new schedule is created. - **Update Schedule:** Triggered when an existing schedule is updated. - **Complete Schedule:** Triggered when a schedule is marked as completed. - **Delete Schedule:** Triggered when a schedule is deleted. ### Webhook Payload Examples #### Create Inspection ```json { "sType": "Create_Inspection", "iInspectionID": 1388563, "iCompanyID": 6847 } ``` #### Update Inspection Status ```json { "sType": "Update_Inspection_Status", "iInspectionID": 1388563, "iCompanyID": 6847, "sStatus": "sample status" } ``` #### Create Review ```json { "sType": "Create_Review", "iInsReviewID": 1388563, "iInspectionID": 1234, "iCompanyID": 6847 } ``` #### Review Signed ```json { "sType": "Review_Signed", "iInsReviewID": 1388563, "iInspectionID": 1234, "iCompanyID": 6847 } ``` #### Create Task ```json { "sType": "Create_Task", "iTaskID": 1388563, "iCompanyID": 6847 } ``` *Note: There is a 3-minute delay with the Create Task Webhook.* #### Update Task Status ```json { "sType": "Update_Task_Status", "iTaskID": 1388563, "sStatus": "new status", "iCompanyID": 6847 } ``` #### Create Schedule ```json { "iScheduleID": 432565, "iScheduleID_Prev": 432564, "sType": "Create_Schedule" } ``` *Note: When an Inspector is updated on a schedule, this will create a new schedule and delete the previous one. The `iScheduleID_Prev` points to the schedule ID of the previous schedule.* #### Update Schedule ```json { "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 ```json { "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. `iScheduleID` is a newly generated schedule that was created specifically for this completed inspection.* #### Delete Schedule ```json { "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. ``` -------------------------------- ### Inspection Types API Source: https://www.snapinspect.com/content/swagger2 Endpoints for retrieving inspection types and their associated review templates. ```APIDOC ## GET /inspection_types ### Description Get Inspection Types. ### Method GET ### Endpoint /inspection_types ### Response #### Success Response (200) - **field1** (type) - Description #### Response Example { "example": "response body" } ## GET /inspection_types/{iinstypeid}/reviewtemplates ### Description Get Review Templates. ### Method GET ### Endpoint /inspection_types/{iinstypeid}/reviewtemplates ### Parameters #### Path Parameters - **iinstypeid** (string) - Required - The ID of the inspection type. ### Response #### Success Response (200) - **field1** (type) - Description #### Response Example { "example": "response body" } ``` -------------------------------- ### Contacts API Source: https://www.snapinspect.com/content/swagger2 Endpoints for managing contacts, including saving, deleting, updating, and archiving contacts. ```APIDOC ## POST /contacts ### Description Save a contact. ### Method POST ### Endpoint /contacts ### Parameters #### Request Body - **field1** (type) - Required - Description ### Request Example { "example": "request body" } ### Response #### Success Response (200) - **field1** (type) - Description #### Response Example { "example": "response body" } ## DELETE /contacts/{contact_id} ### Description Delete a contact. ### Method DELETE ### Endpoint /contacts/{contact_id} ### Parameters #### Path Parameters - **contact_id** (string) - Required - The ID of the contact to delete. ### Response #### Success Response (200) - **field1** (type) - Description #### Response Example { "example": "response body" } ## PUT /contacts/{contact_id} ### Description Update a given contact. ### Method PUT ### Endpoint /contacts/{contact_id} ### Parameters #### Path Parameters - **contact_id** (string) - Required - The ID of the contact to update. #### Request Body - **field1** (type) - Required - Description ### Request Example { "example": "request body" } ### Response #### Success Response (200) - **field1** (type) - Description #### Response Example { "example": "response body" } ## PUT /contacts/{contact_id}/archive ### Description Archive a contact. ### Method PUT ### Endpoint /contacts/{contact_id}/archive ### Parameters #### Path Parameters - **contact_id** (string) - Required - The ID of the contact to archive. ### Response #### Success Response (200) - **field1** (type) - Description #### Response Example { "example": "response body" } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.