---
title: "Save completed audit to the database"
method: POST
path: "/subscribers/current/siteaudit/completed"
tags: ["SiteAudit"]
---

# Save completed audit to the database

`POST /subscribers/current/siteaudit/completed`

## Request

- Base URL: `https://sb2api.servicechannel.com/v3`
- URL: `https://sb2api.servicechannel.com/v3/subscribers/current/siteaudit/completed`
- Auth: OAuth 2
  - Authorization code: `https://sb2login.servicechannel.com/oauth/authorize`
  - Token URL: `https://sb2login.servicechannel.com/oauth/token`
- TypeScript: <https://skmtc.dev/servicechannel/apis/servicechannel-api-v-3/docs/subscribers/current/siteaudit/completed/post.ts> (a function with typed inputs; its response is checked against the schema)

## Request body

- ServiceChannelServicesMessagingSiteAuditAuditDataExternal
  - `Id` integer
  - `StoreId` integer
  - `TemplateTypeId` integer
  - `StartDate` string, date-time
  - `FinishDate` string, date-time
  - `SendEmails` boolean
  - `Emails` string
  - `Areas` ServiceChannelServicesMessagingSiteAuditAuditAreaRequest[]
    - `Id` integer
    - `Name` string
    - `SortOrder` integer
    - `CheckLists` ServiceChannelServicesMessagingSiteAuditCheckListRequest[]
      - `Name` string
      - `Unlisted` boolean
      - `SortOrder` integer
      - `CheckListItems` ServiceChannelServicesMessagingSiteAuditCheckListItemRequest[]
        - `Name` string
        - `Description` string
        - `Score` integer
        - `System` 'PassFail' | 'Numeric' | 'Weighted' | 'Percentage'
        - `Range` integer[]
        - `PassThreshold` integer
        - `Date` string, date-time
        - `Unlisted` boolean
        - `Issues` ServiceChannelServicesMessagingSiteAuditAuditIssueExternal[]
          - `Id` integer
          - `Description` string
          - `Date` string, date-time
          - `Attachments` ServiceChannelServicesMessagingSiteAuditIssueAttachmentExternal[]
            - `Id` integer
            - `RemoteName` string
            - `RemoteNameResized` string
            - `FileName` string
            - `ContentUrl` string
            - `ContentUrlResized` string
            - `ContentType` string
          - `Persistent` boolean
          - `UserName` string
        - `Quantity` ServiceChannelServicesMessagingSiteAuditQuantityExternal
          - `Value` integer
          - `Type` 'Dollar' | 'Quantity'
          - `Unit` string
        - `CheckListItemImpact` string
        - `WorkOrderIds` integer[]
  - `Language` string
  - `Status` 'Undefined' | 'Open' | 'Completed'
  - `Source` string

## Response `201`

The audit with status completed is created

- ServiceChannelServicesMessagingSiteAuditSaveAuditDataResponse
  - `Saved` boolean
  - `Sent` string
  - `AuditId` integer

## Other responses

- `400`: The request is not accepted due to bad syntax, missing parameters, insufficient data, etc. <br/>Error codes: 608 - Do not have access to the location. 999 - Invalid site audit linked work orders 1005 - Save site audit error. 1007 - Inactive template type. 1010 - Invalid site audit parameters
- `401`: The request is not authorized. <br/>Error codes: 504 - Missing or incorrect authentication credentials
- `500`: The server was unable to complete the request due to an internal error. <br/>Error codes: 501 - Unspecified internal server error occurred

---

[API](https://skmtc.dev/servicechannel/apis/servicechannel-api-v-3.md) - [All operations](https://skmtc.dev/servicechannel/apis/servicechannel-api-v-3/llms.txt) - [OpenAPI document](https://skmtc.dev/servicechannel/apis/servicechannel-api-v-3/revisions/d490d6596809?raw)
