| GET,PUT,POST,DELETE | /{Workspace}/LaborItemTemplate |
|---|
namespace Field2Office.API.Model.PricingEngine
open System
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations
type CustomFieldDataType =
| Text = 0
| Number = 1
| Decimal = 2
| Money = 3
| PhoneNumber = 4
| Ssn = 5
| List = 6
| Date = 7
| File = 8
| Barcode = 9
| GPS = 10
| Photo = 11
| Spacer = 12
| Separator = 13
| AutoNumber = 14
| TextArea = 15
| Contact = 16
| User = 17
| Asset = 18
| Checkbox = 19
| CoreAssetList = 20
| CoreTaskList = 21
| CoreParentTask = 22
| CoreContactList = 23
| ComboBox = 24
| DateTime = 25
| Time = 26
| Location = 27
| CoreLocation = 28
| Label = 29
| EventLog = 30
| Address = 31
| Catalog = 32
| CoreTeamList = 33
| Segment = 34
| CoreTimeSeries = 35
| TimeSeries = 36
| Command = 37
| AutoNumberNumeric = 38
| CatalogList = 39
| CatalogComboBox = 40
| DateRange = 41
| DocumentGrid = 42
| ReportLink = 43
| Hyperlink = 44
| PercentComplete = 45
| Chart = 46
| Range = 47
| ExternalId = 48
| AssetCatalog = 49
| Inventory = 50
| CoreTaskLaborItemTypes = 51
| CoreTaskLaborItems = 52
| ObjectList = 53
| CoreTimeZone = 54
[<AllowNullLiteral>]
type CustomField() =
member val Key:String = null with get,set
member val Label:String = null with get,set
member val IsActive:Boolean = new Boolean() with get,set
member val IsReadOnly:Boolean = new Boolean() with get,set
member val IsHidden:Boolean = new Boolean() with get,set
member val IsMandatory:Boolean = new Boolean() with get,set
member val DisplayOnMap:Boolean = new Boolean() with get,set
member val CustomFieldDataType:CustomFieldDataType = new CustomFieldDataType() with get,set
member val Values:String = null with get,set
member val Prompt:String = null with get,set
member val Default:String = null with get,set
member val DefaultAutoUpdate:Boolean = new Boolean() with get,set
member val RequiredIf:String = null with get,set
member val Hidden:ResizeArray<String> = new ResizeArray<String>() with get,set
member val ReadOnly:ResizeArray<String> = new ResizeArray<String>() with get,set
member val ControlArgs:Dictionary<String, Object> = new Dictionary<String, Object>() with get,set
member val IndexSlot:String = null with get,set
member val Index:String = null with get,set
[<AllowNullLiteral>]
type LaborItemTemplate() =
member val ObjectId:String = null with get,set
member val Workspace:String = null with get,set
member val Name:String = null with get,set
member val CustomFields:ResizeArray<CustomField> = new ResizeArray<CustomField>() with get,set
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /{Workspace}/LaborItemTemplate HTTP/1.1
Host: dev.fieldsquared.com
Accept: application/json
Content-Type: application/json
Content-Length: length
{"ObjectId":"String","Workspace":"String","Name":"String","CustomFields":[{"Key":"String","Label":"String","IsActive":false,"IsReadOnly":false,"IsHidden":false,"IsMandatory":false,"DisplayOnMap":false,"CustomFieldDataType":"Text","Values":"String","Prompt":"String","Default":"String","DefaultAutoUpdate":false,"RequiredIf":"String","Hidden":["String"],"ReadOnly":["String"],"ControlArgs":{"String":{}},"IndexSlot":"String","Index":"String"}]}