Field Squared API Services

<back to all web services

OptimizeScheduleRequest

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

namespace Field2Office.API.Model
{
    public partial class Location
    {
        public virtual double y { get; set; }
        public virtual double x { get; set; }
    }

}

namespace Field2Office.API.Model.MapRoute
{
    public partial class OptimizeScheduleRequest
    {
        public OptimizeScheduleRequest()
        {
            TaskIds = new List<string>{};
        }

        public virtual string Workspace { get; set; }
        public virtual string UserId { get; set; }
        public virtual string Date { get; set; }
        public virtual List<string> TaskIds { get; set; }
        public virtual int RoundStartTimes { get; set; }
        public virtual int TransitionTime { get; set; }
        public virtual int? StartTime { get; set; }
        public virtual Location StartLocation { get; set; }
        public virtual Location EndLocation { get; set; }
        public virtual bool? AllowReorder { get; set; }
        public virtual int? LunchStart { get; set; }
        public virtual int? LunchDuration { get; set; }
        public virtual string DebugRequestTime { get; set; }
        public virtual bool Debug { get; set; }
    }

}

C# OptimizeScheduleRequest DTOs

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

HTTP + CSV

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/csv
Content-Type: text/csv
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}