---
title: "Update an inspection"
method: PUT
path: "/audits/{audit_id}"
tags: ["Inspections"]
---

# Update an inspection

`PUT /audits/{audit_id}`

## Path parameters

- `audit_id` string, required

## Request body

- S12ThepubV1ThePubServiceUpdateInspectionBody — The parameters for `UpdateInspection`
  - `archived` boolean — Whether to archive or un-archive the inspection. Optional. Defaults to false (un-archive).
  - `header_items` S12ThepubV1UpdateInspectionItem[] — The title page items of the inspection.
    - `item_id` string — The id of the item.
    - `type` 'text' | 'textsingle' | 'address' | 'datetime' | 'question' | 'list' | 'checkbox' | 'slider' | 'switch'
    - `responses` S12ThepubV1UpdateInspectionItemResponses
      - `text` string — Text response.
      - `value` string — Value response. Used for sliders, checkboxes, and switches.
      - `name` string — Someone's Name. Used with signature, location and weather items.
      - `datetime` string, date-time — Time of action. Used only with barcode and signature items.
      - `location_text` string — Location represented as text (address or coordinates).
      - `location` S12ThepubV1UpdateInspectionItemResponsesLocation
        - `administrative_area` string — The administrative area of the location.
        - `country` string — The country of the location.
        - `formatted_address` string[] — The formatted address of the location.
        - `geometry` S12ThepubV1UpdateInspectionItemResponsesLocationGeometry
          - `type` string — The type of geometry.
          - `coordinates` number[] — The coordinates that define the geometry.
        - `iso_country_code` string — The ISO Country Code of the location.
        - `locality` string — The locality of the location.
        - `name` string — The name of the location.
        - `postal_code` string — The postal code of the location.
        - `sub_administrative_area` string — The sub administrative area of the location.
        - `sub_locality` string — The sub locality of the location.
        - `sub_thoroughfare` string — The sub thoroughfare of the location.
        - `thoroughfare` string — The thoroughfare of the location.
      - `selected` S12ThepubV1UpdateInspectionItemResponsesResponse[] — The selected items from an response set.
        - `id` string — The id of the response.
      - `note` string — Note added to the response. Detailed information available [here](https://developer.safetyculture.com/reference/add-notes-to-inspection-questions)
  - `items` S12ThepubV1UpdateInspectionItem[] — The items of the inspection.
    - `item_id` string — The id of the item.
    - `type` 'text' | 'textsingle' | 'address' | 'datetime' | 'question' | 'list' | 'checkbox' | 'slider' | 'switch'
    - `responses` S12ThepubV1UpdateInspectionItemResponses
      - `text` string — Text response.
      - `value` string — Value response. Used for sliders, checkboxes, and switches.
      - `name` string — Someone's Name. Used with signature, location and weather items.
      - `datetime` string, date-time — Time of action. Used only with barcode and signature items.
      - `location_text` string — Location represented as text (address or coordinates).
      - `location` S12ThepubV1UpdateInspectionItemResponsesLocation
        - `administrative_area` string — The administrative area of the location.
        - `country` string — The country of the location.
        - `formatted_address` string[] — The formatted address of the location.
        - `geometry` S12ThepubV1UpdateInspectionItemResponsesLocationGeometry
          - `type` string — The type of geometry.
          - `coordinates` number[] — The coordinates that define the geometry.
        - `iso_country_code` string — The ISO Country Code of the location.
        - `locality` string — The locality of the location.
        - `name` string — The name of the location.
        - `postal_code` string — The postal code of the location.
        - `sub_administrative_area` string — The sub administrative area of the location.
        - `sub_locality` string — The sub locality of the location.
        - `sub_thoroughfare` string — The sub thoroughfare of the location.
        - `thoroughfare` string — The thoroughfare of the location.
      - `selected` S12ThepubV1UpdateInspectionItemResponsesResponse[] — The selected items from an response set.
        - `id` string — The id of the response.
      - `note` string — Note added to the response. Detailed information available [here](https://developer.safetyculture.com/reference/add-notes-to-inspection-questions)

## Response `200`

A successful response.

- S12ThepubV1Inspection
  - `template_id` string — The template this inspection was conducted from.
  - `audit_id` string — The id of this inspection.
  - `archived` boolean — If this inspection is archived.
  - `created_at` string, date-time — The date this inspection was created on the server.
  - `modified_at` string, date-time — The date this inspection was last updated on the server.
  - `audit_data` S12ThepubV1InspectionAuditData
    - `score` integer — The score of the inspection.
    - `total_score` integer — The total possible score of the inspection.
    - `percentage` integer — The percentage of the inspection score.
    - `name` string — The name of the inspection.
    - `duration` string, int64 — The duration of the inspection.
    - `authorship` S12ThepubV1InspectionAuthorship
      - `device_id` string — The ID of the device that this was last modified on.
      - `owner` string — The name of the user who created this document.
      - `owner_id` string — The id of the user who created this document.
      - `author` string — The name of the user who last modified this document.
      - `author_id` string — The id of the user who last modified this document.
    - `date_completed` string, date-time — The date and time the inspection was completed.
    - `date_modified` string, date-time — The date and time the inspection was last modified.
    - `date_started` string, date-time — The date and time the inspection was started.
    - `site` S12ThepubV1InspectionAuditDataSite
      - `name` string — The name of the site this inspection was conducted at.
  - `template_data` S12ThepubV1InspectionTemplateData
    - `authorship` S12ThepubV1InspectionAuthorship
      - `device_id` string — The ID of the device that this was last modified on.
      - `owner` string — The name of the user who created this document.
      - `owner_id` string — The id of the user who created this document.
      - `author` string — The name of the user who last modified this document.
      - `author_id` string — The id of the user who last modified this document.
    - `metadata` S12ThepubV1InspectionTemplateDataMetadata
      - `name` string — The name of the template.
      - `description` string — The description of the template.
    - `response_sets` object — Response sets used in the template.
  - `header_items` S12ThepubV1InspectionItem[] — The title page items of the inspection.
    - `item_id` string — The id of the item.
    - `label` string — The label of the item.
    - `type` string — The type of the item.
    - `children` string[] — The child items of the item.
    - `parent_id` string — The parent item of the item.
    - `responses` S12ThepubV1InspectionItemResponses
      - `text` string — Text response.
      - `value` string — Value response. Used for sliders, checkboxes, and switches.
      - `name` string — Someone's Name. Used with signature, location and weather items.
      - `time` string, date-time — Time of action. Used only with barcode and signature items.
      - `location_text` string — Location represented as text (address or coordinates).
      - `location` S12ThepubV1InspectionItemResponsesLocation
        - `administrative_area` string — The administrative area of the location.
        - `country` string — The country of the location.
        - `formatted_address` string[] — The formatted address of the location.
        - `geometry` S12ThepubV1InspectionItemResponsesLocationGeometry
          - `type` string — The type of geometry.
          - `coordinates` number[] — The coordinates that define the geometry.
        - `iso_country_code` string — The ISO Country Code of the location.
        - `locality` string — The locality of the location.
        - `name` string — The name of the location.
        - `postal_code` string — The postal code of the location.
        - `sub_administrative_area` string — The sub administrative area of the location.
        - `sub_locality` string — The sub locality of the location.
        - `sub_thoroughfare` string — The sub thoroughfare of the location.
        - `thoroughfare` string — The thoroughfare of the location.
      - `selected` S12ThepubV1InspectionResponse[] — The selected items from an response set.
        - `id` string — The id of the response.
        - `colour` string — The colour of the response.
        - `enable_score` boolean — If scoring is enabled for the response.
        - `label` string — The label of the response.
        - `score` integer — The score of the response.
        - `short_label` string — The short label of the response.
        - `type` string — The type of the response. `question` or `list`
      - `failed` boolean — If the response is considered failed.
      - `media` S12ThepubV1InspectionMedia[] — The media of the response.
        - `date_created` string, date-time — The date the media was created.
        - `file_ext` string — The file extension of the media.
        - `media_id` string — The id of the media.
        - `label` string — The label of the media.
        - `href` string — The url to retrieve the media.
      - `image` S12ThepubV1InspectionMedia
        - `date_created` string, date-time — The date the media was created.
        - `file_ext` string — The file extension of the media.
        - `media_id` string — The id of the media.
        - `label` string — The label of the media.
        - `href` string — The url to retrieve the media.
      - `scoring` S12ThepubV1InspectionItemResponsesScoring
        - `combined_score` number, double — The combined score of the category.
        - `combined_max_score` integer — The combined maximum score of the category.
        - `combined_score_percentage` number, double — The combined score percentage of the category.
        - `score` number, double — The score of the item.
        - `max_score` integer — The maximum score of the category.
        - `score_percentage` number, double — The score percentage of the category.
      - `notes` string — Notes added to the response.
  - `items` S12ThepubV1InspectionItem[] — The items of the inspection.
    - `item_id` string — The id of the item.
    - `label` string — The label of the item.
    - `type` string — The type of the item.
    - `children` string[] — The child items of the item.
    - `parent_id` string — The parent item of the item.
    - `responses` S12ThepubV1InspectionItemResponses
      - `text` string — Text response.
      - `value` string — Value response. Used for sliders, checkboxes, and switches.
      - `name` string — Someone's Name. Used with signature, location and weather items.
      - `time` string, date-time — Time of action. Used only with barcode and signature items.
      - `location_text` string — Location represented as text (address or coordinates).
      - `location` S12ThepubV1InspectionItemResponsesLocation
        - `administrative_area` string — The administrative area of the location.
        - `country` string — The country of the location.
        - `formatted_address` string[] — The formatted address of the location.
        - `geometry` S12ThepubV1InspectionItemResponsesLocationGeometry
          - `type` string — The type of geometry.
          - `coordinates` number[] — The coordinates that define the geometry.
        - `iso_country_code` string — The ISO Country Code of the location.
        - `locality` string — The locality of the location.
        - `name` string — The name of the location.
        - `postal_code` string — The postal code of the location.
        - `sub_administrative_area` string — The sub administrative area of the location.
        - `sub_locality` string — The sub locality of the location.
        - `sub_thoroughfare` string — The sub thoroughfare of the location.
        - `thoroughfare` string — The thoroughfare of the location.
      - `selected` S12ThepubV1InspectionResponse[] — The selected items from an response set.
        - `id` string — The id of the response.
        - `colour` string — The colour of the response.
        - `enable_score` boolean — If scoring is enabled for the response.
        - `label` string — The label of the response.
        - `score` integer — The score of the response.
        - `short_label` string — The short label of the response.
        - `type` string — The type of the response. `question` or `list`
      - `failed` boolean — If the response is considered failed.
      - `media` S12ThepubV1InspectionMedia[] — The media of the response.
        - `date_created` string, date-time — The date the media was created.
        - `file_ext` string — The file extension of the media.
        - `media_id` string — The id of the media.
        - `label` string — The label of the media.
        - `href` string — The url to retrieve the media.
      - `image` S12ThepubV1InspectionMedia
        - `date_created` string, date-time — The date the media was created.
        - `file_ext` string — The file extension of the media.
        - `media_id` string — The id of the media.
        - `label` string — The label of the media.
        - `href` string — The url to retrieve the media.
      - `scoring` S12ThepubV1InspectionItemResponsesScoring
        - `combined_score` number, double — The combined score of the category.
        - `combined_max_score` integer — The combined maximum score of the category.
        - `combined_score_percentage` number, double — The combined score percentage of the category.
        - `score` number, double — The score of the item.
        - `max_score` integer — The maximum score of the category.
        - `score_percentage` number, double — The score percentage of the category.
      - `notes` string — Notes added to the response.

## Other responses

- `default` — An unexpected error response.

---

[API](https://skmtc.net/safetyculture/apis/safetyculture-api.md) · [All operations](https://skmtc.net/safetyculture/apis/safetyculture-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/safetyculture/safetyculture-api/versions/5be91df61ded/schema)
