POST /ver2/ComplianceService.svc/locations
Creates a new Location object in the Compliance Model, optionally by copying the structure from another Location to the new Location. Supported object types are Division, Facility (Program), Unit (Element), and Point of Interest. This API does not support historical custom fields (those with Track Value History enabled).
Security: User with permission to Compliance Objects.
SDK API (create): envianceSdk.compliance.createLocation (locationInfo, onsuccess, onerror)
SDK API (create async): envianceSdk.compliance.createLocationAsync (locationInfo, onsuccess, onerror)
SDK API (copy): envianceSdk.compliance.copyLocation(locationInfo, copyFrom, onsuccess, onerror)
SDK API (copy async): envianceSdk.compliance.copyLocationAsync (locationInfo, copyFrom, onsuccess, onerror)
//EXAMPLE (CREATE)
POST /ver2/ComplianceService.svc/locations HTTP 1.1
Content-Type: application/json; charset=utf-8
{
"locationInfo": {
"name": "Toy Manufacturing",
"type": "Facility",
"parentPath": "/Manufacturing Division/Toys/",
"timeZone": { "name": "Pacific Time (US & Canada) (UTC-08:00) (With DST)" },
"activeDate": "2012-01-01T00:00:00",
"fieldTemplate": "Manufacturing Facility",
"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 (COPY)
POST /ver2/ComplianceService.svc/locations HTTP 1.1
Content-Type: application/json; charset=utf-8
{
"locationInfo": {
"name": "Toy Manufacturing",
"type": "Facility",
"parentPath": "/Manufacturing Division/Toys/",
"timeZone": { "name": "Pacific Time (US & Canada) (UTC-08:00) (With DST)" },
"activeDate": "2012-01-01T00:00:00",
"fieldTemplate": "Manufacturing Facility",
"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"]
},
"copyFrom": "/Manufacturing Division/Books"
}
envianceSdk.compliance.createLocation
[
{
"name": "Toy Manufacturing",
"type": "Facility",
"isSensitiveData": true,
"parentPath": "/Manufacturing Division/Toys/",
"timeZone": {
"name": "USA Pacific"
},
"fieldTemplate": "Manufacturing Facility",
"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
- Base URLhttps://api.enviance.com (the document declares no server; this is the origin it was published from)
- Authnone declared
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Headers
Specify specific system to run instead of Home
(optional) Clients application/package ID
Udfs of DateTime should use Iso
(obsolete) Udfs of DateTime type whould be in ReadInUserTz
(optional) Udfs - Force Non-Localized (invariant) values
(optional) Extend objects with User-given Localizations
(optional) Client ID for double submit prevention
Request body
Response
not available
Changes
No recorded changes to this operation across all 1 revision of this API.