Field Squared API Services

<back to all web services

UserLocation

Service representing a UserLocation in a workspace.

The following routes are available for this service:
POST/{Workspace}/UserLocation/{ObjectId}
import java.math.*;
import java.util.*;
import net.servicestack.client.*;

public class dtos
{

    /**
    * Service representing a UserLocation in a workspace.
    */
    public static class UserLocation extends Location
    {
        public String Workspace = null;
        public String ObjectId = null;
        public String VersionId = null;
        public String BasedOn = null;
        public UserStatus UserStatus = null;
        
        public String getWorkspace() { return Workspace; }
        public UserLocation setWorkspace(String value) { this.Workspace = value; return this; }
        public String getObjectId() { return ObjectId; }
        public UserLocation setObjectId(String value) { this.ObjectId = value; return this; }
        public String getVersionId() { return VersionId; }
        public UserLocation setVersionId(String value) { this.VersionId = value; return this; }
        public String getBasedOn() { return BasedOn; }
        public UserLocation setBasedOn(String value) { this.BasedOn = value; return this; }
        public UserStatus getUserStatus() { return UserStatus; }
        public UserLocation setUserStatus(UserStatus value) { this.UserStatus = 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 enum UserStatus
    {
        NotStarted,
        Driving,
        InProgress,
        Complete,
        Blocked;
    }

}

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

<UserLocation xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Field2Office.API.Model.Users">
  <x xmlns="http://schemas.datacontract.org/2004/07/Field2Office.API.Model">0</x>
  <y xmlns="http://schemas.datacontract.org/2004/07/Field2Office.API.Model">0</y>
  <BasedOn>String</BasedOn>
  <ObjectId>String</ObjectId>
  <UserStatus>NotStarted</UserStatus>
  <VersionId>String</VersionId>
  <Workspace>String</Workspace>
</UserLocation>