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 .csv suffix or ?format=csv

HTTP + CSV

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/csv
Content-Type: text/csv
Content-Length: length

{"ContactId":"00000000-0000-0000-0000-000000000000","RoleListItemFilterId":"00000000-0000-0000-0000-000000000000"}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"Roles":[{"RoleId":"00000000-0000-0000-0000-000000000000","RoleName":"String","IsLicenseeRole":false,"IsManageContacts":false,"IsPlatformRole":false,"IsServiceRole":false,"IsCustomerRole":false,"IsFunctionalRole":false,"IsRequestAutoAccepted":false,"SuiteId":"00000000-0000-0000-0000-000000000000","SuiteName":"String","RecordStatus":"String","ObjectConnectionId":"00000000-0000-0000-0000-000000000000"}],"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}