Field Squared API Services

<back to all web services

TaskType

The following routes are available for this service:
GET, POST, DELETE/{Workspace}/TaskType/{Type}
GET/{Workspace}/TaskType
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using Field2Office.API.Model.Tasks;
using Field2Office.DomainObjects.Model;

namespace Field2Office.API.Model.Tasks
{
    public partial class TaskType
    {
        public TaskType()
        {
            SkillTags = new List<string>{};
            AllowedDocTypes = new List<string>{};
            AutoCreateDocuments = new List<string>{};
            EditTeams = new List<string>{};
            RequiredAssets = new List<RequiredAsset>{};
            RequiredInventoryTypes = new List<RequiredInventoryType>{};
            RequiredUsers = new List<RequiredUser>{};
            ActiveLaborTypes = new Dictionary<string, Object>{};
            AutoCreateDocExpressions = new List<AutoCreateDocExpression>{};
        }

        public virtual string Workspace { get; set; }
        public virtual string Type { get; set; }
        public virtual string Icon { get; set; }
        public virtual List<string> SkillTags { get; set; }
        public virtual double MinTimeToComplete { get; set; }
        public virtual double AvgTimeToComplete { get; set; }
        public virtual double MaxTimeToComplete { get; set; }
        public virtual string Template { get; set; }
        public virtual bool DocFilter { get; set; }
        public virtual bool ShowRelatedDocs { get; set; }
        public virtual List<string> AllowedDocTypes { get; set; }
        public virtual int? DefaultPriority { get; set; }
        public virtual bool Inactive { get; set; }
        public virtual List<string> AutoCreateDocuments { get; set; }
        public virtual string PercentCompleteType { get; set; }
        public virtual bool UseJobTimers { get; set; }
        public virtual bool InheritAssetTeams { get; set; }
        public virtual bool InheritContactTeams { get; set; }
        public virtual List<string> EditTeams { get; set; }
        public virtual bool UseRequired { get; set; }
        public virtual bool AllowOverride { get; set; }
        public virtual List<RequiredAsset> RequiredAssets { get; set; }
        public virtual List<RequiredInventoryType> RequiredInventoryTypes { get; set; }
        public virtual List<RequiredUser> RequiredUsers { get; set; }
        public virtual Dictionary<string, Object> ActiveLaborTypes { get; set; }
        public virtual bool IndividualUserStatuses { get; set; }
        public virtual bool LockOption { get; set; }
        public virtual List<AutoCreateDocExpression> AutoCreateDocExpressions { get; set; }
        public virtual bool PTO { get; set; }
    }

}

namespace Field2Office.DomainObjects.Model
{
    public partial class AutoCreateDocExpression
    {
        public virtual string Document { get; set; }
        public virtual string Expression { get; set; }
        public virtual bool MultipleCopies { get; set; }
    }

    public partial class RequiredAsset
    {
        public virtual int Number { get; set; }
        public virtual string Type { get; set; }
    }

    public partial class RequiredInventoryType
    {
        public virtual int Number { get; set; }
        public virtual string Type { get; set; }
        public virtual string Name { get; set; }
        public virtual bool IsSerialized { get; set; }
        public virtual string Description { get; set; }
    }

    public partial class RequiredUser
    {
        public RequiredUser()
        {
            SkillTags = new List<string>{};
        }

        public virtual int Number { get; set; }
        public virtual List<string> SkillTags { get; set; }
    }

}

C# TaskType 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}/TaskType/{Type} HTTP/1.1 
Host: dev.fieldsquared.com 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"Workspace":"String","Type":"String","Icon":"String","SkillTags":["String"],"MinTimeToComplete":0,"AvgTimeToComplete":0,"MaxTimeToComplete":0,"Template":"String","DocFilter":false,"ShowRelatedDocs":false,"AllowedDocTypes":["String"],"DefaultPriority":0,"Inactive":false,"AutoCreateDocuments":["String"],"PercentCompleteType":"String","UseJobTimers":false,"InheritAssetTeams":false,"InheritContactTeams":false,"EditTeams":["String"],"UseRequired":false,"AllowOverride":false,"RequiredAssets":[{"Number":0,"Type":"String"}],"RequiredInventoryTypes":[{"Number":0,"Type":"String","Name":"String","IsSerialized":false,"Description":"String"}],"RequiredUsers":[{"Number":0,"SkillTags":["String"]}],"ActiveLaborTypes":{"String":{}},"IndividualUserStatuses":false,"LockOption":false,"AutoCreateDocExpressions":[{"Document":"String","Expression":"String","MultipleCopies":false}],"PTO":false}