Cochrane+ App API

<back to all web services

UserLogin

The following routes are available for this service:
POST/user/login
import java.math.*;
import java.util.*;
import net.servicestack.client.*;

public class dtos
{

    public static class UserLogin extends ApiServiceRequest
    {
        public String username = null;
        public String password = null;
        public Integer utcOffset = null;
        
        public String getUsername() { return username; }
        public UserLogin setUsername(String value) { this.username = value; return this; }
        public String getPassword() { return password; }
        public UserLogin setPassword(String value) { this.password = value; return this; }
        public Integer getUtcOffset() { return utcOffset; }
        public UserLogin setUtcOffset(Integer value) { this.utcOffset = value; return this; }
    }

    public static class ApiServiceRequest implements IServiceRequest, IHasApiKey, IHasDeviceInfo
    {
        /**
        * The API Key required for authentication
        */
        @ApiMember(DataType="string", Description="The API Key required for authentication", IsRequired=true)
        public String apiKey = null;

        /**
        * Latitude of the user making this request
        */
        @ApiMember(DataType="double", Description="Latitude of the user making this request")
        public Double latitude = null;

        /**
        * Longitude of the user making this request
        */
        @ApiMember(DataType="double", Description="Longitude of the user making this request")
        public Double longitude = null;
        
        public String getApiKey() { return apiKey; }
        public ApiServiceRequest setApiKey(String value) { this.apiKey = value; return this; }
        public Double getLatitude() { return latitude; }
        public ApiServiceRequest setLatitude(Double value) { this.latitude = value; return this; }
        public Double getLongitude() { return longitude; }
        public ApiServiceRequest setLongitude(Double value) { this.longitude = value; return this; }
    }

    public static class UserLoginResponse extends ApiServiceResponse
    {
        public Boolean allowAttendanceOnLaptop = null;
        public String profileImageUrl = null;
        public String friendlyName = null;
        public Integer systemUserId = null;
        public String username = null;
        public SystemUserPermission permissions = null;
        public AppSettings settings = null;
        public Double startLatitude = null;
        public Double startLongitude = null;
        public Boolean hasStartLocation = null;
        public Double endLatitude = null;
        public Double endLongitude = null;
        public Boolean hasEndLocation = null;
        public Boolean isSalesPerson = null;
        public ArrayList<String> feelingStatusMappings = null;
        public Boolean hasAiPermissions = null;
        public String refreshToken = null;
        public Boolean isManagerOrPromotedTo = null;
        public Boolean isTemplateApprover = null;
        public Integer outstandingApprovals = null;
        
        public Boolean isAllowAttendanceOnLaptop() { return allowAttendanceOnLaptop; }
        public UserLoginResponse setAllowAttendanceOnLaptop(Boolean value) { this.allowAttendanceOnLaptop = value; return this; }
        public String getProfileImageUrl() { return profileImageUrl; }
        public UserLoginResponse setProfileImageUrl(String value) { this.profileImageUrl = value; return this; }
        public String getFriendlyName() { return friendlyName; }
        public UserLoginResponse setFriendlyName(String value) { this.friendlyName = value; return this; }
        public Integer getSystemUserId() { return systemUserId; }
        public UserLoginResponse setSystemUserId(Integer value) { this.systemUserId = value; return this; }
        public String getUsername() { return username; }
        public UserLoginResponse setUsername(String value) { this.username = value; return this; }
        public SystemUserPermission getPermissions() { return permissions; }
        public UserLoginResponse setPermissions(SystemUserPermission value) { this.permissions = value; return this; }
        public AppSettings getSettings() { return settings; }
        public UserLoginResponse setSettings(AppSettings value) { this.settings = value; return this; }
        public Double getStartLatitude() { return startLatitude; }
        public UserLoginResponse setStartLatitude(Double value) { this.startLatitude = value; return this; }
        public Double getStartLongitude() { return startLongitude; }
        public UserLoginResponse setStartLongitude(Double value) { this.startLongitude = value; return this; }
        public Boolean isHasStartLocation() { return hasStartLocation; }
        public UserLoginResponse setHasStartLocation(Boolean value) { this.hasStartLocation = value; return this; }
        public Double getEndLatitude() { return endLatitude; }
        public UserLoginResponse setEndLatitude(Double value) { this.endLatitude = value; return this; }
        public Double getEndLongitude() { return endLongitude; }
        public UserLoginResponse setEndLongitude(Double value) { this.endLongitude = value; return this; }
        public Boolean isHasEndLocation() { return hasEndLocation; }
        public UserLoginResponse setHasEndLocation(Boolean value) { this.hasEndLocation = value; return this; }
        public Boolean getIsSalesPerson() { return isSalesPerson; }
        public UserLoginResponse setIsSalesPerson(Boolean value) { this.isSalesPerson = value; return this; }
        public ArrayList<String> getFeelingStatusMappings() { return feelingStatusMappings; }
        public UserLoginResponse setFeelingStatusMappings(ArrayList<String> value) { this.feelingStatusMappings = value; return this; }
        public Boolean isHasAiPermissions() { return hasAiPermissions; }
        public UserLoginResponse setHasAiPermissions(Boolean value) { this.hasAiPermissions = value; return this; }
        public String getRefreshToken() { return refreshToken; }
        public UserLoginResponse setRefreshToken(String value) { this.refreshToken = value; return this; }
        public Boolean getIsManagerOrPromotedTo() { return isManagerOrPromotedTo; }
        public UserLoginResponse setIsManagerOrPromotedTo(Boolean value) { this.isManagerOrPromotedTo = value; return this; }
        public Boolean getIsTemplateApprover() { return isTemplateApprover; }
        public UserLoginResponse setIsTemplateApprover(Boolean value) { this.isTemplateApprover = value; return this; }
        public Integer getOutstandingApprovals() { return outstandingApprovals; }
        public UserLoginResponse setOutstandingApprovals(Integer value) { this.outstandingApprovals = value; return this; }
    }

    public static class ApiServiceResponse implements IServiceResponse
    {
        public String description = null;
        public String heading = null;
        public Boolean wasSuccessful = null;
        public Object modelState = null;
        
        public String getDescription() { return description; }
        public ApiServiceResponse setDescription(String value) { this.description = value; return this; }
        public String getHeading() { return heading; }
        public ApiServiceResponse setHeading(String value) { this.heading = value; return this; }
        public Boolean isWasSuccessful() { return wasSuccessful; }
        public ApiServiceResponse setWasSuccessful(Boolean value) { this.wasSuccessful = value; return this; }
        public Object getModelState() { return modelState; }
        public ApiServiceResponse setModelState(Object value) { this.modelState = value; return this; }
    }

    public static class SystemUserPermission
    {
        public Boolean meeting = null;
        public Boolean journey = null;
        public Boolean attendance = null;
        public Boolean notificationCenter = null;
        public Boolean internalRating = null;
        public Boolean debrief = null;
        public Boolean thunderBoltActions = null;
        public Boolean onTheMove = null;
        
        public Boolean isMeeting() { return meeting; }
        public SystemUserPermission setMeeting(Boolean value) { this.meeting = value; return this; }
        public Boolean isJourney() { return journey; }
        public SystemUserPermission setJourney(Boolean value) { this.journey = value; return this; }
        public Boolean isAttendance() { return attendance; }
        public SystemUserPermission setAttendance(Boolean value) { this.attendance = value; return this; }
        public Boolean isNotificationCenter() { return notificationCenter; }
        public SystemUserPermission setNotificationCenter(Boolean value) { this.notificationCenter = value; return this; }
        public Boolean isInternalRating() { return internalRating; }
        public SystemUserPermission setInternalRating(Boolean value) { this.internalRating = value; return this; }
        public Boolean isDebrief() { return debrief; }
        public SystemUserPermission setDebrief(Boolean value) { this.debrief = value; return this; }
        public Boolean isThunderBoltActions() { return thunderBoltActions; }
        public SystemUserPermission setThunderBoltActions(Boolean value) { this.thunderBoltActions = value; return this; }
        public Boolean isOnTheMove() { return onTheMove; }
        public SystemUserPermission setOnTheMove(Boolean value) { this.onTheMove = value; return this; }
    }

    public static class AppSettings
    {
        public Boolean allowAbstainRatings = null;
        public Boolean showMoodIndicatorOnApp = null;
        public Boolean takePhotoForAnalysis = null;
        
        public Boolean isAllowAbstainRatings() { return allowAbstainRatings; }
        public AppSettings setAllowAbstainRatings(Boolean value) { this.allowAbstainRatings = value; return this; }
        public Boolean isShowMoodIndicatorOnApp() { return showMoodIndicatorOnApp; }
        public AppSettings setShowMoodIndicatorOnApp(Boolean value) { this.showMoodIndicatorOnApp = value; return this; }
        public Boolean isTakePhotoForAnalysis() { return takePhotoForAnalysis; }
        public AppSettings setTakePhotoForAnalysis(Boolean value) { this.takePhotoForAnalysis = value; return this; }
    }

}

Java UserLogin 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 /user/login HTTP/1.1 
Host: cochraneplus-api-dev.happen.zone 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"username":"String","password":"String","utcOffset":0,"apiKey":"String","latitude":0,"longitude":0}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"allowAttendanceOnLaptop":false,"profileImageUrl":"String","friendlyName":"String","systemUserId":0,"username":"String","permissions":{"meeting":false,"journey":false,"attendance":false,"notificationCenter":false,"internalRating":false,"debrief":false,"thunderBoltActions":false,"onTheMove":false},"settings":{"allowAbstainRatings":false,"showMoodIndicatorOnApp":false,"takePhotoForAnalysis":false},"startLatitude":0,"startLongitude":0,"hasStartLocation":false,"endLatitude":0,"endLongitude":0,"hasEndLocation":false,"isSalesPerson":false,"feelingStatusMappings":["String"],"hasAiPermissions":false,"refreshToken":"String","isManagerOrPromotedTo":false,"isTemplateApprover":false,"outstandingApprovals":0,"description":"String","heading":"String","wasSuccessful":false,"modelState":{}}