| 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 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,FileName?:string,ImageTitle?:string,UploadDate?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {?string} */
ImageId;
/** @type {string} */
FileName;
/** @type {string} */
ImageTitle;
/** @type {string} */
UploadDate;
}
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 {{ResponseStatus?:ResponseStatus,Week?:SchedulerWeek,Services?:Line[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @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 .csv suffix or ?format=csv
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/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"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-01T00:00:00.0000000","ModDate":"0001-01-01T00:00:00.0000000","SendQuestionnaire":false,"RequireUpload":false,"UploadMessage":"String","LineImages":[{"ImageId":"00000000000000000000000000000000","FileName":"String","ImageTitle":"String","UploadDate":"0001-01-01T00:00:00.0000000"}]}]},"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-01T00:00:00.0000000","ModDate":"0001-01-01T00:00:00.0000000","SendQuestionnaire":false,"RequireUpload":false,"UploadMessage":"String","LineImages":[{"ImageId":"00000000000000000000000000000000","FileName":"String","ImageTitle":"String","UploadDate":"0001-01-01T00:00:00.0000000"}]}]}