Field Squared API Services

<back to all web services

InventoryItemTemplate

The following routes are available for this service:
GET,PUT,POST,DELETE/{Workspace}/InventoryItemTemplate
import java.math.*
import java.util.*
import net.servicestack.client.*


open class InventoryItemTemplate
{
    var ObjectId:String? = null
    var Workspace:String? = null
    var Name:String? = null
    var CustomFields:ArrayList<CustomField> = ArrayList<CustomField>()
}

open class CustomField
{
    var Key:String? = null
    var Label:String? = null
    var IsActive:Boolean? = null
    var IsReadOnly:Boolean? = null
    var IsHidden:Boolean? = null
    var IsMandatory:Boolean? = null
    var DisplayOnMap:Boolean? = null
    var CustomFieldDataType:CustomFieldDataType? = null
    var Values:String? = null
    var Prompt:String? = null
    var Default:String? = null
    var DefaultAutoUpdate:Boolean? = null
    var RequiredIf:String? = null
    var Hidden:ArrayList<String> = ArrayList<String>()
    var ReadOnly:ArrayList<String> = ArrayList<String>()
    var ControlArgs:HashMap<String,Object> = HashMap<String,Object>()
    var IndexSlot:String? = null
    var Index:String? = null
}

enum class CustomFieldDataType
{
    Text,
    Number,
    Decimal,
    Money,
    PhoneNumber,
    Ssn,
    List,
    Date,
    File,
    Barcode,
    Gps,
    Photo,
    Spacer,
    Separator,
    AutoNumber,
    TextArea,
    Contact,
    User,
    Asset,
    Checkbox,
    CoreAssetList,
    CoreTaskList,
    CoreParentTask,
    CoreContactList,
    ComboBox,
    DateTime,
    Time,
    Location,
    CoreLocation,
    Label,
    EventLog,
    Address,
    Catalog,
    CoreTeamList,
    Segment,
    CoreTimeSeries,
    TimeSeries,
    Command,
    AutoNumberNumeric,
    CatalogList,
    CatalogComboBox,
    DateRange,
    DocumentGrid,
    ReportLink,
    Hyperlink,
    PercentComplete,
    Chart,
    Range,
    ExternalId,
    AssetCatalog,
    Inventory,
    CoreTaskLaborItemTypes,
    CoreTaskLaborItems,
    ObjectList,
    CoreTimeZone,
}

Kotlin InventoryItemTemplate DTOs

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

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /{Workspace}/InventoryItemTemplate 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"}]}