Field Squared API Services

<back to all web services

Team

Represents a DTO for a team in a workspace. Calls without an ObjectId will retrieve an array of all team objects for the workspace.

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


/**
* Represents a DTO for a team in a workspace. Calls without an ObjectId will retrieve an array of all team objects for the workspace.
*/
open class Team
{
    var Workspace:String? = null
    var TimeZone:String? = null
    var ObjectId:String? = null
    var ExternalId:String? = null
    var VersionId:String? = null
    var BasedOn:String? = null
    var Name:String? = null
    var Enabled:Boolean? = null
    var Members:ArrayList<DomainItem> = ArrayList<DomainItem>()
    var Lead:DomainItem? = null
    var Parent:DomainItem? = null
    var Address:Address? = null
    var Data:HashMap<String,String> = HashMap<String,String>()
    var Teams:ArrayList<String> = ArrayList<String>()
    var Events:ArrayList<EventItem> = ArrayList<EventItem>()
    var CreatedBy:String? = null
    var ActiveLaborTypes:HashMap<String,Object> = HashMap<String,Object>()
}

open class DomainItem
{
    var Workspace:String? = null
    var ObjectId:String? = null
    var VersionId:String? = null
    var LastUpdated:String? = null
}

open class Address
{
    var Street:String? = null
    var Unit:String? = null
    var City:String? = null
    var State:String? = null
    var Zip:String? = null
    var ContactTitle:String? = null
    var ContactName:String? = null
    var ContactPhone:String? = null
    var ContactEmail:String? = null
    var Location:Location? = null
    var SiteName:String? = null
    var GeocodeFailed:Boolean? = null
    var Country:String? = null
}

open class Location
{
    var y:Double? = null
    var x:Double? = null
}

open class EventItem
{
    var ObjectId:String? = null
    var Date:String? = null
    var Location:Location? = null
    var Barcode:String? = null
    var Details:String? = null
    var Type:String? = null
    var IsScan:Boolean? = null
    var User:String? = null
    var SelectedBy:String? = null
    var Status:String? = null
    var StatusType:String? = null
    var DateCreated:String? = null
    var Automatic:Boolean? = null
}

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

{"Workspace":"String","TimeZone":"String","ObjectId":"String","ExternalId":"String","VersionId":"String","BasedOn":"String","Name":"String","Enabled":false,"Members":[{"Workspace":"String","ObjectId":"String","VersionId":"String","LastUpdated":"String"}],"Lead":{"Workspace":"String","ObjectId":"String","VersionId":"String","LastUpdated":"String"},"Parent":{"Workspace":"String","ObjectId":"String","VersionId":"String","LastUpdated":"String"},"Address":{"Street":"String","Unit":"String","City":"String","State":"String","Zip":"String","ContactTitle":"String","ContactName":"String","ContactPhone":"String","ContactEmail":"String","Location":{"y":0,"x":0},"SiteName":"String","GeocodeFailed":false,"Country":"String"},"Data":{"String":"String"},"Teams":["String"],"Events":[{"ObjectId":"String","Date":"String","Location":{"y":0,"x":0},"Barcode":"String","Details":"String","Type":"String","IsScan":false,"User":"String","SelectedBy":"String","Status":"String","StatusType":"String","DateCreated":"String","Automatic":false}],"CreatedBy":"String","ActiveLaborTypes":{"String":{}}}