Field Squared API Services

<back to all web services

ProposeRouteRequest

The following routes are available for this service:
POST/{Workspace}/ProposeRoute
import java.math.*;
import java.util.*;
import net.servicestack.client.*;

public class dtos
{

    public static class ProposeRouteRequest
    {
        public String Workspace = null;
        public ArrayList<RouteNode> Nodes = null;
        public Boolean AllowReorder = null;
        public Location StartLocation = null;
        public Location EndLocation = null;
        public Boolean ShortestDistance = null;
        public String StartTime = null;
        public Boolean StartClockAtFirstNode = null;
        public Integer RoundStartTimes = null;
        public Integer TransitionTime = null;
        public String LunchStart = null;
        public Integer LunchDuration = null;
        public Integer Time = null;
        public Integer RealTime = null;
        public Double Distance = null;
        
        public String getWorkspace() { return Workspace; }
        public ProposeRouteRequest setWorkspace(String value) { this.Workspace = value; return this; }
        public ArrayList<RouteNode> getNodes() { return Nodes; }
        public ProposeRouteRequest setNodes(ArrayList<RouteNode> value) { this.Nodes = value; return this; }
        public Boolean isAllowReorder() { return AllowReorder; }
        public ProposeRouteRequest setAllowReorder(Boolean value) { this.AllowReorder = value; return this; }
        public Location getStartLocation() { return StartLocation; }
        public ProposeRouteRequest setStartLocation(Location value) { this.StartLocation = value; return this; }
        public Location getEndLocation() { return EndLocation; }
        public ProposeRouteRequest setEndLocation(Location value) { this.EndLocation = value; return this; }
        public Boolean isShortestDistance() { return ShortestDistance; }
        public ProposeRouteRequest setShortestDistance(Boolean value) { this.ShortestDistance = value; return this; }
        public String getStartTime() { return StartTime; }
        public ProposeRouteRequest setStartTime(String value) { this.StartTime = value; return this; }
        public Boolean isStartClockAtFirstNode() { return StartClockAtFirstNode; }
        public ProposeRouteRequest setStartClockAtFirstNode(Boolean value) { this.StartClockAtFirstNode = value; return this; }
        public Integer getRoundStartTimes() { return RoundStartTimes; }
        public ProposeRouteRequest setRoundStartTimes(Integer value) { this.RoundStartTimes = value; return this; }
        public Integer getTransitionTime() { return TransitionTime; }
        public ProposeRouteRequest setTransitionTime(Integer value) { this.TransitionTime = value; return this; }
        public String getLunchStart() { return LunchStart; }
        public ProposeRouteRequest setLunchStart(String value) { this.LunchStart = value; return this; }
        public Integer getLunchDuration() { return LunchDuration; }
        public ProposeRouteRequest setLunchDuration(Integer value) { this.LunchDuration = value; return this; }
        public Integer getTime() { return Time; }
        public ProposeRouteRequest setTime(Integer value) { this.Time = value; return this; }
        public Integer getRealTime() { return RealTime; }
        public ProposeRouteRequest setRealTime(Integer value) { this.RealTime = value; return this; }
        public Double getDistance() { return Distance; }
        public ProposeRouteRequest setDistance(Double value) { this.Distance = value; return this; }
    }

    public static class RouteNode extends ClassedItem
    {
        public Location Location = null;
        public Integer StopTime = null;
        public Schedule Schedule = null;
        public String Name = null;
        
        public Location getLocation() { return Location; }
        public RouteNode setLocation(Location value) { this.Location = value; return this; }
        public Integer getStopTime() { return StopTime; }
        public RouteNode setStopTime(Integer value) { this.StopTime = value; return this; }
        public Schedule getSchedule() { return Schedule; }
        public RouteNode setSchedule(Schedule value) { this.Schedule = value; return this; }
        public String getName() { return Name; }
        public RouteNode setName(String value) { this.Name = value; return this; }
    }

    public static class ClassedItem
    {
        public String ObjectId = null;
        public String Class = null;
        public String VersionId = null;
        public ArrayList<String> Ancestors = null;
        public String Type = null;
        
        public String getObjectId() { return ObjectId; }
        public ClassedItem setObjectId(String value) { this.ObjectId = value; return this; }
        public String getClass() { return Class; }
        public ClassedItem setClass(String value) { this.Class = value; return this; }
        public String getVersionId() { return VersionId; }
        public ClassedItem setVersionId(String value) { this.VersionId = value; return this; }
        public ArrayList<String> getAncestors() { return Ancestors; }
        public ClassedItem setAncestors(ArrayList<String> value) { this.Ancestors = value; return this; }
        public String getType() { return Type; }
        public ClassedItem setType(String value) { this.Type = value; return this; }
    }

    public static class Location
    {
        public Double y = null;
        public Double x = null;
        
        public Double getY() { return y; }
        public Location setY(Double value) { this.y = value; return this; }
        public Double getX() { return x; }
        public Location setX(Double value) { this.x = value; return this; }
    }

    public static class Schedule
    {
        public String Workspace = null;
        public String ObjectId = null;
        public String VersionId = null;
        public String BasedOn = null;
        public String Start = null;
        public String End = null;
        public String TimeZone = null;
        public ArrayList<String> Users = null;
        public ArrayList<String> Teams = null;
        public HashMap<String,Object> Data = null;
        
        public String getWorkspace() { return Workspace; }
        public Schedule setWorkspace(String value) { this.Workspace = value; return this; }
        public String getObjectId() { return ObjectId; }
        public Schedule setObjectId(String value) { this.ObjectId = value; return this; }
        public String getVersionId() { return VersionId; }
        public Schedule setVersionId(String value) { this.VersionId = value; return this; }
        public String getBasedOn() { return BasedOn; }
        public Schedule setBasedOn(String value) { this.BasedOn = value; return this; }
        public String getStart() { return Start; }
        public Schedule setStart(String value) { this.Start = value; return this; }
        public String getEnd() { return End; }
        public Schedule setEnd(String value) { this.End = value; return this; }
        public String getTimeZone() { return TimeZone; }
        public Schedule setTimeZone(String value) { this.TimeZone = value; return this; }
        public ArrayList<String> getUsers() { return Users; }
        public Schedule setUsers(ArrayList<String> value) { this.Users = value; return this; }
        public ArrayList<String> getTeams() { return Teams; }
        public Schedule setTeams(ArrayList<String> value) { this.Teams = value; return this; }
        public HashMap<String,Object> getData() { return Data; }
        public Schedule setData(HashMap<String,Object> value) { this.Data = value; return this; }
    }

}

Java ProposeRouteRequest 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.

POST /{Workspace}/ProposeRoute HTTP/1.1 
Host: dev.fieldsquared.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<ProposeRouteRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Field2Office.API.Model.MapRoute">
  <AllowReorder>false</AllowReorder>
  <Distance>0</Distance>
  <EndLocation xmlns:d2p1="http://schemas.datacontract.org/2004/07/Field2Office.API.Model">
    <d2p1:x>0</d2p1:x>
    <d2p1:y>0</d2p1:y>
  </EndLocation>
  <LunchDuration>0</LunchDuration>
  <LunchStart>String</LunchStart>
  <Nodes>
    <RouteNode>
      <Ancestors xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns="http://schemas.datacontract.org/2004/07/Field2Office.DomainObjects.Model">
        <d4p1:string>String</d4p1:string>
      </Ancestors>
      <Class xmlns="http://schemas.datacontract.org/2004/07/Field2Office.DomainObjects.Model">String</Class>
      <ObjectId xmlns="http://schemas.datacontract.org/2004/07/Field2Office.DomainObjects.Model">String</ObjectId>
      <Type xmlns="http://schemas.datacontract.org/2004/07/Field2Office.DomainObjects.Model">String</Type>
      <VersionId xmlns="http://schemas.datacontract.org/2004/07/Field2Office.DomainObjects.Model">String</VersionId>
      <Location xmlns:d4p1="http://schemas.datacontract.org/2004/07/Field2Office.API.Model">
        <d4p1:x>0</d4p1:x>
        <d4p1:y>0</d4p1:y>
      </Location>
      <Name>String</Name>
      <Schedule xmlns:d4p1="http://schemas.datacontract.org/2004/07/Field2Office.API.Model.Schedules">
        <d4p1:BasedOn>String</d4p1:BasedOn>
        <d4p1:Data xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:KeyValueOfstringanyType>
            <d5p1:Key>String</d5p1:Key>
            <d5p1:Value />
          </d5p1:KeyValueOfstringanyType>
        </d4p1:Data>
        <d4p1:End>String</d4p1:End>
        <d4p1:ObjectId>String</d4p1:ObjectId>
        <d4p1:Start>String</d4p1:Start>
        <d4p1:Teams xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:string>String</d5p1:string>
        </d4p1:Teams>
        <d4p1:TimeZone>String</d4p1:TimeZone>
        <d4p1:Users xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:string>String</d5p1:string>
        </d4p1:Users>
        <d4p1:VersionId>String</d4p1:VersionId>
        <d4p1:Workspace>String</d4p1:Workspace>
      </Schedule>
      <StopTime>0</StopTime>
    </RouteNode>
  </Nodes>
  <RealTime>0</RealTime>
  <RoundStartTimes>0</RoundStartTimes>
  <ShortestDistance>false</ShortestDistance>
  <StartClockAtFirstNode>false</StartClockAtFirstNode>
  <StartLocation xmlns:d2p1="http://schemas.datacontract.org/2004/07/Field2Office.API.Model">
    <d2p1:x>0</d2p1:x>
    <d2p1:y>0</d2p1:y>
  </StartLocation>
  <StartTime>String</StartTime>
  <Time>0</Time>
  <TransitionTime>0</TransitionTime>
  <Workspace>String</Workspace>
</ProposeRouteRequest>