| GET,OPTIONS | /v1/Scheduler/{SchedulerUrl} | ||
|---|---|---|---|
| GET,OPTIONS | /v1/Scheduler/{SchedulerUrl}/{StartDate} | ||
| GET,OPTIONS | /v1/Scheduler/{SchedulerUrl}/{StartDate}/{LocalDate} | ||
| GET,OPTIONS | /v1/SchedulerServices/{SchedulerUrl}/{StartDate}/{ServiceIdsList} |
"use strict";
export class SchedulerRequest {
/** @param {{SchedulerUrl?:string,StartDate?:string,Session?:string[],ServiceIdsList?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
SchedulerUrl;
/** @type {string} */
StartDate;
/** @type {string[]} */
Session = [];
/** @type {string} */
ServiceIdsList;
}
export class Location {
/** @param {{Id?:string,ClientId?:string,Name?:string,Address1?:string,Address2?:string,City?:string,State?:string,Zip?:string,Phone?:string,Fax?:string,URL?:string,Email?:string,TimeZone?:string,Active?:boolean,EntDate?:string,ModDate?:string,LocationImage?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Id;
/** @type {string} */
ClientId;
/** @type {string} */
Name;
/** @type {string} */
Address1;
/** @type {string} */
Address2;
/** @type {string} */
City;
/** @type {string} */
State;
/** @type {string} */
Zip;
/** @type {string} */
Phone;
/** @type {string} */
Fax;
/** @type {string} */
URL;
/** @type {string} */
Email;
/** @type {string} */
TimeZone;
/** @type {boolean} */
Active;
/** @type {string} */
EntDate;
/** @type {string} */
ModDate;
/** @type {string} */
LocationImage;
}
export class QueueDefault {
/** @param {{LocationId?:string,Services?:string[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
LocationId;
/** @type {string[]} */
Services = [];
}
export class Agent {
/** @param {{AgentId?:number,Company?:string,AgentName?:string,FirstName?:string,LastName?:string,MiddleInitial?:string,Address1?:string,Address2?:string,City?:string,State?:string,Zip?:string,Country?:string,Email?:string,EmailSignature?:string,HomePhone?:string,CellPhone?:string,WorkPhone?:string,InsLicensed?:boolean,AgreeToDisclosures?:boolean,AgreeToDate?:string,PaidDate?:string,AgentNumber?:string,ReferringAgent?:string,PlacementAgent?:string,CreatedDate?:string,UserId?:string,IsAgent?:boolean,Package?:string,StoreName?:string,Notes?:string,Upline1?:number,Upline2?:number,Upline3?:number,Upline4?:number,MVPID?:number,AVPID?:number,RVPID?:number,AgentLevel?:number,IsMVP?:boolean,IsRVP?:boolean,IsAVP?:boolean,IsAdmin?:boolean,IsBusinessCardAdmin?:boolean,TeamName?:string,LocationId?:string,CalendarId?:string,Rank?:string,NBC?:boolean,Upline1Percent?:number,Upline2Percent?:number,Upline3Percent?:number,Upline4Percent?:number,AgentStatus?:string,Office?:string,DOB?:string,SSN?:string,Fax?:string,BusinessEmail?:string,ModifiedDate?:string,ModifiedBy?:string,TimeZone?:string,LeaderLocked?:boolean,LastSubmittedBusinessDate?:string,GracePeriodDate?:string,Vested?:boolean,DirectPay?:string,DirectPayApprBy?:string,FactFinderBilling?:number,FullName?:string,ByLastName?:string,IsSecurityLicensed?:boolean,IsEncompassAdmin?:boolean,ApiKey?:string,LastSessionId?:string,LastLogin?:string,MfaActive?:boolean,RequireMFA?:boolean,SMSPhoneNumber?:string,VerifiedEmailStatus?:boolean,VerifiedCellPhoneStatus?:boolean,SchedulerUrl?:string,QueueDefaults?:QueueDefault,Roles?:string[],PasswordUpdated?:boolean,RestrictToSingleSession?:boolean,AgentImage?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
AgentId;
/** @type {string} */
Company;
/** @type {string} */
AgentName;
/** @type {string} */
FirstName;
/** @type {string} */
LastName;
/** @type {string} */
MiddleInitial;
/** @type {string} */
Address1;
/** @type {string} */
Address2;
/** @type {string} */
City;
/** @type {string} */
State;
/** @type {string} */
Zip;
/** @type {string} */
Country;
/** @type {string} */
Email;
/** @type {string} */
EmailSignature;
/** @type {string} */
HomePhone;
/** @type {string} */
CellPhone;
/** @type {string} */
WorkPhone;
/** @type {boolean} */
InsLicensed;
/** @type {boolean} */
AgreeToDisclosures;
/** @type {?string} */
AgreeToDate;
/** @type {?string} */
PaidDate;
/** @type {string} */
AgentNumber;
/** @type {string} */
ReferringAgent;
/** @type {string} */
PlacementAgent;
/** @type {?string} */
CreatedDate;
/** @type {string} */
UserId;
/** @type {boolean} */
IsAgent;
/** @type {string} */
Package;
/** @type {string} */
StoreName;
/** @type {string} */
Notes;
/** @type {?number} */
Upline1;
/** @type {?number} */
Upline2;
/** @type {?number} */
Upline3;
/** @type {?number} */
Upline4;
/** @type {?number} */
MVPID;
/** @type {?number} */
AVPID;
/** @type {?number} */
RVPID;
/** @type {?number} */
AgentLevel;
/** @type {boolean} */
IsMVP;
/** @type {boolean} */
IsRVP;
/** @type {boolean} */
IsAVP;
/** @type {boolean} */
IsAdmin;
/** @type {boolean} */
IsBusinessCardAdmin;
/** @type {string} */
TeamName;
/** @type {string} */
LocationId;
/** @type {string} */
CalendarId;
/** @type {string} */
Rank;
/** @type {boolean} */
NBC;
/** @type {?number} */
Upline1Percent;
/** @type {?number} */
Upline2Percent;
/** @type {?number} */
Upline3Percent;
/** @type {?number} */
Upline4Percent;
/** @type {string} */
AgentStatus;
/** @type {string} */
Office;
/** @type {?string} */
DOB;
/** @type {string} */
SSN;
/** @type {string} */
Fax;
/** @type {string} */
BusinessEmail;
/** @type {?string} */
ModifiedDate;
/** @type {string} */
ModifiedBy;
/** @type {string} */
TimeZone;
/** @type {boolean} */
LeaderLocked;
/** @type {string} */
LastSubmittedBusinessDate;
/** @type {string} */
GracePeriodDate;
/** @type {boolean} */
Vested;
/** @type {string} */
DirectPay;
/** @type {string} */
DirectPayApprBy;
/** @type {?number} */
FactFinderBilling;
/** @type {string} */
FullName;
/** @type {string} */
ByLastName;
/** @type {boolean} */
IsSecurityLicensed;
/** @type {boolean} */
IsEncompassAdmin;
/** @type {string} */
ApiKey;
/** @type {string} */
LastSessionId;
/** @type {?string} */
LastLogin;
/** @type {boolean} */
MfaActive;
/** @type {boolean} */
RequireMFA;
/** @type {string} */
SMSPhoneNumber;
/** @type {boolean} */
VerifiedEmailStatus;
/** @type {boolean} */
VerifiedCellPhoneStatus;
/** @type {string} */
SchedulerUrl;
/** @type {QueueDefault} */
QueueDefaults;
/** @type {string[]} */
Roles = [];
/** @type {boolean} */
PasswordUpdated;
/** @type {boolean} */
RestrictToSingleSession;
/** @type {string} */
AgentImage;
}
export class ScheduleConfigTimeBlock {
/** @param {{StartTime?:string,DayStartFriendly?:string,EndTime?:string,DayEndFriendly?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
StartTime;
/** @type {string} */
DayStartFriendly;
/** @type {string} */
EndTime;
/** @type {string} */
DayEndFriendly;
}
export class ScheduleConfigDay {
/** @param {{DayName?:string,DayNumber?:number,DayEnabled?:boolean,TimeBlocks?:ScheduleConfigTimeBlock[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
DayName;
/** @type {?number} */
DayNumber;
/** @type {?boolean} */
DayEnabled;
/** @type {ScheduleConfigTimeBlock[]} */
TimeBlocks = [];
}
export class LineImage {
/** @param {{ImageId?:string,LineId?:string,ImageTitle?:string,UploadDate?:string,MimeType?:string,FileName?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {?string} */
ImageId;
/** @type {?string} */
LineId;
/** @type {string} */
ImageTitle;
/** @type {string} */
UploadDate;
/** @type {string} */
MimeType;
/** @type {string} */
FileName;
}
export class Line {
/** @param {{Id?:string,LocationId?:string,LocationName?:string,Name?:string,Description?:string,ServiceDurationMinutes?:number,WaitTime?:number,Cost?:number,UpperThreshold?:number,LowerThreshold?:number,Active?:boolean,EntDate?:string,ModDate?:string,SendQuestionnaire?:boolean,RequireUpload?:boolean,UploadMessage?:string,LineImages?:LineImage[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Id;
/** @type {string} */
LocationId;
/** @type {string} */
LocationName;
/** @type {string} */
Name;
/** @type {string} */
Description;
/** @type {number} */
ServiceDurationMinutes;
/** @type {number} */
WaitTime;
/** @type {number} */
Cost;
/** @type {?number} */
UpperThreshold;
/** @type {?number} */
LowerThreshold;
/** @type {boolean} */
Active;
/** @type {?string} */
EntDate;
/** @type {?string} */
ModDate;
/** @type {boolean} */
SendQuestionnaire;
/** @type {boolean} */
RequireUpload;
/** @type {string} */
UploadMessage;
/** @type {LineImage[]} */
LineImages = [];
}
export class SchedulerConfiguration {
/** @param {{ConfigId?:number,SchedulerUrl?:string,SchedulerName?:string,DefaultLocation?:string,DefaultSummary?:string,DefaultDescription?:string,DayStart?:string,DayStartFriendly?:string,DayEnd?:string,DayEndFriendly?:string,TimeslotDuration?:number,NumberOfSlots?:number,LocationId?:string,CalendarId?:string,AgentId?:number,TimeZone?:string,AvailableDateTimes?:ScheduleConfigDay[],AvailableServices?:string[],AllServices?:Line[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
ConfigId;
/** @type {string} */
SchedulerUrl;
/** @type {string} */
SchedulerName;
/** @type {string} */
DefaultLocation;
/** @type {string} */
DefaultSummary;
/** @type {string} */
DefaultDescription;
/** @type {string} */
DayStart;
/** @type {string} */
DayStartFriendly;
/** @type {string} */
DayEnd;
/** @type {string} */
DayEndFriendly;
/** @type {number} */
TimeslotDuration;
/** @type {?number} */
NumberOfSlots;
/** @type {string} */
LocationId;
/** @type {string} */
CalendarId;
/** @type {number} */
AgentId;
/** @type {string} */
TimeZone;
/** @type {ScheduleConfigDay[]} */
AvailableDateTimes = [];
/** @type {string[]} */
AvailableServices = [];
/** @type {Line[]} */
AllServices = [];
}
export class Contact {
/** @param {{ContactId?:number,ContactType?:number,FirstName?:string,LastName?:string,Name?:string,Role?:string,Title?:string,EmailWork?:string,EmailPersonal?:string,District?:string,DistrictID?:number,School?:string,SchoolID?:number,State?:string,StateName?:string,StateID?:number,CountyID?:number,County?:string,Phone?:string,Department?:string,Flow?:string,LastContact?:string,DoNotContact?:boolean,Active?:boolean,AgentId?:number,PhoneAlt?:string,PeraContactId?:number,RoomNumber?:string,SourceTypeId?:number,SourceTypeDesc?:string,SourceNote?:string,ContactStatusId?:number,ContactStatusDesc?:string,SSN?:string,DateOfBirth?:string,Deleted?:boolean,IsShared?:boolean,address_line1?:string,address_city?:string,address_state?:string,address_zip?:string,DeletedBy?:string,DeletedDateTimeUtc?:string,HasNBC?:boolean,HasFactFinderSheet?:boolean,MiddleInitial?:string,Tags?:string,DateCreated?:string,PhoneLabel?:string,AltPhoneLabel?:string,Carriers?:string,ContactImage?:string,CompanyAffiliation?:string,AdditionalInformation?:string,HasGiftCard?:boolean,ContactCategory?:number,WritingAgentId?:number,WritingAgentName?:string,MaritalStatus?:string,TotalDebtAmount?:number,NumberOfDebtAccounts?:number,FactFinderCodeId?:number,BusinessName?:string,DBA?:string,ContactGUID?:string,ProjectEndDate?:string,Rate?:number,JobID?:number,JobName?:string,JobCount?:number,Locked?:boolean,LockedByAgentId?:number,LockedTimestamp?:string,Initials?:string,ContactCategoryName?:string,SMSOptIn?:boolean}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
ContactId;
/** @type {number} */
ContactType;
/** @type {string} */
FirstName;
/** @type {string} */
LastName;
/** @type {string} */
Name;
/** @type {string} */
Role;
/** @type {string} */
Title;
/** @type {string} */
EmailWork;
/** @type {string} */
EmailPersonal;
/** @type {string} */
District;
/** @type {number} */
DistrictID;
/** @type {string} */
School;
/** @type {number} */
SchoolID;
/** @type {string} */
State;
/** @type {string} */
StateName;
/** @type {number} */
StateID;
/** @type {number} */
CountyID;
/** @type {string} */
County;
/** @type {string} */
Phone;
/** @type {string} */
Department;
/** @type {string} */
Flow;
/** @type {string} */
LastContact;
/** @type {boolean} */
DoNotContact;
/** @type {boolean} */
Active;
/** @type {number} */
AgentId;
/** @type {string} */
PhoneAlt;
/** @type {number} */
PeraContactId;
/** @type {string} */
RoomNumber;
/** @type {number} */
SourceTypeId;
/** @type {string} */
SourceTypeDesc;
/** @type {string} */
SourceNote;
/** @type {number} */
ContactStatusId;
/** @type {string} */
ContactStatusDesc;
/** @type {string} */
SSN;
/** @type {string} */
DateOfBirth;
/** @type {boolean} */
Deleted;
/** @type {boolean} */
IsShared;
/** @type {string} */
address_line1;
/** @type {string} */
address_city;
/** @type {string} */
address_state;
/** @type {string} */
address_zip;
/** @type {string} */
DeletedBy;
/** @type {?string} */
DeletedDateTimeUtc;
/** @type {boolean} */
HasNBC;
/** @type {boolean} */
HasFactFinderSheet;
/** @type {string} */
MiddleInitial;
/** @type {string} */
Tags;
/** @type {string} */
DateCreated;
/** @type {string} */
PhoneLabel;
/** @type {string} */
AltPhoneLabel;
/** @type {string} */
Carriers;
/** @type {string} */
ContactImage;
/** @type {string} */
CompanyAffiliation;
/** @type {string} */
AdditionalInformation;
/** @type {boolean} */
HasGiftCard;
/** @type {number} */
ContactCategory;
/** @type {number} */
WritingAgentId;
/** @type {string} */
WritingAgentName;
/** @type {string} */
MaritalStatus;
/** @type {number} */
TotalDebtAmount;
/** @type {number} */
NumberOfDebtAccounts;
/** @type {number} */
FactFinderCodeId;
/** @type {string} */
BusinessName;
/** @type {string} */
DBA;
/** @type {string} */
ContactGUID;
/** @type {string} */
ProjectEndDate;
/** @type {number} */
Rate;
/** @type {number} */
JobID;
/** @type {string} */
JobName;
/** @type {number} */
JobCount;
/** @type {boolean} */
Locked;
/** @type {number} */
LockedByAgentId;
/** @type {string} */
LockedTimestamp;
/** @type {string} */
Initials;
/** @type {string} */
ContactCategoryName;
/** @type {boolean} */
SMSOptIn;
}
export class SchedulerTimeslot {
/** @param {{Day?:string,Time?:string,Duration?:number,StartDateTime?:string,EndDateTime?:string,TimeFriendly?:string,Contact?:Contact,ServiceIds?:string[],LocationId?:string,Unavailable?:boolean,BookedIds?:number[],CalendarId?:string,SchedulerUrl?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Day;
/** @type {string} */
Time;
/** @type {number} */
Duration;
/** @type {string} */
StartDateTime;
/** @type {string} */
EndDateTime;
/** @type {string} */
TimeFriendly;
/** @type {Contact} */
Contact;
/** @type {string[]} */
ServiceIds = [];
/** @type {string} */
LocationId;
/** @type {boolean} */
Unavailable;
/** @type {number[]} */
BookedIds = [];
/** @type {string} */
CalendarId;
/** @type {string} */
SchedulerUrl;
}
export class SchedulerDay {
/** @param {{Day?:string,MonthNumber?:number,DayNumber?:number,DayOfWeek?:string,Timeslots?:SchedulerTimeslot[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Day;
/** @type {number} */
MonthNumber;
/** @type {number} */
DayNumber;
/** @type {string} */
DayOfWeek;
/** @type {SchedulerTimeslot[]} */
Timeslots = [];
}
export class SchedulerWeek {
/** @param {{Settings?:SchedulerConfiguration,Days?:SchedulerDay[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {SchedulerConfiguration} */
Settings;
/** @type {SchedulerDay[]} */
Days = [];
}
export class SchedulerResponse {
/** @param {{Location?:Location,Agent?:Agent,ResponseStatus?:ResponseStatus,Week?:SchedulerWeek,Services?:Line[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {Location} */
Location;
/** @type {Agent} */
Agent;
/** @type {ResponseStatus} */
ResponseStatus;
/** @type {SchedulerWeek} */
Week;
/** @type {Line[]} */
Services = [];
}
JavaScript SchedulerRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /v1/Scheduler/{SchedulerUrl} HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
Location:
{
Id: 00000000000000000000000000000000,
ClientId: 00000000000000000000000000000000,
Name: String,
Address1: String,
Address2: String,
City: String,
State: String,
Zip: String,
Phone: String,
Fax: String,
URL: String,
Email: String,
TimeZone: String,
Active: False,
EntDate: 0001-01-01,
ModDate: 0001-01-01,
LocationImage: String
},
Agent:
{
AgentId: 0,
Company: String,
AgentName: String,
FirstName: String,
LastName: String,
MiddleInitial: String,
Address1: String,
Address2: String,
City: String,
State: String,
Zip: String,
Country: String,
Email: String,
EmailSignature: String,
HomePhone: String,
CellPhone: String,
WorkPhone: String,
InsLicensed: False,
AgreeToDisclosures: False,
AgreeToDate: 0001-01-01,
PaidDate: 0001-01-01,
AgentNumber: String,
ReferringAgent: String,
PlacementAgent: String,
CreatedDate: 0001-01-01,
UserId: 00000000000000000000000000000000,
IsAgent: False,
Package: String,
StoreName: String,
Notes: String,
Upline1: 0,
Upline2: 0,
Upline3: 0,
Upline4: 0,
MVPID: 0,
AVPID: 0,
RVPID: 0,
AgentLevel: 0,
IsMVP: False,
IsRVP: False,
IsAVP: False,
IsAdmin: False,
IsBusinessCardAdmin: False,
TeamName: String,
LocationId: 00000000000000000000000000000000,
CalendarId: 00000000000000000000000000000000,
Rank: String,
NBC: False,
Upline1Percent: 0,
Upline2Percent: 0,
Upline3Percent: 0,
Upline4Percent: 0,
AgentStatus: String,
Office: String,
DOB: 0001-01-01,
SSN: String,
Fax: String,
BusinessEmail: String,
ModifiedDate: 0001-01-01,
ModifiedBy: String,
TimeZone: String,
LeaderLocked: False,
LastSubmittedBusinessDate: 0001-01-01,
GracePeriodDate: 0001-01-01,
Vested: False,
DirectPay: 0001-01-01,
DirectPayApprBy: String,
FactFinderBilling: 0,
FullName: String,
ByLastName: String,
IsSecurityLicensed: False,
IsEncompassAdmin: False,
ApiKey: 00000000000000000000000000000000,
LastSessionId: String,
LastLogin: 0001-01-01,
MfaActive: False,
RequireMFA: False,
SMSPhoneNumber: String,
VerifiedEmailStatus: False,
VerifiedCellPhoneStatus: False,
SchedulerUrl: String,
QueueDefaults:
{
LocationId: 00000000000000000000000000000000,
Services:
[
00000000000000000000000000000000
]
},
Roles:
[
String
],
PasswordUpdated: False,
RestrictToSingleSession: False,
AgentImage: String
},
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
},
Week:
{
Settings:
{
ConfigId: 0,
SchedulerUrl: String,
SchedulerName: String,
DefaultLocation: String,
DefaultSummary: String,
DefaultDescription: String,
DayStart: PT0S,
DayStartFriendly: "00:00",
DayEnd: PT0S,
DayEndFriendly: "00:00",
TimeslotDuration: 0,
NumberOfSlots: 0,
LocationId: 00000000000000000000000000000000,
CalendarId: 00000000000000000000000000000000,
AgentId: 0,
TimeZone: String,
AvailableDateTimes:
[
{
DayName: String,
DayNumber: 0,
DayEnabled: False,
TimeBlocks:
[
{
StartTime: PT0S,
DayStartFriendly: "00:00",
EndTime: PT0S,
DayEndFriendly: "00:00"
}
]
}
],
AvailableServices:
[
00000000000000000000000000000000
],
AllServices:
[
{
Id: 00000000000000000000000000000000,
LocationId: 00000000000000000000000000000000,
LocationName: String,
Name: String,
Description: String,
ServiceDurationMinutes: 0,
WaitTime: 0,
Cost: 0,
UpperThreshold: 0,
LowerThreshold: 0,
Active: False,
EntDate: 0001-01-01,
ModDate: 0001-01-01,
SendQuestionnaire: False,
RequireUpload: False,
UploadMessage: String,
LineImages:
[
{
ImageId: 00000000000000000000000000000000,
LineId: 00000000000000000000000000000000,
ImageTitle: String,
UploadDate: 0001-01-01,
MimeType: String,
FileName: String
}
]
}
]
},
Days:
[
{
}
]
},
Services:
[
{
Id: 00000000000000000000000000000000,
LocationId: 00000000000000000000000000000000,
LocationName: String,
Name: String,
Description: String,
ServiceDurationMinutes: 0,
WaitTime: 0,
Cost: 0,
UpperThreshold: 0,
LowerThreshold: 0,
Active: False,
EntDate: 0001-01-01,
ModDate: 0001-01-01,
SendQuestionnaire: False,
RequireUpload: False,
UploadMessage: String,
LineImages:
[
{
ImageId: 00000000000000000000000000000000,
LineId: 00000000000000000000000000000000,
ImageTitle: String,
UploadDate: 0001-01-01,
MimeType: String,
FileName: String
}
]
}
]
}