Trendsic Platform Service

<back to all web services

ScheduleWorkerPoolRequest

Requires Authentication
The following routes are available for this service:
GET/v1/schedule/workerpool
"use strict";
export class WorkerScheduleItem {
    /** @param {{WorkerScheduleItemID?:number,JobID?:number,ProjectID?:number,ContactID?:number,ScheduledDate?:string,SortOrder?:number,SourceCrewID?:number,Status?:string,StartedAt?:string,CompletedAt?:string,WorkerNotes?:string,JobName?:string,ProjectName?:string,FirstName?:string,LastName?:string,WorkerName?:string,SourceCrewName?:string,ProjectLocationID?:number,ProjectLocationName?:string,LocationZip?:string,LocationCity?:string,LocationLatitude?:number,LocationLongitude?:number,JobStatusName?:string,BranchId?:string,BranchName?:string,WorkerHomeBranchId?:string,WorkerHomeBranchName?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    WorkerScheduleItemID;
    /** @type {number} */
    JobID;
    /** @type {?number} */
    ProjectID;
    /** @type {number} */
    ContactID;
    /** @type {?string} */
    ScheduledDate;
    /** @type {number} */
    SortOrder;
    /** @type {?number} */
    SourceCrewID;
    /** @type {string} */
    Status;
    /** @type {?string} */
    StartedAt;
    /** @type {?string} */
    CompletedAt;
    /** @type {string} */
    WorkerNotes;
    /** @type {string} */
    JobName;
    /** @type {string} */
    ProjectName;
    /** @type {string} */
    FirstName;
    /** @type {string} */
    LastName;
    /** @type {string} */
    WorkerName;
    /** @type {string} */
    SourceCrewName;
    /** @type {?number} */
    ProjectLocationID;
    /** @type {string} */
    ProjectLocationName;
    /** @type {string} */
    LocationZip;
    /** @type {string} */
    LocationCity;
    /** @type {?number} */
    LocationLatitude;
    /** @type {?number} */
    LocationLongitude;
    /** @type {string} */
    JobStatusName;
    /** @type {string} */
    BranchId;
    /** @type {string} */
    BranchName;
    /** @type {?string} */
    WorkerHomeBranchId;
    /** @type {string} */
    WorkerHomeBranchName;
}
export class SchedulableJob {
    /** @param {{JobID?:number,JobName?:string,ProjectID?:number,ProjectName?:string,StatusID?:number,StatusName?:string,ProjectLocationID?:number,ProjectLocationName?:string,LocationZip?:string,LocationCity?:string,LocationLatitude?:number,LocationLongitude?:number,ExpectedStartDate?:string,ExpectedCompletionDate?:string,IsRecurring?:boolean,OccurrenceDates?:string[]}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    JobID;
    /** @type {string} */
    JobName;
    /** @type {number} */
    ProjectID;
    /** @type {string} */
    ProjectName;
    /** @type {?number} */
    StatusID;
    /** @type {string} */
    StatusName;
    /** @type {?number} */
    ProjectLocationID;
    /** @type {string} */
    ProjectLocationName;
    /** @type {string} */
    LocationZip;
    /** @type {string} */
    LocationCity;
    /** @type {?number} */
    LocationLatitude;
    /** @type {?number} */
    LocationLongitude;
    /** @type {?string} */
    ExpectedStartDate;
    /** @type {?string} */
    ExpectedCompletionDate;
    /** @type {boolean} */
    IsRecurring;
    /** @type {string[]} */
    OccurrenceDates = [];
}
export class ScheduleWorker {
    /** @param {{ContactId?:number,FirstName?:string,LastName?:string,Name?:string,Initials?:string,Rate?:number,ImageUrl?:string,BranchId?:string,BranchName?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    ContactId;
    /** @type {string} */
    FirstName;
    /** @type {string} */
    LastName;
    /** @type {string} */
    Name;
    /** @type {string} */
    Initials;
    /** @type {?number} */
    Rate;
    /** @type {string} */
    ImageUrl;
    /** @type {?string} */
    BranchId;
    /** @type {string} */
    BranchName;
}
export class Crew {
    /** @param {{CrewID?:number,CrewName?:string,CrewNumber?:string,CrewManagerContactID?:number,CrewManagerContactName?:string,CrewColor?:string,RecordCreatedDate?:string,Active?:boolean,CreatedByUID?:string,ProjectID?:number,CrewMemberCount?:number,ProjectCrewID?:number,ProjectName?:string,BranchId?:string,BranchName?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    CrewID;
    /** @type {string} */
    CrewName;
    /** @type {string} */
    CrewNumber;
    /** @type {number} */
    CrewManagerContactID;
    /** @type {string} */
    CrewManagerContactName;
    /** @type {string} */
    CrewColor;
    /** @type {string} */
    RecordCreatedDate;
    /** @type {boolean} */
    Active;
    /** @type {string} */
    CreatedByUID;
    /** @type {number} */
    ProjectID;
    /** @type {number} */
    CrewMemberCount;
    /** @type {number} */
    ProjectCrewID;
    /** @type {string} */
    ProjectName;
    /** @type {string} */
    BranchId;
    /** @type {string} */
    BranchName;
}
export class ScheduleLastAssignment {
    /** @param {{JobID?:number,ContactIds?:number[],SourceCrewID?:number}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    JobID;
    /** @type {number[]} */
    ContactIds = [];
    /** @type {?number} */
    SourceCrewID;
}
export class ScheduleAutoFillResult {
    /** @param {{JobsFilled?:number,JobsSkipped?:number,VisitsScheduled?:number}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    JobsFilled;
    /** @type {number} */
    JobsSkipped;
    /** @type {number} */
    VisitsScheduled;
}
export class WorkerScheduleResponse {
    /** @param {{Items?:WorkerScheduleItem[],SchedulableJobs?:SchedulableJob[],Workers?:ScheduleWorker[],Crews?:Crew[],BudgetedCrew?:ScheduleWorker[],LastAssignment?:ScheduleLastAssignment,AutoFill?:ScheduleAutoFillResult,DatesScheduled?:number,WorkersScheduled?:number,ItemsRemoved?:number,ResponseStatus?:ResponseStatus}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {WorkerScheduleItem[]} */
    Items = [];
    /** @type {SchedulableJob[]} */
    SchedulableJobs = [];
    /** @type {ScheduleWorker[]} */
    Workers = [];
    /** @type {Crew[]} */
    Crews = [];
    /** @type {ScheduleWorker[]} */
    BudgetedCrew = [];
    /** @type {ScheduleLastAssignment} */
    LastAssignment;
    /** @type {ScheduleAutoFillResult} */
    AutoFill;
    /** @type {?number} */
    DatesScheduled;
    /** @type {?number} */
    WorkersScheduled;
    /** @type {?number} */
    ItemsRemoved;
    /** @type {ResponseStatus} */
    ResponseStatus;
}
export class ScheduleWorkerPoolRequest {
    /** @param {{ProjectID?:number,JobID?:number,Scope?:string,CrewID?:number,IncludeOtherBranches?:boolean}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    ProjectID;
    /** @type {number} */
    JobID;
    /** @type {string} */
    Scope;
    /** @type {number} */
    CrewID;
    /** @type {boolean} */
    IncludeOtherBranches;
}

JavaScript ScheduleWorkerPoolRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /v1/schedule/workerpool HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<WorkerScheduleResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <AutoFill>
    <JobsFilled>0</JobsFilled>
    <JobsSkipped>0</JobsSkipped>
    <VisitsScheduled>0</VisitsScheduled>
  </AutoFill>
  <BudgetedCrew>
    <ScheduleWorker>
      <BranchId>00000000-0000-0000-0000-000000000000</BranchId>
      <BranchName>String</BranchName>
      <ContactId>0</ContactId>
      <FirstName>String</FirstName>
      <ImageUrl>String</ImageUrl>
      <Initials>String</Initials>
      <LastName>String</LastName>
      <Name>String</Name>
      <Rate>0</Rate>
    </ScheduleWorker>
  </BudgetedCrew>
  <Crews>
    <Crew>
      <Active>false</Active>
      <BranchId>00000000-0000-0000-0000-000000000000</BranchId>
      <BranchName>String</BranchName>
      <CreatedByUID>00000000-0000-0000-0000-000000000000</CreatedByUID>
      <CrewColor>String</CrewColor>
      <CrewID>0</CrewID>
      <CrewManagerContactID>0</CrewManagerContactID>
      <CrewManagerContactName>String</CrewManagerContactName>
      <CrewMemberCount>0</CrewMemberCount>
      <CrewName>String</CrewName>
      <CrewNumber>String</CrewNumber>
      <ProjectCrewID>0</ProjectCrewID>
      <ProjectID>0</ProjectID>
      <ProjectName>String</ProjectName>
      <RecordCreatedDate>0001-01-01T00:00:00</RecordCreatedDate>
    </Crew>
  </Crews>
  <DatesScheduled>0</DatesScheduled>
  <Items>
    <WorkerScheduleItem>
      <BranchId>00000000-0000-0000-0000-000000000000</BranchId>
      <BranchName>String</BranchName>
      <CompletedAt>0001-01-01T00:00:00</CompletedAt>
      <ContactID>0</ContactID>
      <FirstName>String</FirstName>
      <JobID>0</JobID>
      <JobName>String</JobName>
      <JobStatusName>String</JobStatusName>
      <LastName>String</LastName>
      <LocationCity>String</LocationCity>
      <LocationLatitude>0</LocationLatitude>
      <LocationLongitude>0</LocationLongitude>
      <LocationZip>String</LocationZip>
      <ProjectID>0</ProjectID>
      <ProjectLocationID>0</ProjectLocationID>
      <ProjectLocationName>String</ProjectLocationName>
      <ProjectName>String</ProjectName>
      <ScheduledDate>0001-01-01T00:00:00</ScheduledDate>
      <SortOrder>0</SortOrder>
      <SourceCrewID>0</SourceCrewID>
      <SourceCrewName>String</SourceCrewName>
      <StartedAt>0001-01-01T00:00:00</StartedAt>
      <Status>String</Status>
      <WorkerHomeBranchId>00000000-0000-0000-0000-000000000000</WorkerHomeBranchId>
      <WorkerHomeBranchName>String</WorkerHomeBranchName>
      <WorkerName>String</WorkerName>
      <WorkerNotes>String</WorkerNotes>
      <WorkerScheduleItemID>0</WorkerScheduleItemID>
    </WorkerScheduleItem>
  </Items>
  <ItemsRemoved>0</ItemsRemoved>
  <LastAssignment>
    <ContactIds xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:int>0</d3p1:int>
    </ContactIds>
    <JobID>0</JobID>
    <SourceCrewID>0</SourceCrewID>
  </LastAssignment>
  <ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
    <d2p1:ErrorCode>String</d2p1:ErrorCode>
    <d2p1:Message>String</d2p1:Message>
    <d2p1:StackTrace>String</d2p1:StackTrace>
    <d2p1:Errors>
      <d2p1:ResponseError>
        <d2p1:ErrorCode>String</d2p1:ErrorCode>
        <d2p1:FieldName>String</d2p1:FieldName>
        <d2p1:Message>String</d2p1:Message>
        <d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:KeyValueOfstringstring>
            <d5p1:Key>String</d5p1:Key>
            <d5p1:Value>String</d5p1:Value>
          </d5p1:KeyValueOfstringstring>
        </d2p1:Meta>
      </d2p1:ResponseError>
    </d2p1:Errors>
    <d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>String</d3p1:Key>
        <d3p1:Value>String</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
    </d2p1:Meta>
  </ResponseStatus>
  <SchedulableJobs>
    <SchedulableJob>
      <ExpectedCompletionDate>0001-01-01T00:00:00</ExpectedCompletionDate>
      <ExpectedStartDate>0001-01-01T00:00:00</ExpectedStartDate>
      <IsRecurring>false</IsRecurring>
      <JobID>0</JobID>
      <JobName>String</JobName>
      <LocationCity>String</LocationCity>
      <LocationLatitude>0</LocationLatitude>
      <LocationLongitude>0</LocationLongitude>
      <LocationZip>String</LocationZip>
      <OccurrenceDates xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>String</d4p1:string>
      </OccurrenceDates>
      <ProjectID>0</ProjectID>
      <ProjectLocationID>0</ProjectLocationID>
      <ProjectLocationName>String</ProjectLocationName>
      <ProjectName>String</ProjectName>
      <StatusID>0</StatusID>
      <StatusName>String</StatusName>
    </SchedulableJob>
  </SchedulableJobs>
  <Workers>
    <ScheduleWorker>
      <BranchId>00000000-0000-0000-0000-000000000000</BranchId>
      <BranchName>String</BranchName>
      <ContactId>0</ContactId>
      <FirstName>String</FirstName>
      <ImageUrl>String</ImageUrl>
      <Initials>String</Initials>
      <LastName>String</LastName>
      <Name>String</Name>
      <Rate>0</Rate>
    </ScheduleWorker>
  </Workers>
  <WorkersScheduled>0</WorkersScheduled>
</WorkerScheduleResponse>