Platform API

<back to all web services

UpdateRoleWithSharing

Updates a Role record, and updates Sharing.

Requires Authentication
The following routes are available for this service:
PUT/api/roles
UpdateRoleWithSharing Parameters:
NameParameterData TypeRequiredDescription
RoleDetailsqueryRoleDetailsModelYesDetails of the Contact Role to be Updated.
FormqueryFormCollectionNo
ShareListqueryList<ObjectShareModel>NoList of Object Share details.
RoleDetailsModel Parameters:
NameParameterData TypeRequiredDescription
RoleIdformGuidNoRole Id
RoleNameformstringNoRole Name
RoleConnectionDefinitionIdformGuidNoRole Connection Definition Id
ContactTypesformListNoContact Types the Role applies to
RequireContactsToAcceptformboolNoDoes the role require contacts to accept it?
ListItemFiltersformListNoFilters linked to the custom role.
ListItemFilterModel Parameters:
NameParameterData TypeRequiredDescription
ListItemFilterIdformGuidNo
FilterNameformstringNo
ListIdformGuidNo
ListItemIdformGuidNo
ListItemIsInFilterformboolNo
ObjectShareModel Parameters:
NameParameterData TypeRequiredDescription
ObjectShareIdformGuidNo
ObjectIdformGuidNo
ObjectNameformstringNo
NameformstringNo
DescriptionformstringNo
ReferenceformstringNo
ContactIdformGuidNo
ContactNameformstringNo
ContactTypeformstringNo
ContactImageUrlPrimaryformstringNo
ContactImageUrlPrimaryThmbnailformstringNo
ShareStatusIdformGuidNo
ShareStatusNameformstringNo

To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

PUT /api/roles HTTP/1.1 
Host: pfapi.pstpf.com.au 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"RoleDetails":{"RoleId":"00000000-0000-0000-0000-000000000000","RoleName":"String","RoleConnectionDefinitionId":"00000000-0000-0000-0000-000000000000","ContactTypes":["00000000-0000-0000-0000-000000000000"],"RequireContactsToAccept":false,"ListItemFilters":[{"ListItemFilterId":"00000000-0000-0000-0000-000000000000","FilterName":"String","ListId":"00000000-0000-0000-0000-000000000000","ListItemId":"00000000-0000-0000-0000-000000000000","ListItemIsInFilter":false}]},"Form":[],"ShareList":[{"ObjectShareId":"00000000-0000-0000-0000-000000000000","ObjectId":"00000000-0000-0000-0000-000000000000","ObjectName":"String","Name":"String","Description":"String","Reference":"String","ContactId":"00000000-0000-0000-0000-000000000000","ContactName":"String","ContactType":"String","ContactImageUrlPrimary":"String","ContactImageUrlPrimaryThmbnail":"String","ShareStatusId":"00000000-0000-0000-0000-000000000000","ShareStatusName":"String"}]}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}