---
title: "PATCH /ver2/ComplianceService.svc/locations/{locationIdOrPath}"
method: PATCH
path: "/ver2/ComplianceService.svc/locations/{locationIdOrPath}"
tags: ["Compliance"]
---

# PATCH /ver2/ComplianceService.svc/locations/{locationIdOrPath}

`PATCH /ver2/ComplianceService.svc/locations/{locationIdOrPath}`

## Request

- Base URL: `https://api.enviance.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.enviance.com/ver2/ComplianceService.svc/locations/{locationIdOrPath}`
- Auth: none declared
- TypeScript: <https://skmtc.dev/enviance/apis/restapi/docs/ver2/ComplianceService.svc/locations/:locationIdOrPath/patch.ts> (a function with typed inputs; its response is checked against the schema)

Updates (and potentially moves) an existing Location object in the Compliance Model. Specifying a new parent path moves the Location underneath another parent Location. Updating the Custom Field Template of a Location object, if that object currently has no Template, adds the Template to the object. When switching from one Template to another Template, those values that belong to fields common to both Templates are kept, any values for fields not in the new Template are removed permanently. Setting the Template to null permanently removes all Custom Field values. This API does not support historical custom fields (those with Track Value History enabled).

**Security:** User with permission to Compliance Objects.

**SDK API:**  `envianceSdk.compliance.updateLocation (locationIdOrPath, locationInfo, onsuccess, onerror)`

**SDK API (async):**  `envianceSdk.compliance.updateLocationAsync (locationIdOrPath, locationInfo, onsuccess, onerror)`

```
PATCH /ver2/ComplianceService.svc/locations/06cc9d1c-731b-4031-b471-de3336b0166d HTTP 1.1
Content-Type: application/json; charset=utf-8
 
{
  "locationInfo": {
  "name": "Toy Manufacturing",
  "fieldValues": [
    {"name": "Aspect", "values": ["Air pollution control waste"]},
    {"name": "Start Date", "values": ["2012-09-19T20:00:00"]},
    {"name": "Type", "values": ["Spill", "Near Miss"]},
    {"name": "Category", "values": ["Cat1", "Cat1.1", "Cat1.1.1"]}
  ],
  "documents": ["/Folder A/Document.doc"]
  }
}

//EXAMPLE with MOVE
PATCH /ver2/ComplianceService.svc/locations/06cc9d1c-731b-4031-b471-de3336b0166d HTTP 1.1
Content-Type: application/json; charset=utf-8
 
{
  "locationInfo": {
  "name": "Toy Manufacturing",
  "parentPath": "/New Manufacturing Division/Toys/"
  }
}

```



envianceSdk.compliance.updateLocation
```
[
  "0128E876-42C3-4820-8219-000A3F2409AA",
  {
    "name": "Toy Manufacturing",
    "isSensitiveData": true,
    "CorityCachedID": 0,
    "CorityLink": false,
    "fieldValues": [
      {
        "name": "Aspect",
        "values": [
          "Air pollution control waste"
        ]
      },
      {
        "name": "Start Date",
        "values": [
          "2012-09-19T20:00"
        ]
      },
      {
        "name": "Type",
        "values": [
          "Spill",
          "Near Miss"
        ]
      },
      {
        "name": "Category",
        "values": [
          "Cat1",
          "Cat1.1",
          "Cat1.1.1"
        ]
      }
    ],
    "namelocalized": [
      {
        "value": "DemoLoc POI (US)",
        "culture": "en-us"
      }
    ],
    "documents": [
      "/Folder A/Document.doc"
    ]
  },
  "onsuccess",
  "onerror"
]
```

## Path parameters

- `locationIdOrPath` string, required

## Headers

- `EnvApi-Systemid` string
- `EnvApi-Packageid` string
- `EnvApi-Udf-DateTime-Iso-In-CustomFields` string
- `EnvApi-Udf-DateTime-ReadInUserTz` string
- `EnvApi-Udf-Value-Invariant` string
- `EnvApi-Localization-All` string
- `x-client-request-id` string

## Request body

- UpdateLocation
  - `locationInfo` EnvianceRestServicesVer2ComplianceModelLocationInfo
    - `id` string, guid
    - `name` string
    - `isSensitiveData` boolean
    - `CorityLink` boolean
    - `CorityCachedID` integer
    - `CorityObjectType` string
    - `type` string
    - `parentPath` string
    - `parentPathLocalized` string
    - `timeZone` EnvianceRestServicesCommonTimeZoneInfo
      - `id` integer
      - `name` string
      - `stdOffset` integer
      - `dstOffset` integer
      - `currentOffset` integer
    - `activeDate` string, date-time
    - `inactiveDate` string, date-time
    - `responsibleUser` string
    - `fieldTemplate` string
    - `calcFieldTemplate` string
    - `fieldValues` EnvianceRestServicesUdfsProperty[]
      - `name` string
      - `urlItems` EnvianceBusinessUdfRestUrlItem[]
        - `label` string
        - `url` string
      - `values` string[]
      - `beginDate` string, date-time
      - `endDate` string, date-time
      - `caption` string
      - `captionLocalized` string
    - `calcFieldValues` EnvianceRestServicesUdfsProperty[]
      - `name` string
      - `urlItems` EnvianceBusinessUdfRestUrlItem[]
        - `label` string
        - `url` string
      - `values` string[]
      - `beginDate` string, date-time
      - `endDate` string, date-time
      - `caption` string
      - `captionLocalized` string
    - `description` string
    - `address` EnvianceRestServicesVer2ComplianceModelAddress
      - `street1` string
      - `street2` string
      - `street3` string
      - `city` string
      - `countyOrRegion` string
      - `stateOrProvince` string
      - `country` string
      - `postalCode` string
    - `documents` string[]
    - `geoLocation` EnvianceRestServicesVer2ComplianceModelGeoLocation
      - `latitude` number, double
      - `longitude` number, double
      - `latNS` string
      - `latDeg` integer
      - `latMin` integer
      - `latSec` number, double
      - `longEW` string
      - `longDeg` integer
      - `longMin` integer
      - `longSec` number, double
      - `utmZone` string
      - `utmEast` number, double
      - `utmNorth` number, double
      - `formatType` integer
    - `security` unknown
    - `tags` EnvianceRestServicesCommonTagAssociationInfo[]
      - `tagScheme` string
      - `tag` string
      - `tagHistory` EnvianceBusinessTaggingObjectsTagsEntitiesTagHistory[]
        - `BeginDate` string, date-time
        - `EndDate` string, date-time
    - `namelocalized` EnvianceRestServicesCommonLocalizationInfo[]
      - `culture` string
      - `value` string
    - `mailingAddress` EnvianceRestServicesVer2ComplianceModelMailingAddressInfo
      - `Country` string
      - `State` string
      - `City` string
      - `PostalCode` string
      - `Address1` string
      - `Address2` string
      - `Address3` string
    - `contactInformation` EnvianceRestServicesVer2ComplianceModelContactInfo
      - `FirstName` string
      - `LastName` string
      - `Title` string
      - `Company` string
      - `TelNo` string
      - `FaxNo` string
      - `Mobile` string
      - `Email` string
    - `locationHistory` EnvianceRestServicesVer2ComplianceModelLocationHistoryInfo[]
      - `BeginDate` string, date-time
      - `LocationId` string
      - `Location` string
    - `regulatoryIdentification` EnvianceRestServicesVer2ComplianceModelRegulatoryIdentificationInfo
      - `RCRA` string
      - `TRI` string
      - `RMP` string
      - `StateID1` string
      - `StateID2` string
      - `StateID3` string
      - `LocalID1` string
      - `LocalID2` string
      - `LocalID3` string
      - `IDType1` string
      - `IDType2` string
      - `IDType3` string
      - `IDNo1` string
      - `IDNo2` string
      - `IDNo3` string
    - `note` string
    - `SIC1` string
    - `SIC2` string
    - `dunBradNo` string
    - `otherAddress` string

## Response `default`

not available

- string, guid

---

[API](https://skmtc.dev/enviance/apis/restapi.md) - [All operations](https://skmtc.dev/enviance/apis/restapi/llms.txt) - [OpenAPI document](https://skmtc.dev/enviance/apis/restapi/revisions/45b2200a8cf2?raw)
