Field Squared API Services

<back to all web services

DriveTime

The following routes are available for this service:
GET/{Workspace}/DriveTime
import Foundation
import ServiceStack

public class DriveTime : Codable
{
    public var workspace:String
    public var startLoc:Location
    public var endLoc:Location
    public var duration:Double
    public var distance:Double
    public var error:String
    public var userId:String
    public var endScheduleId:String
    public var timeBetweenSchedules:Int

    required public init(){}
}

public class Location : Codable
{
    public var y:Double
    public var x:Double

    required public init(){}
}


Swift DriveTime DTOs

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

HTTP + JSV

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

GET /{Workspace}/DriveTime HTTP/1.1 
Host: dev.fieldsquared.com 
Accept: text/jsv