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.*;

public class dtos
{

    /**
    * Represents a DTO for a team in a workspace. Calls without an ObjectId will retrieve an array of all team objects for the workspace.
    */
    public static class Team
    {
        public String Workspace = null;
        public String TimeZone = null;
        public String ObjectId = null;
        public String ExternalId = null;
        public String VersionId = null;
        public String BasedOn = null;
        public String Name = null;
        public Boolean Enabled = null;
        public ArrayList<DomainItem> Members = null;
        public DomainItem Lead = null;
        public DomainItem Parent = null;
        public Address Address = null;
        public HashMap<String,String> Data = null;
        public ArrayList<String> Teams = null;
        public ArrayList<EventItem> Events = null;
        public String CreatedBy = null;
        public HashMap<String,Object> ActiveLaborTypes = null;
        
        public String getWorkspace() { return Workspace; }
        public Team setWorkspace(String value) { this.Workspace = value; return this; }
        public String getTimeZone() { return TimeZone; }
        public Team setTimeZone(String value) { this.TimeZone = value; return this; }
        public String getObjectId() { return ObjectId; }
        public Team setObjectId(String value) { this.ObjectId = value; return this; }
        public String getExternalId() { return ExternalId; }
        public Team setExternalId(String value) { this.ExternalId = value; return this; }
        public String getVersionId() { return VersionId; }
        public Team setVersionId(String value) { this.VersionId = value; return this; }
        public String getBasedOn() { return BasedOn; }
        public Team setBasedOn(String value) { this.BasedOn = value; return this; }
        public String getName() { return Name; }
        public Team setName(String value) { this.Name = value; return this; }
        public Boolean isEnabled() { return Enabled; }
        public Team setEnabled(Boolean value) { this.Enabled = value; return this; }
        public ArrayList<DomainItem> getMembers() { return Members; }
        public Team setMembers(ArrayList<DomainItem> value) { this.Members = value; return this; }
        public DomainItem getLead() { return Lead; }
        public Team setLead(DomainItem value) { this.Lead = value; return this; }
        public DomainItem getParent() { return Parent; }
        public Team setParent(DomainItem value) { this.Parent = value; return this; }
        public Address getAddress() { return Address; }
        public Team setAddress(Address value) { this.Address = value; return this; }
        public HashMap<String,String> getData() { return Data; }
        public Team setData(HashMap<String,String> value) { this.Data = value; return this; }
        public ArrayList<String> getTeams() { return Teams; }
        public Team setTeams(ArrayList<String> value) { this.Teams = value; return this; }
        public ArrayList<EventItem> getEvents() { return Events; }
        public Team setEvents(ArrayList<EventItem> value) { this.Events = value; return this; }
        public String getCreatedBy() { return CreatedBy; }
        public Team setCreatedBy(String value) { this.CreatedBy = value; return this; }
        public HashMap<String,Object> getActiveLaborTypes() { return ActiveLaborTypes; }
        public Team setActiveLaborTypes(HashMap<String,Object> value) { this.ActiveLaborTypes = value; return this; }
    }

    public static class DomainItem
    {
        public String Workspace = null;
        public String ObjectId = null;
        public String VersionId = null;
        public String LastUpdated = null;
        
        public String getWorkspace() { return Workspace; }
        public DomainItem setWorkspace(String value) { this.Workspace = value; return this; }
        public String getObjectId() { return ObjectId; }
        public DomainItem setObjectId(String value) { this.ObjectId = value; return this; }
        public String getVersionId() { return VersionId; }
        public DomainItem setVersionId(String value) { this.VersionId = value; return this; }
        public String getLastUpdated() { return LastUpdated; }
        public DomainItem setLastUpdated(String value) { this.LastUpdated = value; return this; }
    }

    public static class Address
    {
        public String Street = null;
        public String Unit = null;
        public String City = null;
        public String State = null;
        public String Zip = null;
        public String ContactTitle = null;
        public String ContactName = null;
        public String ContactPhone = null;
        public String ContactEmail = null;
        public Location Location = null;
        public String SiteName = null;
        public Boolean GeocodeFailed = null;
        public String Country = null;
        
        public String getStreet() { return Street; }
        public Address setStreet(String value) { this.Street = value; return this; }
        public String getUnit() { return Unit; }
        public Address setUnit(String value) { this.Unit = value; return this; }
        public String getCity() { return City; }
        public Address setCity(String value) { this.City = value; return this; }
        public String getState() { return State; }
        public Address setState(String value) { this.State = value; return this; }
        public String getZip() { return Zip; }
        public Address setZip(String value) { this.Zip = value; return this; }
        public String getContactTitle() { return ContactTitle; }
        public Address setContactTitle(String value) { this.ContactTitle = value; return this; }
        public String getContactName() { return ContactName; }
        public Address setContactName(String value) { this.ContactName = value; return this; }
        public String getContactPhone() { return ContactPhone; }
        public Address setContactPhone(String value) { this.ContactPhone = value; return this; }
        public String getContactEmail() { return ContactEmail; }
        public Address setContactEmail(String value) { this.ContactEmail = value; return this; }
        public Location getLocation() { return Location; }
        public Address setLocation(Location value) { this.Location = value; return this; }
        public String getSiteName() { return SiteName; }
        public Address setSiteName(String value) { this.SiteName = value; return this; }
        public Boolean isGeocodeFailed() { return GeocodeFailed; }
        public Address setGeocodeFailed(Boolean value) { this.GeocodeFailed = value; return this; }
        public String getCountry() { return Country; }
        public Address setCountry(String value) { this.Country = value; return this; }
    }

    public static class Location
    {
        public Double y = null;
        public Double x = null;
        
        public Double getY() { return y; }
        public Location setY(Double value) { this.y = value; return this; }
        public Double getX() { return x; }
        public Location setX(Double value) { this.x = value; return this; }
    }

    public static class EventItem
    {
        public String ObjectId = null;
        public String Date = null;
        public Location Location = null;
        public String Barcode = null;
        public String Details = null;
        public String Type = null;
        public Boolean IsScan = null;
        public String User = null;
        public String SelectedBy = null;
        public String Status = null;
        public String StatusType = null;
        public String DateCreated = null;
        public Boolean Automatic = null;
        
        public String getObjectId() { return ObjectId; }
        public EventItem setObjectId(String value) { this.ObjectId = value; return this; }
        public String getDate() { return Date; }
        public EventItem setDate(String value) { this.Date = value; return this; }
        public Location getLocation() { return Location; }
        public EventItem setLocation(Location value) { this.Location = value; return this; }
        public String getBarcode() { return Barcode; }
        public EventItem setBarcode(String value) { this.Barcode = value; return this; }
        public String getDetails() { return Details; }
        public EventItem setDetails(String value) { this.Details = value; return this; }
        public String getType() { return Type; }
        public EventItem setType(String value) { this.Type = value; return this; }
        public Boolean getIsScan() { return IsScan; }
        public EventItem setIsScan(Boolean value) { this.IsScan = value; return this; }
        public String getUser() { return User; }
        public EventItem setUser(String value) { this.User = value; return this; }
        public String getSelectedBy() { return SelectedBy; }
        public EventItem setSelectedBy(String value) { this.SelectedBy = value; return this; }
        public String getStatus() { return Status; }
        public EventItem setStatus(String value) { this.Status = value; return this; }
        public String getStatusType() { return StatusType; }
        public EventItem setStatusType(String value) { this.StatusType = value; return this; }
        public String getDateCreated() { return DateCreated; }
        public EventItem setDateCreated(String value) { this.DateCreated = value; return this; }
        public Boolean isAutomatic() { return Automatic; }
        public EventItem setAutomatic(Boolean value) { this.Automatic = value; return this; }
    }

}

Java Team 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}/Team/{ObjectId} HTTP/1.1 
Host: dev.fieldsquared.com 
Accept: text/csv
Content-Type: text/csv
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":{}}}