POST | /documents |
---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class PostDocumentReq
{
public String reference = null;
public String languageIsoCode = null;
public String countryIsoCode = null;
public String clientUri = null;
public AuthenticationMethodType authenticationMethodType = null;
public UUID employeeGuid = null;
public String getReference() { return reference; }
public PostDocumentReq setReference(String value) { this.reference = value; return this; }
public String getLanguageIsoCode() { return languageIsoCode; }
public PostDocumentReq setLanguageIsoCode(String value) { this.languageIsoCode = value; return this; }
public String getCountryIsoCode() { return countryIsoCode; }
public PostDocumentReq setCountryIsoCode(String value) { this.countryIsoCode = value; return this; }
public String getClientUri() { return clientUri; }
public PostDocumentReq setClientUri(String value) { this.clientUri = value; return this; }
public AuthenticationMethodType getAuthenticationMethodType() { return authenticationMethodType; }
public PostDocumentReq setAuthenticationMethodType(AuthenticationMethodType value) { this.authenticationMethodType = value; return this; }
public UUID getEmployeeGuid() { return employeeGuid; }
public PostDocumentReq setEmployeeGuid(UUID value) { this.employeeGuid = value; return this; }
}
public static enum AuthenticationMethodType
{
NemId,
Sso,
Common,
Single;
}
public static class Members
{
public String homeUrl = null;
public Boolean success = null;
public Boolean isPensionSight = null;
public String getHomeUrl() { return homeUrl; }
public Members setHomeUrl(String value) { this.homeUrl = value; return this; }
public Boolean isSuccess() { return success; }
public Members setSuccess(Boolean value) { this.success = value; return this; }
public Boolean getIsPensionSight() { return isPensionSight; }
public Members setIsPensionSight(Boolean value) { this.isPensionSight = value; return this; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /documents HTTP/1.1
Host: hcbtas-q-albamfs-api.azurewebsites.net
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<PostDocumentReq xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AlbaApi.ServiceModel">
<AuthenticationMethodType>NemId</AuthenticationMethodType>
<ClientUri>String</ClientUri>
<CountryIsoCode>String</CountryIsoCode>
<EmployeeGuid>00000000-0000-0000-0000-000000000000</EmployeeGuid>
<LanguageIsoCode>String</LanguageIsoCode>
<Reference>String</Reference>
</PostDocumentReq>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <Members xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AlbaApi.Model"> <HomeUrl>String</HomeUrl> <IsPensionSight>false</IsPensionSight> <Success>false</Success> </Members>