Insure Guard App API

<back to all web services

AutoLogin

using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using WebService.ServiceModel;
using WebService.ServiceModel.Base;

namespace WebService.ServiceModel
{
    public partial class AutoLogin
        : ApiServiceRequest
    {
        public virtual int UtcOffset { get; set; }
        public virtual int SystemUserId { get; set; }
        public virtual string RefreshToken { get; set; }
    }

    public partial class AutoLoginResponse
        : ApiServiceResponse
    {
        public virtual LoginData Data { get; set; }
    }

    public partial class ClientData
    {
        public virtual string FirstName { get; set; }
        public virtual string Surname { get; set; }
        public virtual string Email { get; set; }
        public virtual string MobileNumber { get; set; }
        public virtual string Address1 { get; set; }
        public virtual string Address2 { get; set; }
        public virtual string City { get; set; }
        public virtual string DateOfBirth { get; set; }
        public virtual string SourceOfIncome { get; set; }
    }

    public partial class LoginData
    {
        public virtual int SystemUserId { get; set; }
        public virtual string RefreshToken { get; set; }
        public virtual bool HasActivePanicCover { get; set; }
        public virtual bool AccountInArrears { get; set; }
        public virtual bool UpdateClientInformation { get; set; }
        public virtual string NextPanicDate { get; set; }
        public virtual string PanicReference { get; set; }
        public virtual ClientData ClientData { get; set; }
    }

}

namespace WebService.ServiceModel.Base
{
    public partial class ApiServiceRequest
        : IServiceRequest, IHasApiKey, IHasDeviceInfo
    {
        ///<summary>
        ///The API Key required for authentication
        ///</summary>
        [ApiMember(DataType="string", Description="The API Key required for authentication", IsRequired=true)]
        public virtual string ApiKey { get; set; }

        ///<summary>
        ///Latitude of the user making this request
        ///</summary>
        [ApiMember(DataType="double", Description="Latitude of the user making this request")]
        public virtual double Latitude { get; set; }

        ///<summary>
        ///Longitude of the user making this request
        ///</summary>
        [ApiMember(DataType="double", Description="Longitude of the user making this request")]
        public virtual double Longitude { get; set; }
    }

    public partial class ApiServiceResponse
        : IServiceResponse
    {
        ///<summary>
        ///Information about the response.
        ///</summary>
        [ApiMember(Description="Information about the response.", IsRequired=true)]
        public virtual string Description { get; set; }

        ///<summary>
        ///Heading or summary of the response.
        ///</summary>
        [ApiMember(Description="Heading or summary of the response.", IsRequired=true)]
        public virtual string Heading { get; set; }

        ///<summary>
        ///Did the intended operation for this response complete successfully?
        ///</summary>
        [ApiMember(DataType="boolean", Description="Did the intended operation for this response complete successfully?", IsRequired=true)]
        public virtual bool WasSuccessful { get; set; }

        public virtual ResponseStatus ResponseStatus { get; set; }
    }

}

C# AutoLogin DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

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

POST /jsv/reply/AutoLogin HTTP/1.1 
Host: legalguard-api-dev.happen.zone 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	utcOffset: 0,
	systemUserId: 0,
	refreshToken: String,
	apiKey: String,
	latitude: 0,
	longitude: 0
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	data: 
	{
		systemUserId: 0,
		refreshToken: String,
		hasActivePanicCover: False,
		accountInArrears: False,
		updateClientInformation: False,
		nextPanicDate: String,
		panicReference: String,
		clientData: 
		{
			firstName: String,
			surname: String,
			email: String,
			mobileNumber: String,
			address1: String,
			address2: String,
			city: String,
			dateOfBirth: String,
			sourceOfIncome: String
		}
	},
	description: String,
	heading: String,
	wasSuccessful: False,
	responseStatus: 
	{
		errorCode: String,
		message: String,
		stackTrace: String,
		errors: 
		[
			{
				errorCode: String,
				fieldName: String,
				message: String,
				meta: 
				{
					String: String
				}
			}
		],
		meta: 
		{
			String: String
		}
	}
}