| GET,OPTIONS | /v1/visits/board |
|---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
public static class VisitBoardRequest
{
public String Date = null;
public String getDate() { return Date; }
public VisitBoardRequest setDate(String value) { this.Date = value; return this; }
}
public static class VisitBoardResponse
{
public String Date = null;
public ArrayList<CrewColumn> Crews = new ArrayList<CrewColumn>();
public ArrayList<VisitCard> Unassigned = new ArrayList<VisitCard>();
public BoardReadiness Readiness = null;
public ResponseStatus ResponseStatus = null;
public String getDate() { return Date; }
public VisitBoardResponse setDate(String value) { this.Date = value; return this; }
public ArrayList<CrewColumn> getCrews() { return Crews; }
public VisitBoardResponse setCrews(ArrayList<CrewColumn> value) { this.Crews = value; return this; }
public ArrayList<VisitCard> getUnassigned() { return Unassigned; }
public VisitBoardResponse setUnassigned(ArrayList<VisitCard> value) { this.Unassigned = value; return this; }
public BoardReadiness getReadiness() { return Readiness; }
public VisitBoardResponse setReadiness(BoardReadiness value) { this.Readiness = value; return this; }
public ResponseStatus getResponseStatus() { return ResponseStatus; }
public VisitBoardResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
}
public static class CrewColumn
{
public Integer CrewID = null;
public String CrewName = null;
public String CrewColor = null;
public Integer MemberCount = null;
public ArrayList<VisitCard> Visits = new ArrayList<VisitCard>();
public Double DriveMiles = null;
public Integer DriveMinutes = null;
public Integer OnSiteMinutes = null;
public Integer BillablePct = null;
public Integer getCrewID() { return CrewID; }
public CrewColumn setCrewID(Integer value) { this.CrewID = value; return this; }
public String getCrewName() { return CrewName; }
public CrewColumn setCrewName(String value) { this.CrewName = value; return this; }
public String getCrewColor() { return CrewColor; }
public CrewColumn setCrewColor(String value) { this.CrewColor = value; return this; }
public Integer getMemberCount() { return MemberCount; }
public CrewColumn setMemberCount(Integer value) { this.MemberCount = value; return this; }
public ArrayList<VisitCard> getVisits() { return Visits; }
public CrewColumn setVisits(ArrayList<VisitCard> value) { this.Visits = value; return this; }
public Double getDriveMiles() { return DriveMiles; }
public CrewColumn setDriveMiles(Double value) { this.DriveMiles = value; return this; }
public Integer getDriveMinutes() { return DriveMinutes; }
public CrewColumn setDriveMinutes(Integer value) { this.DriveMinutes = value; return this; }
public Integer getOnSiteMinutes() { return OnSiteMinutes; }
public CrewColumn setOnSiteMinutes(Integer value) { this.OnSiteMinutes = value; return this; }
public Integer getBillablePct() { return BillablePct; }
public CrewColumn setBillablePct(Integer value) { this.BillablePct = value; return this; }
}
public static class VisitCard
{
public String VisitKey = null;
public Integer JobID = null;
public Integer ProjectID = null;
public String ProjectUID = null;
public Integer AgreementJobID = null;
public String ScheduledDate = null;
public String CustomerName = null;
public String JobName = null;
public String LocationName = null;
public String City = null;
public String Zip = null;
public Double Lat = null;
public Double Lng = null;
public Integer CrewID = null;
public String CrewName = null;
public Integer SortOrder = null;
public String Status = null;
public Integer DurationMinutes = null;
public String EtaWindow = null;
public Boolean IsCommercial = null;
public String getVisitKey() { return VisitKey; }
public VisitCard setVisitKey(String value) { this.VisitKey = value; return this; }
public Integer getJobID() { return JobID; }
public VisitCard setJobID(Integer value) { this.JobID = value; return this; }
public Integer getProjectID() { return ProjectID; }
public VisitCard setProjectID(Integer value) { this.ProjectID = value; return this; }
public String getProjectUID() { return ProjectUID; }
public VisitCard setProjectUID(String value) { this.ProjectUID = value; return this; }
public Integer getAgreementJobID() { return AgreementJobID; }
public VisitCard setAgreementJobID(Integer value) { this.AgreementJobID = value; return this; }
public String getScheduledDate() { return ScheduledDate; }
public VisitCard setScheduledDate(String value) { this.ScheduledDate = value; return this; }
public String getCustomerName() { return CustomerName; }
public VisitCard setCustomerName(String value) { this.CustomerName = value; return this; }
public String getJobName() { return JobName; }
public VisitCard setJobName(String value) { this.JobName = value; return this; }
public String getLocationName() { return LocationName; }
public VisitCard setLocationName(String value) { this.LocationName = value; return this; }
public String getCity() { return City; }
public VisitCard setCity(String value) { this.City = value; return this; }
public String getZip() { return Zip; }
public VisitCard setZip(String value) { this.Zip = value; return this; }
public Double getLat() { return Lat; }
public VisitCard setLat(Double value) { this.Lat = value; return this; }
public Double getLng() { return Lng; }
public VisitCard setLng(Double value) { this.Lng = value; return this; }
public Integer getCrewID() { return CrewID; }
public VisitCard setCrewID(Integer value) { this.CrewID = value; return this; }
public String getCrewName() { return CrewName; }
public VisitCard setCrewName(String value) { this.CrewName = value; return this; }
public Integer getSortOrder() { return SortOrder; }
public VisitCard setSortOrder(Integer value) { this.SortOrder = value; return this; }
public String getStatus() { return Status; }
public VisitCard setStatus(String value) { this.Status = value; return this; }
public Integer getDurationMinutes() { return DurationMinutes; }
public VisitCard setDurationMinutes(Integer value) { this.DurationMinutes = value; return this; }
public String getEtaWindow() { return EtaWindow; }
public VisitCard setEtaWindow(String value) { this.EtaWindow = value; return this; }
public Boolean getIsCommercial() { return IsCommercial; }
public VisitCard setIsCommercial(Boolean value) { this.IsCommercial = value; return this; }
}
public static class BoardReadiness
{
public Integer TotalVisits = null;
public Integer Assigned = null;
public Integer Unassigned = null;
public Integer Conflicts = null;
public Integer AssignedPct = null;
public Integer getTotalVisits() { return TotalVisits; }
public BoardReadiness setTotalVisits(Integer value) { this.TotalVisits = value; return this; }
public Integer getAssigned() { return Assigned; }
public BoardReadiness setAssigned(Integer value) { this.Assigned = value; return this; }
public Integer getUnassigned() { return Unassigned; }
public BoardReadiness setUnassigned(Integer value) { this.Unassigned = value; return this; }
public Integer getConflicts() { return Conflicts; }
public BoardReadiness setConflicts(Integer value) { this.Conflicts = value; return this; }
public Integer getAssignedPct() { return AssignedPct; }
public BoardReadiness setAssignedPct(Integer value) { this.AssignedPct = value; return this; }
}
}
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/visits/board HTTP/1.1 Host: api.dev.dynamics.trendsic.com Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
Date: String,
Crews:
[
{
CrewID: 0,
CrewName: String,
CrewColor: String,
MemberCount: 0,
Visits:
[
{
VisitKey: String,
JobID: 0,
ProjectID: 0,
ProjectUID: String,
AgreementJobID: 0,
ScheduledDate: String,
CustomerName: String,
JobName: String,
LocationName: String,
City: String,
Zip: String,
Lat: 0,
Lng: 0,
CrewID: 0,
CrewName: String,
SortOrder: 0,
Status: String,
DurationMinutes: 0,
EtaWindow: String,
IsCommercial: False
}
],
DriveMiles: 0,
DriveMinutes: 0,
OnSiteMinutes: 0,
BillablePct: 0
}
],
Unassigned:
[
{
VisitKey: String,
JobID: 0,
ProjectID: 0,
ProjectUID: String,
AgreementJobID: 0,
ScheduledDate: String,
CustomerName: String,
JobName: String,
LocationName: String,
City: String,
Zip: String,
Lat: 0,
Lng: 0,
CrewID: 0,
CrewName: String,
SortOrder: 0,
Status: String,
DurationMinutes: 0,
EtaWindow: String,
IsCommercial: False
}
],
Readiness:
{
TotalVisits: 0,
Assigned: 0,
Unassigned: 0,
Conflicts: 0,
AssignedPct: 0
},
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
}
}