Trendsic Platform Service

<back to all web services

ScheduleWorkerPoolRequest

Requires Authentication
The following routes are available for this service:
GET/v1/schedule/workerpool

export class WorkerScheduleItem
{
    public WorkerScheduleItemID: number;
    public JobID: number;
    public ProjectID?: number;
    public ContactID: number;
    public ScheduledDate?: string;
    public SortOrder: number;
    public SourceCrewID?: number;
    public Status: string;
    public StartedAt?: string;
    public CompletedAt?: string;
    public WorkerNotes: string;
    public JobName: string;
    public ProjectName: string;
    public FirstName: string;
    public LastName: string;
    public WorkerName: string;
    public SourceCrewName: string;
    public ProjectLocationID?: number;
    public ProjectLocationName: string;
    public LocationZip: string;
    public LocationCity: string;
    public LocationLatitude?: number;
    public LocationLongitude?: number;
    public JobStatusName: string;
    public BranchId: string;
    public BranchName: string;
    public WorkerHomeBranchId?: string;
    public WorkerHomeBranchName: string;

    public constructor(init?: Partial<WorkerScheduleItem>) { (Object as any).assign(this, init); }
}

export class SchedulableJob
{
    public JobID: number;
    public JobName: string;
    public ProjectID: number;
    public ProjectName: string;
    public StatusID?: number;
    public StatusName: string;
    public ProjectLocationID?: number;
    public ProjectLocationName: string;
    public LocationZip: string;
    public LocationCity: string;
    public LocationLatitude?: number;
    public LocationLongitude?: number;
    public ExpectedStartDate?: string;
    public ExpectedCompletionDate?: string;
    public IsRecurring: boolean;
    public OccurrenceDates: string[] = [];

    public constructor(init?: Partial<SchedulableJob>) { (Object as any).assign(this, init); }
}

export class ScheduleWorker
{
    public ContactId: number;
    public FirstName: string;
    public LastName: string;
    public Name: string;
    public Initials: string;
    public Rate?: number;
    public ImageUrl: string;
    public BranchId?: string;
    public BranchName: string;

    public constructor(init?: Partial<ScheduleWorker>) { (Object as any).assign(this, init); }
}

export class Crew
{
    public CrewID: number;
    public CrewName: string;
    public CrewNumber: string;
    public CrewManagerContactID: number;
    public CrewManagerContactName: string;
    public CrewColor: string;
    public RecordCreatedDate: string;
    public Active: boolean;
    public CreatedByUID: string;
    public ProjectID: number;
    public CrewMemberCount: number;
    public ProjectCrewID: number;
    public ProjectName: string;
    public BranchId: string;
    public BranchName: string;

    public constructor(init?: Partial<Crew>) { (Object as any).assign(this, init); }
}

export class ScheduleLastAssignment
{
    public JobID: number;
    public ContactIds: number[] = [];
    public SourceCrewID?: number;

    public constructor(init?: Partial<ScheduleLastAssignment>) { (Object as any).assign(this, init); }
}

export class ScheduleAutoFillResult
{
    public JobsFilled: number;
    public JobsSkipped: number;
    public VisitsScheduled: number;

    public constructor(init?: Partial<ScheduleAutoFillResult>) { (Object as any).assign(this, init); }
}

export class WorkerScheduleResponse
{
    public Items: WorkerScheduleItem[] = [];
    public SchedulableJobs: SchedulableJob[] = [];
    public Workers: ScheduleWorker[] = [];
    public Crews: Crew[] = [];
    public BudgetedCrew: ScheduleWorker[] = [];
    public LastAssignment: ScheduleLastAssignment;
    public AutoFill: ScheduleAutoFillResult;
    public DatesScheduled?: number;
    public WorkersScheduled?: number;
    public ItemsRemoved?: number;
    public ResponseStatus: ResponseStatus;

    public constructor(init?: Partial<WorkerScheduleResponse>) { (Object as any).assign(this, init); }
}

export class ScheduleWorkerPoolRequest
{
    public ProjectID: number;
    public JobID: number;
    public Scope: string;
    public CrewID: number;
    public IncludeOtherBranches: boolean;

    public constructor(init?: Partial<ScheduleWorkerPoolRequest>) { (Object as any).assign(this, init); }
}

TypeScript 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>