Platform API

<back to all web services

GetDataLists

Get custom data lists for a licensee, as well as standard data lists

Requires Authentication
The following routes are available for this service:
All Verbs/api/datalists/
"use strict";
export class ListItemModel {
    /** @param {{ListItemId?:string,Name?:string,Description?:string,ShortName?:string,IsDefault?:boolean,Order?:number,ListItemTrafficLightId?:string,PrimaryListItemImageId?:string,PrimaryListItemImageUrl?:string,PrimaryImageThumbnailUrl?:string,OwnerContactId?:string,RecordStatus?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    ListItemId;
    /** @type {string} */
    Name;
    /** @type {string} */
    Description;
    /** @type {string} */
    ShortName;
    /** @type {boolean} */
    IsDefault;
    /** @type {number} */
    Order;
    /** @type {string} */
    ListItemTrafficLightId;
    /** @type {string} */
    PrimaryListItemImageId;
    /** @type {string} */
    PrimaryListItemImageUrl;
    /** @type {string} */
    PrimaryImageThumbnailUrl;
    /** @type {string} */
    OwnerContactId;
    /** @type {string} */
    RecordStatus;
}
export class ListModel {
    /** @param {{ListId?:string,Name?:string,Description?:string,ShortName?:string,OwnerContactId?:string,IsStandard?:boolean,RecordStatus?:string,DefaultListItemId?:string,DefaultListItemName?:string,HasImageForListItem?:boolean,HasTrafficLightForListItem?:boolean,ListItems?:ListItemModel[],PermissionEdit?:boolean,PermissionAdd?:boolean,PermissionDelete?:boolean}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    ListId;
    /** @type {string} */
    Name;
    /** @type {string} */
    Description;
    /** @type {string} */
    ShortName;
    /** @type {string} */
    OwnerContactId;
    /** @type {boolean} */
    IsStandard;
    /** @type {string} */
    RecordStatus;
    /** @type {string} */
    DefaultListItemId;
    /** @type {string} */
    DefaultListItemName;
    /** @type {boolean} */
    HasImageForListItem;
    /** @type {boolean} */
    HasTrafficLightForListItem;
    /** @type {ListItemModel[]} */
    ListItems;
    /** @type {boolean} */
    PermissionEdit;
    /** @type {boolean} */
    PermissionAdd;
    /** @type {boolean} */
    PermissionDelete;
}
export class GetDataListsResponse {
    /** @param {{Lists?:ListModel[],ResponseStatus?:ResponseStatus}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {ListModel[]} */
    Lists;
    /** @type {ResponseStatus} */
    ResponseStatus;
}
export class GetDataLists {
    /** @param {{LicenseeId?:string,SearchText?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {?string}
     * @description Licensee requested Custom data lists belong to. */
    LicenseeId;
    /**
     * @type {string}
     * @description Specific text to search for. */
    SearchText;
}

JavaScript GetDataLists 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/datalists/ HTTP/1.1 
Host: pfapi.pstpf.com.au 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	LicenseeId: 00000000000000000000000000000000,
	SearchText: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Lists: 
	[
		{
			Name: String,
			Description: String,
			ShortName: String,
			IsStandard: False,
			RecordStatus: String,
			DefaultListItemName: String,
			HasImageForListItem: False,
			HasTrafficLightForListItem: False,
			ListItems: 
			[
				{
					Name: String,
					Description: String,
					ShortName: String,
					IsDefault: False,
					Order: 0,
					PrimaryListItemImageUrl: String,
					PrimaryImageThumbnailUrl: String,
					RecordStatus: String
				}
			],
			PermissionEdit: False,
			PermissionAdd: False,
			PermissionDelete: False
		}
	],
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	}
}