Field Squared API Services

<back to all web services

Authentication

The following routes are available for this service:
POST/Authentication
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using Field2Office.API.Model.Authentication;

namespace Field2Office.API.Model.Authentication
{
    public partial class Authentication
    {
        public virtual string Email { get; set; }
        public virtual string Password { get; set; }
        public virtual string Code { get; set; }
        public virtual Object SubscriptionObject { get; set; }
        public virtual string DeviceId { get; set; }
    }

    public partial class AuthenticationResponse
    {
        public AuthenticationResponse()
        {
            Teams = new List<string>{};
        }

        public virtual string AuthToken { get; set; }
        public virtual string Workspace { get; set; }
        public virtual string UserId { get; set; }
        public virtual List<string> Teams { get; set; }
        public virtual int MobileTaskRangePast { get; set; }
        public virtual int MobileTaskRangeFuture { get; set; }
        public virtual string RetainCustomerDatabase { get; set; }
        public virtual string RetainAssetDatabase { get; set; }
        public virtual string UserType { get; set; }
    }

}

C# Authentication 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 /Authentication HTTP/1.1 
Host: dev.fieldsquared.com 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"Email":"String","Password":"String","Code":"String","SubscriptionObject":{},"DeviceId":"String"}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"AuthToken":"String","Workspace":"String","UserId":"String","Teams":["String"],"MobileTaskRangePast":0,"MobileTaskRangeFuture":0,"RetainCustomerDatabase":"String","RetainAssetDatabase":"String","UserType":"String"}