---
title: "Update multiple leak records for a work order and an asset"
method: POST
path: "/refrigeranttracking/BulkLeakrecords"
tags: ["RefrigerantTracking"]
---

# Update multiple leak records for a work order and an asset

`POST /refrigeranttracking/BulkLeakrecords`

## Request

- Base URL: `https://sb2api.servicechannel.com/v3`
- URL: `https://sb2api.servicechannel.com/v3/refrigeranttracking/BulkLeakrecords`
- 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/refrigeranttracking/BulkLeakrecords/post.ts> (a function with typed inputs; its response is checked against the schema)

Creates, updates, or deletes multiple leak records for the **work order + asset** pair.
            <br />***Note:*** Leak records should belong to a unique pair of **WO + asset** to perform bulk operations with them. 
            <br />***Note:*** Available with the *RTMultiLeakFlow* feature flag.
            <br />**Example request for adding multiple leak records:**
            
                { 
                    "AddItems": [
                        {
                        "RepairDate": "2022-09-18T11:53:48.741Z",
                        "InitialVerificationDate": "2022-09-18T11:53:48.741Z",
                        "InitialVerificationMethod": 2,
                        "FollowUpVerificationDate": "2022-09-18T11:53:48.741Z",
                        "FollowUpVerificationMethod": 2,
                        "ActionCodeId": 2,
                        "FaultCodeId": 2,
                        "LeakLocationId": 2,
                        "Notes": [
                            "leak record 1"
                            ],
                        "RecId": 204762085,
                        "AssetId": 5490153,
                        "Actor": "Sam Drill"
                        },
                        {
                        "RepairDate": "2022-09-19T11:53:48.741Z",
                        "InitialVerificationDate": "2022-09-19T11:53:48.741Z",
                        "InitialVerificationMethod": 1,
                        "FollowUpVerificationDate": "2022-09-19T11:53:48.741Z",
                        "FollowUpVerificationMethod": 1,
                        "ActionCodeId": 1,
                        "FaultCodeId": 1,
                        "LeakLocationId": 1,
                        "Notes": [
                            "leak record 2"
                            ],
                        "RecId": 204762085,
                        "AssetId": 5490153,
                        "Actor": "Derek Crown" 
                        ],
                     "RecId": 204762085,
                     "AssetId": 5490153
                }

## Request body

- ServiceChannelServicesMessagingRefrigerantTrackingLeakImmeasurableBulkChangeRequest: Request model to perform bulk operations with multiple leak records for the work order and an asset.
  - `AddItems` ServiceChannelServicesMessagingRefrigerantTrackingAddLeakImmeasurableRequest[]
    - `RepairDate` string, date-time: Date and time when the repair was completed. ***Note:*** It cannot be earlier than the work order call date. The date format is `YYYY-MM-DDThh:mm:ss.sssZ`.
    - `InitialVerificationDate` string, date-time: Date when the first verification took place. ***Note:*** The initial verification date cannot be in the future and cannot be less than the repair date. It should be either a current date or a date in the past.
    - `InitialVerificationMethod` integer: Method that was used during the first verification to make sure the leak had been fixed. <br />Possible values: • `0`: Unknown • `1`: Soap Bubble Test • `2`: Electronic Leak Detection • `3`: Ultrasonic Leak Detection • `4`: Pressure Test • `5`: Vacuum Test • `6`: Fluorescent Dye Test • `7`: Infrared Test • `8`: Near Infrared Test • `9`: Halon Gas Detection
    - `FollowUpVerificationDate` string, date-time: Date of the second verification. The date format is `YYYY-MM-DDThh:mm:ss.sssZ`. ***Note:*** The follow-up verification date cannot be earlier than the initial verification date and cannot be in the future. It should be either a current date or a date in the past.
    - `FollowUpVerificationMethod` integer: Method of the second verification. The list of available verification methods is the same as for the `InitialVerificationMethod`.
    - `ActionCodeId` integer: Unique numeric identifier of the action that a technician took to fix the leak. Use the [GET/refrigeranttracking/leakRecord/actionCodes](https://developer.servicechannel.com/swagger/index.html#/RefrigerantTracking/GETv3_refrigeranttracking_leakRecord_actionCodes) method to get available action codes and their IDs.
    - `FaultCodeId` integer: Unique numeric identifier of the reason why the problem occurred. Use the [GET/refrigeranttracking/leakRecord/faultCodes](https://developer.servicechannel.com/swagger/index.html#/RefrigerantTracking/GETv3_refrigeranttracking_leakRecord_faultCodes) method to get available fault codes and their IDs. <br />Possible values: • `1`: Accidental Damage • `2`: Braze or Joint Failure • `3`: Corrosion • `4`: Defrost Heater Failure • `5`: Faulty Part • `6`: Forklift Damage • `7`: Gasket Seal Failure • `8`: Ice Build Up • `9`: Line Break • `10`: Manufacture Defect • `11`: Missing Part • `12`: Natural Disaster • `13`: Normal Mechanical Wear • `14`: Other (Must Explain in Comments) • `15`: Vandalism • `16`: Vibration Related • `17`: Project Related Loss
    - `LeakLocationId` integer: Unique numeric identifier of the location where the leak occurred: more specific place within the particular area, for example, *Coil*, *Level Indicator/Alarm*, *Splitting Valve*. Use the [GET/refrigeranttracking/{subscriberId}/leaklocations](https://developer.servicechannel.com/swagger/index.html#/RefrigerantTracking/GETv3_refrigeranttracking_%7BsubscriberId%7D_leaklocations) method to get the list of available leak locations.
    - `Notes` string[]: Leak record notes.
    - `RecId` integer: Unique numeric identifier of the work order to add the leak record to.
    - `AssetId` integer: Unique numeric identifier of the asset to add the leak record to.
    - `Actor` string: Name of the technician who performed the fix of the leak.
    - `LeakDetectionDate` string, date-time: Date when the leak was detected. If not provided, defaults to the repair date. Cannot be later than the repair date.
  - `UpdateItems` ServiceChannelServicesMessagingRefrigerantTrackingUpdateLeakImmeasurable[]
    - `Id` integer: Unique numeric identifier of the leak record.
    - `RepairDate` string, date-time: Date when the repair was completed.
    - `InitialVerificationDate` string, date-time: Date when the first verification took place.
    - `InitialVerificationMethod` integer: Method that was used during the first verification to make sure the leak had been fixed.
    - `FollowUpVerificationDate` string, date-time: Date of the second verification.
    - `FollowUpVerificationMethod` integer: Method of the second verification.
    - `ActionCodeId` integer: Unique numeric identifier of the action that a technician took to fix the leak.
    - `FaultCodeId` integer: Unique numeric identifier of the reason why the problem occurred.
    - `LeakLocationId` integer: Unique numeric identifier of the location where the leak occurred: more specific place within the particular area, for example, level indicator/alarm/splitting valve.
    - `Notes` string[]: Leak record notes.
    - `Actor` string: Name of the technician who performed the fix of the leak.
    - `LeakDetectionDate` string, date-time: Date when the leak was detected. If not provided, defaults to the repair date. Cannot be later than the repair date.
  - `DeleteItems` integer[]: List of leak records IDs to remove.
  - `RecId` integer: Unique numeric identifier of the work order.
  - `AssetId` integer: Unique numeric identifier of the asset.

## Response `200`

The specified leak records have been successfully modified.

- ServiceChannelServicesCoreInternalRequestsRefrigerantTrackingLeakImmeasurableBulkChangeRequestInternal
  - `RequestData` ServiceChannelServicesMessagingRefrigerantTrackingLeakImmeasurableBulkChangeRequest: Request model to perform bulk operations with multiple leak records for the work order and an asset.
    - `AddItems` ServiceChannelServicesMessagingRefrigerantTrackingAddLeakImmeasurableRequest[]
      - `RepairDate` string, date-time: Date and time when the repair was completed. ***Note:*** It cannot be earlier than the work order call date. The date format is `YYYY-MM-DDThh:mm:ss.sssZ`.
      - `InitialVerificationDate` string, date-time: Date when the first verification took place. ***Note:*** The initial verification date cannot be in the future and cannot be less than the repair date. It should be either a current date or a date in the past.
      - `InitialVerificationMethod` integer: Method that was used during the first verification to make sure the leak had been fixed. <br />Possible values: • `0`: Unknown • `1`: Soap Bubble Test • `2`: Electronic Leak Detection • `3`: Ultrasonic Leak Detection • `4`: Pressure Test • `5`: Vacuum Test • `6`: Fluorescent Dye Test • `7`: Infrared Test • `8`: Near Infrared Test • `9`: Halon Gas Detection
      - `FollowUpVerificationDate` string, date-time: Date of the second verification. The date format is `YYYY-MM-DDThh:mm:ss.sssZ`. ***Note:*** The follow-up verification date cannot be earlier than the initial verification date and cannot be in the future. It should be either a current date or a date in the past.
      - `FollowUpVerificationMethod` integer: Method of the second verification. The list of available verification methods is the same as for the `InitialVerificationMethod`.
      - `ActionCodeId` integer: Unique numeric identifier of the action that a technician took to fix the leak. Use the [GET/refrigeranttracking/leakRecord/actionCodes](https://developer.servicechannel.com/swagger/index.html#/RefrigerantTracking/GETv3_refrigeranttracking_leakRecord_actionCodes) method to get available action codes and their IDs.
      - `FaultCodeId` integer: Unique numeric identifier of the reason why the problem occurred. Use the [GET/refrigeranttracking/leakRecord/faultCodes](https://developer.servicechannel.com/swagger/index.html#/RefrigerantTracking/GETv3_refrigeranttracking_leakRecord_faultCodes) method to get available fault codes and their IDs. <br />Possible values: • `1`: Accidental Damage • `2`: Braze or Joint Failure • `3`: Corrosion • `4`: Defrost Heater Failure • `5`: Faulty Part • `6`: Forklift Damage • `7`: Gasket Seal Failure • `8`: Ice Build Up • `9`: Line Break • `10`: Manufacture Defect • `11`: Missing Part • `12`: Natural Disaster • `13`: Normal Mechanical Wear • `14`: Other (Must Explain in Comments) • `15`: Vandalism • `16`: Vibration Related • `17`: Project Related Loss
      - `LeakLocationId` integer: Unique numeric identifier of the location where the leak occurred: more specific place within the particular area, for example, *Coil*, *Level Indicator/Alarm*, *Splitting Valve*. Use the [GET/refrigeranttracking/{subscriberId}/leaklocations](https://developer.servicechannel.com/swagger/index.html#/RefrigerantTracking/GETv3_refrigeranttracking_%7BsubscriberId%7D_leaklocations) method to get the list of available leak locations.
      - `Notes` string[]: Leak record notes.
      - `RecId` integer: Unique numeric identifier of the work order to add the leak record to.
      - `AssetId` integer: Unique numeric identifier of the asset to add the leak record to.
      - `Actor` string: Name of the technician who performed the fix of the leak.
      - `LeakDetectionDate` string, date-time: Date when the leak was detected. If not provided, defaults to the repair date. Cannot be later than the repair date.
    - `UpdateItems` ServiceChannelServicesMessagingRefrigerantTrackingUpdateLeakImmeasurable[]
      - `Id` integer: Unique numeric identifier of the leak record.
      - `RepairDate` string, date-time: Date when the repair was completed.
      - `InitialVerificationDate` string, date-time: Date when the first verification took place.
      - `InitialVerificationMethod` integer: Method that was used during the first verification to make sure the leak had been fixed.
      - `FollowUpVerificationDate` string, date-time: Date of the second verification.
      - `FollowUpVerificationMethod` integer: Method of the second verification.
      - `ActionCodeId` integer: Unique numeric identifier of the action that a technician took to fix the leak.
      - `FaultCodeId` integer: Unique numeric identifier of the reason why the problem occurred.
      - `LeakLocationId` integer: Unique numeric identifier of the location where the leak occurred: more specific place within the particular area, for example, level indicator/alarm/splitting valve.
      - `Notes` string[]: Leak record notes.
      - `Actor` string: Name of the technician who performed the fix of the leak.
      - `LeakDetectionDate` string, date-time: Date when the leak was detected. If not provided, defaults to the repair date. Cannot be later than the repair date.
    - `DeleteItems` integer[]: List of leak records IDs to remove.
    - `RecId` integer: Unique numeric identifier of the work order.
    - `AssetId` integer: Unique numeric identifier of the asset.
  - `UserData` ServiceChannelServicesCoreInternalRequestsUserInfo
    - `UserName` string
    - `UserId` integer
    - `AuthUserId` integer
    - `Email` string
    - `CreatedBy` string
    - `ProviderId` integer
    - `SubscriberId` integer
    - `ProviderAsSubscriberId` integer
    - `SetupId` integer
    - `UserNameOrFullName` string
    - `IsUniversalUser` boolean
    - `DistrictAccess` SystemObject
    - `StoreAccess` SystemObject
    - `RegionAccess` SystemObject

## Other responses

- `400`: The request was not accepted due to bad syntax, missing parameters, insufficient data, etc. <br/>Error codes: 503 &mdash; Asset is not attached to a work order 503 &mdash; Asset is not refrigerant 503 &mdash; Asset ID and work order ID are required 503 &mdash; Asset doesn't exist 503 &mdash; Actor length cannot be more than 50 symbols 503 &mdash; There are uncompleted leak records in another WO 503 &mdash; Follow-up verification date cannot be earlier than the initial verification date and later than the work order completion date or the scheduled date 503 &mdash; Initial verification date can't be less than the repair date and more than the work order completion date or scheduled date 503 &mdash; Verification data cannot be entered without the leak location 503 &mdash; Repair date cannot be earlier than the work order call date and later than the work order completion date 503 &mdash; Repair date is required 503 &mdash; Fault code ID is required 503 &mdash; Action code ID is required 503 &mdash; Action сode ID is not found 503 &mdash; Fault code ID is not found 503 &mdash; Follow-up verification date and method should be entered 503 &mdash; Initial verification date and method should be entered 503 &mdash; Work order is in the completed status. Only RT Admins can process leak records on WOs in an invoiceable status 503 &mdash; To complete a leak record, fill out all the fields 503 &mdash; Leak immeasurable must be completed. If a work order is already in an invoiceable status or the linked leak event is already completed, all leak record data should be entered 503 &mdash; Only one WO + asset pair is allowed in the request
- `500`: Something went wrong, and the server was unable to complete your request. <br>Error codes: 501 &mdash; Internal Error
- `503`: The request was not accepted because the user is not a Refrigerant Tracking Admin.

---

[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)
