POST | /authentication/login |
---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class AuthenticationLoginCreate implements IPost
{
public String login = null;
public String password = null;
public String agentId = null;
public String getLogin() { return login; }
public AuthenticationLoginCreate setLogin(String value) { this.login = value; return this; }
public String getPassword() { return password; }
public AuthenticationLoginCreate setPassword(String value) { this.password = value; return this; }
public String getAgentId() { return agentId; }
public AuthenticationLoginCreate setAgentId(String value) { this.agentId = value; return this; }
}
public static class AuthenticationLoginCreateResponse
{
public ResponseStatus responseStatus = null;
public String accessToken = null;
public String refreshToken = null;
public Date timestamp = null;
public BigDecimal beeNumber = null;
public ResponseStatus getResponseStatus() { return responseStatus; }
public AuthenticationLoginCreateResponse setResponseStatus(ResponseStatus value) { this.responseStatus = value; return this; }
public String getAccessToken() { return accessToken; }
public AuthenticationLoginCreateResponse setAccessToken(String value) { this.accessToken = value; return this; }
public String getRefreshToken() { return refreshToken; }
public AuthenticationLoginCreateResponse setRefreshToken(String value) { this.refreshToken = value; return this; }
public Date getTimestamp() { return timestamp; }
public AuthenticationLoginCreateResponse setTimestamp(Date value) { this.timestamp = value; return this; }
public BigDecimal getBeeNumber() { return beeNumber; }
public AuthenticationLoginCreateResponse setBeeNumber(BigDecimal value) { this.beeNumber = value; return this; }
}
}
Java AuthenticationLoginCreate DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /authentication/login HTTP/1.1
Host: extensions.avon.ca
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"login":"String","password":"String","agentId":"String"}
HTTP/1.1 200 OK Content-Type: text/csv Content-Length: length {"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}},"accessToken":"String","refreshToken":"String","timestamp":"0001-01-01T00:00:00.0000000","beeNumber":0}