Compliance

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

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"
]

Request

Path parameters

locationIdOrPathstring required

Headers

EnvApi-Systemidstring

Specify specific system to run instead of Home

EnvApi-Packageidstring

(optional) Clients application/package ID

EnvApi-Udf-DateTime-Iso-In-CustomFieldsstring

Udfs of DateTime should use Iso

EnvApi-Udf-DateTime-ReadInUserTzstring

(obsolete) Udfs of DateTime type whould be in ReadInUserTz

EnvApi-Udf-Value-Invariantstring

(optional) Udfs - Force Non-Localized (invariant) values

EnvApi-Localization-Allstring

(optional) Extend objects with User-given Localizations

x-client-request-idstring

(optional) Client ID for double submit prevention

Request body

Response

not available

string guid required

Changes

No recorded changes to this operation across all 1 revision of this API.