This article helps you locate and identify the specific item IDs within your inspections or templates, which can be used for custom or Microsoft Flow integrations.

There are different ways to find Item IDs. The most common method is by retrieving the inspection content via an API client such as Postman, but it is also possible to identify item IDs via your web browser. We will cover both methods in this support article.

Overview

To find and use the IDs, you must first understand what they are. There are two primary IDs you would use for integrations:

  • item_id: this is the unique identifier for any field within your inspection or template
  • response_id: this is the unique identifier for any response sets used in your inspection or template, such as a set containing Yes/No/NA
IMPORTANT NOTE

“response_id” can only be identified using the API.

Using an API client

This method requires the user of iAuditor API tokens and basic understanding of making REST API requests.

Conduct an inspection

  1. Login to the iAuditor WebApp
  2. Navigate to the “Templates” pages from the left side menu
  3. Click on the template you want to find item IDs for and “Start Inspection”
  4. Complete the inspection

Retrieve the inspection

  1. Navigate to the “Inspections” page left side menu
  2. Click on the completed inspection to view
  3. Copy the inspection audit_id from the URL
    i.e. https://app.safetyculture.io/report/audit/audit_759acebbd203461db9cac9968751840c
  4. Refer to our API documentation for GET inspection and retrieve the inspection content via your API client

Find item IDs and response IDs

  1. In the returned inspection content body, search for the question/field label you need the ID for
    The API client should support “Find Results” by keyboard command of Control + F (Windows) or Command + F (macOS)
  2. Once you have found the question/field, you may see something like this:
    The line above the “label” is the “item_id”
    The line below “responses”, headed by “id” is the “response_id”

    {
                “parent_id”: “41428e98-27cb-4ab7-b44b-5c4f363e953f”,
                “item_id”: “e4112fe9-7618-4256-ac11-671a7293bf04“,
                “label”: “Emergency exits are kept free of obstructions”,
                “type”: “question”,
                “scoring”: {
                    “score”: 2,
                    “max_score”: 2,
                    “score_percentage”: 100
                },
                “options”: {
                    “weighting”: 1,
                    “response_set”: “c6c011ed-4ade-460d-a04b-da730834b667”,
                    “failed_responses”: [
                        “060ace02-1f61-468e-9c42-918fa93badcf”,
                        “e1695ee6-f36e-48a8-88d6-01e9d5157daa”
                    ],
                    “is_mandatory”: false
                },
                “responses”: {
                    “selected”: [
                        {
                            “id”: “060ace00-1f61-468e-9c42-918fa93badcf“,
                            “label”: “Exceeds Standard (+2)”,
                            “colour”: “19,133,95”,
                            “score”: 2,
                            “short_label”: “”,
                            “type”: “text”,
                            “enable_score”: true
                        }
                    ],
                    “failed”: false
                }
            }
  3. For all integrations, such as Microsoft Flow, only the ID is required so you would not need to present headers or prefixes such as “item” or “id”
    e.g. e4112fe9-7618-4256-ac11-671a7293bf04

Using a web browser

IMPORTANT NOTE

This guide outlines the steps using Google Chrome (our recommended browser) and its developer tools. Similar functions are available with other browsers.

  1. Login to the iAuditor WebApp
  2. Navigate to the “Templates” pages from the left side menu
  3. Hover your mouse over the template you want to find item IDs for and “Edit”
  4. Using the mobile preview on the right hand side – find the question/field you need the ID for

Find item IDs

  1. Once you have found the question/field, right click your mouse on the webpage and select “Inspect”
  2. The Chrome developer tools will open and present you with the code from the webpage
  3. You can use the keyboard command of Control + F (Windows) or Command + F (macOS) to find the question label quickly
  4. You may find more than one result in the search in Elements – make sure it is the label in the mobile preview by hovering your mouse over the results and see where the webpage is highlighted
    The “item_id” will be above the label headed by “data-item-id=”
  5. You can copy and paste the “item_id” by double-clicking the unique ID
Was this article helpful?

We love your feedback. Please tell us what you think.


Yes No
Care to share a bit more so we can continue to make improvements for you? Care to share a bit more so we can make this article even better for you? Thanks for your feedback!