Field Squared API Services

<back to all web services

DriveTimeBatch

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

public class dtos
{

    public static class DriveTimeBatch
    {
        public ArrayList<DriveTime> DriveTimes = null;
        public String Workspace = null;
        
        public ArrayList<DriveTime> getDriveTimes() { return DriveTimes; }
        public DriveTimeBatch setDriveTimes(ArrayList<DriveTime> value) { this.DriveTimes = value; return this; }
        public String getWorkspace() { return Workspace; }
        public DriveTimeBatch setWorkspace(String value) { this.Workspace = value; return this; }
    }

    public static class DriveTime
    {
        public String Workspace = null;
        public Location StartLoc = null;
        public Location EndLoc = null;
        public Double Duration = null;
        public Double Distance = null;
        public String Error = null;
        public String UserId = null;
        public String EndScheduleId = null;
        public Integer TimeBetweenSchedules = null;
        
        public String getWorkspace() { return Workspace; }
        public DriveTime setWorkspace(String value) { this.Workspace = value; return this; }
        public Location getStartLoc() { return StartLoc; }
        public DriveTime setStartLoc(Location value) { this.StartLoc = value; return this; }
        public Location getEndLoc() { return EndLoc; }
        public DriveTime setEndLoc(Location value) { this.EndLoc = value; return this; }
        public Double getDuration() { return Duration; }
        public DriveTime setDuration(Double value) { this.Duration = value; return this; }
        public Double getDistance() { return Distance; }
        public DriveTime setDistance(Double value) { this.Distance = value; return this; }
        public String getError() { return Error; }
        public DriveTime setError(String value) { this.Error = value; return this; }
        public String getUserId() { return UserId; }
        public DriveTime setUserId(String value) { this.UserId = value; return this; }
        public String getEndScheduleId() { return EndScheduleId; }
        public DriveTime setEndScheduleId(String value) { this.EndScheduleId = value; return this; }
        public Integer getTimeBetweenSchedules() { return TimeBetweenSchedules; }
        public DriveTime setTimeBetweenSchedules(Integer value) { this.TimeBetweenSchedules = 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; }
    }

}

Java DriveTimeBatch 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}/DriveTimeBatch HTTP/1.1 
Host: dev.fieldsquared.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<DriveTimeBatch xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Field2Office.API.Model.Geocoding">
  <DriveTimes>
    <DriveTime>
      <Distance>0</Distance>
      <Duration>0</Duration>
      <EndLoc xmlns:d4p1="http://schemas.datacontract.org/2004/07/Field2Office.API.Model">
        <d4p1:x>0</d4p1:x>
        <d4p1:y>0</d4p1:y>
      </EndLoc>
      <EndScheduleId>String</EndScheduleId>
      <Error>String</Error>
      <StartLoc xmlns:d4p1="http://schemas.datacontract.org/2004/07/Field2Office.API.Model">
        <d4p1:x>0</d4p1:x>
        <d4p1:y>0</d4p1:y>
      </StartLoc>
      <TimeBetweenSchedules>0</TimeBetweenSchedules>
      <UserId>String</UserId>
      <Workspace>String</Workspace>
    </DriveTime>
  </DriveTimes>
  <Workspace>String</Workspace>
</DriveTimeBatch>