Organization methods
Contents
createOrg(Org child, Org parent)
Creates a new Org (child) and adds to the Org (parent)
Input
- parent: internalId or (externalId, parent, type)
- child: full set of attributes
Response
Org (D)
Availability
Engage 7.3.3, 8.5.0 (Support for Enterprise & SuperEnterprise)
Errors returned
- ARG_INVALID_TYPE – Argument is of invalid type '%s'
- ARG_NULL – Invalid Data, argument '%s' must be non-null
- OBJECT_EXISTS – Object '%s' already exists
- OBJECT_NOT_EXISTS – Referenced object '%s' does not exist
- SYSTEM_LIMIT_EXCEEDED – maximum number of active organizations exceeded
Notes
- If an externalId is provided it must be unique within the context of its parent.
- The maximum number of available accounts per Enterprise is 500. The maximum number of Enterprises per SuperEnterprise is 50.
- Account parents must be Enterprises. Enterprise parents must be SuperEnterprises. SuperEnterprise parents must be null.
deleteOrg(Org org)
Deletes an organization (some business state validation is required).
Input
org : internalId, type or (externalId, parent, type)
Response
NONE
Availability
Engage 8.4.0, 8.5.0 (Support for Enterprise & SuperEnterprise)
Errors returned
- ARG_INVALID_TYPE – Argument is of invalid type '%s'
- ARG_NULL – Invalid Data, argument '%s' must be non-null
- OBJECT_NOT_EXISTS – Referenced object '%s' does not exist
Notes
If an externalId is provided it must be unique within the context of its parent.
showOrg(Org org)
Retrieves information about the supplied organization.
Input
org : internalId or externalId, and type
Response
Org (D)
Availability
Engage 7.5.0, 8.5.0 (Support for Enterprise & SuperEnterprise)
Errors returned
- ARG_INVALID_TYPE – Argument is of invalid type '%s'
- ARG_NULL – Invalid Data, argument '%s' must be non-null
- OBJECT_NOT_EXISTS – Referenced object '%s' does not exist
Notes
If an externalId is provided it must be unique within the context of its parent.
listOrgs(Org parent, Org sample)
Lists sub-organizations for the supplied parent organization.
Input
- Parent
- externalId: External Id of parent object
- any attribute: other attributes to narrow down the criteria
- sample: optional list of organizational attributes to narrow down search
Response
Org[] (D): sub-organizations for the supplied parent and query. Empty array if no children match specified query.
Availability
Engage 8.5.0 (Support for Account & Enterprise)
Errors returned
- ARG_INVALID_TYPE – Argument is of invalid type '%s'
- ARG_NULL – Invalid Data, argument '%s' must be non-null
- OBJECT_NOT_EXISTS – Referenced object '%s' does not exist
- RESULT_TOO_LARGE – Result returned would be too large
Notes
- If an externalId is provided it must be unique within the context of its parent.
- If sample is null, all children within the Org are returned.
- Only direct descendants are returned.
- The maximum number of items returned using this method is 1,000.
changeOrg(Org org)
Update fields/attributes of the supplied Org.
Input
org: (internalId or (externalId, parent, type)) + any fields to be changed
Response
Org (D): updated org
Availability
Engage 7.5.0, 8.5.0 (Support for Enterprise & SuperEnterprise)
Errors returned
- ARG_INVALID – Argument is invalid – reason '%s'
- ARG_INVALID_TYPE – Argument is of invalid type '%s'
- ARG_NULL – Invalid Data, argument '%s' must be non-null
- OBJECT_NOT_EXISTS – Referenced object '%s' does not exist
Notes
If an externalId is provided it must be unique within the context of its parent.
moveOrg(Org child, Org newParent)
Moves child from current parent to newParent.
Input
- newParent: internalId or (externalId, parent, type)
- child: internalId or (externalId, parent, type)
Response
NONE
Availability
Future
Errors returned
- ARG_INVALID_TYPE – Argument is of invalid type '%s'
- ARG_NULL – Invalid Data, argument '%s' must be non-null
- OBJECT_NOT_EXISTS – Referenced object '%s' does not exist
Notes
All descendants of a child are implicitly moved along with the child.