POST | /searches/list | Get all sanctions searches |
---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
@ApiResponse(Description="Your request is successful if the \"<em>Data.ResponseStatus.Message</em>\" field is \"<b>Success</b>\".", StatusCode=200)
@DataContract
public static class GetListSearches implements IBaseRequest
{
@DataMember
public Authentication Authentication = null;
@DataMember
public Integer Page = null;
@DataMember
public String SortOrder = null;
@DataMember
public String NameSearch = null;
public Authentication getAuthentication() { return Authentication; }
public GetListSearches setAuthentication(Authentication value) { this.Authentication = value; return this; }
public Integer getPage() { return Page; }
public GetListSearches setPage(Integer value) { this.Page = value; return this; }
public String getSortOrder() { return SortOrder; }
public GetListSearches setSortOrder(String value) { this.SortOrder = value; return this; }
public String getNameSearch() { return NameSearch; }
public GetListSearches setNameSearch(String value) { this.NameSearch = value; return this; }
}
@DataContract
public static class Authentication implements IAuthentication
{
/**
* The API User ID that will authenticate your request
*/
@DataMember
@ApiMember(DataType="string", Description="The API User ID that will authenticate your request", IsRequired=true)
public String ApiUserId = null;
/**
* The API User Key that will authenticate your request
*/
@DataMember
@ApiMember(DataType="string", Description="The API User Key that will authenticate your request", IsRequired=true)
public String ApiUserKey = null;
public String getApiUserId() { return ApiUserId; }
public Authentication setApiUserId(String value) { this.ApiUserId = value; return this; }
public String getApiUserKey() { return ApiUserKey; }
public Authentication setApiUserKey(String value) { this.ApiUserKey = value; return this; }
}
@DataContract
public static class GetListSearchesResponse
{
@DataMember
public GetListSearchesData Data = null;
public GetListSearchesData getData() { return Data; }
public GetListSearchesResponse setData(GetListSearchesData value) { this.Data = value; return this; }
}
@DataContract
public static class GetListSearchesData implements IBaseDataResponse, IHasResponseStatus
{
@DataMember
public ResponseStatus ResponseStatus = null;
@DataMember
public Integer TotalSearchRecords = null;
@DataMember
public Integer CurrentPageNum = null;
@DataMember
public Integer MaxPageNum = null;
@DataMember
public ArrayOfSearchListItem SearchRecords = null;
public ResponseStatus getResponseStatus() { return ResponseStatus; }
public GetListSearchesData setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
public Integer getTotalSearchRecords() { return TotalSearchRecords; }
public GetListSearchesData setTotalSearchRecords(Integer value) { this.TotalSearchRecords = value; return this; }
public Integer getCurrentPageNum() { return CurrentPageNum; }
public GetListSearchesData setCurrentPageNum(Integer value) { this.CurrentPageNum = value; return this; }
public Integer getMaxPageNum() { return MaxPageNum; }
public GetListSearchesData setMaxPageNum(Integer value) { this.MaxPageNum = value; return this; }
public ArrayOfSearchListItem getSearchRecords() { return SearchRecords; }
public GetListSearchesData setSearchRecords(ArrayOfSearchListItem value) { this.SearchRecords = value; return this; }
}
public static class ArrayOfResponseError extends ArrayList<ResponseError>
{
}
public static class ArrayOfSearchListItem extends ArrayList<SearchListItem>
{
}
public static class SearchListItem
{
public Long Id = null;
public String SearchType = null;
public Date DateSearched = null;
public Date DateUpdated = null;
public Integer NumOfResults = null;
public Boolean ClientInResults = null;
public Boolean ClientNotInResults = null;
public Boolean AffectedByUpdate = null;
public SearchCriteria SearchCriteria = null;
public Long getId() { return Id; }
public SearchListItem setId(Long value) { this.Id = value; return this; }
public String getSearchType() { return SearchType; }
public SearchListItem setSearchType(String value) { this.SearchType = value; return this; }
public Date getDateSearched() { return DateSearched; }
public SearchListItem setDateSearched(Date value) { this.DateSearched = value; return this; }
public Date getDateUpdated() { return DateUpdated; }
public SearchListItem setDateUpdated(Date value) { this.DateUpdated = value; return this; }
public Integer getNumOfResults() { return NumOfResults; }
public SearchListItem setNumOfResults(Integer value) { this.NumOfResults = value; return this; }
public Boolean isClientInResults() { return ClientInResults; }
public SearchListItem setClientInResults(Boolean value) { this.ClientInResults = value; return this; }
public Boolean isClientNotInResults() { return ClientNotInResults; }
public SearchListItem setClientNotInResults(Boolean value) { this.ClientNotInResults = value; return this; }
public Boolean isAffectedByUpdate() { return AffectedByUpdate; }
public SearchListItem setAffectedByUpdate(Boolean value) { this.AffectedByUpdate = value; return this; }
public SearchCriteria getSearchCriteria() { return SearchCriteria; }
public SearchListItem setSearchCriteria(SearchCriteria value) { this.SearchCriteria = value; return this; }
}
public static class SearchCriteria
{
public String Name = null;
public String DateOfBirth = null;
public String CountryOfBirth = null;
public String Nationality = null;
public String Address = null;
public String getName() { return Name; }
public SearchCriteria setName(String value) { this.Name = value; return this; }
public String getDateOfBirth() { return DateOfBirth; }
public SearchCriteria setDateOfBirth(String value) { this.DateOfBirth = value; return this; }
public String getCountryOfBirth() { return CountryOfBirth; }
public SearchCriteria setCountryOfBirth(String value) { this.CountryOfBirth = value; return this; }
public String getNationality() { return Nationality; }
public SearchCriteria setNationality(String value) { this.Nationality = value; return this; }
public String getAddress() { return Address; }
public SearchCriteria setAddress(String value) { this.Address = value; return this; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /searches/list HTTP/1.1
Host: api.sanctionssearch.com
Accept: application/json
Content-Type: application/json
Content-Length: length
{"Authentication":{"ApiUserId":"String","ApiUserKey":"String"},"Page":0,"SortOrder":"String","NameSearch":"String"}
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length {"Data":{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String"}]},"TotalSearchRecords":0,"CurrentPageNum":0,"MaxPageNum":0,"SearchRecords":[{"Id":0,"SearchType":"String","DateSearched":"\/Date(-62135596800000-0000)\/","DateUpdated":"\/Date(-62135596800000-0000)\/","NumOfResults":0,"ClientInResults":false,"ClientNotInResults":false,"AffectedByUpdate":false,"SearchCriteria":{"Name":"String","DateOfBirth":"String","CountryOfBirth":"String","Nationality":"String","Address":"String"}}]}}