Platform API

<back to all web services

GetRolesForContact

Get roles for the specified contact

Requires Authentication
The following routes are available for this service:
All Verbs/api/roles/{ContactId}
All Verbs/api/resourceroles/available/{ContactId}
All Verbs/api/resourceroles/licensee/{RoleListItemFilterId}
All Verbs/api/resourceroles/licensee
All Verbs/api/licenseeroles/{ContactId}
"use strict";
export class RoleModel {
    /** @param {{RoleId?:string,RoleName?:string,IsLicenseeRole?:boolean,IsManageContacts?:boolean,IsPlatformRole?:boolean,IsServiceRole?:boolean,IsCustomerRole?:boolean,IsFunctionalRole?:boolean,IsRequestAutoAccepted?:boolean,SuiteId?:string,SuiteName?:string,RecordStatus?:string,ObjectConnectionId?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {string}
     * @description Role Id */
    RoleId;
    /**
     * @type {string}
     * @description Role Name */
    RoleName;
    /**
     * @type {boolean}
     * @description Is the role a licensee role? */
    IsLicenseeRole;
    /**
     * @type {boolean}
     * @description Is manage contacts role? */
    IsManageContacts;
    /**
     * @type {boolean}
     * @description Is the role a Platform role? */
    IsPlatformRole;
    /**
     * @type {boolean}
     * @description Is the role a services role? */
    IsServiceRole;
    /**
     * @type {boolean}
     * @description Is the role a customer role? */
    IsCustomerRole;
    /**
     * @type {boolean}
     * @description Is the role a functional role? */
    IsFunctionalRole;
    /**
     * @type {boolean}
     * @description Is the role an auto-accept role? */
    IsRequestAutoAccepted;
    /**
     * @type {string}
     * @description Suite that the role belongs to */
    SuiteId;
    /**
     * @type {string}
     * @description Suite that the role belongs to */
    SuiteName;
    /**
     * @type {string}
     * @description 'A' (Active) or 'I' (Inactive) */
    RecordStatus;
    /**
     * @type {string}
     * @description Object Connection Id, which is populated when the roles are returned based on those that are connected to an object. */
    ObjectConnectionId;
}
export class GetRolesResponse {
    /** @param {{Roles?:RoleModel[],ResponseStatus?:ResponseStatus}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {RoleModel[]} */
    Roles;
    /** @type {ResponseStatus} */
    ResponseStatus;
}
export class GetRolesForContact {
    /** @param {{ContactId?:string,RoleListItemFilterId?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {string}
     * @description Get roles (custom and standard roles) for the specified contact */
    ContactId;
    /**
     * @type {string}
     * @description List Item Filter to use on the roles. Applicable to route /resourceroles/licensee/{RoleListItemFilter} */
    RoleListItemFilterId;
}

JavaScript GetRolesForContact DTOs

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

HTTP + JSV

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

POST /api/roles/{ContactId} HTTP/1.1 
Host: pfapi.pstpf.com.au 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Roles: 
	[
		{
			RoleName: String,
			IsLicenseeRole: False,
			IsManageContacts: False,
			IsPlatformRole: False,
			IsServiceRole: False,
			IsCustomerRole: False,
			IsFunctionalRole: False,
			IsRequestAutoAccepted: False,
			SuiteName: String,
			RecordStatus: String
		}
	],
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	}
}