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

<TaskType xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Field2Office.API.Model.Tasks">
  <ActiveLaborTypes xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:KeyValueOfstringanyType>
      <d2p1:Key>String</d2p1:Key>
      <d2p1:Value />
    </d2p1:KeyValueOfstringanyType>
  </ActiveLaborTypes>
  <AllowOverride>false</AllowOverride>
  <AllowedDocTypes xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>String</d2p1:string>
  </AllowedDocTypes>
  <AutoCreateDocExpressions xmlns:d2p1="http://schemas.datacontract.org/2004/07/Field2Office.DomainObjects.Model">
    <d2p1:AutoCreateDocExpression>
      <d2p1:Document>String</d2p1:Document>
      <d2p1:Expression>String</d2p1:Expression>
      <d2p1:MultipleCopies>false</d2p1:MultipleCopies>
    </d2p1:AutoCreateDocExpression>
  </AutoCreateDocExpressions>
  <AutoCreateDocuments xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>String</d2p1:string>
  </AutoCreateDocuments>
  <AvgTimeToComplete>0</AvgTimeToComplete>
  <DefaultPriority>0</DefaultPriority>
  <DocFilter>false</DocFilter>
  <EditTeams xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>String</d2p1:string>
  </EditTeams>
  <Icon>String</Icon>
  <Inactive>false</Inactive>
  <IndividualUserStatuses>false</IndividualUserStatuses>
  <InheritAssetTeams>false</InheritAssetTeams>
  <InheritContactTeams>false</InheritContactTeams>
  <LockOption>false</LockOption>
  <MaxTimeToComplete>0</MaxTimeToComplete>
  <MinTimeToComplete>0</MinTimeToComplete>
  <PTO>false</PTO>
  <PercentCompleteType>String</PercentCompleteType>
  <RequiredAssets xmlns:d2p1="http://schemas.datacontract.org/2004/07/Field2Office.DomainObjects.Model">
    <d2p1:RequiredAsset>
      <d2p1:Number>0</d2p1:Number>
      <d2p1:Type>String</d2p1:Type>
    </d2p1:RequiredAsset>
  </RequiredAssets>
  <RequiredInventoryTypes xmlns:d2p1="http://schemas.datacontract.org/2004/07/Field2Office.DomainObjects.Model">
    <d2p1:RequiredInventoryType>
      <d2p1:Description>String</d2p1:Description>
      <d2p1:IsSerialized>false</d2p1:IsSerialized>
      <d2p1:Name>String</d2p1:Name>
      <d2p1:Number>0</d2p1:Number>
      <d2p1:Type>String</d2p1:Type>
    </d2p1:RequiredInventoryType>
  </RequiredInventoryTypes>
  <RequiredUsers xmlns:d2p1="http://schemas.datacontract.org/2004/07/Field2Office.DomainObjects.Model">
    <d2p1:RequiredUser>
      <d2p1:Number>0</d2p1:Number>
      <d2p1:SkillTags xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>String</d4p1:string>
      </d2p1:SkillTags>
    </d2p1:RequiredUser>
  </RequiredUsers>
  <ShowRelatedDocs>false</ShowRelatedDocs>
  <SkillTags xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>String</d2p1:string>
  </SkillTags>
  <Template>String</Template>
  <Type>String</Type>
  <UseJobTimers>false</UseJobTimers>
  <UseRequired>false</UseRequired>
  <Workspace>String</Workspace>
</TaskType>