Field Squared API Services

<back to all web services

OptimizeScheduleRequest

The following routes are available for this service:
POST/{Workspace}/OptimizeSchedule
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports Field2Office.API.Model.MapRoute
Imports Field2Office.API.Model

Namespace Global

    Namespace Field2Office.API.Model

        Public Partial Class Location
            Public Overridable Property y As Double
            Public Overridable Property x As Double
        End Class
    End Namespace

    Namespace Field2Office.API.Model.MapRoute

        Public Partial Class OptimizeScheduleRequest
            Public Sub New()
                TaskIds = New List(Of String)
            End Sub

            Public Overridable Property Workspace As String
            Public Overridable Property UserId As String
            Public Overridable Property [Date] As String
            Public Overridable Property TaskIds As List(Of String)
            Public Overridable Property RoundStartTimes As Integer
            Public Overridable Property TransitionTime As Integer
            Public Overridable Property StartTime As Nullable(Of Integer)
            Public Overridable Property StartLocation As Location
            Public Overridable Property EndLocation As Location
            Public Overridable Property AllowReorder As Nullable(Of Boolean)
            Public Overridable Property LunchStart As Nullable(Of Integer)
            Public Overridable Property LunchDuration As Nullable(Of Integer)
            Public Overridable Property DebugRequestTime As String
            Public Overridable Property Debug As Boolean
        End Class
    End Namespace
End Namespace

VB.NET OptimizeScheduleRequest 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.

POST /{Workspace}/OptimizeSchedule HTTP/1.1 
Host: dev.fieldsquared.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	Workspace: String,
	UserId: String,
	Date: String,
	TaskIds: 
	[
		String
	],
	RoundStartTimes: 0,
	TransitionTime: 0,
	StartTime: 0,
	StartLocation: 
	{
		y: 0,
		x: 0
	},
	EndLocation: 
	{
		y: 0,
		x: 0
	},
	AllowReorder: False,
	LunchStart: 0,
	LunchDuration: 0,
	DebugRequestTime: String,
	Debug: False
}