Trendsic Platform Service

<back to all web services

CoverageGapsRequest

Requires Authentication
The following routes are available for this service:
GET/v1/coverage/gaps
"use strict";
export class CoverageExplanationSource {
    /** @param {{PolicyName?:string,CascadeLevel?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    PolicyName;
    /** @type {string} */
    CascadeLevel;
}
export class CoverageExplanationOverride {
    /** @param {{Who?:string,Consequence?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    Who;
    /** @type {string} */
    Consequence;
}
export class CoverageExplanation {
    /** @param {{PlainSentence?:string,RuleId?:string,RuleName?:string,Demand?:string,Source?:CoverageExplanationSource,Kind?:string,WhyItExists?:string,WhatWouldChangeIt?:string,Override?:CoverageExplanationOverride,Drill?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    PlainSentence;
    /** @type {string} */
    RuleId;
    /** @type {string} */
    RuleName;
    /** @type {string} */
    Demand;
    /** @type {CoverageExplanationSource} */
    Source;
    /** @type {string} */
    Kind;
    /** @type {string} */
    WhyItExists;
    /** @type {string} */
    WhatWouldChangeIt;
    /** @type {CoverageExplanationOverride} */
    Override;
    /** @type {string} */
    Drill;
}
export class CoverageCandidateCheck {
    /** @param {{CheckId?:string,Result?:string,Expl?:CoverageExplanation}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    CheckId;
    /** @type {string} */
    Result;
    /** @type {CoverageExplanation} */
    Expl;
}
export class CoverageEffect {
    /** @param {{Icon?:string,Text?:string,RuleId?:string,Expl?:CoverageExplanation}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    Icon;
    /** @type {string} */
    Text;
    /** @type {string} */
    RuleId;
    /** @type {CoverageExplanation} */
    Expl;
}
export class CoverageCandidate {
    /** @param {{ContactId?:number,Name?:string,FirstName?:string,Initials?:string,Rank?:number,DiffLine?:string,CostLine?:string,CostTone?:string,RankExpl?:CoverageExplanation,MarginPct?:number,MarginTone?:string,Loaded?:number,Billed?:number,OtHours?:number,OtPremium?:number,Checks?:CoverageCandidateCheck[],Preview?:CoverageEffect[],Confirm?:CoverageEffect[],HasWarn?:boolean}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    ContactId;
    /** @type {string} */
    Name;
    /** @type {string} */
    FirstName;
    /** @type {string} */
    Initials;
    /** @type {number} */
    Rank;
    /** @type {string} */
    DiffLine;
    /** @type {string} */
    CostLine;
    /** @type {string} */
    CostTone;
    /** @type {CoverageExplanation} */
    RankExpl;
    /** @type {?number} */
    MarginPct;
    /** @type {string} */
    MarginTone;
    /** @type {?number} */
    Loaded;
    /** @type {?number} */
    Billed;
    /** @type {?number} */
    OtHours;
    /** @type {?number} */
    OtPremium;
    /** @type {CoverageCandidateCheck[]} */
    Checks = [];
    /** @type {CoverageEffect[]} */
    Preview = [];
    /** @type {CoverageEffect[]} */
    Confirm = [];
    /** @type {boolean} */
    HasWarn;
}
export class CoverageBlockedCandidate {
    /** @param {{ContactId?:number,Name?:string,Initials?:string,Reason?:string,ChangeChip?:string,Expl?:CoverageExplanation}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    ContactId;
    /** @type {string} */
    Name;
    /** @type {string} */
    Initials;
    /** @type {string} */
    Reason;
    /** @type {string} */
    ChangeChip;
    /** @type {CoverageExplanation} */
    Expl;
}
export class CoverageOfferInfo {
    /** @param {{CoverageOfferId?:number,ContactId?:number,Name?:string,Ring?:number,Channel?:string,Status?:string,SentAtUtc?:string,RespondedAtUtc?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    CoverageOfferId;
    /** @type {number} */
    ContactId;
    /** @type {string} */
    Name;
    /** @type {number} */
    Ring;
    /** @type {string} */
    Channel;
    /** @type {string} */
    Status;
    /** @type {string} */
    SentAtUtc;
    /** @type {?string} */
    RespondedAtUtc;
}
export class CoverageApprovalInfo {
    /** @param {{CoverageApprovalId?:number,CoverageGapId?:number,Type?:string,Status?:string,RequestedAtUtc?:string,Effects?:CoverageEffect[],ContactId?:number,ContactName?:string,DecidedAtUtc?:string,DecisionNote?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    CoverageApprovalId;
    /** @type {number} */
    CoverageGapId;
    /** @type {string} */
    Type;
    /** @type {string} */
    Status;
    /** @type {string} */
    RequestedAtUtc;
    /** @type {CoverageEffect[]} */
    Effects = [];
    /** @type {?number} */
    ContactId;
    /** @type {string} */
    ContactName;
    /** @type {?string} */
    DecidedAtUtc;
    /** @type {string} */
    DecisionNote;
}
export class CoverageGapEventInfo {
    /** @param {{EventType?:string,Channel?:string,Detail?:string,ContactName?:string,AtUtc?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    EventType;
    /** @type {string} */
    Channel;
    /** @type {string} */
    Detail;
    /** @type {string} */
    ContactName;
    /** @type {string} */
    AtUtc;
}
export class CoverageMoveOption {
    /** @param {{Key?:string,Label?:string,Detail?:string,Expl?:CoverageExplanation}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    Key;
    /** @type {string} */
    Label;
    /** @type {string} */
    Detail;
    /** @type {CoverageExplanation} */
    Expl;
}
export class CoverageNoShowAttempt {
    /** @param {{AtUtc?:string,Channel?:string,Note?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    AtUtc;
    /** @type {string} */
    Channel;
    /** @type {string} */
    Note;
}
export class CoverageNoShowState {
    /** @param {{GraceUntilUtc?:string,Attempts?:CoverageNoShowAttempt[],DeclaredAtUtc?:string,AttendanceNote?:boolean,FalseAlarm?:boolean}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    GraceUntilUtc;
    /** @type {CoverageNoShowAttempt[]} */
    Attempts = [];
    /** @type {?string} */
    DeclaredAtUtc;
    /** @type {boolean} */
    AttendanceNote;
    /** @type {boolean} */
    FalseAlarm;
}
export class CoverageLeaveCheckpoint {
    /** @param {{AtUtc?:string,Note?:string,ByName?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    AtUtc;
    /** @type {string} */
    Note;
    /** @type {string} */
    ByName;
}
export class CoverageLeaveState {
    /** @param {{Fmla?:boolean,Began?:string,EstReturn?:string,CheckpointDays?:number,NextCheckpointUtc?:string,Checkpoints?:CoverageLeaveCheckpoint[],InterimContactId?:number,InterimName?:string,InterimStart?:string,InterimEnd?:string,RequisitionOpened?:boolean,StaffPostingId?:number,ChainedGapIds?:number[],ParentLeaveGapId?:number,RestoredAtUtc?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {boolean} */
    Fmla;
    /** @type {string} */
    Began;
    /** @type {?string} */
    EstReturn;
    /** @type {number} */
    CheckpointDays;
    /** @type {?string} */
    NextCheckpointUtc;
    /** @type {CoverageLeaveCheckpoint[]} */
    Checkpoints = [];
    /** @type {?number} */
    InterimContactId;
    /** @type {string} */
    InterimName;
    /** @type {?string} */
    InterimStart;
    /** @type {?string} */
    InterimEnd;
    /** @type {boolean} */
    RequisitionOpened;
    /** @type {?number} */
    StaffPostingId;
    /** @type {number[]} */
    ChainedGapIds = [];
    /** @type {?number} */
    ParentLeaveGapId;
    /** @type {?string} */
    RestoredAtUtc;
}
export class CoverageGap {
    /** @param {{CoverageGapId?:number,CoverageGapUID?:string,BranchId?:string,Status?:string,Track?:string,OutContactID?:number,OutName?:string,OutInitials?:string,JobID?:number,JobName?:string,ProjectID?:number,WorkerScheduleItemID?:number,WindowStart?:string,WindowEnd?:string,Reason?:string,MustFill?:boolean,MustFillExpl?:CoverageExplanation,FilledByContactID?:number,FilledByName?:string,RecordNo?:string,DecidedPolicyVersionId?:number,CreatedAt?:string,UpdatedAt?:string,QualifiedLine?:string,Candidates?:CoverageCandidate[],Blocked?:CoverageBlockedCandidate[],Offers?:CoverageOfferInfo[],Approvals?:CoverageApprovalInfo[],Timeline?:CoverageGapEventInfo[],MoveOptions?:CoverageMoveOption[],OrderExpl?:CoverageExplanation,AssignmentMode?:string,NoShow?:CoverageNoShowState,Leave?:CoverageLeaveState,CustomerName?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    CoverageGapId;
    /** @type {string} */
    CoverageGapUID;
    /** @type {?string} */
    BranchId;
    /** @type {string} */
    Status;
    /** @type {string} */
    Track;
    /** @type {?number} */
    OutContactID;
    /** @type {string} */
    OutName;
    /** @type {string} */
    OutInitials;
    /** @type {?number} */
    JobID;
    /** @type {string} */
    JobName;
    /** @type {?number} */
    ProjectID;
    /** @type {?number} */
    WorkerScheduleItemID;
    /** @type {string} */
    WindowStart;
    /** @type {string} */
    WindowEnd;
    /** @type {string} */
    Reason;
    /** @type {boolean} */
    MustFill;
    /** @type {CoverageExplanation} */
    MustFillExpl;
    /** @type {?number} */
    FilledByContactID;
    /** @type {string} */
    FilledByName;
    /** @type {string} */
    RecordNo;
    /** @type {?number} */
    DecidedPolicyVersionId;
    /** @type {string} */
    CreatedAt;
    /** @type {?string} */
    UpdatedAt;
    /** @type {string} */
    QualifiedLine;
    /** @type {CoverageCandidate[]} */
    Candidates = [];
    /** @type {CoverageBlockedCandidate[]} */
    Blocked = [];
    /** @type {CoverageOfferInfo[]} */
    Offers = [];
    /** @type {CoverageApprovalInfo[]} */
    Approvals = [];
    /** @type {CoverageGapEventInfo[]} */
    Timeline = [];
    /** @type {CoverageMoveOption[]} */
    MoveOptions = [];
    /** @type {CoverageExplanation} */
    OrderExpl;
    /** @type {string} */
    AssignmentMode;
    /** @type {CoverageNoShowState} */
    NoShow;
    /** @type {CoverageLeaveState} */
    Leave;
    /** @type {string} */
    CustomerName;
}
export class CoverageGapsResponse {
    /** @param {{Gaps?:CoverageGap[],PolicyName?:string,LockLine?:string,AssignmentMode?:string,CanApprove?:boolean,CanEditPolicy?:boolean,CanSeePay?:boolean,ResponseStatus?:ResponseStatus}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {CoverageGap[]} */
    Gaps = [];
    /** @type {string} */
    PolicyName;
    /** @type {string} */
    LockLine;
    /** @type {string} */
    AssignmentMode;
    /** @type {boolean} */
    CanApprove;
    /** @type {boolean} */
    CanEditPolicy;
    /** @type {boolean} */
    CanSeePay;
    /** @type {ResponseStatus} */
    ResponseStatus;
}
export class CoverageGapsRequest {
    /** @param {{BranchId?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {?string} */
    BranchId;
}

JavaScript CoverageGapsRequest 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.

GET /v1/coverage/gaps HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Gaps: 
	[
		{
			CoverageGapId: 0,
			CoverageGapUID: 00000000000000000000000000000000,
			BranchId: 00000000000000000000000000000000,
			Status: String,
			Track: String,
			OutContactID: 0,
			OutName: String,
			OutInitials: String,
			JobID: 0,
			JobName: String,
			ProjectID: 0,
			WorkerScheduleItemID: 0,
			WindowStart: 0001-01-01,
			WindowEnd: 0001-01-01,
			Reason: String,
			MustFill: False,
			MustFillExpl: 
			{
				PlainSentence: String,
				RuleId: String,
				RuleName: String,
				Demand: String,
				Source: 
				{
					PolicyName: String,
					CascadeLevel: String
				},
				Kind: String,
				WhyItExists: String,
				WhatWouldChangeIt: String,
				Override: 
				{
					Who: String,
					Consequence: String
				},
				Drill: String
			},
			FilledByContactID: 0,
			FilledByName: String,
			RecordNo: String,
			DecidedPolicyVersionId: 0,
			CreatedAt: 0001-01-01,
			UpdatedAt: 0001-01-01,
			QualifiedLine: String,
			Candidates: 
			[
				{
					ContactId: 0,
					Name: String,
					FirstName: String,
					Initials: String,
					Rank: 0,
					DiffLine: String,
					CostLine: String,
					CostTone: String,
					RankExpl: 
					{
						PlainSentence: String,
						RuleId: String,
						RuleName: String,
						Demand: String,
						Source: 
						{
							PolicyName: String,
							CascadeLevel: String
						},
						Kind: String,
						WhyItExists: String,
						WhatWouldChangeIt: String,
						Override: 
						{
							Who: String,
							Consequence: String
						},
						Drill: String
					},
					MarginPct: 0,
					MarginTone: String,
					Loaded: 0,
					Billed: 0,
					OtHours: 0,
					OtPremium: 0,
					Checks: 
					[
						{
							CheckId: String,
							Result: String,
							Expl: 
							{
								PlainSentence: String,
								RuleId: String,
								RuleName: String,
								Demand: String,
								Source: 
								{
									PolicyName: String,
									CascadeLevel: String
								},
								Kind: String,
								WhyItExists: String,
								WhatWouldChangeIt: String,
								Override: 
								{
									Who: String,
									Consequence: String
								},
								Drill: String
							}
						}
					],
					Preview: 
					[
						{
							Icon: String,
							Text: String,
							RuleId: String,
							Expl: 
							{
								PlainSentence: String,
								RuleId: String,
								RuleName: String,
								Demand: String,
								Source: 
								{
									PolicyName: String,
									CascadeLevel: String
								},
								Kind: String,
								WhyItExists: String,
								WhatWouldChangeIt: String,
								Override: 
								{
									Who: String,
									Consequence: String
								},
								Drill: String
							}
						}
					],
					Confirm: 
					[
						{
							Icon: String,
							Text: String,
							RuleId: String,
							Expl: 
							{
								PlainSentence: String,
								RuleId: String,
								RuleName: String,
								Demand: String,
								Source: 
								{
									PolicyName: String,
									CascadeLevel: String
								},
								Kind: String,
								WhyItExists: String,
								WhatWouldChangeIt: String,
								Override: 
								{
									Who: String,
									Consequence: String
								},
								Drill: String
							}
						}
					],
					HasWarn: False
				}
			],
			Blocked: 
			[
				{
					ContactId: 0,
					Name: String,
					Initials: String,
					Reason: String,
					ChangeChip: String,
					Expl: 
					{
						PlainSentence: String,
						RuleId: String,
						RuleName: String,
						Demand: String,
						Source: 
						{
							PolicyName: String,
							CascadeLevel: String
						},
						Kind: String,
						WhyItExists: String,
						WhatWouldChangeIt: String,
						Override: 
						{
							Who: String,
							Consequence: String
						},
						Drill: String
					}
				}
			],
			Offers: 
			[
				{
					CoverageOfferId: 0,
					ContactId: 0,
					Name: String,
					Ring: 0,
					Channel: String,
					Status: String,
					SentAtUtc: 0001-01-01,
					RespondedAtUtc: 0001-01-01
				}
			],
			Approvals: 
			[
				{
					CoverageApprovalId: 0,
					CoverageGapId: 0,
					Type: String,
					Status: String,
					RequestedAtUtc: 0001-01-01,
					Effects: 
					[
						{
							Icon: String,
							Text: String,
							RuleId: String,
							Expl: 
							{
								PlainSentence: String,
								RuleId: String,
								RuleName: String,
								Demand: String,
								Source: 
								{
									PolicyName: String,
									CascadeLevel: String
								},
								Kind: String,
								WhyItExists: String,
								WhatWouldChangeIt: String,
								Override: 
								{
									Who: String,
									Consequence: String
								},
								Drill: String
							}
						}
					],
					ContactId: 0,
					ContactName: String,
					DecidedAtUtc: 0001-01-01,
					DecisionNote: String
				}
			],
			Timeline: 
			[
				{
					EventType: String,
					Channel: String,
					Detail: String,
					ContactName: String,
					AtUtc: 0001-01-01
				}
			],
			MoveOptions: 
			[
				{
					Key: String,
					Label: String,
					Detail: String,
					Expl: 
					{
						PlainSentence: String,
						RuleId: String,
						RuleName: String,
						Demand: String,
						Source: 
						{
							PolicyName: String,
							CascadeLevel: String
						},
						Kind: String,
						WhyItExists: String,
						WhatWouldChangeIt: String,
						Override: 
						{
							Who: String,
							Consequence: String
						},
						Drill: String
					}
				}
			],
			OrderExpl: 
			{
				PlainSentence: String,
				RuleId: String,
				RuleName: String,
				Demand: String,
				Source: 
				{
					PolicyName: String,
					CascadeLevel: String
				},
				Kind: String,
				WhyItExists: String,
				WhatWouldChangeIt: String,
				Override: 
				{
					Who: String,
					Consequence: String
				},
				Drill: String
			},
			AssignmentMode: String,
			NoShow: 
			{
				GraceUntilUtc: 0001-01-01,
				Attempts: 
				[
					{
						AtUtc: 0001-01-01,
						Channel: String,
						Note: String
					}
				],
				DeclaredAtUtc: 0001-01-01,
				AttendanceNote: False,
				FalseAlarm: False
			},
			Leave: 
			{
				Fmla: False,
				Began: 0001-01-01,
				EstReturn: 0001-01-01,
				CheckpointDays: 0,
				NextCheckpointUtc: 0001-01-01,
				Checkpoints: 
				[
					{
						AtUtc: 0001-01-01,
						Note: String,
						ByName: String
					}
				],
				InterimContactId: 0,
				InterimName: String,
				InterimStart: 0001-01-01,
				InterimEnd: 0001-01-01,
				RequisitionOpened: False,
				StaffPostingId: 0,
				ChainedGapIds: 
				[
					0
				],
				ParentLeaveGapId: 0,
				RestoredAtUtc: 0001-01-01
			},
			CustomerName: String
		}
	],
	PolicyName: String,
	LockLine: String,
	AssignmentMode: String,
	CanApprove: False,
	CanEditPolicy: False,
	CanSeePay: False,
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	}
}