Trendsic Platform Service

<back to all web services

ScheduleRangeRequest

Requires Authentication
The following routes are available for this service:
GET/v1/schedule/range/{FromDate}/{ToDate}
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;

public class dtos
{

    public static class ScheduleRangeRequest
    {
        public Date FromDate = null;
        public Date ToDate = null;
        public Integer ContactID = null;
        
        public Date getFromDate() { return FromDate; }
        public ScheduleRangeRequest setFromDate(Date value) { this.FromDate = value; return this; }
        public Date getToDate() { return ToDate; }
        public ScheduleRangeRequest setToDate(Date value) { this.ToDate = value; return this; }
        public Integer getContactID() { return ContactID; }
        public ScheduleRangeRequest setContactID(Integer value) { this.ContactID = value; return this; }
    }

    public static class WorkerScheduleResponse
    {
        public ArrayList<WorkerScheduleItem> Items = new ArrayList<WorkerScheduleItem>();
        public ArrayList<SchedulableJob> SchedulableJobs = new ArrayList<SchedulableJob>();
        public ArrayList<ScheduleWorker> Workers = new ArrayList<ScheduleWorker>();
        public ArrayList<Crew> Crews = new ArrayList<Crew>();
        public ArrayList<ScheduleWorker> BudgetedCrew = new ArrayList<ScheduleWorker>();
        public ScheduleLastAssignment LastAssignment = null;
        public ScheduleAutoFillResult AutoFill = null;
        public Integer DatesScheduled = null;
        public Integer WorkersScheduled = null;
        public Integer ItemsRemoved = null;
        public ResponseStatus ResponseStatus = null;
        
        public ArrayList<WorkerScheduleItem> getItems() { return Items; }
        public WorkerScheduleResponse setItems(ArrayList<WorkerScheduleItem> value) { this.Items = value; return this; }
        public ArrayList<SchedulableJob> getSchedulableJobs() { return SchedulableJobs; }
        public WorkerScheduleResponse setSchedulableJobs(ArrayList<SchedulableJob> value) { this.SchedulableJobs = value; return this; }
        public ArrayList<ScheduleWorker> getWorkers() { return Workers; }
        public WorkerScheduleResponse setWorkers(ArrayList<ScheduleWorker> value) { this.Workers = value; return this; }
        public ArrayList<Crew> getCrews() { return Crews; }
        public WorkerScheduleResponse setCrews(ArrayList<Crew> value) { this.Crews = value; return this; }
        public ArrayList<ScheduleWorker> getBudgetedCrew() { return BudgetedCrew; }
        public WorkerScheduleResponse setBudgetedCrew(ArrayList<ScheduleWorker> value) { this.BudgetedCrew = value; return this; }
        public ScheduleLastAssignment getLastAssignment() { return LastAssignment; }
        public WorkerScheduleResponse setLastAssignment(ScheduleLastAssignment value) { this.LastAssignment = value; return this; }
        public ScheduleAutoFillResult getAutoFill() { return AutoFill; }
        public WorkerScheduleResponse setAutoFill(ScheduleAutoFillResult value) { this.AutoFill = value; return this; }
        public Integer getDatesScheduled() { return DatesScheduled; }
        public WorkerScheduleResponse setDatesScheduled(Integer value) { this.DatesScheduled = value; return this; }
        public Integer getWorkersScheduled() { return WorkersScheduled; }
        public WorkerScheduleResponse setWorkersScheduled(Integer value) { this.WorkersScheduled = value; return this; }
        public Integer getItemsRemoved() { return ItemsRemoved; }
        public WorkerScheduleResponse setItemsRemoved(Integer value) { this.ItemsRemoved = value; return this; }
        public ResponseStatus getResponseStatus() { return ResponseStatus; }
        public WorkerScheduleResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
    }

    public static class WorkerScheduleItem
    {
        public Integer WorkerScheduleItemID = null;
        public Integer JobID = null;
        public Integer ProjectID = null;
        public Integer ContactID = null;
        public Date ScheduledDate = null;
        public Integer SortOrder = null;
        public Integer SourceCrewID = null;
        public String Status = null;
        public Date StartedAt = null;
        public Date CompletedAt = null;
        public String WorkerNotes = null;
        public String JobName = null;
        public String ProjectName = null;
        public String FirstName = null;
        public String LastName = null;
        public String WorkerName = null;
        public String SourceCrewName = null;
        public Integer ProjectLocationID = null;
        public String ProjectLocationName = null;
        public String LocationZip = null;
        public String LocationCity = null;
        public BigDecimal LocationLatitude = null;
        public BigDecimal LocationLongitude = null;
        public String JobStatusName = null;
        public UUID BranchId = null;
        public String BranchName = null;
        public UUID WorkerHomeBranchId = null;
        public String WorkerHomeBranchName = null;
        
        public Integer getWorkerScheduleItemID() { return WorkerScheduleItemID; }
        public WorkerScheduleItem setWorkerScheduleItemID(Integer value) { this.WorkerScheduleItemID = value; return this; }
        public Integer getJobID() { return JobID; }
        public WorkerScheduleItem setJobID(Integer value) { this.JobID = value; return this; }
        public Integer getProjectID() { return ProjectID; }
        public WorkerScheduleItem setProjectID(Integer value) { this.ProjectID = value; return this; }
        public Integer getContactID() { return ContactID; }
        public WorkerScheduleItem setContactID(Integer value) { this.ContactID = value; return this; }
        public Date getScheduledDate() { return ScheduledDate; }
        public WorkerScheduleItem setScheduledDate(Date value) { this.ScheduledDate = value; return this; }
        public Integer getSortOrder() { return SortOrder; }
        public WorkerScheduleItem setSortOrder(Integer value) { this.SortOrder = value; return this; }
        public Integer getSourceCrewID() { return SourceCrewID; }
        public WorkerScheduleItem setSourceCrewID(Integer value) { this.SourceCrewID = value; return this; }
        public String getStatus() { return Status; }
        public WorkerScheduleItem setStatus(String value) { this.Status = value; return this; }
        public Date getStartedAt() { return StartedAt; }
        public WorkerScheduleItem setStartedAt(Date value) { this.StartedAt = value; return this; }
        public Date getCompletedAt() { return CompletedAt; }
        public WorkerScheduleItem setCompletedAt(Date value) { this.CompletedAt = value; return this; }
        public String getWorkerNotes() { return WorkerNotes; }
        public WorkerScheduleItem setWorkerNotes(String value) { this.WorkerNotes = value; return this; }
        public String getJobName() { return JobName; }
        public WorkerScheduleItem setJobName(String value) { this.JobName = value; return this; }
        public String getProjectName() { return ProjectName; }
        public WorkerScheduleItem setProjectName(String value) { this.ProjectName = value; return this; }
        public String getFirstName() { return FirstName; }
        public WorkerScheduleItem setFirstName(String value) { this.FirstName = value; return this; }
        public String getLastName() { return LastName; }
        public WorkerScheduleItem setLastName(String value) { this.LastName = value; return this; }
        public String getWorkerName() { return WorkerName; }
        public WorkerScheduleItem setWorkerName(String value) { this.WorkerName = value; return this; }
        public String getSourceCrewName() { return SourceCrewName; }
        public WorkerScheduleItem setSourceCrewName(String value) { this.SourceCrewName = value; return this; }
        public Integer getProjectLocationID() { return ProjectLocationID; }
        public WorkerScheduleItem setProjectLocationID(Integer value) { this.ProjectLocationID = value; return this; }
        public String getProjectLocationName() { return ProjectLocationName; }
        public WorkerScheduleItem setProjectLocationName(String value) { this.ProjectLocationName = value; return this; }
        public String getLocationZip() { return LocationZip; }
        public WorkerScheduleItem setLocationZip(String value) { this.LocationZip = value; return this; }
        public String getLocationCity() { return LocationCity; }
        public WorkerScheduleItem setLocationCity(String value) { this.LocationCity = value; return this; }
        public BigDecimal getLocationLatitude() { return LocationLatitude; }
        public WorkerScheduleItem setLocationLatitude(BigDecimal value) { this.LocationLatitude = value; return this; }
        public BigDecimal getLocationLongitude() { return LocationLongitude; }
        public WorkerScheduleItem setLocationLongitude(BigDecimal value) { this.LocationLongitude = value; return this; }
        public String getJobStatusName() { return JobStatusName; }
        public WorkerScheduleItem setJobStatusName(String value) { this.JobStatusName = value; return this; }
        public UUID getBranchId() { return BranchId; }
        public WorkerScheduleItem setBranchId(UUID value) { this.BranchId = value; return this; }
        public String getBranchName() { return BranchName; }
        public WorkerScheduleItem setBranchName(String value) { this.BranchName = value; return this; }
        public UUID getWorkerHomeBranchId() { return WorkerHomeBranchId; }
        public WorkerScheduleItem setWorkerHomeBranchId(UUID value) { this.WorkerHomeBranchId = value; return this; }
        public String getWorkerHomeBranchName() { return WorkerHomeBranchName; }
        public WorkerScheduleItem setWorkerHomeBranchName(String value) { this.WorkerHomeBranchName = value; return this; }
    }

    public static class SchedulableJob
    {
        public Integer JobID = null;
        public String JobName = null;
        public Integer ProjectID = null;
        public String ProjectName = null;
        public Integer StatusID = null;
        public String StatusName = null;
        public Integer ProjectLocationID = null;
        public String ProjectLocationName = null;
        public String LocationZip = null;
        public String LocationCity = null;
        public BigDecimal LocationLatitude = null;
        public BigDecimal LocationLongitude = null;
        public Date ExpectedStartDate = null;
        public Date ExpectedCompletionDate = null;
        public Boolean IsRecurring = null;
        public ArrayList<String> OccurrenceDates = new ArrayList<String>();
        
        public Integer getJobID() { return JobID; }
        public SchedulableJob setJobID(Integer value) { this.JobID = value; return this; }
        public String getJobName() { return JobName; }
        public SchedulableJob setJobName(String value) { this.JobName = value; return this; }
        public Integer getProjectID() { return ProjectID; }
        public SchedulableJob setProjectID(Integer value) { this.ProjectID = value; return this; }
        public String getProjectName() { return ProjectName; }
        public SchedulableJob setProjectName(String value) { this.ProjectName = value; return this; }
        public Integer getStatusID() { return StatusID; }
        public SchedulableJob setStatusID(Integer value) { this.StatusID = value; return this; }
        public String getStatusName() { return StatusName; }
        public SchedulableJob setStatusName(String value) { this.StatusName = value; return this; }
        public Integer getProjectLocationID() { return ProjectLocationID; }
        public SchedulableJob setProjectLocationID(Integer value) { this.ProjectLocationID = value; return this; }
        public String getProjectLocationName() { return ProjectLocationName; }
        public SchedulableJob setProjectLocationName(String value) { this.ProjectLocationName = value; return this; }
        public String getLocationZip() { return LocationZip; }
        public SchedulableJob setLocationZip(String value) { this.LocationZip = value; return this; }
        public String getLocationCity() { return LocationCity; }
        public SchedulableJob setLocationCity(String value) { this.LocationCity = value; return this; }
        public BigDecimal getLocationLatitude() { return LocationLatitude; }
        public SchedulableJob setLocationLatitude(BigDecimal value) { this.LocationLatitude = value; return this; }
        public BigDecimal getLocationLongitude() { return LocationLongitude; }
        public SchedulableJob setLocationLongitude(BigDecimal value) { this.LocationLongitude = value; return this; }
        public Date getExpectedStartDate() { return ExpectedStartDate; }
        public SchedulableJob setExpectedStartDate(Date value) { this.ExpectedStartDate = value; return this; }
        public Date getExpectedCompletionDate() { return ExpectedCompletionDate; }
        public SchedulableJob setExpectedCompletionDate(Date value) { this.ExpectedCompletionDate = value; return this; }
        public Boolean getIsRecurring() { return IsRecurring; }
        public SchedulableJob setIsRecurring(Boolean value) { this.IsRecurring = value; return this; }
        public ArrayList<String> getOccurrenceDates() { return OccurrenceDates; }
        public SchedulableJob setOccurrenceDates(ArrayList<String> value) { this.OccurrenceDates = value; return this; }
    }

    public static class ScheduleWorker
    {
        public Integer ContactId = null;
        public String FirstName = null;
        public String LastName = null;
        public String Name = null;
        public String Initials = null;
        public BigDecimal Rate = null;
        public String ImageUrl = null;
        public UUID BranchId = null;
        public String BranchName = null;
        
        public Integer getContactId() { return ContactId; }
        public ScheduleWorker setContactId(Integer value) { this.ContactId = value; return this; }
        public String getFirstName() { return FirstName; }
        public ScheduleWorker setFirstName(String value) { this.FirstName = value; return this; }
        public String getLastName() { return LastName; }
        public ScheduleWorker setLastName(String value) { this.LastName = value; return this; }
        public String getName() { return Name; }
        public ScheduleWorker setName(String value) { this.Name = value; return this; }
        public String getInitials() { return Initials; }
        public ScheduleWorker setInitials(String value) { this.Initials = value; return this; }
        public BigDecimal getRate() { return Rate; }
        public ScheduleWorker setRate(BigDecimal value) { this.Rate = value; return this; }
        public String getImageUrl() { return ImageUrl; }
        public ScheduleWorker setImageUrl(String value) { this.ImageUrl = value; return this; }
        public UUID getBranchId() { return BranchId; }
        public ScheduleWorker setBranchId(UUID value) { this.BranchId = value; return this; }
        public String getBranchName() { return BranchName; }
        public ScheduleWorker setBranchName(String value) { this.BranchName = value; return this; }
    }

    public static class Crew
    {
        public Integer CrewID = null;
        public String CrewName = null;
        public String CrewNumber = null;
        public Integer CrewManagerContactID = null;
        public String CrewManagerContactName = null;
        public String CrewColor = null;
        public Date RecordCreatedDate = null;
        public Boolean Active = null;
        public UUID CreatedByUID = null;
        public Integer ProjectID = null;
        public Integer CrewMemberCount = null;
        public Integer ProjectCrewID = null;
        public String ProjectName = null;
        public UUID BranchId = null;
        public String BranchName = null;
        
        public Integer getCrewID() { return CrewID; }
        public Crew setCrewID(Integer value) { this.CrewID = value; return this; }
        public String getCrewName() { return CrewName; }
        public Crew setCrewName(String value) { this.CrewName = value; return this; }
        public String getCrewNumber() { return CrewNumber; }
        public Crew setCrewNumber(String value) { this.CrewNumber = value; return this; }
        public Integer getCrewManagerContactID() { return CrewManagerContactID; }
        public Crew setCrewManagerContactID(Integer value) { this.CrewManagerContactID = value; return this; }
        public String getCrewManagerContactName() { return CrewManagerContactName; }
        public Crew setCrewManagerContactName(String value) { this.CrewManagerContactName = value; return this; }
        public String getCrewColor() { return CrewColor; }
        public Crew setCrewColor(String value) { this.CrewColor = value; return this; }
        public Date getRecordCreatedDate() { return RecordCreatedDate; }
        public Crew setRecordCreatedDate(Date value) { this.RecordCreatedDate = value; return this; }
        public Boolean isActive() { return Active; }
        public Crew setActive(Boolean value) { this.Active = value; return this; }
        public UUID getCreatedByUID() { return CreatedByUID; }
        public Crew setCreatedByUID(UUID value) { this.CreatedByUID = value; return this; }
        public Integer getProjectID() { return ProjectID; }
        public Crew setProjectID(Integer value) { this.ProjectID = value; return this; }
        public Integer getCrewMemberCount() { return CrewMemberCount; }
        public Crew setCrewMemberCount(Integer value) { this.CrewMemberCount = value; return this; }
        public Integer getProjectCrewID() { return ProjectCrewID; }
        public Crew setProjectCrewID(Integer value) { this.ProjectCrewID = value; return this; }
        public String getProjectName() { return ProjectName; }
        public Crew setProjectName(String value) { this.ProjectName = value; return this; }
        public UUID getBranchId() { return BranchId; }
        public Crew setBranchId(UUID value) { this.BranchId = value; return this; }
        public String getBranchName() { return BranchName; }
        public Crew setBranchName(String value) { this.BranchName = value; return this; }
    }

    public static class ScheduleLastAssignment
    {
        public Integer JobID = null;
        public ArrayList<Integer> ContactIds = new ArrayList<Integer>();
        public Integer SourceCrewID = null;
        
        public Integer getJobID() { return JobID; }
        public ScheduleLastAssignment setJobID(Integer value) { this.JobID = value; return this; }
        public ArrayList<Integer> getContactIds() { return ContactIds; }
        public ScheduleLastAssignment setContactIds(ArrayList<Integer> value) { this.ContactIds = value; return this; }
        public Integer getSourceCrewID() { return SourceCrewID; }
        public ScheduleLastAssignment setSourceCrewID(Integer value) { this.SourceCrewID = value; return this; }
    }

    public static class ScheduleAutoFillResult
    {
        public Integer JobsFilled = null;
        public Integer JobsSkipped = null;
        public Integer VisitsScheduled = null;
        
        public Integer getJobsFilled() { return JobsFilled; }
        public ScheduleAutoFillResult setJobsFilled(Integer value) { this.JobsFilled = value; return this; }
        public Integer getJobsSkipped() { return JobsSkipped; }
        public ScheduleAutoFillResult setJobsSkipped(Integer value) { this.JobsSkipped = value; return this; }
        public Integer getVisitsScheduled() { return VisitsScheduled; }
        public ScheduleAutoFillResult setVisitsScheduled(Integer value) { this.VisitsScheduled = value; return this; }
    }

}

Java ScheduleRangeRequest DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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

GET /v1/schedule/range/{FromDate}/{ToDate} HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"Items":[{"WorkerScheduleItemID":0,"JobID":0,"ProjectID":0,"ContactID":0,"ScheduledDate":"0001-01-01T00:00:00.0000000","SortOrder":0,"SourceCrewID":0,"Status":"String","StartedAt":"0001-01-01T00:00:00.0000000","CompletedAt":"0001-01-01T00:00:00.0000000","WorkerNotes":"String","JobName":"String","ProjectName":"String","FirstName":"String","LastName":"String","WorkerName":"String","SourceCrewName":"String","ProjectLocationID":0,"ProjectLocationName":"String","LocationZip":"String","LocationCity":"String","LocationLatitude":0,"LocationLongitude":0,"JobStatusName":"String","BranchId":"00000000000000000000000000000000","BranchName":"String","WorkerHomeBranchId":"00000000000000000000000000000000","WorkerHomeBranchName":"String"}],"SchedulableJobs":[{"JobID":0,"JobName":"String","ProjectID":0,"ProjectName":"String","StatusID":0,"StatusName":"String","ProjectLocationID":0,"ProjectLocationName":"String","LocationZip":"String","LocationCity":"String","LocationLatitude":0,"LocationLongitude":0,"ExpectedStartDate":"0001-01-01T00:00:00.0000000","ExpectedCompletionDate":"0001-01-01T00:00:00.0000000","IsRecurring":false,"OccurrenceDates":["String"]}],"Workers":[{"ContactId":0,"FirstName":"String","LastName":"String","Name":"String","Initials":"String","Rate":0,"ImageUrl":"String","BranchId":"00000000000000000000000000000000","BranchName":"String"}],"Crews":[{"CrewID":0,"CrewName":"String","CrewNumber":"String","CrewManagerContactID":0,"CrewManagerContactName":"String","CrewColor":"String","RecordCreatedDate":"0001-01-01T00:00:00.0000000","Active":false,"CreatedByUID":"00000000000000000000000000000000","ProjectID":0,"CrewMemberCount":0,"ProjectCrewID":0,"ProjectName":"String","BranchId":"00000000000000000000000000000000","BranchName":"String"}],"BudgetedCrew":[{"ContactId":0,"FirstName":"String","LastName":"String","Name":"String","Initials":"String","Rate":0,"ImageUrl":"String","BranchId":"00000000000000000000000000000000","BranchName":"String"}],"LastAssignment":{"JobID":0,"ContactIds":[0],"SourceCrewID":0},"AutoFill":{"JobsFilled":0,"JobsSkipped":0,"VisitsScheduled":0},"DatesScheduled":0,"WorkersScheduled":0,"ItemsRemoved":0,"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}